Hi,
We are using Yocto as the build environment for a custom, imx28-based, board. We are using the Freescale imx28evk BSP as the base BSP for our board. We have followed the Freescale model for the imx28 and added a new custom board to the linux-imx recipe, together with imx28evk, imx23ekv and imx5 boards, under the meta-fsl-arm layer.
I want to apply a number of patches specific to our kernel/BSP. I've been investigating how to do this and it looks like this can be achieved by using the .bbappend file under the linux kernel recipe. The problem I see with this approach is that the append file applies to a specific recipe. The imx28evk, imx23evk, mx5 and our custom board are all under the one kernel recipe and so I think the patches would apply to all of these boards and not just our board. I want the patches to just apply to our custom board and I haven't found a way to do this.
Is this correct? I am new to Yocto and so perhaps there is a better approach. Is there another way to just apply patches to our custom board given that it is part of a single recipe that includes a number of other Freescale boards?
Thanks
Bruno
Having investigated this a bit it looks like the way to do this is to use overrides in Yocto.
It should be possible to conditionally apply patches based on the definition of MACHINE.
I've added a bbappend file that contains the following
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append_am_100 = " \
file://add_support_new_board.patch \
file://add_os_led_support.patch \
file://add_support_nand_S34ML01G1.patch \
file://add_change_nand_partitions.patch \
From my understanding of all of this these patches should only be applied when MACHINE=am_100.
In our case MACHINE is defined as "am_100" and I can see that this is the actual definition when I start the build
Build Configuration:
BB_VERSION = "1.26.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "am_100"
DISTRO = "poky"
DISTRO_VERSION = "1.8.1"
TUNE_FEATURES = "arm armv5 thumb dsp"
TARGET_FPU = "soft"
However the patches are not being applied. They only get applied when I use the following:
SRC_URI_append_mx28 = ....
This came from Freescale and is used to build for the imx28evk platform.
Can anyone suggest why the overrides are not working as expected?
Thanks,
Bruno
Hello Bruno,
The machine-specific appends should do the trick. However, it seems like the machine configuration is still invoking the i.MX28 EVK. Have you made a machine configuration file for the am_100? Perhaps there's something missing from the machine configuration.