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