aboutsummaryrefslogtreecommitdiff
path: root/stand/defs.mk
Commit message (Collapse)AuthorAgeFilesLines
* stand/efi: Add a 32-bit variant of libefiAhmad Khalifa2024-09-201-3/+7
| | | | | | | | | In preparation for supporting 64-bit machines with 32-bit UEFI firmware, add a 32-bit variant of libefi since we need to compile both the 64-bit version and the 32-bit version at the same time. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
* flua: move modules source into the main source directoryBaptiste Daroussin2024-09-121-1/+1
| | | | | | | | | | | | | Follow the path of what is done with bsnmp, build the modules along with the main binary, this allows to build the modules at a moment where all needed libraries are already built and available in the linker path instead of having to declare all the libraries which a flua module will be linked to in _prebuild_libs. Discused with: markj Reviewed by: markj, jrtc27, kevans, imp Accepted by: kevans, imp Differential Revision: https://reviews.freebsd.org/D46610
* Prepare some build fixes in advance of more _FORTIFY_SOURCEKyle Evans2024-07-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | ZFS' libspl needs to be made aware that we have strlcat(3) and strlcpy(3) to avoid some more complicated declaration duplication, so go ahead and define these HAVE_ macros now. libprocstat has to define `_KERNEL` and include kernel headers in order to get what it wants, but this results in sys/cdefs.h being included too late and we pick up the build breaking version of the __RENAME definition. Just explicitly include sys/cdefs.h earlier rather than disabling _FORTIFY_SOURCE. The zfs/ subdir only builds an object that holds some structures and sizes, so just disable _FORTIFY_SOURCE there entirely rather than trying to move #define _KERNEL into the file.. While we're here, make sure that we disable _FORTIFY_SOURCE in the bootloader because we don't have the symbol renaming support today to do it as cleanly as we'd like. ssp/ssp.h needs to be pulled into the libsa environment so that other bits can understand that ssp is disabled in the consistent __SSP_FORTIFY_LEVEL way that we try to do. Reviewed by: allanjude (previous version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45676
* kboot: Add our own lua bindingsWarner Losh2024-02-161-0/+1
| | | | | | | | Create a small wrapper around the new flua hash module so we can use it here too. There's no 4th bindings, nor will they be created. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43874
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* stand: remove mips supportWarner Losh2021-12-101-4/+0
| | | | | | | | | | As part of decommissioning mips support, remove the boot loader support. Do this in advance of other boot loader work to limit the amount of work that will be thrown away. Sponsored by: Netflix Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D33377
* powerpc64le: stand fixesLeandro Lupori2021-10-201-3/+5
| | | | | | | | | | | | | | | | | | | | | | Fix boot1 and loader on PowerPC64 little-endian (LE). Due to endian issues, boot1 couldn't find the UFS boot partition and loader wasn't able to load the kernel. Most of the issues happened because boot1 and loader were BE binaries trying to access LE UFS partitions and because loader expects the kernel ELF image to use the same endian as itself. To fix these issues, boot1 and loader are now built as LE binaries on PPC64LE. To support this, the functions that call OpenFirmware were enhanced to correctly perform endian conversion on its input and output arguments and to change the CPU into BE mode before making the calls, as OpenFirmware always runs in BE. Besides that, some other small fixes were needed. Submitted by: bdragon (initial version) Reviewed by: alfredo, jhibbits Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D32160
* stand: Add MK_PIE=no to defs.mkWarner Losh2021-08-111-0/+1
| | | | | | | | | | There's no need to build both pie and non-pie .o's for stand. There's some other build thing with MK_BEAR_SSL=yes and/or MK_LOADER_VERIEXEC=yes that causes the pie build to fail that the 'ar' stage now. Since we don't need the PIE stuff and the non-PIE stuff, disable PIE for the boot loader. Reviewed by: emaste Sponsored by: Netflix
* Prefer MK_SSP=no to SSP_CFLAGS=Mitchell Horne2021-08-041-2/+0
| | | | | | | | | It is more idiomatic. CFLAGS is only augmented with $SSP_CFLAGS when $MK_SSP != "no". Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31401
* Fix build of stand/ when building world with ASANAlex Richardson2021-08-021-0/+6
| | | | | | | | | | | | The userboot/test program links against the default userspace libraries (e.g. shared libgcc_s.so) that will be instrumented if WITH_ASAN is set. All other programs link against libsa instead of libc and therefore can't use the sanitizer runtime library. To fix the stand/ build with sanitizers, we disable MK_ASAN/MK_UBSAN if -nostdlib is found in the LDFLAGS (i.e. we are using libsa instead of libc). Reviewed By: imp, tsoome Differential Revision: https://reviews.freebsd.org/D31047
* loader: make sure CPUTYPE is ignored when buildingWarner Losh2021-07-151-0/+8
| | | | | | | | | | | | | | | CPUTYPE?=native causes -march=native to be added to the command line. When the host machine is haswell, this causes some versions of clang to generate code that can't execute in the efi boot loader environment. Set _CPUCFLAGS= to undo what's done bsd.cpu.mk. bsd.cpu.mk is included too early to control with NO_CPU_CFLAGS here. The only other option is to put that in all the Makefiles, and this is less tedious and error prone. PR: 194641 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31187 MFC After: 1 week
* [PowerPC64LE] Set up powerpc.powerpc64le architectureBrandon Bergren2020-09-221-4/+4
| | | | | | | | | | | | | | | | | | This is the initial set up for PowerPC64LE. The current plan is for this arch to remain experimental for FreeBSD 13. This started as a weekend learning project for me and kinda snowballed from there. (More to follow momentarily.) Reviewed by: imp (earlier version), emaste Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D26399 Notes: svn path=/head/; revision=366032
* [PowerPC] Remove obsolete MK_LOADER_FORCE_LEBrandon Bergren2020-09-151-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | In D12421, the ability to compile stand/ in little-endian was added, with the intention to extend loader.kboot to run in Petitboot. However, no further work was done, as the kernel then gained self-execution capabilities as Petitboot was taught to load FreeBSD kernels directly. The FreeBSD installer on powerpc64 (on POWER8 and POWER9) uses /boot/etc/kboot.conf instead of loader. As this option does nothing but cause stand/ to be miscompiled and actively causes confusion, remove it. (I have a functioning petitboot loader in my local tree, however, it turned out to be quite inconvient to use due to the current petitboot plugin design so I put it on hold.) Reviewed by: emaste, imp, jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D26430 Notes: svn path=/head/; revision=365739
* Add defines for OpenZFS variablesWarner Losh2020-09-011-0/+3
| | | | | | | | | | | OZFS is the top of the OpenZFS tree (aka src/sys/contrib/openzfs). ZFSOSSRC is the path to the OepnZFS sources ZFSOSINC is the path to the OepnZFS includes MFC After: 3 days Notes: svn path=/head/; revision=365026
* Create CFLAGS_EARLY.file for boot loader.Warner Losh2020-08-281-0/+5
| | | | | | | | | | | | | | | | | | Some external code requires a specific set of include paths to work properly since it emulates the typical environment the code is used in. Enable this by creating a CFLAGS_EARLY.file variable that can be used to build this stack. Otherwise the include stack we build for stand programs may get in the way. Code that uses this feature has to tolerate the normal stack of inclues being last on the list (and presumably unused), though. Generally, it it should only be used for the specific include directories. Defines and that sort of thing should be done in the normal CFLAGS variable. There is a global CFLAGS_EARY hook as well for everything in a Makefile. Notes: svn path=/head/; revision=364924
* stand: use portable ln -n instead of ln -hAlex Richardson2020-08-061-1/+1
| | | | | | | | | This fixes the build on Linux Differential Revision: https://reviews.freebsd.org/D24783 Notes: svn path=/head/; revision=363993
* Really fix cleandir after r362973Mitchell Horne2020-07-141-1/+2
| | | | | | | | | | | | | | | | | | I made an attempt to fix this in r362978, but all it really did was confine the issue to the $MACHINE_CPUARCH == "riscv" case. The real problem is that LINKER_FEATURES is not defined here, so bsd.linker.mk needs to be included. This error with cleandir only occurs when META_MODE is disabled, which explains why it was missed by both CI and myself. Note that this effectively reverts r362978. Reported by: mjg Reviewed by: imp, kevans (in IRC) Notes: svn path=/head/; revision=363197
* Fix cleandir target post r362973Mitchell Horne2020-07-061-1/+1
| | | | | | | Reported by: mmacy Notes: svn path=/head/; revision=362978
* RISC-V boot1.efi and loader.efi supportMitchell Horne2020-07-061-3/+10
| | | | | | | | | | | | | | | | | | | | | This implementation doesn't have any major deviations from the other EFI ports. I've copied the boilerplate from arm and arm64. I've tested this with the following boot flows: OpenSBI (M-mode) -> u-boot (S-mode) -> loader.efi -> FreeBSD OpenSBI (M-mode) -> u-boot (S-mode) -> boot1.efi -> loader.efi -> FreeBSD Due to the way that u-boot handles secondary CPUs, OpenSBI >= v0.7 is required, as the HSM extension is needed to bring them up explicitly. Because of this, using BBL as the SBI implementation will not be possible. Additionally, there are a few recent u-boot changes that are required as well, all of which will be present in the upcoming v2020.07 release. Looks good: emaste Differential Revision: https://reviews.freebsd.org/D25135 Notes: svn path=/head/; revision=362973
* Remove tests for obsolete compilers in the build systemEric van Gyzen2020-05-121-4/+0
| | | | | | | | | | | | | | Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802 Notes: svn path=/head/; revision=360964
* Build the arm64 loader with -ffixed-x18Andrew Turner2020-04-241-1/+1
| | | | | | | | | | | | This stops the compiler from using the x18 register. Some UEFI implementations assume this will be preserved when calling the Boot Services. MFC after: 2 weeks Sponsored by: Innovate UK Notes: svn path=/head/; revision=360247
* [PowerPC] Switch powerpc and powerpcspe to lldBrandon Bergren2020-03-271-4/+0
| | | | | | | | | | | | | | | Now that LLD 10 is out, and required patches have landed, we are now ready to finally switch away from the ancient in-tree ld.bfd. Special thanks to Fangrui Song for many hours of work on getting the 32-bit powerpc lld ready for prime-time. Reviewed by: emaste (earlier revision), jhibbits Relnotes: yes Differential Revision: https://reviews.freebsd.org/D24111 Notes: svn path=/head/; revision=359347
* Move stand/ofw/libofw to stand/libofw.Brandon Bergren2020-01-021-0/+1
| | | | | | | | | | | | | | | Since rS330365, there has been no particular reason for libofw to be in a subdirectory of ofw. Move libofw up a level to make it fit in better with the other top level libraries. Also add a LIBOFWSRC to stand/defs.mk to match what all the other libraries are doing. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23000 Notes: svn path=/head/; revision=356266
* [PowerPC64] Use ld.bfd to build LIB32 and STAND - when using llvmJustin Hibbits2019-12-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is to support ongoing work for replacing "GCC/BFD" by "CLANG/LLD" on target PowerPC64 [1], by proposing a way to specify and/or locate a secondary ld.bfd linker. This is necessary as LLD currently doesn't support PowerPC 32 bits, so we keep using BFD for the 32 bit stuff on PowePC64(LIB32 compatibility and STAND/slof/loader.) - creates LD_BFD variable pointing to ld.bfd - use LD_BFD as linker for LIB32/compat - Default behavior for other platforms aren't changed. [1] https://wiki.freebsd.org/powerpc/llvm-elfv2 Submitted by: alfredo.junior_eldorado.org.br Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20261 Notes: svn path=/head/; revision=356054
* Add flua to the base system, install to /usr/libexecKyle Evans2019-11-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSDlua ("flua") is a FreeBSD-private lua, flavored with whatever extensions we need for base system operations. We currently support a subset of lfs and lposix that are used in the rewrite of makesyscall.sh into lua, added in r354786. flua is intentionally written such that one can install standard lua and some set of lua modules from ports and achieve the same effect. linit_flua is a copy of linit.c from contrib/lua with lfs and lposix added in. This is similar to what we do in stand/. linit.c has been renamed to make it clear that this has flua-specific bits. luaconf has been slightly obfuscated to make extensions more difficult. Part of the problem is that flua is already hard enough to use as a bootstrap tool because it's not in PATH- attempting to do extension loading would require a special bootstrap version of flua with paths changed to protect the innocent. src.lua.mk has been added to make it easy for in-tree stuff to find flua, whether it's bootstrap-flua or relying on PATH frobbing by Makefile.inc1. Reviewed by: brooks, emaste (both earlier version), imp Differential Revision: https://reviews.freebsd.org/D21893 Notes: svn path=/head/; revision=354833
* stand: consolidate knowledge of lua pathKyle Evans2019-11-021-0/+3
| | | | | | | | | | | | | Multiple places coordinate to 'know' where lua scripts are installed. Knock this down to being formally defined (and overridable) in exactly one spot, defs.mk, and spread the knowledge to loaders and liblua alike. A future commit will expose this to lua as loader.lua_path, so it can build absolute paths to lua scripts as needed. MFC after: 1 week Notes: svn path=/head/; revision=354245
* Add support for hypervisor check on x86Simon J. Gerraty2019-10-241-8/+12
| | | | | | | | | | | | | | Add ficl words for isvirtualized and move ficl inb and outb words to ficl/x86/sysdep.c so can be shared by i386 and amd64 Reviewed by: imp bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22069 Notes: svn path=/head/; revision=354043
* loader: --gc-sections needs sections to work withToomas Soome2019-09-081-0/+1
| | | | | | | | | | --gc-sections is not really useful unless we generate sections with -ffunction-sections -fdata-sections While there, i386/loader would win from --gc-sections too. Notes: svn path=/head/; revision=352032
* loader: use teken teminal emulator for x86 and uefiToomas Soome2019-09-051-0/+7
| | | | | | | | | | | Replace mini cons25 emulator with teken, this does enable us proper console terminal for loader and will make it possible to implement different back end callbacks to draw to screen. At this time we still only "draw" in text mode. Notes: svn path=/head/; revision=351900
* stand: push LIBC_SRC up into defs.mkKyle Evans2019-08-161-0/+1
| | | | | | | | | | | | | | Other parts of stand/ that don't use libsa will need to grab bits from libc shortly. Push LIBC_SRC up to defs.mk in advance of this so that they can use it, and rename it to LIBCSRC to match the convention of the rest of the *SRC variables in this file. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21282 Notes: svn path=/head/; revision=351119
* Move inclusion of src.opts.mk later.Warner Losh2018-12-031-4/+8
| | | | | | | | | | | | | | | src.opts.mk includes bsd.own.mk. This in turn defines CTFCONVERT_CMD depending on the MK_CTF value. We then set MK_CTF to no, which has no real effect. The solution is to set all the MK_foo values before including src.opts.mk. This should stop the cdboot binary from exploding in size for releases built WITH_CTF=yes in src.conf. Sponsored by: Netflix Notes: svn path=/head/; revision=341433
* powerpcspe: Don't crash the loader on ubldr with SPE instructions.Justin Hibbits2018-11-281-0/+5
| | | | | | | | | -msoft-float seems to be insufficient for disabling the SPE on powerpcspe. Force it off with -mno-spe as well. This prevents a crash in ubldr on powerpcspe. Notes: svn path=/head/; revision=341101
* Be a little conservative about when to force size optimizations.Warner Losh2018-09-051-0/+2
| | | | | | | | | | | | Reports have come in that there's issue with powerpc and sparc64 since we've switched to using -Oz / -Os. We don't strictly need them for !x86, so be conservative about when we enable them. Approved by: re@ (gjb) Differential Revision: https://reviews.freebsd.org/D17016 Notes: svn path=/head/; revision=338474
* Enable 'C'-compressed ISA extension.Ruslan Bukin2018-09-031-1/+1
| | | | | | | | | | | | | | | This was disabled recently due to lack of support in KDB disassembler and DTrace FBT provider. Support for 'C'-extension to both of these was added, so we can now enable 'C'-extension. This reduces size of the kernel important for low-end embedded devices, and saves cache footprint for high perfomance machines. Approved by: re (kib) Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=338445
* stand: Flip the default interpreter to LuaKyle Evans2018-08-191-3/+3
| | | | | | | | | | | | | | After years in the making, lualoader is ready to make its debut. Both flavors of loader are still built by default, and may be installed as /boot/loader or /boot/loader.efi as appropriate either by manually creating hard links or using LOADER_DEFAULT_INTERP as documented in build(7). Discussed with: imp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16795 Notes: svn path=/head/; revision=338050
* stand: Use -Oz/-Os for all loader/stand builds.Warner Losh2018-08-151-1/+6
| | | | | | | | | | | | | | | | | | | | While we're not super size constrained, the x86 BIOS /boot/loader has to be less than about 520k-530k to be reliable. The LUA loader is at this size today. -Oz saves 15-20% on the size, keeping us safely small enough (comparable to where we were with the 4th loader). This will also help with sjg's work on bringing in bearssl, though we may again be looking for space in the LUA loader. Size table for clang 6.0.0: default -O1 -Os -Oz 4th 442368 417792 389120 376832 lua 524288 479232 446464 430080 Tested by: kevans91@ (ubldr on armv7), dhw@ (loader on amdy64) Differential Revision: https://reviews.freebsd.org/D16724 Notes: svn path=/head/; revision=337868
* Create a loader for each interpreter for x86 BIOS and all EFIWarner Losh2018-08-141-0/+12
| | | | | | | | | | | | | | | | | | Create loader_{4th,lua,simp}{,.efi}. All of these are installed by default. Create LOADER_DEFAULT_INTERP to specify the default interpreter when no other is specified. LOADER_INTERP is the current interpreter language building. Turn building of lua on by default to match 4th. simploader is a simplified loader build w/o any interpreter language (but with a simple loader). This is the historic behavir you got with WITHOUT_FORTH. Make a hard link to the default loader. This has to be a hard link rather than the more desirable soft link because older zfsboot blocks don't support symlinks. RelNotes: Yes Differential Revision: https://reviews.freebsd.org/D16705 Notes: svn path=/head/; revision=337806
* Disable 'C'-compressed ISA extension.Ruslan Bukin2018-07-251-1/+1
| | | | | | | | | | | | | | | | It works excellent, but KDB disassembler and DTrace FBT provider for RISC-V do lack support for it. They currently handle 4-byte instructions only, while C-compressed ISA extension introduces 2-byte instructions freely mixing them together. So disable it for now. Reviewed by: markj@ Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16436 Notes: svn path=/head/; revision=336716
* Extend loader(8) geli support to all architectures and all disk-like devices.Ian Lepore2018-07-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This moves the bulk of the geli support from lib386/biosdisk.c into a new geli/gelidev.c which implements a devsw-type device whose dv_strategy() function handles geli decryption. Support for all arches comes from moving the taste-and-attach code to the devopen() function in libsa. After opening any DEVT_DISK device, devopen() calls the new function geli_probe_and_attach(), which will "attach" the geli code to the open_file struct by creating a geli_devdesc instance to replace the disk_devdesc instance in the open_file. That routes all IO for the device through the geli code. A new public geli_add_key() function is added, to allow arch/vendor-specific code to add keys obtained from custom hardware or other sources. With these changes, geli support will be compiled into all variations of loader(8) on all arches because the default is WITH_LOADER_GELI. Relnotes: yes Sponsored by: Microchip Technology Inc Differential Revision: https://reviews.freebsd.org/D15743 Notes: svn path=/head/; revision=336252
* Move ZFS files into libsaWarner Losh2018-07-081-1/+1
| | | | | | | | | | | | | Move the libzfs stuff into libsa. There's no need for it to be a separate library. The separate library adds to the issues of build ordering that we see from time to time. Move the filesystem support into libsa, like all the other filesystem support rather than making zfs the odd-duck out. Discussed with: allanjude@ Notes: svn path=/head/; revision=336084
* stand: move libgeliboot into libsa.Warner Losh2018-06-181-2/+1
| | | | | | | | | Reduce by 1 the number of crazy libraries we need in stand by moving geli into libsa (where architecturally it belonged all along). This just moves things around without any code changes. Notes: svn path=/head/; revision=335321
* Fix build of stand with base gccDimitry Andric2018-05-311-1/+1
| | | | | | | | | | | | | | | | | | | * Make autoboot() a static function in stand/common/boot.c, so it does not shadow local variables in gptboot.c and zfsboot.c. * Remove -Winline from the Makefiles for gptboot, gptzfsboot and zfsboot, as gcc will always fail to inline some functions, and there is nothing we can do about it. * For gcc <= 4.2.1, silence -Wuninitialized for isoboot, as it produces a false positive warning. * Remove deprecated and unnecessary -mcpu=i386 flag from stand/defs.mk, as there is already a -march=i386 flag further in the file. Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D15628 Notes: svn path=/head/; revision=334432
* Don't add links or cleanfiles for NO_OBJ case, in addition to notWarner Losh2018-03-181-5/+5
| | | | | | | | | | creating them. Move them under the if after the all: target. They are just defines, so it doesn't really matter where we have them. MFC After: 3 days Notes: svn path=/head/; revision=331140
* Add NO_OBJ to those directories that don't make anything.Warner Losh2018-02-261-1/+2
| | | | | | | | | | | For directories that don't many anything, add NO_OBJ=t just before we include bsd.init.mk. This prevents them from creating an OBJ directory. In addition, prevent defs.mk from creating the machine related links in these cases. They aren't needed and break, at least on stable, the read-only src tree build. Notes: svn path=/head/; revision=330004
* Floaty McFloatface is funnier...Warner Losh2018-02-231-1/+1
| | | | | | | Submitted by: emaste@ Notes: svn path=/head/; revision=329860
* Do not include float interfaces when using libsa.Warner Losh2018-02-231-0/+3
| | | | | | | | | | We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step of spiking double and float to prevent any more accidental seepage. Notes: svn path=/head/; revision=329859
* Eliminate bsd.stand.mk and -fPIC 32-bit intel buildsWarner Losh2018-02-161-3/+12
| | | | | | | | | | | | | OK. We don't really need a bsd.stand.mk, and it was causing a -fPIC for the toolchain to be added (bogusly) when building on amd64. Pull all relevant defs back into defs.mk and delete bsd.stand.mk. This saves about 15-20k on i386 loader and zfsloader which when combined with Lua give us a lot more stack space in those constrained environments. Notes: svn path=/head/; revision=329345
* Add Lua as a scripting langauge to /boot/loaderWarner Losh2018-02-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | liblua glues the lua run time into the boot loader. It implements all the runtime routines that lua expects. In addition, it has a few standard 'C' headers that nueter various aspects of the LUA build that are too specific to lua to be in libsa. Many refinements from the original code to improve implementation and the number of included lua libraries. Use int64_t for lua_Number. Have "/boot/lua" be the default module path. Numerous cleanups from the original GSoC project, including hacking libsa to allow lua to be built with only one change outside luaconf.h. Add the final bit of lua glue to bring in liblua and plug into the multiple interpreter framework, previously committed. Add LOADER_LUA option, currently off by default. Presently, this is an experimental option. One must opt-in to using this by defining WITH_LOADER_LUA and WITHOUT_FORTH. It's been lightly tested, so keep a backup copy of your old loader handy. The menu code, coming in the next commit, hasn't been exhaustively tested. A LUA boot loader is 60k larger than a FORTH one, which is 80k larger than a no-interpreter one. Subtle changes in size may tip things past some subtle limit (the binary is ~430k now when built with LUA). A future version may offer coexistance. Bump FreeBSD version to 1200058 to mark the milestone. Pedro Souza's 2014 Summer of Code project. Rui Paulo, Pedro Arthur, Zakary Nafziger and Wojciech A. Koszek also contributed. Warner Losh reworked it extensively into its current form. Obtained from: https://wiki.freebsd.org/SummerOfCode2014/LuaLoader Sponsored by: Google Summer of Code Relnotes: Yes MFC After: 1 month Differential Review: https://reviews.freebsd.org/D14295 Notes: svn path=/head/; revision=329166
* Fix build of userboot.soWarner Losh2018-02-081-1/+3
| | | | | | | | | | Since it's not possible to unset a variable easily, create a new variable 'PIC' to signal that we are creating a shared object that we want to install. defs.mk refains from defining NO_PIC and ITNERALLIB when PIC is defined. This unbreaks userboot.so building. Notes: svn path=/head/; revision=329050
* Centralize several variables.Warner Losh2018-02-021-0/+7
| | | | | | | | | | MK_CTF, MK_SSP, MK_PROFILE, NO_PIC, and INTERNALLIB are always the same, so set them in defs.mk. MAN= is common, so set it here too. This removes a lot of boring repetition from the Makefiles that added almost no value. Notes: svn path=/head/; revision=328769