freebsd-dev/stand
Kyle Evans bac5966e2d lualoader: rewrite try_include using lfs + dofile
Actual modules get require()'d in, rather than try_include(). All instances
of try_include should be provided with proper hooks/API in the rest of
loader to do the work they need to do, since we can't rely on them to exist.
Convert this now to lfs + dofile since we won't really be treating them as
modules.

lfs is required because dofile will properly throw an error if the file
doesn't exist, which is not in the spirit of 'optionally included'.

Getting out of the pcall game allows us to provide a loader.exit() style
call that backs out to the common bits of loader (autoboot sequence unless
disabled with a loader.setenv("autoboot_delay", "NO")). The most ideal way
identified so far to implement loader.exit() is to throw a special
abort-style error that indicates to the caller in interp_lua that we've not
actually errored out, just continue execution. Otherwise, we have to hack in
logic to bubble up and return from loader.lua without continuing further,
which gets kind of ugly depending on the context in which we're aborting.

A compat shim is provided temporarily in case the executing loader doesn't
yet have loader.lua_path, which was just added in r354246.
2019-11-02 04:01:39 +00:00
..
arm Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
arm64 No need to make objects here. 2018-04-27 22:15:18 +00:00
common stand: consolidate knowledge of lua path 2019-11-02 03:37:58 +00:00
defaults Enable lualoader's kernel autodetection, disabled on install media 2018-10-11 17:17:54 +00:00
efi We don't support configuring serial PCI cards in EFI. Make this clearer in the 2019-11-01 21:26:43 +00:00
fdt loader: Add pnp functions for autoloading modules based on linker.hints 2019-05-23 19:26:50 +00:00
ficl Add support for hypervisor check on x86 2019-10-24 20:02:48 +00:00
ficl32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
forth loader_4th: menu items need to reset color attribute, not switch to white 2019-09-22 16:10:25 +00:00
i386 We don't support configuring serial PCI cards in EFI. Make this clearer in the 2019-11-01 21:26:43 +00:00
kshim A more definitions to kernel emulation shim in order to build stand/usb. 2018-02-07 18:50:36 +00:00
liblua liblua: add loader.lua_path 2019-11-02 03:41:30 +00:00
liblua32 Add Lua as a scripting langauge to /boot/loader 2018-02-12 15:31:53 +00:00
libsa loader: asprinf does crash arm64 due to missing NULL pointer check 2019-11-01 06:54:07 +00:00
libsa32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
lua lualoader: rewrite try_include using lfs + dofile 2019-11-02 04:01:39 +00:00
man Improve formatting. 2018-08-15 11:39:13 +00:00
mips mips: ubldr: use truncated load address for mips32 2019-09-18 01:33:17 +00:00
ofw [PPC] Fix loader input with newer QEMU versions 2019-06-19 11:37:43 +00:00
powerpc loader/powerpc64: Include generic PVR values in CAS architecture list 2019-10-08 02:36:53 +00:00
sparc64 MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland / kernel 2019-01-05 22:45:20 +00:00
uboot stand: refactor overlay loading a little bit 2019-04-11 13:26:28 +00:00
usb Distinguish between "no partition" and "choose best partition" with a constant. 2019-03-24 18:51:52 +00:00
userboot userboot/test should use PRIx64 as one would expect from prefix 0x 2019-10-24 07:49:33 +00:00
defs.mk stand: consolidate knowledge of lua path 2019-11-02 03:37:58 +00:00
fdt.mk
ficl.mk ficl pfopen: verify file 2019-05-24 19:43:38 +00:00
loader.mk stand: consolidate knowledge of lua path 2019-11-02 03:37:58 +00:00
lua.mk Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
Makefile Move ZFS files into libsa 2018-07-08 07:42:49 +00:00
Makefile.amd64 Create LOADER_UBOOT, and LOADER_OFW. Move these options out of 2018-03-01 19:50:55 +00:00
Makefile.inc Minor flags cleanup 2017-12-02 00:06:58 +00:00
uboot.mk Unify metadata load files for arm, mips, powerpc, sparc64 2018-02-13 03:44:50 +00:00