Date: Fri, 19 Jun 2020 19:24:37 +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-12@freebsd.org Subject: svn commit: r362413 - in stable/12/release: arm64 tools Message-ID: <202006191924.05JJObYU000277@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Fri Jun 19 19:24:36 2020 New Revision: 362413 URL: https://svnweb.freebsd.org/changeset/base/362413 Log: MFC r360271-r360272, r360321 r360271: Add support for generating release images using GPT for ARM Submitted by: Daniel Engberg (Original version) Differential Revision: https://reviews.freebsd.org/D22537 r360272: Add PINE64 ROCKPro64 config for generation of release images Submitted by: Daniel Engberg Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D22538 r360321: release: arm64: rockpro64: Set hw.ncpu to 4 Since there is known issue with big.LITTLE set the number of CPU to 4 which is the number present in the LITTLE cluster. Added: stable/12/release/arm64/ROCKPRO64.conf - copied, changed from r360272, head/release/arm64/ROCKPRO64.conf Modified: stable/12/release/tools/arm.subr Directory Properties: stable/12/ (props changed) Copied and modified: stable/12/release/arm64/ROCKPRO64.conf (from r360272, head/release/arm64/ROCKPRO64.conf) ============================================================================== --- head/release/arm64/ROCKPRO64.conf Fri Apr 24 16:32:25 2020 (r360272, copy source) +++ stable/12/release/arm64/ROCKPRO64.conf Fri Jun 19 19:24:36 2020 (r362413) @@ -26,3 +26,10 @@ arm_install_uboot() { of=/dev/${mddev} bs=512 seek=16384 conv=sync return 0 } + +arm_do_quirk() { + echo '# Known issue with big.LITTLE' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf + echo 'hw.ncpu=4' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf +} Modified: stable/12/release/tools/arm.subr ============================================================================== --- stable/12/release/tools/arm.subr Fri Jun 19 19:16:25 2020 (r362412) +++ stable/12/release/tools/arm.subr Fri Jun 19 19:24:36 2020 (r362413) @@ -65,13 +65,21 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} - chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} - chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 - chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} - chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 - chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 - chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a + if [ "${PART_SCHEME}" == "GPT" ]; then + chroot ${CHROOTDIR} gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}p1 + chroot ${CHROOTDIR} gpart add -t freebsd-ufs -l rootfs -a 64k ${mddev} + chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}p2 + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} + chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 + chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} + chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 + chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 + chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a + fi return 0 } @@ -161,7 +169,12 @@ arm_setup_minimal_loader() { } arm_install_base() { - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} + if [ "${PART_SCHEME}" == "GPT" ]; then + chroot ${CHROOTDIR} mount /dev/${mddev}p2 ${DESTDIR} + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} + fi eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \ TARGET=${EMBEDDED_TARGET} \ TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ @@ -178,10 +191,18 @@ arm_install_base() { echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "/dev/ufs/rootfs / ufs rw 1 1" \ - >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ - >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + if [ "${PART_SCHEME}" == "GPT" ]; then + echo "/dev/ufs/rootfs / ufs rw 1 1" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + echo "/dev/msdosfs/efi /boot/efi msdosfs rw,noatime 0 0" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + echo "/dev/ufs/rootfs / ufs rw 1 1" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + fi echo "tmpfs /tmp tmpfs rw,mode=1777,size=50m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab @@ -206,8 +227,17 @@ 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 [ "${PART_SCHEME}" == "GPT" ]; then + dospart="/dev/${mddev}p1" + ufspart="/dev/${mddev}p2" + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + dospart="/dev/${mddev}s1" + ufspart="/dev/${mddev}s2a" + fi + + chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT} + chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT} if [ "${EMBEDDED_TARGET}" == "arm" ]; then chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006191924.05JJObYU000277>