Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/embedded/conf Move a lot of *.dtb files to a d...



details:   https://anonhg.NetBSD.org/src/rev/f5bafe9fd3e5
branches:  trunk
changeset: 1004493:f5bafe9fd3e5
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Oct 30 12:28:32 2019 +0000

description:
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.

diffstat:

 distrib/utils/embedded/conf/armv7.conf |  20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 9c076549ed31 -r f5bafe9fd3e5 distrib/utils/embedded/conf/armv7.conf
--- a/distrib/utils/embedded/conf/armv7.conf    Wed Oct 30 12:25:28 2019 +0000
+++ b/distrib/utils/embedded/conf/armv7.conf    Wed Oct 30 12:28:32 2019 +0000
@@ -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 @@
 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 @@
                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"



Home | Main Index | Thread Index | Old Index