From c5068cfe5257592d1715bdfadcfe2b66af431c55 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 30 Oct 2019 12:28:32 +0000 Subject: [PATCH] Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition. Mkimage (eroneously) creates a FAT16 partition (despite the configuration asking for FAT32), and that has a root directory size limit. Idea from Jared. --- distrib/utils/embedded/conf/armv7.conf | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/distrib/utils/embedded/conf/armv7.conf b/distrib/utils/embedded/conf/armv7.conf index 5945c32153b0..a9f9db28888e 100644 --- a/distrib/utils/embedded/conf/armv7.conf +++ b/distrib/utils/embedded/conf/armv7.conf @@ -1,4 +1,4 @@ -# $NetBSD: armv7.conf,v 1.36 2019/10/27 21:38:58 jmcneill Exp $ +# $NetBSD: armv7.conf,v 1.37 2019/10/30 12:28:32 martin Exp $ # ARMv7 customization script used by mkimage # board=armv7 @@ -106,7 +106,7 @@ populate_amlogic() { ODROIDC-UBOOT-CONFIG setenv bootargs "awge0.mac-address=\${ethaddr}" -setenv bootcmd "fatload mmc 0:1 0x21000000 ${odroidc1_kernelimg}; fatload mmc 0:1 0x20000000 meson8b-odroidc1.dtb; bootm 0x21000000 - 0x20000000" +setenv bootcmd "fatload mmc 0:1 0x21000000 ${odroidc1_kernelimg}; fatload mmc 0:1 0x20000000 dtb/meson8b-odroidc1.dtb; bootm 0x21000000 - 0x20000000" run bootcmd EOF } @@ -135,16 +135,26 @@ populate() { done done + # "kernels" includes some .dtb files that should go into a separate + # directory + mkdir -p "${mnt}/boot/dtb" + # install kernels to /boot partition for k in ${kernels}; do tgt="$(basename ${k} | sed 's/\.gz$//')" - echo "${bar} installing ${k} to /boot/${tgt} ${bar}" + case "${tgt}" in + sun*.dtb|am335x-*.dtb|meson8b-*.dtb|tegra*.dtb|vexpress*.dtb) + pfx="dtb/";; + *) + pfx=;; + esac + echo "${bar} installing ${k} to /boot/${tgt} (on ${mnt}, pfx=${pfx}) ${bar}" case "${k}" in *.gz) - ${GZIP_CMD} -dc "${k}" > "${mnt}/boot/${tgt}" + ${GZIP_CMD} -dc "${k}" > "${mnt}/boot/${pfx}${tgt}" ;; *) - cp "${k}" "${mnt}/boot/${tgt}" + cp "${k}" "${mnt}/boot/${pfx}${tgt}" ;; esac || fail "Copy of ${k} to ${mnt}/boot/${tgt} failed"