I tried building backports under Yocto a few years back using Yocto daisy 
branch with kernel 3.4 for x86 and kernel 3.12 for ARM.  After a fair amount of 
pain I was able to get it to sort of work.  The problem was mainly a sysroot 
arm-wrestle between kernel and backports because they both generate the same 
kernel module packages.  It was a last-one-wins arm-wrestle.  It sort of worked 
OK with daisy branch, but newer yocto versions have stricter management of 
sysroots and staging areas.

I think what we need is some sort of virtual provider or alternatives scheme to 
make this work properly.

You can also run into problems related to exports to other out-of-tree modules 
but IIRC, it would only affect an out-of-tree module with an incompatible 
license.

I was able to run a few circa kernel 3.18 backports experimentally on a kernel 
3.4 and a kernel 3.12.  Eventually we just upgraded the kernel.  Another 
project I know of used backports to update their kernel source and then created 
a recipe to build kernel from that source.

The notes/questions I had in the end were:


  *   was building backports as out-of-tree kernel modules
  *   was concerned that this wouldn’t provide updated kernel staging source, 
particularly with respect to any updated includes
  *   wasn’t sure what would be propagated into the sysroot
  *   should consider the backports use case that patches the kernel source and 
then perhaps use this to generate patchset to be added to kernel recipe 
(bbappend)
  *   otherwise need to ensure proper handling of sysroot, staging, (as well as 
a notion of providers and/or alternatives like I mentioned earlier)

I haven’t touched this in years, but perhaps it may help a bit.

I think your best bet for short term is to use it to patch the kernel and then 
capture the changes as a patchset to add to a kernel recipe.



Regards,

Darcy

Darcy Watkins ::  Senior Staff Engineer, Firmware

SIERRA WIRELESS
Direct  +1 604 233 7989   ::  Fax  +1 604 231 1109  ::  Main  +1 604 231 1100
13811 Wireless Way  :: Richmond, BC Canada V6V 3A4
[P2]
dwatk...@sierrawireless.com<mailto:dwatk...@sierrawireless.com> :: 
www.sierrawireless.com<http://www.sierrawireless.com/>

From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On 
Behalf Of Marlon Smith
Sent: October-18-17 3:14 PM
To: yocto@yoctoproject.org
Subject: [yocto] Building kernel backports for ARM with Yocto

Hi everyone,

I'm trying to build the Linux backports project to get updated wifi drivers on 
an older kernel.  The problem is that when building backports, it first builds 
several tools that need to be run natively before cross-compiling the rest of 
the project.

I know how to write a bitbake recipe to compile natively, and how to write one 
to build for the target, but I can't figure out how to combine the two.  The 
backports project has steps for LTIB:


 %Build

 export PATH=$UNSPOOF_PATH



 make menuconfig prefix=%{_prefix} \

   CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \

   ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \

   KLIB_BUILD=${TOP}/rpm/BUILD/linux



 export PATH=$SPOOF_PATH



 make prefix=%{_prefix} \

   CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \

   ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \

   KLIB_BUILD=${TOP}/rpm/BUILD/linux



I believe what I need is an equivalent to the line export PATH=$UNSPOOF_PATH 
but I can't find anything in the Yocto documentation or mailing lists that 
would be equivalent to that.



Any help would be much appreciated!



Thanks



Marlon
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to