Unable to build custom openwrt

Trying to build openwrt for an AR300M/nand. Fails when running make after make menuconfig with the following:

make[6]: Entering directory ‘/home/rprimrose/gl-inet/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_nand/usbip-2.0/src’
CC usbip.o
CC utils.o
CC usbip_network.o
CC usbip_attach.o
CC usbip_detach.o
CC usbip_list.o
usbip_list.c: In function ‘list_devices’:
usbip_list.c:214:11: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
devpath = udev_device_get_devpath(dev);

How can I get past this problem?

Thanks

GL.iNet source tree or OpenWrt source tree? Which branch?

Edit:

Failure confirmed at

commit 9e5087a242 (HEAD -> glinet-develop)
Author: Lancer <luoyejiang0701@gmail.com>
Date:   Wed May 29 18:02:43 2019 +0800

    01_leds: fix ar300m lan led invalid

logs/package/feeds/packages/usbip/compile.txt contains a hint that the patches need refreshing

Applying ./patches-2.0/100-musl-compat.patch using plaintext: 
patching file src/usbipd.c
Hunk #1 FAILED at 453.
1 out of 1 hunk FAILED -- saving rejects to file src/usbipd.c.rej
Patch failed!  Please fix ./patches-2.0/100-musl-compat.patch!
Makefile:109: recipe for target '/home/jeff/devel/openwrt-glinet-develop/build_dir/target-mips_24kc_musl/linux-ar71xx_nand/usbip-2.0/.prepared_40f1574690c64b48e72c8ca6c677e557_6664517399ebbbc92a37c5bb081b5c53' failed
make[3]: *** [/home/jeff/devel/openwrt-glinet-develop/build_dir/target-mips_24kc_musl/linux-ar71xx_nand/usbip-2.0/.prepared_40f1574690c64b48e72c8ca6c677e557_6664517399ebbbc92a37c5bb081b5c53] Error 1
Command exited with non-zero status 2
time: package/feeds/packages/usbip/compile#0.10#0.03#0.13

Edit:

Builds properly on OpenWrt masterEdit: reported as https://bugs.gl-inet.com/view.php?id=217

kmod-usbip - 4.19.48-1
kmod-usbip-client - 4.19.48-1
kmod-usbip-server - 4.19.48-1

Installed via instructions here: https://github.com/gl-inet/openwrt

Ross

You might try the Makefile from OpenWrt as it doesn’t have any patches at all.

https://git.openwrt.org/?p=feed/packages.git;a=tree;f=net/usbip;h=2d32fa9ca47ceba5cf38b926cedba739cacc1c68;hb=HEAD

I had clone this repo, and build from scratch, I don’t encounter with any error, how can I reproduce it?

image

Select ar71xx, NAND variants, GL-AR300M. Add package usbip and the client and server variants that then are revealed, and build logs, with the resulting seed

CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_nand=y
CONFIG_TARGET_ar71xx_nand_DEVICE_GL-AR300M=y
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
CONFIG_DRIVER_11AC_SUPPORT=y
CONFIG_PACKAGE_ath10k-firmware-qca9887=y
CONFIG_PACKAGE_kmod-ath10k=y
CONFIG_PACKAGE_kmod-usbip=y
CONFIG_PACKAGE_kmod-usbip-client=y
CONFIG_PACKAGE_kmod-usbip-server=y
CONFIG_PACKAGE_libevdev=y
CONFIG_PACKAGE_libudev-fbsd=y
CONFIG_PACKAGE_libwrap=y
CONFIG_PACKAGE_usbip=y
CONFIG_PACKAGE_usbip-client=y
CONFIG_PACKAGE_usbip-server=y

On commit

commit 9e5087a242 (HEAD -> glinet-develop)
Author: Lancer <luoyejiang0701@gmail.com>
Date:   Wed May 29 18:02:43 2019 +0800

    01_leds: fix ar300m lan led invalid
make -j12 clean download world

Fix it, please try it again.

git pull
./scripts/feeds uninstall -a
./scripts/feeds update
./scripts/feeds install -a
1 Like

Builds successfully here, though the OP is @rprimrose

Thanks. That fixed the problem.
Ross

1 Like