[U-Boot] [BeagleBone Black] Possible bug in U-Boot efi loader for BeagleBone Black

Dominik Adamski dominik.adamski at northerntech.community
Wed Dec 12 14:02:33 UTC 2018


Hello,
I think that I have found a bug in U-Boot UEFI implementation for 
BeagleBone Black board.

I have tested U-Boot UEFI implementation for BeagleBone Black. I am able 
to load Linux successfully via GRUB bootloader with U-Boot v2018.09-rc2 
. U-Boot v2018.09-rc3 and above versions cause that the platform 
restarts over and over again. It starts booting, then it loads GRUB and 
when GRUB finishes its work an error occurs and the board restarts.

I have looked through U-Boot repository and I have found the commit, 
which breaks booting. It's name is as follows: "efi_loader: update 
runtime services table crc32" (commit ID: 
a39f39cdd8be5cd3e7a8b696a463b621e3d827e0 ) . I have figured out, that 
when I comment out function call: 
efi_update_table_header_crc32(&efi_runtime_services.hdr); in function 
efi_runtime_detach then I am able to launch Linux successfully.

My setup of U-Boot, GRUB and Linux was as follows: 
https://github.com/DominikAdamski/Beaglebone_GRUB_Manual . For U-Boot 
v2018.09 I get following log when booting:

U-Boot 2018.09 (Dec 11 2018 - 11:11:16 +0100)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Warning - bad CRC, using default 
environment

No USB device found
<ethaddr> not set. Validating first E-fuse MAC
Net:   eth0: ethernet at 4a100000
Hit any key to stop autoboot:  2 ^H^H^H 1 ^H^H^H 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
85 bytes read in 1 ms (83 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc0 ...
Running uenvcmd ...
403968 bytes read in 28 ms (13.8 MiB/s)
^[[18tScanning disks on usb...
Disk usb0 not ready
Disk usb1 not ready
Disk usb2 not ready
Disk usb3 not ready
Scanning disks on mmc...
MMC Device 2 not found
MMC Device 3 not found
Found 4 disks
WARNING: booting without device tree
## Starting EFI application at 82000000 ...
^[[?25h^[[0;30;47mWelcome to GRUB!
^M
^M^[[0;37;40m^[[0;37;40m^[[0;37;40mEFI stub: Booting Linux Kernel...^M
EFI stub: Using DTB from configuration table^M
EFI stub: Exiting boot services and installing virtual address map...^M
U-Boot EFI: Relocation at 9ff4a8a8 is out of range (2008214f)
data abort
pc : [<9ff4a7cc>]          lr : [<9ff4a8b9>]
reloc pc : [<808007cc>]    lr : [<808008b9>]
sp : 9df1ebac  ip : 00000020     fp : 00000000
r10: 00001000  r9 : 9df29eb8     r8 : 00000028
r7 : 9ff4aa10  r6 : 9ff4aec4     r5 : 00000003  r4 : 9ff4aa70
r3 : 2002aac0  r2 : 00000050     r1 : 9ff4aa70  r0 : ffffffff
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32
Code: 61204621 f876f000 bd106120 b5f04b36 (b31c681c)
UEFI image [0x9ceb1000:0x9cf139ff] '/\grub.efi'
UEFI image [0x94728000:0x9510bfff]
Resetting CPU ...

resetting ...

Please let me know, if I should add more detailed logs.

Dominik Adamski



More information about the U-Boot mailing list