Module Name:    src
Committed By:   martin
Date:           Wed Oct 30 12:28:32 UTC 2019

Modified Files:
        src/distrib/utils/embedded/conf: armv7.conf

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/distrib/utils/embedded/conf/armv7.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/embedded/conf/armv7.conf
diff -u src/distrib/utils/embedded/conf/armv7.conf:1.36 src/distrib/utils/embedded/conf/armv7.conf:1.37
--- src/distrib/utils/embedded/conf/armv7.conf:1.36	Sun Oct 27 21:38:58 2019
+++ src/distrib/utils/embedded/conf/armv7.conf	Wed Oct 30 12:28:32 2019
@@ -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"

Reply via email to