4 # Will image the test directory (default /tmp/loadertest) if it doesn't exist
12 scriptdir=$(dirname $(realpath $0))
13 cd $(make -V SRCTOP)/stand
14 obj=$(make -V .OBJDIR)
15 t=$obj/userboot/test/test
17 [ -n "$dir" ] || dir=/tmp/loadertest
18 [ -d "$dir" ] || ${scriptdir}/lua-img.sh ${dir}
19 # We'll try userboot.so from the test directory before plucking it straight out
21 u=$dir/boot/userboot.so
22 [ -f "$u" ] || u=$obj/userboot/userboot_lua/userboot_lua.so
23 [ -f "$dir/boot/lua/loader.lua" ] || die "No boot/lua/loader.lua found"
24 [ -f "$dir/boot/kernel/kernel" ] || die "No kernel to load"
25 [ -x "$t" ] || die "no userboot test jig found ($t)"
26 [ -f "$u" ] || die "no userboot.so ($u) found"