mkisoimages.sh revision 221466
180183Sjkh#!/bin/sh
280183Sjkh#
380183Sjkh# Module: mkisoimages.sh
480183Sjkh# Author: Jordan K Hubbard
580183Sjkh# Date:   22 June 2001
680183Sjkh#
780183Sjkh# $FreeBSD: head/release/i386/mkisoimages.sh 221466 2011-05-04 23:41:11Z nwhitehorn $
880183Sjkh#
980183Sjkh# This script is used by release/Makefile to build the (optional) ISO images
1080183Sjkh# for a FreeBSD release.  It is considered architecture dependent since each
1180183Sjkh# platform has a slightly unique way of making bootable CDs.  This script
1280183Sjkh# is also allowed to generate any number of images since that is more of
1380183Sjkh# publishing decision than anything else.
1480183Sjkh#
1580183Sjkh# Usage:
1680183Sjkh#
17138275Sjhb# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
1880183Sjkh#
19138275Sjhb# Where -b is passed if the ISO image should be made "bootable" by
2080183Sjkh# whatever standards this architecture supports (may be unsupported),
2180183Sjkh# image-label is the ISO image label, image-name is the filename of the
2280183Sjkh# resulting ISO image, base-bits-dir contains the image contents and
2380183Sjkh# extra-bits-dir, if provided, contains additional files to be merged
2480183Sjkh# into base-bits-dir as part of making the image.
2580183Sjkh
26132203Smurraypublisher="The FreeBSD Project.  http://www.freebsd.org/"
2780183Sjkhif [ "x$1" = "x-b" ]; then
28221466Snwhitehorn	# This is highly x86-centric and will be used directly below.
29221466Snwhitehorn	bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot"
3080183Sjkh	shift
3180183Sjkhelse
3280183Sjkh	bootable=""
3380183Sjkhfi
3480183Sjkh
3580183Sjkhif [ $# -lt 3 ]; then
36221466Snwhitehorn	echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]'
3780183Sjkh	exit 1
3880183Sjkhfi
3980183Sjkh
4080183SjkhLABEL=$1; shift
4180183SjkhNAME=$1; shift
4280183Sjkh
43221466Snwhitehornecho "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $1/etc/fstab
44221466Snwhitehornmakefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $*
45219856Snwhitehornrm $1/etc/fstab
46