From owner-svn-src-all@freebsd.org Fri Dec 11 05:15:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE7239D7E8A; Fri, 11 Dec 2015 05:15:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E9D31615; Fri, 11 Dec 2015 05:15:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBB5FDm4007549; Fri, 11 Dec 2015 05:15:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBB5FDXo007547; Fri, 11 Dec 2015 05:15:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512110515.tBB5FDXo007547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 11 Dec 2015 05:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292075 - head/tools/tools/nanobsd/embedded X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 05:15:15 -0000 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