From f52add12964778a749d7bceb92b4cd70d4f36776 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 14 Feb 2018 18:21:54 +0000 Subject: [PATCH] Simple script to image a small test area from a built tree. Build with 'cd stand; make MK_FORTH=no MK_LOADER_LUA=yes' then run this script. You can then test with lua-test.sh with the same parameter. --- tools/boot/lua-img.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/boot/lua-img.sh diff --git a/tools/boot/lua-img.sh b/tools/boot/lua-img.sh new file mode 100644 index 00000000000..5e9cc8d446c --- /dev/null +++ b/tools/boot/lua-img.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# $FreeBSD$ + +# Quick script to build a suitable /boot dir somewhere in the tree for testing. + +die() { + echo $* + exit 1 +} + +dir=$1 +cd $(make -V SRCTOP) + +[ -n "$dir" ] || die "No directory specified" + +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 +make install DESTDIR=${dir} NO_ROOT=t MK_LOADER_LUA=yes MK_FORTH=no MK_INSTALL_AS_USER=yes +mkdir -p ${dir}/boot/kernel +cp /boot/kernel/kernel ${dir}/boot/kernel