All of lore.kernel.org
 help / color / mirror / Atom feed
* Building kernel backports for ARM with Yocto
@ 2017-10-18 22:13 Marlon Smith
  2017-10-18 22:53 ` Darcy Watkins
  2017-10-19  5:50 ` Khem Raj
  0 siblings, 2 replies; 9+ messages in thread
From: Marlon Smith @ 2017-10-18 22:13 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2072 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-18 22:13 Building kernel backports for ARM with Yocto Marlon Smith
@ 2017-10-18 22:53 ` Darcy Watkins
  2017-10-18 23:04   ` Marlon Smith
  2017-10-19  5:50 ` Khem Raj
  1 sibling, 1 reply; 9+ messages in thread
From: Darcy Watkins @ 2017-10-18 22:53 UTC (permalink / raw)
  To: Marlon Smith, yocto

[-- Attachment #1: Type: text/plain, Size: 3671 bytes --]

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]
dwatkins@sierrawireless.com<mailto:dwatkins@sierrawireless.com> :: www.sierrawireless.com<http://www.sierrawireless.com/>

From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@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

[-- Attachment #2: Type: text/html, Size: 15400 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-18 22:53 ` Darcy Watkins
@ 2017-10-18 23:04   ` Marlon Smith
  0 siblings, 0 replies; 9+ messages in thread
From: Marlon Smith @ 2017-10-18 23:04 UTC (permalink / raw)
  To: Darcy Watkins, yocto

[-- Attachment #1: Type: text/plain, Size: 4896 bytes --]

Darcy, thanks for the detailed reply!
Do you remember how you were able to get it to compile in the first
place?  I end up with this error:
./kconf/conf: 1: ./kconf/conf: Syntax error: word unexpected (expecting
")")
..because backports needs to compile conf for x86_64, but instead
compiles it for ARM.  Once that step is done, it needs to compile the
rest of the project for ARM, but this error stops it.
I think I could work around the sysroot arm-wrestle because of the way
our project is built, but haven't made it to that point yet.
Here's the bb file I'm using:
---------------------------
include backports.inc
SRCBRANCH = "linux-4.2.y"
LOCALVERSION = "v4.2.6-1-0-g90118c7"
SRCREV = "90118c7656bb55243620c9dc9cc3f12582b1807f"
DEPENDS += "linux-myproject"do_configure_prepend() {
	export CROSS_COMPILE=${TARGET_PREFIX}
	export ARCH=${TARGET_ARCH}
	export KLIB_BUILD=${STAGING_KERNEL_DIR}
	export KLIB=${STAGING_DIR_TARGET}
	make
}
-----------------------------------
On Wed, 2017-10-18 at 22:53 +0000, Darcy Watkins wrote:
> 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]
> dwatkins@sierrawireless.com :: www.sierrawireless.com
>  
> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproje
> ct.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

[-- Attachment #2: Type: text/html, Size: 17129 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-18 22:13 Building kernel backports for ARM with Yocto Marlon Smith
  2017-10-18 22:53 ` Darcy Watkins
@ 2017-10-19  5:50 ` Khem Raj
  2017-10-19 19:38   ` Marlon Smith
  1 sibling, 1 reply; 9+ messages in thread
From: Khem Raj @ 2017-10-19  5:50 UTC (permalink / raw)
  To: Marlon Smith; +Cc: yocto

On Wed, Oct 18, 2017 at 3:13 PM, Marlon Smith <marlon.smith10@gmail.com> wrote:
> 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!

You might try this out

https://github.com/kraj/meta-himvis/blob/master/recipes-kernel/linux-backports/linux-backports_4.14-rc4.bb

it does not work out of box but with few fixes here and there it should work

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-19  5:50 ` Khem Raj
@ 2017-10-19 19:38   ` Marlon Smith
  2017-10-19 21:18     ` Khem Raj
  0 siblings, 1 reply; 9+ messages in thread
From: Marlon Smith @ 2017-10-19 19:38 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

On Wed, 2017-10-18 at 22:50 -0700, Khem Raj wrote:
> On Wed, Oct 18, 2017 at 3:13 PM, Marlon Smith <marlon.smith10@gmail.c
> om> wrote:
> > 
> > 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!
> You might try this out
> 
> https://github.com/kraj/meta-himvis/blob/master/recipes-kernel/linux-
> backports/linux-backports_4.14-rc4.bb
> 
> it does not work out of box but with few fixes here and there it
> should work

It looks like that recipe inherits backports_module and kernel-
backports_module-split.. do I need those files as well?

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-19 19:38   ` Marlon Smith
@ 2017-10-19 21:18     ` Khem Raj
  2017-10-19 21:23       ` Marlon Smith
  2017-10-23 18:07       ` Marlon Smith
  0 siblings, 2 replies; 9+ messages in thread
From: Khem Raj @ 2017-10-19 21:18 UTC (permalink / raw)
  To: Marlon Smith; +Cc: yocto

On Thu, Oct 19, 2017 at 12:38 PM, Marlon Smith <marlon.smith10@gmail.com> wrote:
> On Wed, 2017-10-18 at 22:50 -0700, Khem Raj wrote:
>> On Wed, Oct 18, 2017 at 3:13 PM, Marlon Smith <marlon.smith10@gmail.c
>> om> wrote:
>> >
>> > 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!
>> You might try this out
>>
>> https://github.com/kraj/meta-himvis/blob/master/recipes-kernel/linux-
>> backports/linux-backports_4.14-rc4.bb
>>
>> it does not work out of box but with few fixes here and there it
>> should work
>
> It looks like that recipe inherits backports_module and kernel-
> backports_module-split.. do I need those files as well?
>

backports_module is merged into recipe itsellf. Other one can be
replaced with inehrtiting
module bbclasss

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-19 21:18     ` Khem Raj
@ 2017-10-19 21:23       ` Marlon Smith
  2017-10-23 18:07       ` Marlon Smith
  1 sibling, 0 replies; 9+ messages in thread
