#!/usr/bin/env bash set -e # # This script creates a bootable image and should at some point in the future # be replaced by the proper NetBSD infrastructure. # : ${ARCH=i386} : ${OBJ=../obj.${ARCH}} : ${TOOLCHAIN_TRIPLET=i586-elf32-minix-} : ${BUILDSH=build.sh} : ${SETS="minix-base"} : ${IMG=minix_x86_usb.img} if [ ! -f ${BUILDSH} ] then echo "Please invoke me from the root source dir, where ${BUILDSH} is." exit 1 fi # set up disk creation environment . releasetools/image.defaults . releasetools/image.functions : ${RAMDISK_SIZE=$(( 200*(2**20) / 512 / 8 ))} # where the kernel & boot modules will be MODDIR=${DESTDIR}/boot/minix/.temp echo "Fetching syslinux..." ${RELEASETOOLSDIR}/fetch_syslinux.sh -o ${RELEASETOOLSDIR}/syslinux -n $SYSLINUX_GIT_VERSION echo "Building work directory..." build_workdir "$SETS" echo "Adding extra files..." # create a fstab entry in /etc cat >${ROOT_DIR}/etc/fstab <${WORK_DIR}/pxelinux.cfg/default <