aboutsummaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2011-08-13 13:18:39 +0000
committerMarius Strobl <marius@FreeBSD.org>2011-08-13 13:18:39 +0000
commit7b92bec5a4f068c80c111dc47a328676c4745d39 (patch)
tree3edda220e242af09f2e253adfe8d01b367f1e89c /release
parent26543eb5f53c663f743c5a8d7c693daca7c8c94e (diff)
Notes
Diffstat (limited to 'release')
-rw-r--r--release/Makefile20
-rw-r--r--release/amd64/mkisoimages.sh19
-rw-r--r--release/i386/mkisoimages.sh26
-rw-r--r--release/pc98/mkisoimages.sh42
-rw-r--r--release/sun4v/mkisoimages.sh70
5 files changed, 126 insertions, 51 deletions
diff --git a/release/Makefile b/release/Makefile
index a6108d58c52b..7d32072d45d4 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -335,12 +335,8 @@ EXTRAS+= cdrom.1 cdrom.2 cdrom.3
.if defined(MAKE_ISOS)
EXTRAS+= iso.1
.endif
-.if ${TARGET} == "pc98"
-BOOTABLE="-G"
-.else
BOOTABLE="-b"
.endif
-.endif
.if !defined(NODOC)
DOCREL= doc.1 doc.2
@@ -1123,35 +1119,35 @@ CD_DVD1_PKGS= ${CD_PACKAGE_TREE}/dvd1
.endif
iso.1:
-.if exists(${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh)
+.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
@echo "Creating ISO images..."
.if defined(CD_BOOT)
- @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
+ @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \
FreeBSD_bootonly \
${CD}/FreeBSD-${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT}
.endif
- @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
+ @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \
FreeBSD_Install \
${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \
${CD_DISC1_PKGS}
- @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \
+ @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \
FreeBSD_Packages \
${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} \
${CD_DISC2_PKGS}
.if defined(MAKE_DVD)
- @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
+ @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \
FreeBSD_Install \
${CD}/FreeBSD-${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \
${CD_DVD1_PKGS}
.endif
.if !defined(NODOC)
- @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \
+ @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \
FreeBSD_Documentation \
${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc3.iso ${CD_DOCS} \
${CD_DOCS_PKGS}
.endif
.if defined(SEPARATE_LIVEFS)
- @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
+ @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \
FreeBSD_LiveFS \
${CD}/FreeBSD-${BUILDNAME}-${TARGET}-livefs.iso ${CD_LIVEFS}
.endif
@@ -1160,7 +1156,7 @@ iso.1:
@(cd ${CD} && sha256 *.iso > FreeBSD-${BUILDNAME}-${TARGET}-iso.CHECKSUM.SHA256)
touch ${.TARGET}
.else
- @echo "Do not know how to create an ISO for ${TARGET_ARCH}."
+ @echo "Do not know how to create an ISO for ${TARGET}."
.endif
#
diff --git a/release/amd64/mkisoimages.sh b/release/amd64/mkisoimages.sh
index a538d5b8764b..2b1014e2b8c6 100644
--- a/release/amd64/mkisoimages.sh
+++ b/release/amd64/mkisoimages.sh
@@ -23,10 +23,9 @@
# extra-bits-dir, if provided, contains additional files to be merged
# into base-bits-dir as part of making the image.
-publisher="The FreeBSD Project. http://www.freebsd.org/"
if [ "x$1" = "x-b" ]; then
# This is highly x86-centric and will be used directly below.
- bootable="-b boot/cdboot -no-emul-boot"
+ bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot"
shift
else
bootable=""
@@ -37,21 +36,7 @@ if [ $# -lt 3 ]; then
exit 1
fi
-type mkisofs 2>&1 | grep " is " >/dev/null
-if [ $? -ne 0 ]; then
- echo The cdrtools port is not installed. Trying to get it now.
- if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then
- cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean
- else
- if ! pkg_add -r cdrtools; then
- echo "Could not get it via pkg_add - please go install this"
- echo "from the ports collection and run this script again."
- exit 2
- fi
- fi
-fi
-
LABEL=$1; shift
NAME=$1; shift
-mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $*
+makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $*
diff --git a/release/i386/mkisoimages.sh b/release/i386/mkisoimages.sh
index 9bb3dbcaac85..2b1014e2b8c6 100644
--- a/release/i386/mkisoimages.sh
+++ b/release/i386/mkisoimages.sh
@@ -23,38 +23,20 @@
# extra-bits-dir, if provided, contains additional files to be merged
# into base-bits-dir as part of making the image.
-publisher="The FreeBSD Project. http://www.freebsd.org/"
-
if [ "x$1" = "x-b" ]; then
- bootable="-b boot/cdboot -no-emul-boot"
- shift
-elif [ "x$1" = "x-G" ]; then
- bootable="-G /R/cdrom/bootonly/boot/cdboot"
+ # This is highly x86-centric and will be used directly below.
+ bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot"
shift
else
bootable=""
fi
if [ $# -lt 3 ]; then
- echo Usage: $0 '[-bG] image-label image-name base-bits-dir [extra-bits-dir]'
+ echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]'
exit 1
fi
-type mkisofs 2>&1 | grep " is " >/dev/null
-if [ $? -ne 0 ]; then
- echo The cdrtools port is not installed. Trying to get it now.
- if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then
- cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean
- else
- if ! pkg_add -r cdrtools; then
- echo "Could not get it via pkg_add - please go install this"
- echo "from the ports collection and run this script again."
- exit 2
- fi
- fi
-fi
-
LABEL=$1; shift
NAME=$1; shift
-mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $*
+makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $*
diff --git a/release/pc98/mkisoimages.sh b/release/pc98/mkisoimages.sh
new file mode 100644
index 000000000000..832834a40f75
--- /dev/null
+++ b/release/pc98/mkisoimages.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Module: mkisoimages.sh
+# Author: Jordan K Hubbard
+# Date: 22 June 2001
+#
+# $FreeBSD$
+#
+# This script is used by release/Makefile to build the (optional) ISO images
+# for a FreeBSD release. It is considered architecture dependent since each
+# platform has a slightly unique way of making bootable CDs. This script
+# is also allowed to generate any number of images since that is more of
+# publishing decision than anything else.
+#
+# Usage:
+#
+# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
+#
+# Where -b is passed if the ISO image should be made "bootable" by
+# whatever standards this architecture supports (may be unsupported),
+# image-label is the ISO image label, image-name is the filename of the
+# resulting ISO image, base-bits-dir contains the image contents and
+# extra-bits-dir, if provided, contains additional files to be merged
+# into base-bits-dir as part of making the image.
+
+if [ "x$1" = "x-b" ]; then
+ # This is highly x86-centric and will be used directly below.
+ bootable="-o generic-bootimage=$4/boot/cdboot"
+ shift
+else
+ bootable=""
+fi
+
+if [ $# -lt 3 ]; then
+ echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]'
+ exit 1
+fi
+
+LABEL=$1; shift
+NAME=$1; shift
+
+makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $*
diff --git a/release/sun4v/mkisoimages.sh b/release/sun4v/mkisoimages.sh
new file mode 100644
index 000000000000..333cf1b8a9e3
--- /dev/null
+++ b/release/sun4v/mkisoimages.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# Module: mkisoimages.sh
+# Author: Jordan K Hubbard
+# Date: 22 June 2001
+#
+# $FreeBSD$
+#
+# This script is used by release/Makefile to build the (optional) ISO images
+# for a FreeBSD release. It is considered architecture dependent since each
+# platform has a slightly unique way of making bootable CDs. This script
+# is also allowed to generate any number of images since that is more of
+# publishing decision than anything else.
+#
+# Usage:
+#
+# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
+#
+# Where -b is passed if the ISO image should be made "bootable" by
+# whatever standards this architecture supports (may be unsupported),
+# image-label is the ISO image label, image-name is the filename of the
+# resulting ISO image, base-bits-dir contains the image contents and
+# extra-bits-dir, if provided, contains additional files to be merged
+# into base-bits-dir as part of making the image.
+
+publisher="The FreeBSD Project. http://www.freebsd.org/"
+IMG=/tmp/bootfs
+MNT=/mnt
+
+if [ "x$1" = "x-b" ]; then
+ dd if=/dev/zero of=${IMG} bs=512 count=1024
+ MD=`mdconfig -a -t vnode -f ${IMG}`
+ sunlabel -w -B -b $4/boot/boot1 ${MD} auto
+ newfs -O1 -o space -m 0 /dev/${MD}
+ mount /dev/${MD} ${MNT}
+ mkdir ${MNT}/boot
+ cp $4/boot/loader ${MNT}/boot
+ umount ${MNT}
+ mdconfig -d -u ${MD#md}
+ bootable="-B ,,,,${IMG}"
+ shift
+else
+ bootable=""
+fi
+
+if [ $# -lt 3 ]; then
+ echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]'
+ rm -f ${IMG}
+ exit 1
+fi
+
+type mkisofs 2>&1 | grep " is " >/dev/null
+if [ $? -ne 0 ]; then
+ echo The cdrtools port is not installed. Trying to get it now.
+ if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then
+ cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean
+ else
+ if ! pkg_add -r cdrtools; then
+ echo "Could not get it via pkg_add - please go install this"
+ echo "from the ports collection and run this script again."
+ exit 2
+ fi
+ fi
+fi
+
+LABEL=$1; shift
+NAME=$1; shift
+
+mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $*
+rm -f ${IMG}