Date: Wed, 25 Jul 2018 21:52:50 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r336726 - in stable/11/release: . arm tools Message-ID: <201807252152.w6PLqoGs044399@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Wed Jul 25 21:52:49 2018 New Revision: 336726 URL: https://svnweb.freebsd.org/changeset/base/336726 Log: MFC r336598-r336600, r336721 r336598: release: Uniform release arm image size Create a 50m fat16 for all boards. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D16238 r336599: 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) Differential Revision: https://reviews.freebsd.org/D16239 r336600: release: Add rpi firmware dtb and mmc overlays for RPI-B and RPI2 This is needed with new u-boot that uses the rpi-firmware dtbs. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D16240 r336721: release: Add OL_DIR forgot in r336600 Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D16439 Approved by: gjb (for insta-mfc of r336721) Modified: stable/11/release/arm/BANANAPI.conf stable/11/release/arm/BEAGLEBONE.conf stable/11/release/arm/CUBIEBOARD.conf stable/11/release/arm/CUBIEBOARD2.conf stable/11/release/arm/GUMSTIX.conf stable/11/release/arm/PANDABOARD.conf stable/11/release/arm/RPI-B.conf stable/11/release/arm/RPI2.conf stable/11/release/arm/WANDBOARD.conf stable/11/release/release.sh stable/11/release/tools/arm.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/release/arm/BANANAPI.conf ============================================================================== --- stable/11/release/arm/BANANAPI.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/BANANAPI.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-bananapi" -FAT_SIZE="32m -b 1m" +FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="1G" KERNEL="ALLWINNER" @@ -20,8 +20,6 @@ export BOARDNAME="BANANAPI" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-bananapi" UBOOT_FILES="u-boot-sunxi-with-spl.bin" - FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=1k seek=8 conv=sync chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" @@ -30,8 +28,6 @@ arm_install_uboot() { chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/bananapi.dtb \ - ${UFSMOUNT}/boot/dtb/sun7i-a20-bananapi.dtb chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} Modified: stable/11/release/arm/BEAGLEBONE.conf ============================================================================== --- stable/11/release/arm/BEAGLEBONE.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/BEAGLEBONE.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-beaglebone" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="1G" KERNEL="BEAGLEBONE" @@ -19,25 +19,17 @@ WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-beaglebone" FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/beaglebone.dtb \ - ${UFSMOUNT}/boot/dtb/am335x-bone.dtb - chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/beaglebone-black.dtb \ - ${UFSMOUNT}/boot/dtb/am335x-boneblack.dtb chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: stable/11/release/arm/CUBIEBOARD.conf ============================================================================== --- stable/11/release/arm/CUBIEBOARD.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/CUBIEBOARD.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-cubieboard" -FAT_SIZE="32m -b 1m" +FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="1G" KERNEL="ALLWINNER_UP" Modified: stable/11/release/arm/CUBIEBOARD2.conf ============================================================================== --- stable/11/release/arm/CUBIEBOARD2.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/CUBIEBOARD2.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-cubieboard2" -FAT_SIZE="32m -b 1m" +FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="1G" KERNEL="ALLWINNER" Modified: stable/11/release/arm/GUMSTIX.conf ============================================================================== --- stable/11/release/arm/GUMSTIX.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/GUMSTIX.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="arm" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-duovero" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="1G" KERNEL="GUMSTIX" Modified: stable/11/release/arm/PANDABOARD.conf ============================================================================== --- stable/11/release/arm/PANDABOARD.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/PANDABOARD.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-pandaboard" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="1G" KERNEL="PANDABOARD" Modified: stable/11/release/arm/RPI-B.conf ============================================================================== --- stable/11/release/arm/RPI-B.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/RPI-B.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -7,12 +7,13 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi sysutils/rpi-firmware" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="1G" KERNEL="RPI-B" MD_ARGS="-x 63 -y 255" NODOC=1 +OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo" PART_SCHEME="MBR" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" @@ -22,12 +23,12 @@ arm_install_uboot() { UBOOT_FILES="u-boot.bin" RPI_FIRMWARE_FILES="bootcode.bin config.txt \ fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ - start.elf start_cd.elf start_db.elf start_x.elf" + start.elf start_cd.elf start_db.elf start_x.elf \ + bcm2708-rpi-0-w.dtb bcm2708-rpi-b-plus.dtb bcm2708-rpi-b.dtb \ + bcm2708-rpi-cm.dtb" FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} for _UF in ${UBOOT_FILES}; do chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ ${FATMOUNT}/${_UF} @@ -36,17 +37,15 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} done - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/dtb/rpi.dtb \ - ${FATMOUNT}/rpi.dtb + chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays + for _OL in ${OVERLAYS}; do + chroot ${CHROOTDIR} cp -p ${OL_DIR}/${_OL} \ + ${FATMOUNT}/overlays/${_OL} + done chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: stable/11/release/arm/RPI2.conf ============================================================================== --- stable/11/release/arm/RPI2.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/RPI2.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -13,6 +13,7 @@ IMAGE_SIZE="1536M" KERNEL="RPI2" MD_ARGS="-x 63 -y 255" NODOC=1 +OVERLAYS="mmc.dtbo" PART_SCHEME="MBR" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" @@ -22,12 +23,11 @@ arm_install_uboot() { UBOOT_FILES="u-boot.bin" RPI_FIRMWARE_FILES="bootcode.bin config.txt \ fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ - start.elf start_cd.elf start_db.elf start_x.elf" + start.elf start_cd.elf start_db.elf start_x.elf \ + bcm2709-rpi-2-b.dtb" FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} for _UF in ${UBOOT_FILES}; do chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ ${FATMOUNT}/${_UF} @@ -36,17 +36,15 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} done - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/dtb/rpi2.dtb \ - ${FATMOUNT}/rpi2.dtb + chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays + for _OL in ${OVERLAYS}; do + chroot ${CHROOTDIR} cp -p ${OL_DIR}/${_OL} \ + ${FATMOUNT}/overlays/${_OL} + done chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: stable/11/release/arm/WANDBOARD.conf ============================================================================== --- stable/11/release/arm/WANDBOARD.conf Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/arm/WANDBOARD.conf Wed Jul 25 21:52:49 2018 (r336726) @@ -20,22 +20,8 @@ export BOARDNAME="WANDBOARD" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-wandboard" UBOOT_FILES="u-boot.imx" - FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=512 seek=2 conv=sync - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot - sync - umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} - chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: stable/11/release/release.sh ============================================================================== --- stable/11/release/release.sh Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/release.sh Wed Jul 25 21:52:49 2018 (r336726) @@ -358,6 +358,21 @@ chroot_build_release() { return 0 } # chroot_build_release() +efi_boot_name() +{ + case $1 in + arm) + echo "bootarm.efi" + ;; + arm64) + echo "bootaa64.efi" + ;; + amd64) + echo "bootx86.efi" + ;; + esac +} + # chroot_arm_build_release(): Create arm SD card image. chroot_arm_build_release() { load_target_env @@ -385,6 +400,7 @@ chroot_arm_build_release() { mdconfig -f ${IMGBASE##${CHROOTDIR}} ${MD_ARGS}) arm_create_disk arm_install_base + arm_install_boot arm_install_uboot mdconfig -d -u ${mddev} chroot ${CHROOTDIR} rmdir ${DESTDIR} Modified: stable/11/release/tools/arm.subr ============================================================================== --- stable/11/release/tools/arm.subr Wed Jul 25 19:31:32 2018 (r336725) +++ stable/11/release/tools/arm.subr Wed Jul 25 21:52:49 2018 (r336726) @@ -130,6 +130,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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807252152.w6PLqoGs044399>