aboutsummaryrefslogtreecommitdiff
path: root/release/powerpc
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2014-05-01 03:24:41 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2014-05-01 03:24:41 +0000
commit18cb3a015d57e62c2bb9abb0a81e563daab432e3 (patch)
tree9b28ad945e979fb0001a72b17a025de38f99825b /release/powerpc
parent2cbc36ab59923f6a87f605e6bc3551db814bbf53 (diff)
downloadsrc-18cb3a015d57e62c2bb9abb0a81e563daab432e3.tar.gz
src-18cb3a015d57e62c2bb9abb0a81e563daab432e3.zip
Use mkimg instead of md(4) and gpart.
Notes
Notes: svn path=/head/; revision=265171
Diffstat (limited to 'release/powerpc')
-rwxr-xr-xrelease/powerpc/make-memstick.sh33
1 files changed, 1 insertions, 32 deletions
diff --git a/release/powerpc/make-memstick.sh b/release/powerpc/make-memstick.sh
index 2277af072fce..4f6b69d47397 100755
--- a/release/powerpc/make-memstick.sh
+++ b/release/powerpc/make-memstick.sh
@@ -41,38 +41,7 @@ if [ $? -ne 0 ]; then
fi
rm ${1}/etc/fstab
-#
-# Use $BLOCKSIZE for transfers to improve efficiency. When calculating
-# how many blocks to transfer "+ 2" is to account for truncation in the
-# division and to provide space for the label.
-#
-
-filesize=`stat -f "%z" ${tempfile}`
-blocks=$(($filesize / ${BLOCKSIZE} + 1728))
-dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks}
-if [ $? -ne 0 ]; then
- echo "creation of image file failed"
- exit 1
-fi
-
-unit=`mdconfig -a -t vnode -f ${2}`
-if [ $? -ne 0 ]; then
- echo "mdconfig failed"
- exit 1
-fi
-
-gpart create -s APM ${unit}
-gpart add -t freebsd-boot -s 800K ${unit}
-gpart bootcode -p ${1}/boot/boot1.hfs -i 1 ${unit}
-gpart add -t freebsd-ufs -l FreeBSD_Install ${unit}
-
-dd if=${tempfile} of=/dev/${unit}s3 bs=$BLOCKSIZE conv=sync
-if [ $? -ne 0 ]; then
- echo "copying filesystem into image file failed"
- exit 1
-fi
-
-mdconfig -d -u ${unit}
+mkimg -s apm -p freebsd-boot:=${1}/boot/boot1.hfs -p freebsd-ufs/FreeBSD_Install:=${tempfile} -o ${2}
rm -f ${tempfile}