Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c | 7 +++++++ arch/arm/boards/crystalfontz-cfa10036/lowlevel.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c index dcf560432d..29b91e775f 100644 --- a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c +++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c @@ -37,6 +37,7 @@ #include <asm/armlinux.h> #include <asm/mmu.h> +#include <asm/barebox-arm.h> #include <mach/fb.h> @@ -93,6 +94,9 @@ static int cfa10036_devices_init(void) { int i; + if (barebox_arm_machine() != MACH_TYPE_CFA10036) + return 0; + /* initizalize muxing */ for (i = 0; i < ARRAY_SIZE(cfa10036_pads); i++) imx_gpio_mode(cfa10036_pads[i]); @@ -115,6 +119,9 @@ device_initcall(cfa10036_devices_init); static int cfa10036_console_init(void) { + if (barebox_arm_machine() != MACH_TYPE_CFA10036) + return 0; + barebox_set_model("crystalfontz-cfa10036"); barebox_set_hostname("cfa10036"); diff --git a/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c b/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c index 50dbcdc150..37c162d30d 100644 --- a/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c +++ b/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c @@ -3,9 +3,10 @@ #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> #include <mach/imx28-regs.h> +#include <generated/mach-types.h> void __naked barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2d) { arm_cpu_lowlevel_init(); - barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, NULL); + barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, (void *)MACH_TYPE_CFA10036); } -- 2.23.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox