1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| apk add build-base autoconf automake libtool eudev-dev linux-headers
wget https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.12.17.tar.gz tar -xzvf linux-6.12.17.tar.gz cp -r linux-6.12.17/tools/usb/usbip/ ~ && cd ~/usbip
sed -i 's,-Wall -Werror -Wextra,,' configure.ac ./autogen.sh
./configure --prefix=$HOME/usbip_build \ --enable-static=yes --enable-shared=no --with-usbids-dir="." \ CFLAGS="-static -no-pie" LDFLAGS="-L/usr/lib" LIBS="-l:libudev.a -l:libc.a"
make V=s && make install
strip src/usbip src/usbipd
wget https://github.com/vcrhonek/hwdata/raw/refs/heads/master/usb.ids
/root/usbip /lib/ld-musl-x86_64.so.1 (0x7fb5ea957000) /root/usbip /mnt/d/usbipd: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped
/root/usbip /lib/ld-musl-x86_64.so.1: src/usbipd: Not a valid dynamic program /root/usbip src/usbipd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
|