Enabling debugfs for ATH9k on BBB running Debian 3.19:Compile new Kernel vs Backports

Dear all,

I’m currently working on a IEEE802.11s WSN using 5 BBBs and a TP-Link stick. To evaluate the wireless link I need to get more information on the wireless link. Therefore, I want to enable the debugfs option of the ATH9k driver module (because just enabling the debug mode using ‘modprobe ath9k_htc debug=0xffffffff’ didn’t work for me).

I think I will have to recompile the ath9k module and some related modules. As far as I understand all what I need for that is part of the backports project [1]. I have already used this on Android for another purpose and everything worked fine. BUT, I will need the kernel source for the compiling process! Where to get the source? (I used Roberts update_kernel.sh script to upgrade my kernel to 3.19)

Another possibility would be to compile a kernel and using make menuconfig to configure the modules. But therefore I would also need the kernel source. I really want to use Robert Nelsons version because I will also need to use DTBs for CAN.

Can anyone help me out here? What would be better/easier?

Thanks a lot in advance and best regards,
Marco

[1] https://www.kernel.org/pub/linux/kernel/projects/backports/

There's a repo here:
https://github.com/RobertCNelson/linux-stable-rcn-ee

Each release (uname -r) is tagged so:

git clone https://github.com/RobertCNelson/linux-stable-rcn-ee
cd ./linux-stable-rcn-ee
git checkout `uname -r` -b tmp

Regards,

Hi,

so I just can use this source without any patches or something like that?

I will just try to use:

1.) make menuconfig

2.) make

3.) make install

is this right?

Best regards and thanks for your help,
Marco

Hi,

so I just can use this source without any patches or something like that?

Yeap, all the patches are in the tag... The default config is: rcn-ee_defconfig

I will just try to use:

1.) make menuconfig
2.) make
3.) make install

is this right?

However, make install won't install the files in the correct place..

make ARCH=arm LOCALVERSION=-<some value> CROSS_COMPILE=
KBUILD_DEBARCH=armhf deb-pkg

Then install the *.deb

Regards,

Dear Robert,

thanks for your help - again! :slight_smile:

Yeap, all the patches are in the tag… The default config is: rcn-ee_defconfig

This is great! Makes things much easier!

make ARCH=arm LOCALVERSION=- CROSS_COMPILE=
KBUILD_DEBARCH=armhf deb-pkg

I’m not really sure here: Does this mean that the compiling will be done on the BBB or crosscompile on another PC? But I will need to install a toolchain for that rigth? This one: 'gcc-arm-linux-gnueabi’?

I also tried to comple my backports (directly on the BBB). Therefore, I used KLIB and KLIB_BUILD to point to the kernel source. But this didn’t worked for me. But maybe also a problem with missing tools / toolchain. Has anyone expiriences with backports on BBB?

Thanks for all your help!!! Really great!!!

Best regards,
Marco

Dear Robert,
thanks for your help - again! :slight_smile:

Yeap, all the patches are in the tag... The default config is:
rcn-ee_defconfig

This is great! Makes things much easier!

make ARCH=arm LOCALVERSION=-<some value> CROSS_COMPILE=

KBUILD_DEBARCH=armhf deb-pkg

I'm not really sure here: Does this mean that the compiling will be done on
the BBB or crosscompile on another PC? But I will need to install a
toolchain for that rigth? This one: 'gcc-arm-linux-gnueabi'?

If on the "BBB" just use: CROSS_COMPILE=

If on an x86, use: CROSS_COMPILE=/path/to/bin/gcc

I also tried to comple my backports (directly on the BBB). Therefore, I used
KLIB and KLIB_BUILD to point to the kernel source. But this didn't worked
for me. But maybe also a problem with missing tools / toolchain. Has anyone
expiriences with backports on BBB?

debian backport repo?

Regards,

Hi Robert,
thank you - I will try To compile the kernel tomorrow.

Backports: https://backports.wiki.kernel.org/index.php/Documentation

I’m not sure if it is also part of the Debian backport repo. It’s mainly about wireles: 80211, Bluetooth, …

Thanks again and besteht regards,
Marco

Dear Robert, dear all,

compiling the kernel directly on the BBB took the whole last day (maybe also because of some errors during build: missing packages & some file where corrupted or missing).

For all which also want to do that these are the required steps:
Prerequirements (at least):

  • apt-get install ncurses-dev
  • apt-get install bc
  • apt-get install lzop

1.) Download kernel source from:
https://github.com/RobertCNelson/linux-stable-rcn-ee

2.) load def-config
make ARCH=arm LOCALVERSION=1.0 CROSS_COMPILE= rcn-ee_defconfig

2.) make menuconfig
→ I wanted to enable the debugfs option for the ATH9k driver module (see link below). But you have A LOT possibilities to change your kernel here.
https://wireless.wiki.kernel.org/en/users/Drivers/ath9k/debug

compiling the kernel

3.)
make ARCH=arm LOCALVERSION=1.0 CROSS_COMPILE= KBUILD_DEBARCH=armhf deb-pkg

@Robert or other experts: are the commands and the order correct?

Now I have four deb files:

  • linux-firmware-image-XYZ.deb
  • linux-headers-XYZ.deb
  • linux-image-XYZ.deb
  • linux-libc-dev-XYZ.deb

To install the new kernel I think I will just have to use
dpkg --install *.deb (in the subdirectory where the .deb files are located). Is this ok? Or do I have to think about the right order when installing the deb files?

Or something else to think about after installing the deb files?

Will this also install all the driver modules (the main reason while I’m doing all this)? (on my linux PC I installed my kernel AND had to use ‘make module_install’)

I hope you can help me with that once again!

Thanks in advance and best regards,
Marco

Hi all,

for all who wants to compile and install a custom build kernel, these are that required steps: (configure and build was done directly on the BBB)

1.) Download kernel source from:
https://github.com/RobertCNelson/linux-stable-rcn-ee

2.) load def-config
make ARCH=arm LOCALVERSION=1.0 CROSS_COMPILE= rcn-ee_defconfig

2.) make menuconfig
→ I wanted to enable the debugfs option for the ATH9k driver module (see link below). But you have A LOT possibilities to change your kernel here.
https://wireless.wiki.kernel.org/en/users/Drivers/ath9k/debug

3.) compiling the kernel
make ARCH=arm LOCALVERSION=1.0 CROSS_COMPILE= KBUILD_DEBARCH=armhf deb-pkg

4.) install the deb file and reboot

dpkg --install *.deb

Best regards,

Marco

@Robert: Thanks again for your great help!!!