| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325834
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=325188
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Define EFISRC, EFIINC and EFIINCMD. Use them, as well as using other
symbols defined in defs.mk. Prefer <bsd.init.mk> to ../../Makefile.inc
or <src.opts.mk>.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325093
|
|
|
|
|
|
|
|
|
|
|
| |
Move framebuffer.{c,h} to sys/boot/efi/loader and add the efifb
related metadata and pass it to the kernel
Reviewed by: imp, andrew
Differential Revision: https://reviews.freebsd.org/D12757
Notes:
svn path=/head/; revision=324995
|
|
|
|
|
|
|
|
|
| |
(those files already do that so weren't changed).
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324981
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Back out the unification commit to boot1. There's some issues on the
arm and arm64 platforms that need to be addressed with code
changes. There's also a discussion on arch@ about the future of
boot1.efi vs just using loader.efi that needs to play out. So take a
pause on these changes until the arm issues can be fixed and it's
clear boot1.efi will survive into FreeBSD 12.
OK'd by: Eric@meatspace
Notes:
svn path=/head/; revision=324709
|
|
|
|
| |
Notes:
svn path=/head/; revision=324653
|
|
|
|
|
|
|
|
| |
There's a number of copies of basically identical code to enable
building forth in /boot/loader. Move it all into ficl.mk.
Notes:
svn path=/head/; revision=324652
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makefile.inc has a specific meaning in the tree, and
common/Makefile.inc doesn't quite fit into that. Rename it to
loader.mk and it will be a place to collect common things to all
/boot/loader programs there.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324649
|
|
|
|
| |
Notes:
svn path=/head/; revision=324648
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor boot1 to use the same I/O code as /boot/loader uses. Refactor
to use the common efi_main.c.
Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D10447
Notes:
svn path=/head/; revision=324646
|
|
|
|
|
|
|
|
|
|
|
| |
Rename exit to efi_exit. It doesn't have the proper signature and
conflicts with standard definition. Provide the standard definition as
well.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324557
|
|
|
|
|
|
|
|
|
|
|
| |
Move ufsread.c from sys/boot/common (which used to be all the common
files for /boot/loader, but grew to be all the common files for
sys/boot, but that's now sys/boot/libsa's job) to sys/boot/libsa.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324556
|
|
|
|
|
|
|
|
|
|
| |
always include it. Remove places where we explicitly include it. This
also helps reduce the 'cut-and-paste' factor of these Makefiles.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324460
|
|
|
|
|
|
|
|
|
|
|
| |
LIBSA is the current stand alone library. LIBSA32 is the 32-bit
version of the library. LIBSAU is the userboot version of libsa. Use
the proper define instead of the more generic define.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324452
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define SASRC to point to the current libstand sources. Include
../Makefile.inc early enough in a few places so we can .include
"${SASRC}/Makefile" and have it work. Create a new pass-up
Makefile.inc in sys/boot/userboot to allow this pattern to work.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324450
|
|
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324449
|
|
|
|
|
|
|
|
|
| |
Wrap `efi_zfs_is_preferred` with `#ifdef EFI_ZFS_BOOT`.
Reported by: Guy Yur <guyyur@gmail.com>
Notes:
svn path=/head/; revision=324388
|
|
|
|
|
|
|
|
|
|
|
| |
Move the retrieval of the image information into loader's main instead
of doing it in efizfs.c
Differential Revision: https://reviews.freebsd.org/D12564
Submitted by: Eric McCorkle
Notes:
svn path=/head/; revision=324360
|
|
|
|
|
|
|
|
|
|
| |
efi_devpath_is_prefix determines if a path matches a passed-in prefix.
Differential Revision: https://reviews.freebsd.org/D12564
Submitted by: Eric McCorkle
Notes:
svn path=/head/; revision=324359
|
|
|
|
|
|
|
| |
The current efipart_floppy() implementation is leaking the acpi pointer.
Notes:
svn path=/head/; revision=323991
|
|
|
|
|
|
|
| |
Define EISA PNP constants and use them, also fix ID for 0x701
Notes:
svn path=/head/; revision=323909
|
|
|
|
|
|
|
| |
Use errno for error checking.
Notes:
svn path=/head/; revision=323908
|
|
|
|
|
|
|
| |
The else statement should have { }
Notes:
svn path=/head/; revision=323907
|
|
|
|
|
|
|
|
| |
We should return ENXIO to indicate the situation with device present,
but no media.
Notes:
svn path=/head/; revision=323906
|
|
|
|
|
|
|
|
|
|
| |
The device index, partition index and reference counter are all positive
numbers. However, since our internal partition number may be negative
to indicate GPT table, the compare expression need to take care when comparing
pdinfo_t and partition data.
Notes:
svn path=/head/; revision=323905
|
|
|
|
|
|
|
| |
The link should be replaced by list.
Notes:
svn path=/head/; revision=323897
|
|
|
|
|
|
|
| |
The efilib.h update was left out from r323885 by mistake.
Notes:
svn path=/head/; revision=323896
|
|
|
|
|
|
|
| |
DevicePathNodeLength() will always return unsigned value.
Notes:
svn path=/head/; revision=323895
|
|
|
|
|
|
|
|
| |
The device specific *_add functions are using malloc() + memset,
should use calloc instead.
Notes:
svn path=/head/; revision=323886
|
|
|
|
|
|
|
|
| |
The current implementation of efi_devpath_match() is returning values 0 or 1,
so it should be updated to return bool.
Notes:
svn path=/head/; revision=323885
|
|
|
|
|
|
|
|
| |
Remove duplicated free()+return statements, default unit to 0
and improve strtol error processing.
Notes:
svn path=/head/; revision=323867
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generate_fat.sh does the following:
- create an 800kb zero-filled file
- create an md device backed by this file
- format the device fat12
- mount the filesystem
- create the EFI ESP directory structure
- create the EFI boot file (BOOTx64 for amd64, BOOTaa64 for aarch64, etc)
- Adds a marker to the beginning of the file, and pad it to 384kb
- 384kb was chosen as it is less than half of 800kb, thus allowing
users to keep a backup of their older boot file in the small partition
- Unmount the filesystem
- Scan the image and find the offset where the marker was inserted
- The process requires root, to make image generation easier, images for
each architecture are pregenerated, compressed with xz, and checked
into svn.
The Makefile that generates boot1.efifat does the following:
- Ensure the compiled boot1.efi file is no larger than the generated image
- Decompress the template created by generate-fat.sh
- dd the contents of boot1.efi into boot1.efifat starting at the offset
where the marker is found. This allows any file less than the maximum
size to be written into the fat filesystem without having to mount it,
so no root privileges are required.
Later work by imp and myself makes bsdinstall create a 200mb fat16 instead
of using this process, but it is retained to make image generation easier.
Submitted by: Eric McCorkle (original version)
Reviewed by: emaste, tsoome, Eric McCorkle
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9680
Notes:
svn path=/head/; revision=323554
|
|
|
|
|
|
|
| |
Need to check rsize before dereferencing it.
Notes:
svn path=/head/; revision=323541
|
|
|
|
|
|
|
|
|
|
| |
In case of error from disk_open(), we should clean up properly.
Reviewed by: allanjude, imp
Differential Revision: https://reviews.freebsd.org/D12340
Notes:
svn path=/head/; revision=323497
|
|
|
|
|
|
|
|
|
|
|
|
| |
This Makefile relies on Makefile.fat providing the correct value for
BOOT1_MAXSIZE and BOOT1_OFFSET. Since BOOT1_OFFSET had no default value
here the build would already fail if Makefile.fat did not provide
correct values.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=323436
|
|
|
|
|
|
|
|
|
|
| |
Need to add #ifdef EFI_ZFS_BOOT guard into efi/loader/main.c
PR: 222215
Reported by: Sylvain Garrigues
Notes:
svn path=/head/; revision=323428
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In advance of other changes to the fat template generation process, have
generate-fat.sh create all template files at the same time so that they
cannot get out of sync.
Also correct a longstanding but where BOOT1_OFFSET was overwritten on
each invocation. A previous version of this patch stored a per-arch
offset (e.g. BOOT1_arm64_OFFSET) but that was deemed unnecessary.
Instead just hardcode the known offset that applies to all archs (0x2d)
and fail if the offset happens to be different.
Ongiong work (using newfs_msdos in bsdinstall and adding msdosfs support
to makefs) will eventually allow us to do away with this fat template
hack altogether, but in the near term we have a few improvements that
will build on this.
Reviewed by: allanjude, imp, Eric McCorkle
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10931
Notes:
svn path=/head/; revision=323407
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the efipart rewrite, the chain command was looking for device
handle using interface applicable only for net devices. Disk
partitions and zfs pools need their own approach to find the proper handle.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12287
Notes:
svn path=/head/; revision=323389
|
|
|
|
|
|
|
|
| |
Noticed by: tsoome@
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323272
|