5 # This script creates a bootable image and should at some point in the future
6 # be replaced by the proper NetBSD infrastructure.
10 : ${OBJ=../obj.${ARCH}}
11 : ${TOOLCHAIN_TRIPLET=i586-elf32-minix-}
14 : ${SETS="minix-base"}
15 : ${IMG=minix_x86.iso}
18 if [ ! -f ${BUILDSH} ]
20 echo "Please invoke me from the root source dir, where ${BUILDSH} is."
24 # set up disk creation environment
25 . releasetools
/image.defaults
26 . releasetools
/image.functions
28 echo "Building work directory..."
31 echo "Adding extra files..."
35 workdir_add_kernel minix_default
38 cat >${ROOT_DIR}/boot.cfg
<<END_BOOT_CFG
39 banner=Welcome to the MINIX 3 installation CD
40 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
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
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..."
76 if [ -f ${IMG} ] # IMG might be a block device
82 ${CROSS_TOOLS}/nbmakefs -t cd9660 -F ${WORK_DIR}/input -o "rockridge,bootimage=i386;${DESTDIR}/usr/mdec/bootxx_cd9660,label=MINIX" ${IMG} ${ROOT_DIR}
85 echo "ISO image at `pwd`/${IMG}"
87 echo "To boot this image on kvm using the bootloader:"
88 echo "qemu-system-i386 --enable-kvm -cdrom `pwd`/${IMG}"
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}"