From: Marlon Smith @ 2017-10-19 21:23 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

On Thu, 2017-10-19 at 14:18 -0700, Khem Raj wrote:
> On Thu, Oct 19, 2017 at 12:38 PM, Marlon Smith <marlon.smith10@gmail.
> com> wrote:
> > 
> > On Wed, 2017-10-18 at 22:50 -0700, Khem Raj wrote:
> > > 
> > > On Wed, Oct 18, 2017 at 3:13 PM, Marlon Smith <marlon.smith10@gma
> > > il.c
> > > om> wrote:
> > > > 
> > > > 
> > > > 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!
> > > You might try this out
> > > 
> > > https://github.com/kraj/meta-himvis/blob/master/recipes-kernel/li
> > > nux-
> > > backports/linux-backports_4.14-rc4.bb
> > > 
> > > it does not work out of box but with few fixes here and there it
> > > should work
> > It looks like that recipe inherits backports_module and kernel-
> > backports_module-split.. do I need those files as well?
> > 
> backports_module is merged into recipe itsellf. Other one can be
> replaced with inehrtiting
> module bbclasss

Ok I'll give that a try.  Thanks for the help!

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-19 21:18     ` Khem Raj
  2017-10-19 21:23       ` Marlon Smith
@ 2017-10-23 18:07       ` Marlon Smith
  2017-10-23 18:11         ` Khem Raj
  1 sibling, 1 reply; 9+ messages in thread
From: Marlon Smith @ 2017-10-23 18:07 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2951 bytes --]

Khem, with a couple of modifications I was able to get this script
working perfectly and installing the modules into the system
automatically.  Thanks a lot!
If you or anyone else would like a copy of the modified bitbake file
I'd be happy to share it.
On Thu, 2017-10-19 at 14:18 -0700, Khem Raj wrote:
> On Thu, Oct 19, 2017 at 12:38 PM, Marlon Smith 
> com> wrote:
> > 
> > On Wed, 2017-10-18 at 22:50 -0700, Khem Raj wrote:
> > > 
> > > On Wed, Oct 18, 2017 at 3:13 PM, Marlon Smith 
> > > il.c
> > > om> wrote:
> > > > 
> > > > 
> > > > 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!
> > > You might try this out
> > > 
> > > https://github.com/kraj/meta-himvis/blob/master/recipes-kernel/li
> > > nux-
> > > backports/linux-backports_4.14-rc4.bb
> > > 
> > > it does not work out of box but with few fixes here and there it
> > > should work
> > It looks like that recipe inherits backports_module and kernel-
> > backports_module-split.. do I need those files as well?
> > 
> backports_module is merged into recipe itsellf. Other one can be
> replaced with inehrtiting
> module bbclasss
> 
> > 
> > > 
> > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Thanks
> > > > 
> > > > 
> > > > Marlon
> > > > 
> > > > 
> > > > --
> > > > _______________________________________________
> > > > yocto mailing list
> > > > yocto@yoctoproject.org
> > > > https://lists.yoctoproject.org/listinfo/yocto
> > > > 

[-- Attachment #2: Type: text/html, Size: 3009 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Building kernel backports for ARM with Yocto
  2017-10-23 18:07       ` Marlon Smith
@ 2017-10-23 18:11         ` Khem Raj
  0 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2017-10-23 18:11 UTC (permalink / raw)
  To: Marlon Smith; +Cc: yocto

On Mon, Oct 23, 2017 at 11:07 AM, Marlon Smith <marlon.smith10@gmail.com> wrote:
> Khem, with a couple of modifications I was able to get this script working
> perfectly and installing the modules into the system automatically.  Thanks
> a lot!
>
> If you or anyone else would like a copy of the modified bitbake file I'd be
> happy to share it.

Please contribute it back to meta-openembedded or meta-himvis
(https://github.com/kraj/meta-himvis)

>
> On Thu, 2017-10-19 at 14:18 -0700, Khem Raj wrote:
>
> On Thu, Oct 19, 2017 at 12:38 PM, Marlon Smith <marlon.smith10@gmail.com>
> wrote:
>
> On Wed, 2017-10-18 at 22:50 -0700, Khem Raj wrote:
>
> On Wed, Oct 18, 2017 at 3:13 PM, Marlon Smith <marlon.smith10@gmail.c
> om> wrote:
>
>
> 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!
>
> You might try this out
>
> https://github.com/kraj/meta-himvis/blob/master/recipes-kernel/linux-
> backports/linux-backports_4.14-rc4.bb
>
> it does not work out of box but with few fixes here and there it
> should work
>
>
> It looks like that recipe inherits backports_module and kernel-
> backports_module-split.. do I need those files as well?
>
>
>
> backports_module is merged into recipe itsellf. Other one can be
> replaced with inehrtiting
> module bbclasss
>
>
>
>
>
>
>
>
> Thanks
>
>
> Marlon
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-23 18:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 22:13 Building kernel backports for ARM with Yocto Marlon Smith
2017-10-18 22:53 ` Darcy Watkins
2017-10-18 23:04   ` Marlon Smith
2017-10-19  5:50 ` Khem Raj
2017-10-19 19:38   ` Marlon Smith
2017-10-19 21:18     ` Khem Raj
2017-10-19 21:23       ` Marlon Smith
2017-10-23 18:07       ` Marlon Smith
2017-10-23 18:11         ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.