1#!/bin/sh 2 3# Quick script to build a suitable /boot dir somewhere in the tree for testing. 4# dir may be passed in, will default to /tmp/loadertest if not specified 5 6die() { 7 echo $* 8 exit 1 9} 10 11dir=$1 12cd $(make -V SRCTOP) 13 14[ -n "$dir" ] || dir=/tmp/loadertest 15 16set -e 17 18rm -rf ${dir} 19mkdir -p ${dir} 20mtree -deUW -f etc/mtree/BSD.root.dist -p ${dir} 21mtree -deUW -f etc/mtree/BSD.usr.dist -p ${dir}/usr 22cd stand 23make -j4 all install DESTDIR=${dir} NO_ROOT=t MK_LOADER_LUA=yes MK_FORTH=no MK_INSTALL_AS_USER=yes 24mkdir -p ${dir}/boot/kernel 25cp /boot/kernel/kernel ${dir}/boot/kernel 26