Remove building with NOCRYPTO option
[minix.git] / releasetools / x86_cdimage.sh
blob657d4f4d6f7ab1f5734dcc7770912745179992d1
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 : ${SETS="minix-base"}
15 : ${IMG=minix_x86.iso}
16 : ${BUNDLE_SETS=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 "Adding extra files..."
32 workdir_add_cd_files
34 # add kernel
35 workdir_add_kernel minix_default
37 # add boot.cfg
38 cat >${ROOT_DIR}/boot.cfg <<END_BOOT_CFG
39 banner=Welcome to the MINIX 3 installation CD
40 banner================================================================================
41 banner=
42 menu=Regular MINIX 3:multiboot /boot/minix_default/kernel bootcd=1 cdproberoot=1
43 menu=Regular MINIX 3 (with AHCI):multiboot /boot/minix_default/kernel bootcd=1 cdproberoot=1 ahci=yes
44 menu=Edit menu option:edit
45 menu=Drop to boot prompt:prompt
46 clear=1
47 timeout=10
48 default=1
49 load=/boot/minix_default/mod01_ds
50 load=/boot/minix_default/mod02_rs
51 load=/boot/minix_default/mod03_pm
52 load=/boot/minix_default/mod04_sched
53 load=/boot/minix_default/mod05_vfs
54 load=/boot/minix_default/mod06_memory
55 load=/boot/minix_default/mod07_tty
56 load=/boot/minix_default/mod08_mib
57 load=/boot/minix_default/mod09_vm
58 load=/boot/minix_default/mod10_pfs
59 load=/boot/minix_default/mod11_mfs
60 load=/boot/minix_default/mod12_init
61 END_BOOT_CFG
62 add_file_spec "boot.cfg" extra.cdfiles
64 # set correct message of the day (log in and install tip)
65 cp releasetools/release/cd/etc/issue ${ROOT_DIR}/etc/issue
66 add_file_spec "etc/issue" extra.cdfiles
68 echo "Bundling packages..."
69 bundle_packages "$BUNDLE_PACKAGES"
71 echo "Creating specification files..."
72 create_input_spec
73 create_protos
75 # Clean image
76 if [ -f ${IMG} ] # IMG might be a block device
77 then
78 rm -f ${IMG}
81 echo "Writing ISO..."
82 ${CROSS_TOOLS}/nbmakefs -t cd9660 -F ${WORK_DIR}/input -o "rockridge,bootimage=i386;${DESTDIR}/usr/mdec/bootxx_cd9660,label=MINIX" ${IMG} ${ROOT_DIR}
84 echo ""
85 echo "ISO image at `pwd`/${IMG}"
86 echo ""
87 echo "To boot this image on kvm using the bootloader:"
88 echo "qemu-system-i386 --enable-kvm -cdrom `pwd`/${IMG}"
89 echo ""
90 echo "To boot this image on kvm:"
91 echo "cd ${MODDIR} && qemu-system-i386 --enable-kvm -kernel kernel -append \"bootcd=1 cdproberoot=1\" -initrd \"${mods}\" -cdrom `pwd`/${IMG}"