Remove building with NOCRYPTO option
[minix.git] / releasetools / pkgsrc_cdimage.sh
blob2ebbae30593eecd7cc5f266db2c4fe07cc3b5189
1 #!/usr/bin/env bash
2 set -e
5 # This script creates a bootable image and should at some point in the future
6 # be replaced by the proper NetBSD infrastructure.
9 : ${ARCH=i386}
10 : ${OBJ=../obj.${ARCH}}
11 : ${TOOLCHAIN_TRIPLET=i586-elf32-minix-}
12 : ${BUILDSH=build.sh}
14 : ${IMG=minix_pkgsrc.iso}
15 : ${SETS=}
16 : ${CREATE_IMAGE_ONLY=1}
18 if [ ! -f ${BUILDSH} ]
19 then
20 echo "Please invoke me from the root source dir, where ${BUILDSH} is."
21 exit 1
24 # set up disk creation environment
25 . releasetools/image.defaults
26 . releasetools/image.functions
28 echo "Building work directory..."
29 build_workdir "$SETS"
31 echo "Bundling packages..."
32 bundle_packages "$BUNDLE_PACKAGES"
34 echo "Creating specification files..."
35 cat > ${WORK_DIR}/extra.base <<EOF
36 . type=dir uid=0 gid=0 mode=0755
37 ./usr type=dir uid=0 gid=0 mode=0755
38 EOF
39 create_input_spec
40 create_protos
42 # Clean image
43 if [ -f ${IMG} ] # IMG might be a block device
44 then
45 rm -f ${IMG}
48 echo "Writing ISO..."
49 ${CROSS_TOOLS}/nbmakefs -t cd9660 -F ${WORK_DIR}/input -o "rockridge,label=MINIX_PKGSRC" ${IMG} ${ROOT_DIR}
51 echo ""
52 echo "ISO image at `pwd`/${IMG}"