[yocto] How to use *.bb file to select different kernel config/feature?
Hi all I want to use one linux-kernel-myown.bb file to select different config for several boxes. I think when I give MACHINE to box1\box2\box3, the kernel config and features select can be done. Is it correct : when use MACHINE=box1\box2\box3 and so on: KERNEL_FEATURES_append_box1=" cfg/box1.scc" KERNEL_CONFIG_box1=" cfg/box1_defconfig.cfg" this instruction could work?or any suggestion. Regards Richard -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] How to use *.bb file to select different kernel config/feature?
On Tue, Mar 21, 2017 at 3:15 AM, Richard Zhang wrote: > Hi all > > > I want to use one linux-kernel-myown.bb file to select different config > for several boxes. > > I think when I give MACHINE to box1\box2\box3, the kernel config and > features select can be done. > > > Is it correct : > > > when use MACHINE=box1\box2\box3 and so on: > > > KERNEL_FEATURES_append_box1=" cfg/box1.scc" > These are variables like any other in bitbake. They can take a variety of overrides, one of which is the machine name. So yes, you could append a kernel feature only for your $MACHINE with the line above. But you must be using a kernel recipe that inherits kernel-yocto for the feature to be processed. > KERNEL_CONFIG_box1=" cfg/box1_defconfig.cfg" > Assuming KERNEL_CONFIG is a valid variable in your layers, this would also work. But if you are using configuration fragments and kernel-yocto, that isn't a variable that is used. Bruce > > > this instruction could work?or any suggestion. > > > > Regards > > Richard > > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] How to use *.bb file to select different kernel config/feature?
So, maybe I should take a KERNEL_CONFIG into my own kernel recipe. Thanks Richard From: Bruce Ashfield Sent: Tuesday, March 21, 2017 8:33:09 PM To: Richard Zhang Cc: yocto@yoctoproject.org Subject: Re: [yocto] How to use *.bb file to select different kernel config/feature? On Tue, Mar 21, 2017 at 3:15 AM, Richard Zhang mailto:richard.zh...@pica8.com>> wrote: Hi all I want to use one linux-kernel-myown.bb<http://linux-kernel-myown.bb> file to select different config for several boxes. I think when I give MACHINE to box1\box2\box3, the kernel config and features select can be done. Is it correct : when use MACHINE=box1\box2\box3 and so on: KERNEL_FEATURES_append_box1=" cfg/box1.scc" These are variables like any other in bitbake. They can take a variety of overrides, one of which is the machine name. So yes, you could append a kernel feature only for your $MACHINE with the line above. But you must be using a kernel recipe that inherits kernel-yocto for the feature to be processed. KERNEL_CONFIG_box1=" cfg/box1_defconfig.cfg" Assuming KERNEL_CONFIG is a valid variable in your layers, this would also work. But if you are using configuration fragments and kernel-yocto, that isn't a variable that is used. Bruce this instruction could work?or any suggestion. Regards Richard -- ___ yocto mailing list yocto@yoctoproject.org<mailto:yocto@yoctoproject.org> https://lists.yoctoproject.org/listinfo/yocto -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto