Date: Fri, 11 Dec 2015 05:15:13 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292075 - head/tools/tools/nanobsd/embedded Message-ID: <201512110515.tBB5FDXo007547@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Dec 11 05:15:13 2015 New Revision: 292075 URL: https://svnweb.freebsd.org/changeset/base/292075 Log: o Resolve the real path to NANO_OBJ so everything that depends on it doesn't have lots of ../../foo in it. o Tweak the powerpc64 variant a bit. This gets us closer to working with qemu-system-poewrpc64, but we aren't quite there yet. Modified: head/tools/tools/nanobsd/embedded/common head/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Fri Dec 11 02:06:03 2015 (r292074) +++ head/tools/tools/nanobsd/embedded/common Fri Dec 11 05:15:13 2015 (r292075) @@ -86,7 +86,7 @@ NANO_CFG_BASE=$(pwd) NANO_CFG_BASE=$(realpath ${NANO_CFG_BASE}/..) NANO_SRC=$(realpath ${NANO_CFG_BASE}/../../..) #### XXX share obj -NANO_OBJ=${NANO_SRC}/../$NANO_NAME/obj +NANO_OBJ=$(realpath ${NANO_SRC}/../$NANO_NAME/obj) # Where cust_pkg() finds packages to install #XXX: Is this the right place? #NANO_PORTS=$(realpath ${NANO_SRC}/../ports) @@ -296,7 +296,7 @@ create_diskimage_mbr ( ) ( rm -fr ${NANO_OBJ}/_.${i}* done - # Populate the FAT partition + # Populate the FAT partition, if needed if [-n "${NANO_SLICE_FAT}" ]; then echo Creating MSDOS partition for kernel newfs_msdos -C ${NANO_SLICE_FAT_SIZE} -F 16 -L ${NANO_NAME} \ @@ -305,6 +305,11 @@ create_diskimage_mbr ( ) ( # makefs -t msdos once that's supported fi + # Populate the Powerpc boot image, if needed + if [ "${NANO_LAYOUT}" = powerpc64-ibm ]; then + dd if=${NANO_WORLDDIR}/boot/boot1.elf of=${NANO_OBJ}/_.s1 bs=800k count=1 conv=sync + fi + # Populate the / partition, and place it into a slice with a # bsd label [ -z ${NANO_NOPRIV_BUILD} ] || extra="-F ${NANO_METALOG}" @@ -357,9 +362,9 @@ create_diskimage_mbr ( ) ( # boot image is on a special partition, ala std-embedded, but that # partition isn't FAT with special files, but a copy of the boot # loader itself. - mkimg ${fmtarg} -s mbr -p ppcboot:=${NANO_WORLDDIR}/boot/boot1.elf \ + mkimg -a 1 ${fmtarg} -s mbr -p ppcboot:=${NANO_OBJ}/_.s1 \ -p ${s2}:=${NANO_OBJ}/_.s2 \ - -p ${s3}:=${NANO_OBJ}/_.s3 \ + -p ${s3}:=${NANO_OBJ}/_.s3a \ -o ${NANO_OBJ}/_.disk.image.${NANO_NAME}${fmt} ;; esac Modified: head/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg ============================================================================== --- head/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg Fri Dec 11 02:06:03 2015 (r292074) +++ head/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg Fri Dec 11 05:15:13 2015 (r292075) @@ -31,6 +31,6 @@ NANO_KERNEL=GENERIC64 NANO_DRIVE=ada0 NANO_NAME=qemu-powerpc64 -qemu_env +NANO_DISKIMAGE_FORMAT=qcow2 . common # Pull in common definitions, keep last
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512110515.tBB5FDXo007547>