Doesn't build due to fat template error of being too large
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 5090 Build 5177: CI src build Jenkins Build 5176: arc lint + arc unit
Event Timeline
currently errors out with:
===> sys/boot/efi/boot1 (all) boot1 8704 bytes too large; regenerate FAT templates? *** Error code 1
sys/boot/efi/loader/copy.c | ||
---|---|---|
43 โ | (On Diff #20110) | ew ... debugging test was inserted here. Your tree predated this change. I'll remove this. |
sys/boot/efi/loader/arch/i386/exec.c | ||
---|---|---|
39 | Cut-n-paste comment here. Should have read something to the effect of "fix missing definition for exit()" ===> sys/boot/efi/loader (all) /home/sbruno/bsd/fbsd_head/sys/boot/efi/loader/arch/i386/exec.c:51:2: error: implicit declaration of function 'exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration] exit(1); ^ 1 error generated. |
Slightly more improved version of the build for EFI32 support.
This doesn't quite do what I want it to do, which is build a loader/ficl
for EFI and non-efi, but its good enough for science and fixes issues with
the review that emaste pointed out.
This still bails as we're 8k over? I'm super confused how this is happening.
cc -target i386-unknown-freebsd12.0 --sysroot=/var/tmp/i386.i386/home/sbruno/bsd/fbsd_head/tmp -B/var/tmp/i386.i386/home/sbruno/bsd/fbsd_head/tmp/usr/bin -O2 -pipe -I. -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../include -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../include/i386 -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../../../contrib/dev/acpica/include -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../../.. -DEFI_UFS_BOOT -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../../zfs/ -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../../../cddl/boot/zfs/ -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../../../crypto/skein -DEFI_ZFS_BOOT -I/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../../common -fPIC -march=i386 -mno-aes -ffreestanding -Wformat -msoft-float -mno-mmx -mno-sse -mno-avx -g -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -Wl,-T/home/sbruno/bsd/fbsd_head/sys/boot/efi/boot1/../loader/arch/i386/ldscript.i386 -Wl,-Bsymbolic -shared -Wl,-znocombreloc -nostdlib -o boot1.sym.full boot1.o self_reloc.o start.o ufs_module.o zfs_module.o skein.o skein_block.o -lstand objcopy --only-keep-debug boot1.sym.full boot1.sym.debug objcopy --strip-debug --add-gnu-debuglink=boot1.sym.debug boot1.sym.full boot1.sym if nm boot1.sym | grep ' U '; then echo "Undefined symbols in boot1.sym"; exit 1; fi SOURCE_DATE_EPOCH=1451606400 objcopy -j .peheader -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel.dyn -j .rela.dyn -j .reloc -j .eh_frame --output-target=efi-app-ia32 boot1.sym boot1.efi boot1 8704 bytes too large; regenerate FAT templates? *** Error code 1
Thanks to Allan, shrink the skein_block code significantly by not
unrolling loops. This now allows me to get to the first kernel boot
twiddle, but not much else. :-(
Functional Loader though, not too shabby.
sys/boot/ficl/loader.c | ||
---|---|---|
1007 | This sucks. This means we have to build two different images for ficl, one for the EFI build and one for the !EFI build. A better approach would be to kick these functions to a specific .o that's only included in loader and not loader.efi. You should get that jerk that put these in to fix it for you... Oh, wait, who was that again :) |
sys/boot/ficl/loader.c | ||
---|---|---|
1007 | *IF ONLY THIS WERE POSSIBLE* :-) |
sys/boot/ficl/loader.c | ||
---|---|---|
1007 | You actually will need multiple ficl images to be built anyhow, because booting UEFI32 will need 32bit boot1 and 32bit loader, and booting 64bit UEFI needs 64bit boot1 and 64bit loader. Even with 32bit UEFI, you still wanna test and boot 64bit kernel (if the hardware allows and you have the kernel variant). And this is because of 64bit systems which are actually using 32bit UEFI (like intel atom). |
sys/boot/efi/Makefile | ||
---|---|---|
18 | Wouldn't removing this make it more difficult for folks to start working on real booting support? Or does this change do something other than what I think? |
sys/boot/efi/Makefile | ||
---|---|---|
18 | I just mean that until there's a kernel it can boot, having a i386 loader.efi might be more confusing to end users. Folks working on boot support can carry this tiny patch or just build the i386 loader directly. |
Drop the actual building of i386 loader.efi to not confuse people
into thinking that it *works*.