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