OpenWrt Forum Archive

Topic: serdisplib with libusb support?

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello Dev's!

I'm really new to OpenWrt and package building. Currently I'm trying to build serdisplib on a Debian Squeeze system with libusb support (to use a Megtron-LCD with lcd4linux) for my new Netgear WNDR3800.

I checked out OpenWrt Backfire (10.03.1) via SVN, selected the entries in menuconfig and built the toolchain and all dependencies. I modified the Makefile for serdisplib like that:

  DEPENDS:=+libusb

[...]

CONFIGURE_ARGS+= \
    --enable-shared \
    --enable-static \
    --enable-libusb \

If I try to {clean,compile} serdisplib I get this error:

[...]

serdisplib version: 1.97.9



supported extra libraries
=========================
 * libusb support            ... yes
 * libSDL support            ... disabled
 * libgd >= 2 support        ... no


enabled(+) / disabled(-) drivers
================================
 + sed153x, pcd8544, sed156x, i2c, t6963, sed133x, nokcol, ks0108, lh155, ssdoled, l4m, goldelox, stv8105, acoolsdcm, lc7981
 - directgfx


tools
=====
 * multidisplay              ... no    (because of missing libgd)

[...]

make[4]: Entering directory `/home/KB19/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/serdisplib-1.97.9/src'
mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float -fpic -Wall -Wno-implicit -I../include -I..  -c serdisp_fctptr.c
In file included from serdisp_fctptr.c:35:
../include/serdisplib/serdisp_fctptr.h:65:18: error: usb.h: No such file or directory
In file included from serdisp_fctptr.c:35:
../include/serdisplib/serdisp_fctptr.h:68: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
../include/serdisplib/serdisp_fctptr.h:69: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:70: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:71: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:72: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:76: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:78: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:79: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:80: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:82: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:84: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:85: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:86: error: expected ')' before '*' token
../include/serdisplib/serdisp_fctptr.h:88: error: expected ')' before '*' token
serdisp_fctptr.c:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
serdisp_fctptr.c:51: error: expected ')' before '*' token
serdisp_fctptr.c:52: error: expected ')' before '*' token
serdisp_fctptr.c:53: error: expected ')' before '*' token
serdisp_fctptr.c:54: error: expected ')' before '*' token
serdisp_fctptr.c:58: error: expected ')' before '*' token
serdisp_fctptr.c:60: error: expected ')' before '*' token
serdisp_fctptr.c:61: error: expected ')' before '*' token
serdisp_fctptr.c:62: error: expected ')' before '*' token
serdisp_fctptr.c:64: error: expected ')' before '*' token
serdisp_fctptr.c:66: error: expected ')' before '*' token
serdisp_fctptr.c:67: error: expected ')' before '*' token
serdisp_fctptr.c:68: error: expected ')' before '*' token
serdisp_fctptr.c:70: error: expected ')' before '*' token
serdisp_fctptr.c: In function 'SDFCTPTR_init':
serdisp_fctptr.c:110: error: 'usb_init' undeclared (first use in this function)
serdisp_fctptr.c:110: error: (Each undeclared identifier is reported only once
serdisp_fctptr.c:110: error: for each function it appears in.)
serdisp_fctptr.c:111: error: 'fp_usb_open' undeclared (first use in this function)
serdisp_fctptr.c:111: error: 'usb_open' undeclared (first use in this function)
serdisp_fctptr.c:112: error: 'fp_usb_close' undeclared (first use in this function)
serdisp_fctptr.c:112: error: 'usb_close' undeclared (first use in this function)
serdisp_fctptr.c:113: error: 'fp_usb_reset' undeclared (first use in this function)
serdisp_fctptr.c:113: error: 'usb_reset' undeclared (first use in this function)
serdisp_fctptr.c:114: error: 'fp_usb_interrupt_read' undeclared (first use in this function)
serdisp_fctptr.c:114: error: 'usb_interrupt_read' undeclared (first use in this function)
serdisp_fctptr.c:115: error: 'fp_usb_release_interface' undeclared (first use in this function)
serdisp_fctptr.c:115: error: 'usb_release_interface' undeclared (first use in this function)
serdisp_fctptr.c:116: error: 'usb_find_busses' undeclared (first use in this function)
serdisp_fctptr.c:117: error: 'usb_find_devices' undeclared (first use in this function)
serdisp_fctptr.c:118: error: 'usb_get_busses' undeclared (first use in this function)
serdisp_fctptr.c:119: error: 'fp_usb_claim_interface' undeclared (first use in this function)
serdisp_fctptr.c:119: error: 'usb_claim_interface' undeclared (first use in this function)
serdisp_fctptr.c:121: error: 'fp_usb_bulk_read' undeclared (first use in this function)
serdisp_fctptr.c:121: error: 'usb_bulk_read' undeclared (first use in this function)
serdisp_fctptr.c:122: error: 'fp_usb_bulk_write' undeclared (first use in this function)
serdisp_fctptr.c:122: error: 'usb_bulk_write' undeclared (first use in this function)
serdisp_fctptr.c:123: error: 'fp_usb_control_msg' undeclared (first use in this function)
serdisp_fctptr.c:123: error: 'usb_control_msg' undeclared (first use in this function)
serdisp_fctptr.c:124: error: 'fp_usb_clear_halt' undeclared (first use in this function)
serdisp_fctptr.c:124: error: 'usb_clear_halt' undeclared (first use in this function)
serdisp_fctptr.c:126: error: 'fp_usb_set_altinterface' undeclared (first use in this function)
serdisp_fctptr.c:126: error: 'usb_set_altinterface' undeclared (first use in this function)
serdisp_fctptr.c:127: error: 'fp_usb_set_configuration' undeclared (first use in this function)
serdisp_fctptr.c:127: error: 'usb_set_configuration' undeclared (first use in this function)
serdisp_fctptr.c:128: error: 'fp_usb_get_string_simple' undeclared (first use in this function)
serdisp_fctptr.c:128: error: 'usb_get_string_simple' undeclared (first use in this function)
serdisp_fctptr.c:133: error: 'fp_usb_detach_kernel_driver_np' undeclared (first use in this function)
make[4]: *** [serdisp_fctptr.o] Error 1
make[4]: Leaving directory `/home/KB19/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/serdisplib-1.97.9/src'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/home/KB19/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/serdisplib-1.97.9'
make[2]: *** [/home/KB19/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/serdisplib-1.97.9/.built] Error 2
make[2]: Leaving directory `/home/KB19/openwrt/backfire/feeds/packages/libs/serdisplib'
make[1]: *** [package/feeds/packages/serdisplib/compile] Error 2
make[1]: Leaving directory `/home/KB19/openwrt/backfire'
make: *** [package/serdisplib/compile] Error 2

