Hi Rouven, On Thu, Jul 02, 2020 at 09:14:11AM +0200, Rouven Czerwinski wrote: > Add support for the Webasto Common Communication Board Version 2. The > device tree included with barebox can eventually be replaced with the > required barebox changes when the ccbv2 device tree is upstream. > > Signed-off-by: Rouven Czerwinski <r.czerwinski@xxxxxxxxxxxxxx> > --- > +static int ccbv2_device_init(void) > +{ > + if (!of_machine_is_compatible("webasto,imx6ul-ccbv2")) > + return 0; > + > + /* the bootloader is stored in one of the two boot partitions */ > + imx6_bbu_internal_mmcboot_register_handler("emmc", "/dev/mmc1", > + BBU_HANDLER_FLAG_DEFAULT); > + > + barebox_set_hostname("weabsto-ccbv2"); > + > + return 0; > + > +} > +device_initcall(ccbv2_device_init); > + > +static int ccbv2_apply_overlay(void) > +{ > + struct device_node *overlay; > + struct fdt_header *fdt; > + int ret; > + > + if(!IS_ENABLED(CONFIG_FIRMWARE_CCBV2_OPTEE)) > + return 0; The lack of the runtime test for a compatible machine breaks running barebox on other enabled machines. You probably do this in a pure_initcall to register the overlay before barebox unflattens the dtb. I'm not sure what to do about it, but breaking other machines is not an option. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox