USB WiFi for Debian Jessie on 410c

Hi ndec: Thanks for mentioning dpkg -c. I just checked my linux-image…deb on my build PC, and seem to have an issue.

When I run:
dpkg -c linux-image-4.4.9-linaro-lt-qcom_4.4.9-linaro-lt-qcom-11_arm64.deb
I think looked through the output, but the only wireless stuff I see is the ath:

drwxr-xr-x root/root         0 2016-07-19 09:37 ./lib/modules/4.4.9-linaro-lt-qcom/kernel/drivers/net/
drwxr-xr-x root/root         0 2016-07-19 09:37 ./lib/modules/4.4.9-linaro-lt-qcom/kernel/drivers/net/wireless/
drwxr-xr-x root/root         0 2016-07-19 09:37 ./lib/modules/4.4.9-linaro-lt-qcom/kernel/drivers/net/wireless/ath/
drwxr-xr-x root/root         0 2016-07-19 09:37 ./lib/modules/4.4.9-linaro-lt-qcom/kernel/drivers/net/wireless/ath/wcn36xx/
-rw-r--r-- root/root    107312 2016-07-19 09:37 ./lib/modules/4.4.9-linaro-lt-qcom/kernel/drivers/net/wireless/ath/wcn36xx/wcn36xx.ko

So I must be doing something incorrect when doing my make. I assume make uses the .config file. Do I need to specify it? I have made sure to make clean before running make menuconfig to include the rt2800 references.

And: I also have not been doing fastboot command on the 410c. So that would explain the old kernel. But I think I need to figure out why I’m not building the kernel + .deb files w/ the rt2800 first now.

hi,

so i tried the exact same thing and it works for me:

$ dpkg -c linux-image-4.4.9+_4.4.9+-45_arm64.deb | grep wireless
drwxr-xr-x root/root         0 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/
drwxr-xr-x root/root         0 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/ath/
drwxr-xr-x root/root         0 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/ath/wcn36xx/
-rw-r--r-- root/root    107624 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/ath/wcn36xx/wcn36xx.ko
drwxr-xr-x root/root         0 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/rt2x00/
-rw-r--r-- root/root     92328 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko
-rw-r--r-- root/root     55312 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
-rw-r--r-- root/root     75104 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/rt2x00/rt2x00lib.ko
-rw-r--r-- root/root     22592 2016-07-20 06:55 ./lib/modules/4.4.9+/kernel/drivers/net/wireless/rt2x00/rt2x00usb.ko

I suspect you don’t save .config properly, or perhaps you override it after you made your changes… In my .config file i have:

$ grep  RT2800 build-arm64/.config
# CONFIG_RT2800PCI is not set
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT33XX=y
CONFIG_RT2800USB_RT35XX=y
# CONFIG_RT2800USB_RT3573 is not set
# CONFIG_RT2800USB_RT53XX is not set
# CONFIG_RT2800USB_RT55XX is not set
# CONFIG_RT2800USB_UNKNOWN is not set
CONFIG_RT2800_LIB=m

Are you sure that you have that too, right before compiling? Are you sure you are not running “make defconfig distro.config” after you made your changes in .config with menuconfig?

Hi ndec,

Thank you very much for confirming that the steps indeed work. I have now also gotten it to work! I have no idea how I got my ./kernel directory in a weird state, but after rm -rfing my kernel directory and just running each step again, all works as expected and I have my dual band WLAN USB device running now on my 410c.

Thanks again to you, Daniel, and David!

-Piper

Hello,
There is another way of adding the whole modules into the file-system.
I think this is the best way to work when we are talking about manufacturing process with a lot of changes to do to the file system.
In two words of how to achieve it: convert the file-system to raw format, mount it copy the needed files, unmount and convert to fast-boot format back.
And in details:

  1. Run the command ‘simg2img filesystem.img filesystem.raw’
  2. Create a temporary directory ‘mkdir tmp’
  3. mount the raw file to tmp directory ‘mount filesystem.raw tmp’
  4. copy the needed files to the mounted file ‘cp -r modules/* ./tmp/’
  5. unmount the directory ‘umount tmp’
  6. convert to fast-boot format ‘img2simg filesystem.raw newfilesystem.img’
  7. flash the newfilesystem with fastboot.

The whole process can be converted to script and run after build.

Hey Leonid,

thank you for that hint. We will need those steps for manufacturing in the future,too.

Our project uses realtek based chipset. As I already posted at the beginning of that thread, I will show you how to use the RTL8192CU driver instead of the in-tree rtlwifi driver in DB410c kernel here.

Maybe it will help some people with similar driver issues :wink:

Best wishes !

hi,

yes, you are correct about the steps above if you want to provide your own ‘custom’ images. My only remark would be on step #6, we do not use img2simg ourselves for the linaro images, but we use ext2simg from the same android-tools-fsutils package. I don’t have the details right now, but I had issues ~2 years ago when I setup the initial images with img2simg.

This is how we create the image that we release:

https://git.linaro.org/ci/job/configs.git/blob/HEAD:/lt-qcom-debian-images-arm64.yaml#l253

I remember studying the difference between the output of the tools because we were seeing really long flash times for images generated by img2simg.

Basically ext2simg is aware of unallocated space on the filesystem and can exclude this form the image, the blocks are marked unused rather than zero so the flashing tool doesn’t need to write anything at all to the flash device… img2simg cannot do this so, although it will attempt to optimize things by conmpressing long runs of zeros, the images will still be bigger, will take longer to flash and will increase wear on the flash device.

Ohh, I also paid attention to a very long burning time, thanks you for pointing it out.
I remember that the ext2simg that should be used is some special patched one that will save the owners or file permissions. Is it still needed?

hi,

no that issues was with a different tool actually. That was the tool we used initially that creates the ext4 FS (e.g. make_ext4fs, from android-tools-fsutils). That tool came from Android and as you remember didn’t take file permissions into account. We had patched this tool for our usage. However there were other issues with this tool and we got rid of it few months ago. see

https://git.linaro.org/ci/job/configs.git/commit/7778af8510205652e855b2a2bd54ea31c2ffd04f

We now use the standard linux tools to create the file system (from e2fsprogs).

So bottomline, I highly recommend you do the same thing…