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.
This commit is contained in:
imp 2015-12-11 05:15:13 +00:00
parent 0026debd97
commit ddf0a68e29
2 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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