Page MenuHomeFreeBSD

sysutils/u-boot-*: Update to 2023.07.02
ClosedPublic

Authored by minsoochoo0122_proton.me on Jul 26 2023, 1:05 AM.
Referenced Files
Unknown Object (File)
Fri, Nov 1, 9:03 AM
Unknown Object (File)
Thu, Oct 31, 12:28 AM
Unknown Object (File)
Oct 1 2024, 4:42 PM
Unknown Object (File)
Sep 28 2024, 9:52 PM
Unknown Object (File)
Sep 28 2024, 9:52 PM
Unknown Object (File)
Sep 28 2024, 9:52 PM
Unknown Object (File)
Sep 28 2024, 9:52 PM
Unknown Object (File)
Sep 21 2024, 10:06 PM

Details

Summary

Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269181

14-CURRENT doesn't boot on RPI4 with 8GB memory because of outdated rpi-firmware and u-boot-rpi4.

This might require updated rpi-firmware(https://reviews.freebsd.org/D41192)

Test Plan

Tested on Raspberry Pi 4 B+.

  1. Download latest 14-CURRENT arm64 RPI snapshot and make a bootable microsd card.
  2. Make rpi-firmware and install (please apply this patch: updated rpi-firmware(https://reviews.freebsd.org/D41192)
cd /usr/ports/sysutils/rpi-firmware
make install
cp -pr /usr/local/share/rpi-firmware/* /boot/efi/
  1. Make latest u-boot-rpi4 and install
cd /usr/ports/sysutils/u-boot-rpi4
make install
cp /usr/local/share/u-boot/u-boot-rpi4/u-boot.bin /boot/
  1. Reboot. This boot will automatically adjust disk size during boot. It might take several minutes or hours depending on your hardware.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Don't see any problems with that patch but I want to test it on different boards just in case, will try to find time this weekend.

u-boot-rockpro64 build fails.

# make install
===>  Building for u-boot-rockpro64-2023.07.02
gmake[1]: Entering directory '/usr/ports/sysutils/u-boot-rockpro64/work/u-boot-2023.07.02'
  ENVC    include/generated/env.txt
  UPD     include/generated/timestamp_autogenerated.h
  ENVP    include/generated/env.in
  ENVT    include/generated/environment.h
  CC      cmd/version.o
  CC      env/common.o
  AR      cmd/built-in.o
  CC      lib/efi_loader/dtbdump.o
  CC      lib/efi_loader/initrddump.o
  AR      env/built-in.o
  LD      lib/efi_loader/initrddump_efi.so
aarch64-none-elf-ld.bfd: warning: -z norelro ignored
  OBJCOPY lib/efi_loader/initrddump.efi
  LD      lib/efi_loader/dtbdump_efi.so
aarch64-none-elf-ld.bfd: warning: -z norelro ignored
  OBJCOPY lib/efi_loader/dtbdump.efi
  KSL     keep-syms-lto.c
/bin/sh: ./scripts/gen_ll_addressable_symbols.sh: not found
gmake[1]: *** [Makefile:1718: keep-syms-lto.c] Error 127
gmake[1]: *** Deleting file 'keep-syms-lto.c'
gmake[1]: Leaving directory '/usr/ports/sysutils/u-boot-rockpro64/work/u-boot-2023.07.02'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/u-boot-rockpro64

although scripts/gen_ll_addressable_symbols.sh exists.

I couldn't find any solutions on the internet. Can this be fixed by modifying u-boot-master/Makefile or should I report this to u-boot project?

u-boot-rockpro64 build fails.

# make install
===>  Building for u-boot-rockpro64-2023.07.02
gmake[1]: Entering directory '/usr/ports/sysutils/u-boot-rockpro64/work/u-boot-2023.07.02'
  ENVC    include/generated/env.txt
  UPD     include/generated/timestamp_autogenerated.h
  ENVP    include/generated/env.in
  ENVT    include/generated/environment.h
  CC      cmd/version.o
  CC      env/common.o
  AR      cmd/built-in.o
  CC      lib/efi_loader/dtbdump.o
  CC      lib/efi_loader/initrddump.o
  AR      env/built-in.o
  LD      lib/efi_loader/initrddump_efi.so
aarch64-none-elf-ld.bfd: warning: -z norelro ignored
  OBJCOPY lib/efi_loader/initrddump.efi
  LD      lib/efi_loader/dtbdump_efi.so
aarch64-none-elf-ld.bfd: warning: -z norelro ignored
  OBJCOPY lib/efi_loader/dtbdump.efi
  KSL     keep-syms-lto.c
/bin/sh: ./scripts/gen_ll_addressable_symbols.sh: not found
gmake[1]: *** [Makefile:1718: keep-syms-lto.c] Error 127
gmake[1]: *** Deleting file 'keep-syms-lto.c'
gmake[1]: Leaving directory '/usr/ports/sysutils/u-boot-rockpro64/work/u-boot-2023.07.02'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/u-boot-rockpro64

although scripts/gen_ll_addressable_symbols.sh exists.

I couldn't find any solutions on the internet. Can this be fixed by modifying u-boot-master/Makefile or should I report this to u-boot project?

Likely because of https://github.com/u-boot/u-boot/blob/master/scripts/gen_ll_addressable_symbols.sh#L1

Check if that can be patched to be /bin/sh, if not we need to add bash to the build depends and add a BINARY_ALIAS for it to be in /bin/

In D41193#938512, @manu wrote:

u-boot-rockpro64 build fails.

# make install
===>  Building for u-boot-rockpro64-2023.07.02
gmake[1]: Entering directory '/usr/ports/sysutils/u-boot-rockpro64/work/u-boot-2023.07.02'
  ENVC    include/generated/env.txt
  UPD     include/generated/timestamp_autogenerated.h
  ENVP    include/generated/env.in
  ENVT    include/generated/environment.h
  CC      cmd/version.o
  CC      env/common.o
  AR      cmd/built-in.o
  CC      lib/efi_loader/dtbdump.o
  CC      lib/efi_loader/initrddump.o
  AR      env/built-in.o
  LD      lib/efi_loader/initrddump_efi.so
aarch64-none-elf-ld.bfd: warning: -z norelro ignored
  OBJCOPY lib/efi_loader/initrddump.efi
  LD      lib/efi_loader/dtbdump_efi.so
aarch64-none-elf-ld.bfd: warning: -z norelro ignored
  OBJCOPY lib/efi_loader/dtbdump.efi
  KSL     keep-syms-lto.c
/bin/sh: ./scripts/gen_ll_addressable_symbols.sh: not found
gmake[1]: *** [Makefile:1718: keep-syms-lto.c] Error 127
gmake[1]: *** Deleting file 'keep-syms-lto.c'
gmake[1]: Leaving directory '/usr/ports/sysutils/u-boot-rockpro64/work/u-boot-2023.07.02'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/u-boot-rockpro64

although scripts/gen_ll_addressable_symbols.sh exists.

I couldn't find any solutions on the internet. Can this be fixed by modifying u-boot-master/Makefile or should I report this to u-boot project?

Likely because of https://github.com/u-boot/u-boot/blob/master/scripts/gen_ll_addressable_symbols.sh#L1

Check if that can be patched to be /bin/sh, if not we need to add bash to the build depends and add a BINARY_ALIAS for it to be in /bin/

You are right! U-boot requires bash and patching it with sh works without build error. Thanks!

Fixed build error on sysutils/rockpro64

Currently building and will test on a few boards just to be sure, will commit after.

This revision is now accepted and ready to land.Aug 9 2023, 10:39 AM
This revision was automatically updated to reflect the committed changes.