aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-14683-136517/+0
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325834
* Move sys/boot/fdt/dts to sys/dts and adjust scripts.Warner Losh2017-11-14116-27290/+0
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325826
* Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o. /boot/dtb wasWarner Losh2017-11-131-1/+1
| | | | | | | what was tested... Notes: svn path=/head/; revision=325780
* Add /boot/dts to the list of default modules. The minimal arm and mipsWarner Losh2017-11-131-1/+1
| | | | | | | | | | loader.conf for uboot have this in the list, but the default one didn't. Since there's no harm and it's a failsafe, add it to the list. Sponsored by: Netflix Notes: svn path=/head/; revision=325779
* Add loader.conf to the list of files that are MD.Warner Losh2017-11-132-2/+1
| | | | | | | | | | | | | | | | | | loader.conf is also different between machines. On arm it's a minimal one that's not quite compatible with the default one. On arm it's minimal for speed, which is good, but there's also extra things in it relative to the default on which break loading FDT which is bad. This doesn't address that issue, but instead ensures the minimal one for arm is used. A similar issue for mips exists, but since we can have a beri variant of /boot/loader and a uboot variant, I'm leaving that mess alone for the moment. Sponsored by: Netflix Notes: svn path=/head/; revision=325775
* Use proper include file. While <boot/userboot/userboot.h> works, itWarner Losh2017-11-131-1/+1
| | | | | | | | | | | | only works because we have -Isys on the command line. We also have -Isys/boot/userboot on the command line, so bring it in directly with <userboot.h>. No functional change, but it removes one hard to see dependency on the boot loader's location in sys/boot. Sponsored by: Netflix Notes: svn path=/head/; revision=325748
* boot1: also check for NULL deviceEd Maste2017-11-121-7/+9
| | | | | | | | | | | | | | | | | r325681 fixed a NULL pointer dereference on RPi3 caused by a lack of functionality in uboot's EFI implementation. That rev checked the boot1 load path for NULL but not the load device. In practice if the former works the latter will as well, but improve correctness by checking each separately. Submitted by: Keith White <kwhite@eecs.uottawa.ca> Reported by: jhb MFC after: 5 days MFC with: r325681 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=325744
* Make sure the proper loader.rc gets installed.Warner Losh2017-11-121-3/+10
| | | | | | | | | | | | | | There were two things wrong. First, the wrong path was listed in .PATH statement. Second, BOOTSRC wasn't yet defined for the .PATH, so it didn't properly add it. Third, even if these were right, . was in the path before, so it wouldn't have worked. Replace this with a simple loop so the proper loader.rc gets selected. Noticed by: dhw@ (menus stopped working on boot) Sponsored by: Netflix Notes: svn path=/head/; revision=325743
* Install the 4th files in sys/boot/forth instead of each loaderWarner Losh2017-11-1039-203/+96
| | | | | | | | | | | | | | | | | | | | | | | | Also, move generation of loader.help into loader.mk. Set HELP_FILES= to disable this (so we only install one help file, for now). At the same time remove some duplicate -I lines. Fix several FILES= and CLEANFILES= into the += form since we're touching both of those in the .mk files. Make sure we only build one loader.help file per platform in a unified way (we were building many on some, with the last to install winning, though often they were the same text). Also, we're now installing loader.rc and menu.rc everywhere. arm and mips uboot installed these as menu.rc.sample, but there's no need since the loader.rc for those platforms doesn't do menu.rc processing by default. pcibios.4th is now installed everywhere, but will failsafe on non x86 platforms (it isn't loaded by default anywhere). These changes are too intertwined to do separately since aspects of each are required to have a bug-free commit. Sponsored by: Netflix Notes: svn path=/head/; revision=325694
* Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELIWarner Losh2017-11-1010-43/+39
| | | | | | | | | | | | | | Transition to WITH/WITHOUT_LOADER_GELI to flag support or not of GELI in the boot loaders. Add HAVE_GELI so components can flag they need support (since it's too large to include everywhere). Add temporary warnings for the old forms to ease transition. Also, update test script to build without GELI on x86. Sponsored by: Netflix Notes: svn path=/head/; revision=325693
* Replace LOADER_FIREWIRE_SUPPORT variableWarner Losh2017-11-103-7/+17
| | | | | | | | | | | | Rename LOADER_FIREWIRE_SUPPORT to MK_LOADER_FIREWIRE. Only build libfirewire when this is "yes". Add note to updating. Fix build script to build this for x86 so the option doesn't decay. sparc64 supports ZFS, so also build it MK_ZFS=no. Sponsored by: Netflix Notes: svn path=/head/; revision=325692
* Remove useless PNP define here.Warner Losh2017-11-101-3/+0
| | | | | | | | | We never use HAVE_PNP for anything, so don't define it on the command line. Sponsored by: Netflix Notes: svn path=/head/; revision=325691
* Remove LOADER_ZFS_SUPPORT as a Makefile variableWarner Losh2017-11-109-26/+30
| | | | | | | | | | | | | LOADER_ZFS_SUPPORT is entirely used to select whether or not to support ZFS in the loader. But it's not a user-servicable part (MK_ZFS is what's used for that) Change it to the more conventional HAVE_ZFS and move the ZFS support code into loader.mk. In addition, only build ZFS libraries and boot loaders when ZFS is enabled. Sponsored by: Netflix Notes: svn path=/head/; revision=325690
* Remove LOADER_FDT_SUPPORT as a Makefile variable.Warner Losh2017-11-1012-38/+27
| | | | | | | | | | | | | LOADER_FDT_SUPPORT was used inconsistently in the tree. In some places, it was used to control whether or not the user wanted FDT included, and in other places it was a command to include support. Remove it entirely. The former is now enabled -DWITH_FDT, while the latter is controlled by Makefiles defining HAVE_FDT. Supported by: Netflix Notes: svn path=/head/; revision=325689
* FDT support doesn't make sense for ps3. There's no support in the ps3Warner Losh2017-11-101-8/+1
| | | | | | | | | | port for FDT, and it's unlikely to grow support for that anytime soon. When it does, support can be added back easily enough. Supported by: Netflix Notes: svn path=/head/; revision=325688
* Remove all the empty help files from the powerpc build.Warner Losh2017-11-108-8/+4
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325687
* Simplify this if to a direct assignment.Warner Losh2017-11-101-5/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325686
* libsa32 isn't needed for i386. It's already a 32-bit platform andWarner Losh2017-11-101-1/+0
| | | | | | | | | | | libfoo32 is only needed when compiling 32-bit libraries on native 64-bit architectures, and only when that 64-bit architecture needs mixed 32-bit and 64-bit binaries. Sponsored by: Netflix Notes: svn path=/head/; revision=325685
* boot1: avoid using NULL device pathEd Maste2017-11-101-14/+15
| | | | | | | | | | | | | | | | As of r323063 boot1 printed out the path & device from which it was loaded, but uboot's EFI implementation lacked some support, resulting in a NULL pointer and a crash. Check for a NULL pointer and avoid reporting (and storing in the environment) the device and path in this case. Submitted by: Zakary Nafziger <worldofzak@gmail.com> MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13038 Notes: svn path=/head/; revision=325681
* loader.efi: efi_devpath_is_prefix should return boolToomas Soome2017-11-102-9/+9
| | | | | | | | | | | efi_devpath_is_prefix() is currently returning values 0 or 1, which means it really should return bool. Additionally, use unsigned len, because we only get unsigned values from DevicePathNodeLength(). Notes: svn path=/head/; revision=325641
* loader: set options before including bsd.init.mkRoger Pau Monné2017-11-0812-104/+105
| | | | | | | | | | | | | | | | | bsd.init.mk ends up including defs.mk so the per-arch options must be set before including defs.mk, or else the global defaults will be used and the per-arch ones will be ignored. Although better, note that the usage of MK_FDT before the inclusion of bsd.init.mk is incorrect but doesn't lead to build errors. This circular dependency must be broken in order for this to work correctly. Reviewed by: imp Sponsored by: Citrix Systems R&D Notes: svn path=/head/; revision=325556
* Centralize all 32-bit builds on 64-bit platform stuff.Warner Losh2017-11-0610-52/+14
| | | | | | | | | | Move the addition of the -m32 and other flags to defs.mk. Remove redunant copies of -m32 that come from multiple locations. Sponsored by: Netflix Notes: svn path=/head/; revision=325485
* Prefer bsd.init.mk to src.opts.mkWarner Losh2017-11-066-8/+5
| | | | | | | | | | | | Final sweep to prefer bsd.init.mk to src.opts.mk everywhere as a design pattern. The rule is that all Makefiles in this subtree should start with .include <bsd.init.mk> so that we properly include ../Makefile.inc and defs.mk before anything else. Sponsored by: Netflix Notes: svn path=/head/; revision=325484
* MACHINE can never be powerpc64, so cleanup code that thinks it can.Warner Losh2017-11-061-4/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325483
* Move machine and other link creation to defs.mkWarner Losh2017-11-0618-145/+42
| | | | | | | | | | | | | | | | Steal the code from kmod.mk and use it to automatically create links. Modify it a little for the needs of the loader (no need to guess the OBJS dependency, and we have 32-on-64 cases to contend with). Remove 15 redundant implementations (which were mostly different, but kinda the same). A future commit should factor out this code and that of kmod.mk so we have only one copy of it in the tree. Sposnored by: Netflix Notes: svn path=/head/; revision=325482
* Prefer bsd.init.mk to other constructs.Warner Losh2017-11-061-3/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325481
* Use DO32 for all the places that we need to flag we're building a 32Warner Losh2017-11-066-10/+16
| | | | | | | | | | bit version of a library. Use a generic name since this may be usefule elsewhere. Sponsored by: Netflix Notes: svn path=/head/; revision=325480
* Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.Warner Losh2017-11-062-9/+6
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325479
* Powerpc is a 32-bit boot loader.Warner Losh2017-11-068-14/+15
| | | | | | | | | | | | Stop building libsa32 on powerpc. Build everything on powerpc64 -m32. Transition to using LIBSA from LIBSA32. This elimiantes the useless build of libsa on powerpc64 (nothing used to use it) and should be a more direct way of saying this. Sponsored by: Netflix Notes: svn path=/head/; revision=325478
* Cleanup stray libstand names to be libsa names.Warner Losh2017-11-042-13/+13
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325382
* Revert "WIP: centralize machine links"Warner Losh2017-11-041-34/+0
| | | | | | | This reverts commit accidentally pushed r325376 Notes: svn path=/head/; revision=325380
* Revert "mostly libsa"Warner Losh2017-11-043-5/+4
| | | | | | | This reverts accidentally pushed r325377. Notes: svn path=/head/; revision=325379
* mostly libsaWarner Losh2017-11-043-4/+5
| | | | Notes: svn path=/head/; revision=325377
* WIP: centralize machine linksWarner Losh2017-11-041-0/+34
| | | | Notes: svn path=/head/; revision=325376
* This used to have bzip2 support too.Warner Losh2017-11-021-0/+1
| | | | Notes: svn path=/head/; revision=325339
* loader: fix BOOTSRC -> BOOTOBJ in a library pathAndriy Gapon2017-11-021-1/+1
| | | | Notes: svn path=/head/; revision=325338
* loader: re-enable gzip support for x86Roger Pau Monné2017-11-021-0/+1
| | | | | | | | | | | r324653 inadvertently disabled default gzip support on x86, re-enable. Sponsored by: Citrix System R&D Reviewed by: imp Differential revision: https://reviews.freebsd.org/D12913 Notes: svn path=/head/; revision=325332
* zfs.c:vdev_read() needs to be careful about large sectorsToomas Soome2017-11-021-7/+51
| | | | | | | | | | Using the same implementation as done in efi/boot1. We must handle smaller than sector size IO etc. Differential Revision: https://reviews.freebsd.org/D12850 Notes: svn path=/head/; revision=325310
* efipart_strategy is using wrong offset with >512B sectorsToomas Soome2017-11-011-1/+5
| | | | | | | | | | | The strategy() calls are assuming 512B sectors, so we need to adjust the offset accordingly. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D12849 Notes: svn path=/head/; revision=325286
* loader ptblread() is broken with >512B sectorsToomas Soome2017-10-311-0/+6
| | | | | | | | | | | The loader strategy() function is assuming 512B blocks, so we need to adjust ptblread() for other sector sizes. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D12847 Notes: svn path=/head/; revision=325248
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-3113-18/+18
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Connect new directories.Bryan Drewery2017-10-312-0/+24
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325187
* Actually add zfs32/MakefileWarner Losh2017-10-301-0/+5
| | | | Notes: svn path=/head/; revision=325176
* For amd64, compile both zfs and zfs32 libraries.Warner Losh2017-10-3019-117/+66
| | | | | | | | | | | | We have a separate copy of zfs for userboot. However, we don't need it if we compile both 32 and 64 bit ZFS libraries. Remove redunant copies of zfs related .o files now that both versions are available. Introduce ZFSSRC and use it everywhere. Sponsored by: Netflix Notes: svn path=/head/; revision=325175
* Minor cleanupWarner Losh2017-10-301-3/+1
| | | | | | | | | | | | Remove ancient comment about words to maybe add to the builds as softwords. We're not going to bring them in, so delete the noise. Also, check to see if HAVE_PNP is defined rather than if its value is true. Sponsored by: Netflix Notes: svn path=/head/; revision=325174
* We don't need to build a special ficl for userboot.Warner Losh2017-10-303-75/+1
| | | | | | | | | | | | | | | Prior to bringing efi into the system, amd64 systems were building 32-bit ficl only, while userboot required the 64-bit one. However, with efi, we now build both. userboot can and should use the one we build for the main tree (in fact, it has been for a while, though I didn't check to see if that was an intentional change before, or an accidental one in my cleanup). Eliminate the extra copy (and build time) for userboot. Sponsored by: Netflix Notes: svn path=/head/; revision=325173
* Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honoredWarner Losh2017-10-302-5/+3
| | | | | | | | | correctly with the new Makefile.inc include order. Sponsored by: Netflix Notes: svn path=/head/; revision=325172
* Use defs.mk name and prefer bsd.init.mkWarner Losh2017-10-3019-122/+118
| | | | | | | | | | Also need to make some small tweaks to the Makefiles to use += rather than = due to small shift in include file order. Sponsored by: Netflix Notes: svn path=/head/; revision=325171
* Use defs.mk values for userbootWarner Losh2017-10-304-22/+19
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325170
* Use defs.mk defins in most MD codeWarner Losh2017-10-3011-84/+81
| | | | | | | | | | | | Use defines from defs.mk in most MD code (the biggest exception is x86, which will be its own commit due to its size). Prefer including bsd.init.mk over the variations (../Makefile.inc and src.opts.mk being the two biggest ones). Sponsored by: Netflix Notes: svn path=/head/; revision=325114