pphdev12
Posts: 4
Joined: Tue May 03, 2016 1:46 pm

Please advise me to backport kernel

Tue May 03, 2016 2:06 pm

Dears,

I'm testing a raspberry pi 3.6 kernel to learn how to backport.
My goal is that execute example-advertisement script of bluez(http://git.kernel.org/cgit/bluetooth/bl ... ertisement)
on 3.6 because it is only executed on 4.1 and later.
(refer to http://permalink.gmane.org/gmane.linux. ... rnel/63228)

So, I'm trying to backport a latest bluetooth subsystem to 3.6 kernel(https://github.com/raspberrypi/linux/tree/rpi-3.6.y).
I think backport is success, but 'LEAdvertisingManager1 interface not
found' error still occured.

My step is below:

###To compile old kernel
$ export ARCH=arm
$ export CROSS_COMPILE=$CCPREFIX
$ cd $KERNEL_SRC
KERNEL_SRC$ make defconfig
KERNEL_SRC$ make
KERNEL_SRC$ make INSTALL_MOD_PATH=$OUTPUT install
###To backport
$ export KLIB=$KERNEL_SRC
$ export KLIB_BUILD=$OUTPUT
$ wget http://www.kernel.org/pub/linux/kernel/ ... 1-1.tar.xz
$ unxz backports-4.1.1-1.tar.xz
$ tar xfp backports-4.1.1-1.tar
$ cd backports-4.1.1-1
backports-4.1.1-1$ echo "CPTCFG_BT=m
> CPTCFG_BT_RFCOMM=m
> CPTCFG_BT_BNEP=m
> CPTCFG_BT_BNEP_MC_FILTER=y
> CPTCFG_BT_BNEP_PROTO_FILTER=y" > defconfigs/bluetooth
backports-4.1.1-1$ make defconfig-bluetooth
backports-4.1.1-1$ make
backports-4.1.1-1$ make install
### replaces a existed kernel with $KERNEL_SRC/arch/arm/boot/zImage to use imagetool-uncompressed.py of raspberrypi tools
### replaces a existed /lib/modules with $OUTPUT/lib/modules
### and execute command 'depmod -a' and reboot
### After reboot, excute test/example-advertisement
### output message is 'LEAdvertisingManager1 interface not found'

Am I missing some configuration or doing wrong step?
Please advise me.

Best regards,
tak

User avatar
Douglas6
Posts: 4742
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Please advise me to backport kernel

Tue May 03, 2016 4:00 pm

I don't have a clue about the 'backporting'. It looks like you're trying to run BlueZ 5 code under BlueZ 4. What does 'bluetoothd -v' tell you?

pphdev12
Posts: 4
Joined: Tue May 03, 2016 1:46 pm

Re: Please advise me to backport kernel

Wed May 04, 2016 1:42 am

Douglas6 wrote:I don't have a clue about the 'backporting'. It looks like you're trying to run BlueZ 5 code under BlueZ 4. What does 'bluetoothd -v' tell you?
Hi Douglas6,
Thank you for your reply.

Code: Select all

root@test:~# bluetoothd -v
5.39
I installed BlueZ 5.39, and with below options

Code: Select all

./configure --prefix=/usr     \
            --sysconfdir=/etc    \
            --localstatedir=/var \
            --enable-library      \
            --enable-experimental \
            --disable-systemd &&
make &&
make install
And if i execute a command 'bluetoothd -ndE', I can show these logs

Code: Select all

...
bluetoothd[2609]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[2609]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[2609]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has been enabled
bluetoothd[2609]: src/adapter.c:trigger_passive_scanning()
bluetoothd[2609]: Failed to read advertising features: Unknown Command (0x01)
bluetoothd[2609]: Failed to set mode: Unknown Command (0x01)
bluetoothd[2609]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0
...
I thinks it is that http://git.kernel.org/cgit/bluetooth/bl ... ing.c#n736

Thank you for your consideration.

User avatar
Douglas6
Posts: 4742
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Please advise me to backport kernel

Wed May 04, 2016 1:50 am

Ah, I remember that. I think on Stackoverflow I saw that 4.1 kernel was required, but when Jessie 4.1 came out, it still wasn't working. I haven't tried it yet with the 4.4 kernel (available from rpi-update). Please let us know what you find out.

pphdev12
Posts: 4
Joined: Tue May 03, 2016 1:46 pm

Re: Please advise me to backport kernel

Wed May 04, 2016 2:21 am

Douglas6 wrote:Ah, I remember that. I think on Stackoverflow I saw that 4.1 kernel was required, but when Jessie 4.1 came out, it still wasn't working. I haven't tried it yet with the 4.4 kernel (available from rpi-update). Please let us know what you find out.
Yes, you are right. It requires 4.1 kernel. It was running very well, if kernel is 4.1 and later (e.g. https://github.com/raspberrypi/linux/tree/rpi-4.1.y).
Already running well with the latest kernel, but I need to learn how to backport a 4.1 BT subsystem to old kernel.
The reason is for running it another embedded board(only supports 3.4).

Thanks

User avatar
Douglas6
Posts: 4742
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Please advise me to backport kernel

Wed May 04, 2016 3:16 am

I'll have to try again with 4.1, thanks. Sorry, I know nothing of backporting.

pphdev12
Posts: 4
Joined: Tue May 03, 2016 1:46 pm

Re: Please advise me to backport kernel

Wed May 04, 2016 4:18 am

Douglas6 wrote:I'll have to try again with 4.1, thanks. Sorry, I know nothing of backporting.
Think nothing of it.
I'm really thank you for your consideration. :D

Return to “Linux Kernel”