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.
This commit is contained in:
martin 2019-10-30 12:28:32 +00:00
parent a65211afef
commit c5068cfe52
1 changed files with 15 additions and 5 deletions

View File

@ -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"