2018-02-14 18:21:54 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
# Quick script to build a suitable /boot dir somewhere in the tree for testing.
|
2018-02-16 20:23:48 +00:00
|
|
|
# dir may be passed in, will default to /tmp/loadertest if not specified
|
2018-02-14 18:21:54 +00:00
|
|
|
|
|
|
|
die() {
|
|
|
|
echo $*
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
dir=$1
|
|
|
|
cd $(make -V SRCTOP)
|
|
|
|
|
2018-02-16 20:23:48 +00:00
|
|
|
[ -n "$dir" ] || dir=/tmp/loadertest
|
2018-02-14 18:21:54 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf ${dir}
|
|
|
|
mkdir -p ${dir}
|
|
|
|
mtree -deUW -f etc/mtree/BSD.root.dist -p ${dir}
|
|
|
|
mtree -deUW -f etc/mtree/BSD.usr.dist -p ${dir}/usr
|
|
|
|
cd stand
|
2021-01-31 16:07:31 +00:00
|
|
|
make -j4 all install DESTDIR=${dir} NO_ROOT=t MK_LOADER_LUA=yes MK_FORTH=no MK_INSTALL_AS_USER=yes
|
2018-02-14 18:21:54 +00:00
|
|
|
mkdir -p ${dir}/boot/kernel
|
|
|
|
cp /boot/kernel/kernel ${dir}/boot/kernel
|