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"}
16 if [ ! -f ${BUILDSH} ]
18 echo "Please invoke me from the root source dir, where ${BUILDSH} is."
22 #: ${RAMDISK_SIZE=$(( 200*(2**20) ))}
24 # set up disk creation environment
25 . releasetools
/image.defaults
26 . releasetools
/image.functions
28 # where the kernel & boot modules will be
29 MODDIR
=${DESTDIR}/boot
/minix
/.temp
31 echo "Building work directory..."
34 echo "Adding extra files..."
35 workdir_add_ramdisk_files
37 # set correct message of the day (log in and install tip)
38 cp releasetools
/release
/ramdisk
/etc
/issue
${ROOT_DIR}/etc
/issue
39 add_file_spec
"etc/issue" extra.cdfiles
41 echo "Bundling packages..."
42 bundle_packages
"$BUNDLE_PACKAGES"
44 echo "Creating specification files..."
48 echo "Writing ramdisk image..."
49 # add the other modules for boot
50 cp ${MODDIR}/* ${WORK_DIR}
51 create_ramdisk_image
${RAMDISK_SIZE}
54 echo "RAM image modules at ${WORK_DIR}"
56 echo "To boot this image on kvm:"
57 echo "cd ${WORK_DIR} && qemu-system-i386 --enable-kvm -m 1G -kernel kernel -append \"bootramdisk=1\" -initrd \"${mods}\""