diff --git a/target/linux/imx/cortexa53/target.mk b/target/linux/imx/cortexa53/target.mk index b9b32d18290..cf1791b92c1 100644 --- a/target/linux/imx/cortexa53/target.mk +++ b/target/linux/imx/cortexa53/target.mk @@ -2,6 +2,7 @@ ARCH:=aarch64 BOARDNAME:=NXP i.MX with Cortex-A53 (ARM64) CPU_TYPE:=cortex-a53 KERNELNAME:=Image dtbs +FEATURES+=dt-overlay define Target/Description Build firmware images for NXP i.MX (Cortex-A53) based boards. diff --git a/target/linux/imx/image/bootscript-gateworks_venice b/target/linux/imx/image/bootscript-gateworks_venice index 062947f27be..3f87bae50b9 100644 --- a/target/linux/imx/image/bootscript-gateworks_venice +++ b/target/linux/imx/image/bootscript-gateworks_venice @@ -29,7 +29,7 @@ echo "loading DTB..." setenv fdt_addr setenv fdt_list $fdt_file $fdt_file1 $fdt_file2 $fdt_file3 $fdt_file4 $fdt_file5 setenv load_fdt 'echo Loading $fdt...; load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${fdt} && setenv fdt_addr ${fdt_addr_r}' -setenv apply_overlays 'fdt addr $fdt_addr_r && fdt resize && for fdt in "$fdt_overlays"; do load ${devtype} ${devnum}:${distro_bootpart} $loadaddr $prefix/$fdt && fdt apply $loadaddr && echo applied $prefix/$fdt; done' +setenv apply_overlays 'fdt addr $fdt_addr_r && for fdt in "$fdt_overlays"; do load ${devtype} ${devnum}:${distro_bootpart} $loadaddr $prefix/$fdt && fdt resize $filesize && fdt apply $loadaddr && echo applied $prefix/$fdt; done' for fdt in ${fdt_list}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${fdt}; then run load_fdt; fi; done if test -z "$fdt_addr"; then echo "Warning: Using bootloader DTB"; setenv fdt_addr $fdtcontroladdr; fi if test -n "$fdt_overlays"; then echo "Applying overlays"; run apply_overlays; fi diff --git a/target/linux/imx/image/cortexa53.mk b/target/linux/imx/image/cortexa53.mk index ec3623e8e70..e618e3ee0a7 100644 --- a/target/linux/imx/image/cortexa53.mk +++ b/target/linux/imx/image/cortexa53.mk @@ -8,6 +8,7 @@ define Build/boot-img-ext4 rm -fR $@.boot mkdir -p $@.boot $(foreach dts,$(DEVICE_DTS), $(CP) $(KDIR)/image-$(dts).dtb $@.boot/$(dts).dtb;) + $(foreach dtbo,$(DEVICE_DTS_OVERLAY), $(CP) $(KDIR)/image-$(dtbo).dtbo $@.boot/$(dtbo).dtbo;) $(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME) -$(CP) $@-boot.scr $@.boot/boot.scr make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M \ @@ -64,6 +65,7 @@ define Device/gateworks_venice BOOT_SCRIPT := gateworks_venice PARTITION_OFFSET := 16M DEVICE_DTS := $(basename $(notdir $(wildcard $(DTS_DIR)/freescale/imx8m*-venice*.dts))) + DEVICE_DTS_OVERLAY := $(basename $(notdir $(wildcard $(DTS_DIR)/freescale/imx8m*-venice*.dtso))) DEVICE_PACKAGES := \ kmod-hwmon-gsc kmod-rtc-ds1672 kmod-eeprom-at24 \ kmod-gpio-button-hotplug kmod-leds-gpio kmod-pps-gpio \