#!/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 minix-comp minix-games minix-man minix-tests tests"} : ${IMG=minix_x86.img} if [ ! -f ${BUILDSH} ] then echo "Please invoke me from the root source dir, where ${BUILDSH} is." exit 1 fi # we create a disk image of about 2 gig's # for alignment reasons, prefer sizes which are multiples of 4096 bytes : ${BOOTXX_SECS=32} : ${ROOT_SIZE=$(( 128*(2**20) - ${BOOTXX_SECS} * 512 ))} : ${HOME_SIZE=$(( 128*(2**20) ))} : ${USR_SIZE=$(( 1792*(2**20) ))} # set up disk creation environment . releasetools/image.defaults . releasetools/image.functions echo "Building work directory..." build_workdir "$SETS" echo "Adding extra files..." workdir_add_hdd_files # add kernels add_link_spec "boot/minix_latest" "minix_default" extra.kernel workdir_add_kernel minix_default workdir_add_kernel minix/$RELEASE_VERSION # add boot.cfg cat >${ROOT_DIR}/boot.cfg <