On Thu, Jan 12, 2017 at 10:37 AM, Ayoub Zaki <ayoub.z...@googlemail.com> wrote: > Hello, > > I'm trying to figure out how can I override machine settings, for example in > raspberrypi I want to change default kernel version from 4.4.x to 4.1.x for > that I created in my layer meta-somelayer/conf/machine/raspberrypi.conf :
there is a machine config with same name in meta-raspberrypi layer and thats taking precedence over your layer see conf/layer.conf where it sets the PRIORITY and also ensure the BBPATHs are prefixed for your layer to be in front of meta-raspberrypi layer. So that it uses your layer and falls back to meta-raspberrypi to do the filler work. > > require conf/machine/raspberrypi.conf > PREFERRED_VERSION_linux-raspberrypi = "4.1.%" > > > when I ran bitbake it gives: > > $ MACHINE=raspberrypi bitbake virtual/kernel > > NOTE: Tainting hash to force rebuild of task > /home/zak/Projects/yocto/meta-somelayer/recipes-kernel/linux/linux-raspberrypi_4.4.bb, > do_compile > > so it seems that bitbake ignored my override settings ! > > I'm using morty branch and my layer meta-somelayer has higher priority than > meta-rapberrypi : > > $ bitbake-layers show-layers > layer path priority > ========================================================================== > meta /home/zak/Projects/yocto/meta 5 > meta-yocto-bsp /home/zak/Projects/yocto/meta-yocto-bsp 5 > meta-poky /home/zak/Projects/yocto/meta-poky 5 > meta-yocto-bsp /home/zak/Projects/yocto/meta-yocto-bsp 5 > meta-raspberrypi /home/zak/Projects/yocto/meta-raspberrypi 9 > meta-somelayer /home/zak/Projects/yocto/meta-somelayer 5 > > > when I tried to override the setting in rpi.conf instead of raspberrypi.conf > in meta-somelayer/conf/machine/rpi.conf: > > MACHINEOVERRIDES = "raspberrypi:${MACHINE}" > require conf/machine/raspberrypi.conf > > PREFERRED_VERSION_linux-raspberrypi = "4.1.%" > > and running bitbake with : > > > $ MACHINE=rpi bitbake virtual/kernel > NOTE: Tainting hash to force rebuild of task > /home/zak/Projects/yocto/meta-somelayer/recipes-kernel/linux/linux-raspberrypi_4.1.bb, > do_compile > > it worked ! > > My objective however is to override the machine settings and keep the same > MACHINE name. > > Any Ideas? > > > Regards, > > > > > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto