aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/boot1/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* stand/efi: Retire i386 supportWarner Losh2023-05-111-4/+3
| | | | | | | | Remove the i386 ifdefs and files. It never worked. Sponsored by: Netflix Reviewed by: manu, tsoome, kevans Differential Revision: https://reviews.freebsd.org/D40012
* stand: s/libstand/libsa/g to catch up with renameWarner Losh2022-04-301-1/+1
| | | | | | | We renamed libstand to libsa years ago with the move from sys/boot to stand. Catch up in the comments. Sponsored by: Netflix
* stand/efi: Pass --no-dynamic-linker to ld.bfd >= 2.34.John Baldwin2022-02-021-0/+3
| | | | | | | | | | ld.bfd in binutils 2.34+ now reports an error in more cases for custom ldscripts that do not place PHDRs in a LOAD segment. However, EFI binaries are not dynamic binaries which need PHDRs, so pass --no-dynamic-linker to disable this check. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D34124
* EFI secure boot VECTX related changesEric van Gyzen2021-04-301-0/+2
| | | | | | | | | | | | | | When VECTX is enabled as a kernel option and non-EFI loaders are built, many reads will fail due to the mis-match of whether LOADER_VERIEXEC_VECTX or not in readin.h. Source that includes bootstrap.h must ensure the kernel option agrees with the compile time CFLAGS in the various make related files. Submitted by: bret_ketchum@dell.com (original revision) Reviewed by: sjg, bdrewery, dab, bret_ketchum@dell.com MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D29993
* Add zstd support to the boot loader.Warner Losh2020-10-121-0/+1
| | | | | | | | | | | | | | | Add support to the _STANDALONE environment enough bits of the kernel that we can compile it. We still have a small zstd_shim.c since there were 3 items that were a bit hard to nail down and may be cleaned up in the future. These go hand in hand with a number of commits to sys/sys in the past weeks, should this need be MFCd. Discussed with: mmacy (in review and on IRC/Slack) Reviewed by: freqlabs (on openzfs repo) Differential Revision: https://reviews.freebsd.org/D26218 Notes: svn path=/head/; revision=366657
* Link efi programs with -pie rather than -sharedAlex Richardson2020-10-121-1/+1
| | | | | | | | | | | This was causing build failures in CheriBSD where we were passing -pie already by default. Reviewed By: andrew Differential Revision: https://reviews.freebsd.org/D24787 Notes: svn path=/head/; revision=366644
* loader: zfs should support bootonce an nextbootToomas Soome2020-09-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag. By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE. By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active. bootonce dataset name is recorded in boot pool labels, bootenv area. in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot. bootonce and nextboot features are usable in both UEFI and BIOS boot. To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools). At this time, only lua loader is updated. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512 Notes: svn path=/head/; revision=365938
* Only set WARNS if not definedKyle Evans2020-09-111-1/+1
| | | | | | | | | | | | | This would allow interested parties to do experimental runs with an environment set appropriately to raise all the warnings throughout the build; e.g. env WARNS=6 NO_WERROR=yes buildworld. Not currently touching the numerous instances in ^/tools. MFC after: 1 week Notes: svn path=/head/; revision=365631
* 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
* Remove duplicate lz4 implementationsToomas Soome2019-11-021-0/+1
| | | | | | | | | | | | | | Port illumos change: https://www.illumos.org/issues/11667 Move lz4.c out of zfs tree to opensolaris/common/lz4, adjust it to be usable from kernel/stand/userland builds, so we can use just one single source. Add lz4.h to declare lz4_compress() and lz4_decompress(). MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D22037 Notes: svn path=/head/; revision=354253
* The efifat files are no longer used: remove the code to build themRebecca Cran2019-09-041-23/+0
| | | | | | | | Reviewed by: imp, tsoome, emaste Differential Revision: https://reviews.freebsd.org/D20562 Notes: svn path=/head/; revision=351831
* loader: support com.delphix:removingToomas Soome2019-08-081-0/+2
| | | | | | | | | | | | We should support removing vdev from boot pool. Update loader zfs reader to support com.delphix:removing. Reviewed by: allanjude MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18901 Notes: svn path=/head/; revision=350772
* Add stuff to disable warning for %SWarner Losh2019-06-081-0/+2
| | | | | | | | | Add the customary warnings to disable format checking on armv7. Code move to new files, and the unconditional setting of WARNS to 6 provoked it on tinerbox... Notes: svn path=/head/; revision=348814
* Break out the disk selection protocol from the rest of boot1.Warner Losh2019-06-081-2/+2
| | | | | | | | | | | Segregate the disk probing and selection protocol from the rest of the boot loader. Reviewed by: tsoome, bcran Differential Revision: https://reviews.freebsd.org/D20547 Notes: svn path=/head/; revision=348811
* Fix when NOFAT is definedWarner Losh2019-06-061-2/+3
| | | | | | | | We need to add the *efi file to the list of things that get built, even if we're not creating the efifat stuff. Notes: svn path=/head/; revision=348763
* Don't make the efifat thing if NOFAT is defined.Warner Losh2019-06-061-0/+4
| | | | Notes: svn path=/head/; revision=348722
* ufs_module.c can't currently be compiled with -Wcast-align, but theWarner Losh2019-06-051-0/+3
| | | | | | | | code is safe enough. Turn off the warning for now until I can find the right construct to silence it in the code. Notes: svn path=/head/; revision=348675
* Reach over and pull in devpath.c from libefiWarner Losh2019-05-061-1/+2
| | | | | | | | This allows us to remove three nearly identical functions because the differences don't matter, and the size difference is trivial. Notes: svn path=/head/; revision=347193
* Use SRC+= rather than SRC=Warner Losh2019-05-031-1/+1
| | | | | | | | To allow boot1/Makefile to be included, use SRC+= rathern than SRC= so the including Makefile can add additional sources to the build. Notes: svn path=/head/; revision=347062
* Substitute boot1 with ${BOOT1}Warner Losh2019-05-031-6/+7
| | | | | | | | Allow for other names to be built, so parameterize this makefile to avoid hard coding boot1. Notes: svn path=/head/; revision=347061
* MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland / kernelMatt Macy2019-01-051-1/+1
| | | | | | | | | | | ZFS but keep the boot-loaders when using ZoL port. MFC after: 1 week Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D18739 Notes: svn path=/head/; revision=342793
* Ensure we have a large enough stack for the lua loaderAndrew Turner2018-08-271-0/+1
| | | | | | | | | | | | | | | | | | | Lua has a few places where it allocates a large buffer on the stack. This is normally fine, except there are a few places where there can be multiple frames with this buffer. This can cause a stack overflow on some arm64 SoCs. Fix this by allocating our own stack in loader.efi large enough for these objects. The required size has been found by tracing how the stack pointer changes in a virtual machine and found to be no larger than 50kB. A larger stack is allocated to reduce the likelihood of overflow from future changes. Reviewed by: kevans Approved by: re (kib) Differential Revision: https://reviews.freebsd.org/D16886 Notes: svn path=/head/; revision=338337
* Hoist EFI_TARGET and SOURCE_DATE_EPOCH up into efi/Makefile.incWarner Losh2018-07-201-11/+0
| | | | Notes: svn path=/head/; revision=336535
* NM and OBJCOPY are already defined for all builds. There's no need toWarner Losh2018-07-201-3/+0
| | | | | | | conditionally define them here. Notes: svn path=/head/; revision=336534
* Move ZFS files into libsaWarner Losh2018-07-081-3/+2
| | | | | | | | | | | | | 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
* Centralize several variables.Warner Losh2018-02-021-5/+0
| | | | | | | | | | 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
* Allow this file to be includedWarner Losh2018-01-121-2/+2
| | | | | | | | | | | | | | Use simple "foo" rather than "${.CURDIR}/foo" to include Makefile.fat since the former works when including this Makefile from else where. Also, use full path from ${BOOTSRC} to the FAT templates for similar reasons. It doesn't change anything in base FreeBSD, but allows us to have a custom boot1.efi more easily (though that will be short-lived for us, it may also be helpful for others). Sponsored by: Netflix Notes: svn path=/head/; revision=327881
* boot1.c needs EFI_ZFS_BOOT too, so add it globally. Otherwise we'llWarner Losh2017-12-081-1/+1
| | | | | | | | | not be able to actually read ZFS partitions. Submitted by: kevans@ Notes: svn path=/head/; revision=326714
* Make sure we include the right path for skein.h, as well only includeWarner Losh2017-12-051-3/+4
| | | | | | | | the ZFS flags for zfs_modules.c. This keeps us from pulling from the system or sysroot during buildworld. Notes: svn path=/head/; revision=326589
* Remove stale dependency on ufsread.cWarner Losh2017-12-021-2/+0
| | | | | | | | | | | Remove the now-useless dependency on ufsread.c. In some cases, it was on the wrong file. But in all cases, we now automatically generate .depend files, so we don't need it explicitly. Sponsored by: Netflix Notes: svn path=/head/; revision=326440
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-141-0/+129
Sponsored by: Netflix Notes: svn path=/head/; revision=325834