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