Hello OpenWRT Devs!
Warning: I'm German, so please be patient with my grammar
For every path shown here, i assume i'm in the base dir (like ~/openwrt/) for compiling Barrier Breaker by myself.
What i wanted to do:
I wanted to add Support for the Sitecom WLA-2100 Wireless USB stick
ID 0df6:0078
into the rt2800usb Kernel module.
What i've done so far:
I installed the luci feed with
./scripts/feeds update -a
./scripts/feeds install -a -p luci
and used
make menuconfig
to set everything up (and include the rt2800usb Kernel module).
I made a patch
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1134,6 +1134,7 @@ static struct usb_device_id rt2800usb_de
{ USB_DEVICE(0x0df6, 0x0051) },
{ USB_DEVICE(0x0df6, 0x005f) },
{ USB_DEVICE(0x0df6, 0x0060) },
+ { USB_DEVICE(0x0df6, 0x0078) },
/* SMC */
{ USB_DEVICE(0x083a, 0x6618) },
{ USB_DEVICE(0x083a, 0x7511) },
following the wiki and put it into
./target/linux/brcm2708/patches-3.10/0175-Adding_Sitecom_WLA-2100_A.patch
folder.
Then i proceeded to build the firmware with
make dirclean
make -j 5 V=s
and everything went fine, except that the kernel module isn't loading for the WLA-2100
dmesg output:
[ 168.147591] usb 1-1.3.1: new high-speed USB device number 5 using dwc_otg
[ 168.274184] usb 1-1.3.1: New USB device found, idVendor=0df6, idProduct=0078
[ 168.283055] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 168.293696] usb 1-1.3.1: Product: 802.11 n WLAN
[ 168.299855] usb 1-1.3.1: Manufacturer: Ralink
[ 168.305713] usb 1-1.3.1: SerialNumber: 1.0
although it is in the image and can be forced with
echo "0DF6 0078" > /sys/bus/usb/drivers/rt2800usb/new_id
to load.
dmesg output:
[ 355.567685] usb 1-1.3.1: new high-speed USB device number 6 using dwc_otg
[ 355.694279] usb 1-1.3.1: New USB device found, idVendor=0df6, idProduct=0078
[ 355.702897] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 355.713102] usb 1-1.3.1: Product: 802.11 n WLAN
[ 355.719073] usb 1-1.3.1: Manufacturer: Ralink
[ 355.724768] usb 1-1.3.1: SerialNumber: 1.0
[ 355.827605] usb 1-1.3.1: reset high-speed USB device number 6 using dwc_otg
[ 355.947155] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5392, rev 0223 detected
[ 356.014148] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5372 detected
So i used
find . -name rt2800usb.c
which gave me the following output:
./build_dir/toolchain-arm_arm1176jzf-s+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/linux-3.10.49/drivers/net/wireless/rt2x00/rt2800usb.c
./build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/linux-brcm2708/compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800usb.c
./build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/linux-brcm2708/linux-3.10.49/.pc/platform/0175-Adding_Sitecom_WLA-2100_A.patch/drivers/net/wireless/rt2x00/rt2800usb.c
./build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/linux-brcm2708/linux-3.10.49/drivers/net/wireless/rt2x00/rt2800usb.c
I looked into every *.c file named above and found that the patch was only applied on
./build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/linux-brcm2708/linux-3.10.49/drivers/net/wireless/rt2x00/rt2800usb.c
whereas the other three weren't affected.
So i edited them manually, deleted the
./bin
folder and compiled again with
make V=s -j 5
and in this image everything works as expected,
dmesg output:
[ 70.867672] usb 1-1.3.1: new high-speed USB device number 5 using dwc_otg
[ 70.994256] usb 1-1.3.1: New USB device found, idVendor=0df6, idProduct=0078
[ 71.003114] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 71.013779] usb 1-1.3.1: Product: 802.11 n WLAN
[ 71.019934] usb 1-1.3.1: Manufacturer: Ralink
[ 71.025804] usb 1-1.3.1: SerialNumber: 1.0
[ 71.127592] usb 1-1.3.1: reset high-speed USB device number 5 using dwc_otg
[ 71.247139] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5392, rev 0223 detected
[ 71.314135] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5372 detected
but after every
make dirclean
the manual changes are getting deleted.
So my Question is:
What am i missing to do, so that the patch is applied among all 4 *.c files that are generated in the build process?
Hardware:
RaspberryPi Model B
Ubuntu Server for building.
Thanks in advice
Napsi-GER-
Edit: Removed dead dropbox link.
(Last edited by Napsi-GER- on 13 Jan 2018, 16:44)