Skip to content

Commit 6bb42dd

Browse files
Gateworksrobimarko
authored andcommitted
imx: venice: add dt overlay support
Enable DT overlay support: - add dt-overlay to board features - add DEVICE_DTS_OVERLAYS - update the boot script to resize before applying each overlay Signed-off-by: Tim Harvey <[email protected]> Link: openwrt/openwrt#19189 Signed-off-by: Robert Marko <[email protected]>
1 parent 5c9460a commit 6bb42dd

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

target/linux/imx/cortexa53/target.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ARCH:=aarch64
22
BOARDNAME:=NXP i.MX with Cortex-A53 (ARM64)
33
CPU_TYPE:=cortex-a53
44
KERNELNAME:=Image dtbs
5+
FEATURES+=dt-overlay
56

67
define Target/Description
78
Build firmware images for NXP i.MX (Cortex-A53) based boards.

target/linux/imx/image/bootscript-gateworks_venice

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "loading DTB..."
2929
setenv fdt_addr
3030
setenv fdt_list $fdt_file $fdt_file1 $fdt_file2 $fdt_file3 $fdt_file4 $fdt_file5
3131
setenv load_fdt 'echo Loading $fdt...; load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${fdt} && setenv fdt_addr ${fdt_addr_r}'
32-
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'
32+
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'
3333
for fdt in ${fdt_list}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${fdt}; then run load_fdt; fi; done
3434
if test -z "$fdt_addr"; then echo "Warning: Using bootloader DTB"; setenv fdt_addr $fdtcontroladdr; fi
3535
if test -n "$fdt_overlays"; then echo "Applying overlays"; run apply_overlays; fi

target/linux/imx/image/cortexa53.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define Build/boot-img-ext4
88
rm -fR $@.boot
99
mkdir -p $@.boot
1010
$(foreach dts,$(DEVICE_DTS), $(CP) $(KDIR)/image-$(dts).dtb $@.boot/$(dts).dtb;)
11+
$(foreach dtbo,$(DEVICE_DTS_OVERLAY), $(CP) $(KDIR)/image-$(dtbo).dtbo $@.boot/$(dtbo).dtbo;)
1112
$(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME)
1213
-$(CP) $@-boot.scr $@.boot/boot.scr
1314
make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M \
@@ -64,6 +65,7 @@ define Device/gateworks_venice
6465
BOOT_SCRIPT := gateworks_venice
6566
PARTITION_OFFSET := 16M
6667
DEVICE_DTS := $(basename $(notdir $(wildcard $(DTS_DIR)/freescale/imx8m*-venice*.dts)))
68+
DEVICE_DTS_OVERLAY := $(basename $(notdir $(wildcard $(DTS_DIR)/freescale/imx8m*-venice*.dtso)))
6769
DEVICE_PACKAGES := \
6870
kmod-hwmon-gsc kmod-rtc-ds1672 kmod-eeprom-at24 \
6971
kmod-gpio-button-hotplug kmod-leds-gpio kmod-pps-gpio \

0 commit comments

Comments
 (0)