mkisoimages.sh revision 287635
117987Speter#!/bin/sh
250471Speter#
31556Srgrimes# Module: mkisoimages.sh
41556Srgrimes# Author: Jordan K Hubbard
5127167Sru# Date:   22 June 2001
635783Sbde#
71556Srgrimes# $FreeBSD: head/release/pc98/mkisoimages.sh 287635 2015-09-10 22:47:26Z dteske $
886692Sknu#
986505Sknu# This script is used by release/Makefile to build the (optional) ISO images
1035783Sbde# for a FreeBSD release.  It is considered architecture dependent since each
11124751Sru# platform has a slightly unique way of making bootable CDs.  This script
1235783Sbde# is also allowed to generate any number of images since that is more of
1317987Speter# publishing decision than anything else.
1451090Ssheldonh#
1551090Ssheldonh# Usage:
1651090Ssheldonh#
1751090Ssheldonh# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
18125503Sru#
19125503Sru# Where -b is passed if the ISO image should be made "bootable" by
2017987Speter# whatever standards this architecture supports (may be unsupported),
211556Srgrimes# image-label is the ISO image label, image-name is the filename of the
221556Srgrimes# resulting ISO image, base-bits-dir contains the image contents and
2317988Speter# extra-bits-dir, if provided, contains additional files to be merged
2417988Speter# into base-bits-dir as part of making the image.
25126173Sjohan
26114500Sobrienif [ "x$1" = "x-b" ]; then
2717987Speter	# This is highly x86-centric and will be used directly below.
2886505Sknu	bootable="-o generic-bootimage=$4/boot/cdboot"
2986692Sknu	shift
301556Srgrimeselse
3130113Sjkh	bootable=""
3235783Sbdefi
3330113Sjkh
341556Srgrimesif [ $# -lt 3 ]; then
3537456Sbde	echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]"
3637456Sbde	exit 1
3730113Sjkhfi
3825903Ssteve
3917987SpeterLABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift
401556SrgrimesNAME="$1"; shift
4125903Ssteve
4225903Sstevepublisher="The FreeBSD Project.  http://www.FreeBSD.org/"
4317987Speterecho "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab"
441556Srgrimesmakefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@"
4528729Sbderm "$1/etc/fstab"
4628729Sbde