summaryrefslogtreecommitdiff
path: root/sys/boot
AgeCommit message (Collapse)Author
2017-11-14Move sys/boot to stand. Fix all references to new locationWarner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325834
2017-11-14Move sys/boot/fdt/dts to sys/dts and adjust scripts.Warner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325826
2017-11-13Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o. /boot/dtb wasWarner Losh
what was tested... Notes: svn path=/head/; revision=325780
2017-11-13Add /boot/dts to the list of default modules. The minimal arm and mipsWarner Losh
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
2017-11-13Add loader.conf to the list of files that are MD.Warner Losh
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
2017-11-13Use proper include file. While <boot/userboot/userboot.h> works, itWarner Losh
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
2017-11-12boot1: also check for NULL deviceEd Maste
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
2017-11-12Make sure the proper loader.rc gets installed.Warner Losh
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
2017-11-10Install the 4th files in sys/boot/forth instead of each loaderWarner Losh
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
2017-11-10Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELIWarner Losh
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
2017-11-10Replace LOADER_FIREWIRE_SUPPORT variableWarner Losh
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
2017-11-10Remove useless PNP define here.Warner Losh
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
2017-11-10Remove LOADER_ZFS_SUPPORT as a Makefile variableWarner Losh
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
2017-11-10Remove LOADER_FDT_SUPPORT as a Makefile variable.Warner Losh
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
2017-11-10FDT support doesn't make sense for ps3. There's no support in the ps3Warner Losh
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
2017-11-10Remove all the empty help files from the powerpc build.Warner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325687
2017-11-10Simplify this if to a direct assignment.Warner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325686
2017-11-10libsa32 isn't needed for i386. It's already a 32-bit platform andWarner Losh
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
2017-11-10boot1: avoid using NULL device pathEd Maste
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
2017-11-10loader.efi: efi_devpath_is_prefix should return boolToomas Soome
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
2017-11-08loader: set options before including bsd.init.mkRoger Pau Monné
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
2017-11-06Centralize all 32-bit builds on 64-bit platform stuff.Warner Losh
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
2017-11-06Prefer bsd.init.mk to src.opts.mkWarner Losh
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
2017-11-06MACHINE can never be powerpc64, so cleanup code that thinks it can.Warner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325483
2017-11-06Move machine and other link creation to defs.mkWarner Losh
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
2017-11-06Prefer bsd.init.mk to other constructs.Warner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325481
2017-11-06Use DO32 for all the places that we need to flag we're building a 32Warner Losh
bit version of a library. Use a generic name since this may be usefule elsewhere. Sponsored by: Netflix Notes: svn path=/head/; revision=325480
2017-11-06Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.Warner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325479
2017-11-06Powerpc is a 32-bit boot loader.Warner Losh
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
2017-11-04Cleanup stray libstand names to be libsa names.Warner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325382
2017-11-04Revert "WIP: centralize machine links"Warner Losh
This reverts commit accidentally pushed r325376 Notes: svn path=/head/; revision=325380
2017-11-04Revert "mostly libsa"Warner Losh
This reverts accidentally pushed r325377. Notes: svn path=/head/; revision=325379
2017-11-04mostly libsaWarner Losh
Notes: svn path=/head/; revision=325377
2017-11-04WIP: centralize machine linksWarner Losh
Notes: svn path=/head/; revision=325376
2017-11-02This used to have bzip2 support too.Warner Losh
Notes: svn path=/head/; revision=325339
2017-11-02loader: fix BOOTSRC -> BOOTOBJ in a library pathAndriy Gapon
Notes: svn path=/head/; revision=325338
2017-11-02loader: re-enable gzip support for x86Roger Pau Monné
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
2017-11-02zfs.c:vdev_read() needs to be careful about large sectorsToomas Soome
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
2017-11-01efipart_strategy is using wrong offset with >512B sectorsToomas Soome
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
2017-10-31loader ptblread() is broken with >512B sectorsToomas Soome
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
2017-10-31DIRDEPS_BUILD: Update dependencies.Bryan Drewery
Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
2017-10-31DIRDEPS_BUILD: Connect new directories.Bryan Drewery
Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325187
2017-10-30Actually add zfs32/MakefileWarner Losh
Notes: svn path=/head/; revision=325176
2017-10-30For amd64, compile both zfs and zfs32 libraries.Warner Losh
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
2017-10-30Minor cleanupWarner Losh
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
2017-10-30We don't need to build a special ficl for userboot.Warner Losh
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
2017-10-30Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honoredWarner Losh
correctly with the new Makefile.inc include order. Sponsored by: Netflix Notes: svn path=/head/; revision=325172
2017-10-30Use defs.mk name and prefer bsd.init.mkWarner Losh
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
2017-10-30Use defs.mk values for userbootWarner Losh
Sponsored by: Netflix Notes: svn path=/head/; revision=325170
2017-10-30Use defs.mk defins in most MD codeWarner Losh
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