Re: EFI bootloader often trys to build itself at installworld stage

From: NGie Cooper <yaneurabeya_at_gmail.com>
Date: Sat, 24 Oct 2015 14:39:21 -0700
> On Oct 24, 2015, at 14:35, NGie Cooper <yaneurabeya_at_gmail.com> wrote:
> 
> 
>> On Oct 24, 2015, at 14:28, Lev Serebryakov <lev_at_FreeBSD.org> wrote:
>> 
>> Hello freebsd-current,
>> 
>> Each other time "make installworld" from object directory created several hours ago
>> try to build efiloader again (and fails in my case as this world doesn't
>> contain compiler):
>> 
>> ===> sys/boot/efi/loader (install)
>> cc -O2 -pipe   -fPIC -I/data/src/sys/boot/efi/loader -I/data/src/sys/boot/efi/loader/arch/amd64 -I/data/src/sys/boot/efi/loader/../include -I/data/src/sys/boot/efi/loader/../include/amd64 -I/data/src/sys/boot/efi/loader/../../../contrib/dev/acpica/include -I/data/src/sys/boot/efi/loader/../../.. -I/data/src/sys/boot/efi/loader/../../i386/libi386 -DNO_PCI -DEFI -DBOOT_FORTH -I/data/src/sys/boot/efi/loader/../../ficl -I/data/src/sys/boot/efi/loader/../../ficl/amd64 -DLOADER_DISK_SUPPORT -DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -I/data/src/sys/boot/efi/loader/../../common -ffreestanding -Wformat -msoft-float -mno-mmx -mno-sse -mno-avx -fshort-wchar -mno-red-zone -mno-aes -std=gnu99   -Qunused-arguments -c /data/src/sys/boot/efi/loader/autoload.c -o autoload.o
>> /tmp/install.Ku58dvCm/sh: cc: not found
>> 
>> Only LOCAL fileystems are in use, and computer has ntpd-synchronized clock.
>> 
>> "installworld" right after "buildworld" works Ok, but if I need to
>> re-create same nanobsd image without changing world (and sources), its often
>> fails to perform "installworld" for second time at this exact point: efi/loader.
> 
> Hi lev,
> 	Be sure to run buildworld with -DNO_CLEAN after updating your sources when using make installworld. Unfortunately many of the Makefiles under sys/boot are sensitive to updates, i.e. you’ll have to rebuild them (otherwise it will try to rebuild them at install and fail as noted above).
> 	That being said, what you described seems interesting. Not sure why it would be failing. Could you please dump all the debug output from make?
> Thanks!
> -NGie

Uh… yeah. I see some non-atomic logic in sys/boot/common/newvers.sh (it’s writing out to vers.c multiple times in the file) instead of once to the file, or multiple times to a temp file then moving to the final file. There are probably other issues.
sys/boot is a mess. I had a patch to better integrate it into the build process, but I wasn’t a committer at the time, so I couldn’t commit my patch (it’s been lost since then).
Received on Sat Oct 24 2015 - 19:39:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:00 UTC