aboutsummaryrefslogtreecommitdiff
path: root/release/tools
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2018-07-22 12:03:17 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2018-07-22 12:03:17 +0000
commit43e289df5a2c4330de932f490cd4246878c51247 (patch)
tree3061c92b508e8f7416fc7aedf7937ed3dddce1b2 /release/tools
parent1f8b431d185416f70e96f03b8fd69b98442b1913 (diff)
downloadsrc-43e289df5a2c4330de932f490cd4246878c51247.tar.gz
src-43e289df5a2c4330de932f490cd4246878c51247.zip
release: Add arm_install_boot to install the commit boot bits
This reduce the per-board arm_install_uboot to just install u-boot. While here remove the installation of rpi.dtb and rpi2.dtb as we load them from the UFS partition via ubldr. Reviewed by: gjb, imp (older version) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D16239
Notes
Notes: svn path=/head/; revision=336599
Diffstat (limited to 'release/tools')
-rw-r--r--release/tools/arm.subr30
1 files changed, 30 insertions, 0 deletions
diff --git a/release/tools/arm.subr b/release/tools/arm.subr
index 902cf21b9af3..855f7b0d3d12 100644
--- a/release/tools/arm.subr
+++ b/release/tools/arm.subr
@@ -165,6 +165,36 @@ arm_install_base() {
return 0
}
+arm_install_boot() {
+ FATMOUNT="${DESTDIR%${KERNEL}}/fat"
+ UFSMOUNT="${DESTDIR%${KERNEL}}/ufs"
+ chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
+ chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT}
+ chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
+
+ if [ "${EMBEDDED_TARGET}" == "arm" ]; then
+ chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
+ ${FATMOUNT}/ubldr.bin
+ fi
+
+ BOOTFILES="$(chroot ${CHROOTDIR} \
+ env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
+ WITH_UNIFIED_OBJDIR=yes \
+ make -C ${WORLDDIR}/stand -V .OBJDIR)"
+ BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})"
+
+ chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT
+ chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/loader/loader.efi \
+ ${FATMOUNT}/EFI/BOOT/$(efi_boot_name ${EMBEDDED_TARGET})
+
+ chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
+ sync
+ umount_loop ${CHROOTDIR}/${FATMOUNT}
+ umount_loop ${CHROOTDIR}/${UFSMOUNT}
+ chroot ${CHROOTDIR} rmdir ${FATMOUNT}
+ chroot ${CHROOTDIR} rmdir ${UFSMOUNT}
+}
+
arm_install_uboot() {
# Override in the arm/KERNEL.conf file.