OpenWrt-SDK

If you get a message usb.h file missing, you have to install this library:

sudo apt-get install libusb-dev
git clone  https://github.com/sonnyyu/UsbRelay.git
cd UsbRelay
mips-openwrt-linux-uclibc-gcc   -O -Wall  -c usbrelay.c -o usbrelay.o
mips-openwrt-linux-uclibc-gcc  -O -Wall -I${CFLAGS} -c hiddata.c -o hiddata.o
mips-openwrt-linux-uclibc-gcc -L${LDFLAGS} -o usbrelay usbrelay.o hiddata.o -Wl,-rpath-link=${LDFLAGS} -lusb
mips-openwrt-linux-uclibc-strip usbrelay
file usbrelay
usbrelay: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped

 

Comments powered by CComment