If I try it directly with ./configure --with-libusb && make, it works without errors. But I can't build it for OpenWrt.

What's going wrong? Can someone help me to build serdisplib with libusb support? smile


Regards,
Christian

No ideas? sad *push*

Fixed! I added the global lib path ($(STAGING_DIR)/usr/include) to the build variables like this:

CFLAGS="$(TARGET_CFLAGS) -Wall -Wno-implicit -I../include -I.. -I$(STAGING_DIR)/usr/include" \

libgd is still disabled (don't know why), but libusb works with this change, I already tested it for some minutes at my WNDR3800 with a Megtron-LCD smile

Additionally I append a config item for libusb support. You can find my modified Makefile and new Config.in here: http://www.happytec.at/upload_files/ope … erdisplib/

And here is a ready-to-use binary for OpenWrt Backfire 10.03.1 for ar71xx - it's tagged with a new release number, ready to install with opkg: http://www.happytec.at/upload_files/ope … ar71xx.ipk

There's also an lcd4linux package with enabled serdisplib support (if needed): http://www.happytec.at/upload_files/ope … ar71xx.ipk

Maybe it'll help someone else to use his display at OpenWrt. I don't know if it's done the right way, but it works. It would be great if someone could validate it and send the changes to SVN. Thx.


Regards,
Christian

PS: There's a mirror for all related files -> Froonix Mirror

(Last edited by killerbees19 on 30 Aug 2012, 11:54)

The discussion might have continued from here.