aboutsummaryrefslogtreecommitdiff
path: root/stand/i386/gptzfsboot/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Use 115200 bps by default for serial communicationEd Maste2023-08-171-1/+1
| | | | | | | | | | | | | 9600 was a standard baud rate decades ago, but 115200 is now more common so choose defaults that are useful to the largest number of users. Note that boot0sio does not support rates above 9600 so it remains unchanged. Reviewed by: bz, imp, manu Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36295
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* loader: implement mount/unmount rootfsToomas Soome2021-09-081-1/+1
| | | | | | | | | We want to keep our root file system open to preserve bcache segment between file accesses, thus reducing physical disk IO. Reviewed by: imp, allanjude, kevans (previous version) Differential Revision: https://reviews.freebsd.org/D30848 MFC after: 1 month
* 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
* loader: create single zfs nextboot implementationToomas Soome2020-06-201-6/+13
| | | | | | | | | | | | | | | | | | | | We should have nextboot feature implemented in libsa zfs code. To get there, I have created zfs_nextboot() implementation based on two sources, our current simple textual string based approach with added structured boot label PAD structure from OpenZFS. Secondly, all nvlist details are moved to separate source file and restructured a bit. This is done to provide base support to add nvlist add/update feature in followup updates. And finally, the zfsboot/gptzfsboot disk access functions are swapped to use libi386 and libsa. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25324 Notes: svn path=/head/; revision=362431
* loader: remove libsa/crc32.c and use version from zlibToomas Soome2020-03-191-0/+1
| | | | | | | | | | | | | we have crc32(const void *, size_t) in libsa. Unfortunately zlib has crc32(long, const unigned char *, unsigned) and we have conflict. Since we do build libsa with zlib, we can use zlib version instead. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D24068 Notes: svn path=/head/; revision=359153
* Link stand/i386 components using a linker scriptDimitry Andric2020-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLD 10.0.0 changed the behavior of the -Ttext option, so that using -Ttext=0x0 now causes linking of the loaders to fail with: ld: error: output file too large: 18446744073707016908 bytes I reported this in https://bugs.llvm.org/show_bug.cgi?id=44715, and initially reverted the upstream change in r357259 to work around it. However, after some discussion with Fangrui Song in the upstream ticket, I think we can classify this as an unfortunate interaction between using -Ttext=0 in combination with --no-rosegment. (We added the latter in r332090, because btxld does not correctly handle input with more than 2 PT_LOAD segments.) Fangrui suggested to use a linker script instead, and Warner was already attempting this in r305353, but had to revert it due to "crypto-using boot problems" (not sure what those were :). This review updates the stand/i386/boot.ldscript to handle more sections, inserts some symbols like _edata and such that we use in libsa, and also discards any .interp section. It uses ORG which is defined on the linker command line using --defsym ORG=value to set the start of all the sections. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23952 Notes: svn path=/head/; revision=358643
* 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
* gptzfsboot: remove CLANG_NO_IASEd Maste2019-08-151-3/+0
| | | | | | | | | | | | | | | | Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler did not handle .codeNN directives. Clang gained support quite some time ago, so we can build stand/ with IAS. In some cases there were small differences in generated object output. In the case of gptzfsboot however using GNU as or Clang IAS to assemble gptldr.S resulted in identical final gptzfsboot binary output. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11115 Notes: svn path=/head/; revision=351097
* loader: support com.delphix:removingToomas Soome2019-08-081-0/+1
| | | | | | | | | | | | 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
* NM and OBJCOPY are already defined for all builds. There's no need toWarner Losh2018-07-201-2/+0
| | | | | | | conditionally define them here. Notes: svn path=/head/; revision=336534
* 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-7/+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-1/+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
* Avoid setting -Wno-tentative-definition-incomplete-type with gcc.Mark Johnston2017-12-071-5/+2
| | | | | | | | | | No version of gcc that I've tried accepts this flag. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D13415 Notes: svn path=/head/; revision=326671
* Need to include skein in the include path so we don't get this fromWarner Losh2017-12-051-0/+1
| | | | | | | | | | the "system" headers (though in buildworld, it's from the recently built sysroot). Sponsored by: Netflix Notes: svn path=/head/; revision=326588
* Fix gptzfsboot for cases with GELI.Warner Losh2017-11-211-3/+3
| | | | | | | | | | | HAVE_GPT isn't currently a thing, but HAVE_GELI is. Replace the former with the latter and remove util.o from the build list (it's picked up from libsa/libsa32, and that's OK). Sponsored by: Netflix Notes: svn path=/head/; revision=326069
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-141-0/+87
Sponsored by: Netflix Notes: svn path=/head/; revision=325834