From 48512cf7bc96ee0cec85bc149b4183b9ca565855 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 24 Apr 2021 02:22:57 +0300 Subject: Turn dtbs platform variable into array Signed-off-by: Laurent Pinchart --- images/FIT.sh | 6 +++--- images/srec.sh | 2 +- kbuild.sh | 4 ++-- kflash.sh | 3 +-- platforms/gen2.sh | 2 +- platforms/gen3.sh | 16 +++++++++++++--- platforms/imx7.sh | 6 +++++- platforms/omap3.sh | 5 ++++- platforms/omap4+.sh | 6 +++++- platforms/scarlet.sh | 2 +- platforms/zynqmp.sh | 2 +- 11 files changed, 37 insertions(+), 17 deletions(-) diff --git a/images/FIT.sh b/images/FIT.sh index e085a8a..2205b44 100644 --- a/images/FIT.sh +++ b/images/FIT.sh @@ -47,7 +47,7 @@ EOF local dtb - for dtb in $dtbs ; do + for dtb in ${dtbs[@]} ; do local src=${dtb/:*/} local dst=${dtb/*:/} dst=${dst/*\//} @@ -69,14 +69,14 @@ EOF EOF done - local config=$(echo $dtbs | sed 's/.*[:/]//') + local config=$(echo ${dtbs[0]} | sed 's/.*[:/]//') cat <> $kernel_its }; configurations { default = "${fit_conf_prefix}${config}"; EOF - for dtb in $dtbs ; do + for dtb in ${dtbs[@]} ; do local dst=${dtb/*:/} dst=${dst/*\//} diff --git a/images/srec.sh b/images/srec.sh index 282567c..798a256 100644 --- a/images/srec.sh +++ b/images/srec.sh @@ -7,7 +7,7 @@ make_srec_image() { objcopy -I binary -O srec --srec-forceS3 --srec-len 516 \ $image.xz $image.xz.srec - for dtb in $dtbs ; do + for dtb in ${dtbs[0]} ; do local src=${dtb/:*/} objcopy -I binary -O srec --srec-forceS3 --srec-len 516 \ diff --git a/kbuild.sh b/kbuild.sh index 7d857df..98f3a0a 100755 --- a/kbuild.sh +++ b/kbuild.sh @@ -247,7 +247,7 @@ fi kernel_dtbs= if [[ ${do_build[dtbs]} == 1 ]] ; then - for dtb in $dtbs ; do + for dtb in ${dtbs[@]} ; do dtb=${dtb/:*/} kernel_dtbs="$kernel_dtbs $dtb" done @@ -311,7 +311,7 @@ copy_dtbs() { return fi - for dtb in $dtbs ; do + for dtb in ${dtbs[@]} ; do local src=${dtb/:*/} local dst=${dtb/*:/} dst=${dst/*\//} diff --git a/kflash.sh b/kflash.sh index 0a91ec1..f8c4dd2 100755 --- a/kflash.sh +++ b/kflash.sh @@ -324,8 +324,7 @@ for part_name in ${partitions[@]} ; do dt) # For DT, only flash the first entry. This can be improved later if # needed. - read -ra _dtbs <<< "$dtbs" - _dtb=${_dtbs[0]} + _dtb=${dtbs[0]} _dtb_src="$output_dir/arch/${arch}/boot/dts/${_dtb/:*/}" _dtb_dst=${_dtb/*:/} _dtb_dst=${_dtb_dst/*\//} diff --git a/platforms/gen2.sh b/platforms/gen2.sh index df6c2a1..0381e69 100644 --- a/platforms/gen2.sh +++ b/platforms/gen2.sh @@ -1,5 +1,5 @@ platform=gen2 arch=arm -dtbs="r8a7790-lager.dtb r8a7791-koelsch.dtb" +dtbs=(r8a7790-lager.dtb r8a7791-koelsch.dtb) image=uImage loadaddr=0x40008000 diff --git a/platforms/gen3.sh b/platforms/gen3.sh index 44cdacd..c92de96 100644 --- a/platforms/gen3.sh +++ b/platforms/gen3.sh @@ -1,8 +1,18 @@ platform=gen3 dir_pattern=renesas arch=arm64 -dtbs="renesas/r8a7795-es1-h3ulcb.dtb renesas/r8a7795-es1-salvator-x.dtb renesas/r8a7795-h3ulcb.dtb renesas/r8a7795-h3ulcb-kf.dtb renesas/r8a7795-salvator-x.dtb renesas/r8a7795-salvator-xs.dtb renesas/r8a7796-m3ulcb.dtb renesas/r8a7796-salvator-x.dtb renesas/r8a77995-draak.dtb" -dtbs=$(cd arch/arm64/boot/dts ; ls renesas/*.dts | sed 's/\.dts/.dtb/') -#dtbs="renesas/r8a77965-salvator-xs.dtb" +dtbs=( + renesas/r8a7795-es1-h3ulcb.dtb + renesas/r8a7795-es1-salvator-x.dtb + renesas/r8a7795-h3ulcb.dtb + renesas/r8a7795-h3ulcb-kf.dtb + renesas/r8a7795-salvator-x.dtb + renesas/r8a7795-salvator-xs.dtb + renesas/r8a7796-m3ulcb.dtb + renesas/r8a7796-salvator-x.dtb + renesas/r8a77995-draak.dtb +) +dtbs=($(cd arch/arm64/boot/dts ; ls renesas/*.dts | sed 's/\.dts/.dtb/')) +#dtbs=(renesas/r8a77965-salvator-xs.dtb) image=FIT loadaddr=0x48080000 diff --git a/platforms/imx7.sh b/platforms/imx7.sh index 63acc41..7a0f3a2 100644 --- a/platforms/imx7.sh +++ b/platforms/imx7.sh @@ -1,7 +1,11 @@ platform=imx7 dir_pattern=plusoptix arch=arm -dtbs="imx7d-sx-pl-emar.dtb imx7d-sx-pl-test.dtb imx7d-sx-imx7-pl.dtb" +dtbs=( + imx7d-sx-pl-emar.dtb + imx7d-sx-pl-test.dtb + imx7d-sx-imx7-pl.dtb +) image=zImage loadaddr=0x80008000 # For as long as we're stuck with the BSP diff --git a/platforms/omap3.sh b/platforms/omap3.sh index 1c2ca71..e51d206 100644 --- a/platforms/omap3.sh +++ b/platforms/omap3.sh @@ -1,5 +1,8 @@ platform=omap3 dir_pattern=media arch=arm -dtbs="omap3-beagle-xm.dtb omap3-overo-storm-tobi.dtb" +dtbs=( + omap3-beagle-xm.dtb + omap3-overo-storm-tobi.dtb +) image=zImage diff --git a/platforms/omap4+.sh b/platforms/omap4+.sh index a5e8071..67c3b12 100644 --- a/platforms/omap4+.sh +++ b/platforms/omap4+.sh @@ -1,6 +1,10 @@ platform=omap4+ dir_pattern=omap arch=arm -dtbs="omap4-panda.dtb omap4-panda-es.dtb am57xx-evm-reva3.dtb:am57xx-beagle-x15.dtb" +dtbs=( + omap4-panda.dtb + omap4-panda-es.dtb + am57xx-evm-reva3.dtb:am57xx-beagle-x15.dtb +) image=FIT loadaddr=0x80008000 diff --git a/platforms/scarlet.sh b/platforms/scarlet.sh index 43408e0..a621eb5 100644 --- a/platforms/scarlet.sh +++ b/platforms/scarlet.sh @@ -2,7 +2,7 @@ platform=scarlet arch=arm64 cmdline="console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=tty1 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd ignore_loglevel" cmdline="console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=tty1 ip=dhcp root=/dev/nfs rootwait rw noinitrd ignore_loglevel" -dtbs="rockchip/rk3399-gru-scarlet-inx.dtb" +dtbs=(rockchip/rk3399-gru-scarlet-inx.dtb) image=CrOS loadaddr=0 diff --git a/platforms/zynqmp.sh b/platforms/zynqmp.sh index ab0a27e..aeb4f8d 100644 --- a/platforms/zynqmp.sh +++ b/platforms/zynqmp.sh @@ -1,7 +1,7 @@ platform=zynqmp dir_pattern=xilinx arch=arm64 -dtbs="xilinx/zynqmp-zcu106-revA.dtb" +dtbs=(xilinx/zynqmp-zcu106-revA.dtb) image=FIT loadaddr=0x00080000 kcflags="$kcflags -Wno-error=packed-not-aligned -Wno-error=sizeof-pointer-memaccess -Wno-error=stringop-truncation -Wno-error=stringop-overflow" -- cgit v1.2.3