[U-Boot] [BUG] efi: stalled execution state

Matwey V. Kornilov matwey.kornilov at gmail.com
Sun Jul 14 12:08:36 UTC 2019


Hello,

I am running u-boot 2019.07 with rk3328-rock64 configuration in the
two following setups:

1) TFTP loaded EFI GRUB

In this setup, I deploy u-boot loader onto the empty microsd card
(without any partitions), GRUB EFI binary is served by TFTP. Please,
find full log attached in u-boot-tftp.txt.
With this setup, u-boot works as expected: it finds the server address
announced by DHCP and downloads /bootaa64.efi, then GRUB is executed
and Linux OS is successfully booted!

2) TFTP loaded EFI GRUB, after microsd card EFI GRUB.

In this setup, I deploy the same u-boot loader binaries onto the
microsd with preinstalled Linux OS and GRUB EFI.
u-boot successfully loads GRUB EFI binary from to EFI partition and
then preinstalled Linux OS is booted from microsd card.

However, If I use the command line for GRUB loaded from microsd card,
and run `exit' command, then I get back to u-boot:

grub> exit
## Application terminated, r = 0
EFI LOAD FAILED: continuing...

Then, u-boot tries to find another way to boot the system and finally
loads another one GRUB EFI executable obtained from TFTP server.
It is the same GRUB EFI binary as in the first scenario. However, now
It behaves completely different. Instead of GRUB menu I see the
command line, because GRUB is failing to obtain configuration from
TFTP server.
Please, find the full log in u-boot-sd.txt

In the first setup, ${prefix} variable is the following:

grub> echo ${prefix}
(tftp,192.168.185.80)
grub>

It is correct prefix variable. While in the second setup, ${prefix}
variable is empty:

grub> echo ${prefix}

grub>

I believe that there is a bug, and TFTP GRUB execution environment
should not rely on previously run EFI applications.


-- 
With best regards,
Matwey V. Kornilov
-------------- next part --------------
DDR version 1.16 20190528
ID:0x805 Y
In
SRX
LPDDR3
333MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=2048MB
ddrconfig:6
OUT

U-Boot SPL 2019.07 (Jul 10 2019 - 22:57:15 +0000)
Trying to boot from MMC1
NOTICE:  BL31: v2.1(debug):
NOTICE:  BL31: Built : 16:00:26, Jun 16 2019
ERROR:   over or zero region, nr=3145987, max=10
NOTICE:  BL31:Rockchip release version: v1.2
INFO:    ARM GICv2 driver initialized
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: BL31: cortex_a53: CPU workaround for 819472 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 824069 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 827319 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 855873 was missing!
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2019.07 (Jul 10 2019 - 22:57:15 +0000)

Model: Pine64 Rock64
DRAM:  2 GiB
MMC:   rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial at ff130000
Out:   serial at ff130000
Err:   serial at ff130000
Model: Pine64 Rock64
Net:   
Warning: ethernet at ff540000 (eth0) using random MAC address - 16:a5:e2:e4:54:76
eth0: ethernet at ff540000
Hit any key to stop autoboot:  0 
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
** No partition table - mmc 1 **
** No partition table - mmc 1 **
** No partition table - mmc 1 **
starting USB...
Bus usb at ff5c0000: USB EHCI 1.00
Bus usb at ff5d0000: USB OHCI 1.0
Bus usb at ff580000: scanning bus usb at ff5c0000 for devices... 1 USB Device(s) found
scanning bus usb at ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb at ff580000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
DHCP client bound to address 192.168.185.61 (3053 ms)
*** Warning: no boot file name; using 'C0A8B93D.img'
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'C0A8B93D.img'.
Load address: 0x800800
Loading: *
TFTP error: 'file /srv/tftpboot/C0A8B93D.img not found' (1)
Not retrying...
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B93D
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C0A8B93D'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B93D not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B93
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C0A8B93'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B93 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B9
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C0A8B9'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B9 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C0A8B'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C0A8'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C0A'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C0'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/C'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3328-evb_rk3328
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/default-arm-rk3328-evb_rk3328'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default-arm-rk3328-evb_rk3328 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3328
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/default-arm-rk3328'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default-arm-rk3328 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/default-arm'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default-arm not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'pxelinux.cfg/default'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default not found' (1)
Not retrying...
Config file not found
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.185.61 (5 ms)
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.61
Filename 'boot.scr.uimg'.
Load address: 0x500000
Loading: *
TFTP error: 'file /srv/tftpboot/boot.scr.uimg not found' (1)
Not retrying...
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.185.61 (9 ms)
Using ethernet at ff540000 device
TFTP from server 192.168.185.80; our IP address is 192.168.185.61
Filename '/bootaa64.efi'.
Load address: 0x2080000
Loading: #################################################################
         #################################################################
         #########
         3.7 MiB/s
done
Bytes transferred = 706560 (ac800 hex)
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.80; our IP address is 192.168.185.61
Filename 'dtb/rockchip/rk3328-rock64.dtb'.
Load address: 0x1f00000
Loading: #######
         2.7 MiB/s
done
Bytes transferred = 34461 (869d hex)
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 1 disks
Welcome to GRUB!
-------------- next part --------------
DDR version 1.16 20190528
ID:0x805 Y
In
SRX
LPDDR3
333MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=2048MB
ddrconfig:6
OUT

U-Boot SPL 2019.07 (Jul 10 2019 - 22:57:15 +0000)
Trying to boot from MMC1
NOTICE:  BL31: v2.1(debug):
NOTICE:  BL31: Built : 16:00:26, Jun 16 2019
ERROR:   over or zero region, nr=3145987, max=10
NOTICE:  BL31:Rockchip release version: v1.2
INFO:    ARM GICv2 driver initialized
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: BL31: cortex_a53: CPU workaround for 819472 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 824069 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 827319 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 855873 was missing!
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2019.07 (Jul 10 2019 - 22:57:15 +0000)

Model: Pine64 Rock64
DRAM:  2 GiB
MMC:   rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial at ff130000
Out:   serial at ff130000
Err:   serial at ff130000
Model: Pine64 Rock64
Net:   
Warning: ethernet at ff540000 (eth0) using random MAC address - 82:56:18:88:4d:af
eth0: ethernet at ff540000
Hit any key to stop autoboot:  0 
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:2...
52268 bytes read in 30 ms (1.7 MiB/s)
** Unrecognized filesystem type **
Scanning mmc 1:1...
Found EFI removable media binary efi/boot/bootaa64.efi
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 4 disks
BootOrder not defined
EFI boot manager: Cannot load any image
1259360 bytes read in 433 ms (2.8 MiB/s)
Welcome to GRUB!

Speed: 1000, full duplex

                                                 GNU GRUB  version 2.02

   Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions.       
   Anywhere else TAB lists possible device or file completions. ESC at any time exits.                            


grub> exit
## Application terminated, r = 0
EFI LOAD FAILED: continuing...
starting USB...
Bus usb at ff5c0000: USB EHCI 1.00
Bus usb at ff5d0000: USB OHCI 1.0
Bus usb at ff580000: scanning bus usb at ff5c0000 for devices... 1 USB Device(s) found
scanning bus usb at ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb at ff580000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
DHCP client bound to address 192.168.185.46 (3042 ms)
*** Warning: no boot file name; using 'C0A8B92E.img'
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'C0A8B92E.img'.
Load address: 0x800800
Loading: *
TFTP error: 'file /srv/tftpboot/C0A8B92E.img not found' (1)
Not retrying...
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B92E
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C0A8B92E'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B92E not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B92
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C0A8B92'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B92 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B9
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C0A8B9'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B9 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8B
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C0A8B'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8B not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A8
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C0A8'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A8 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0A
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C0A'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0A not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C0
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C0'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C0 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/C
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/C'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/C not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3328-evb_rk3328
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/default-arm-rk3328-evb_rk3328'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default-arm-rk3328-evb_rk3328 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3328
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/default-arm-rk3328'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default-arm-rk3328 not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/default-arm'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default-arm not found' (1)
Not retrying...
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'pxelinux.cfg/default'.
Load address: 0x600000
Loading: *
TFTP error: 'file /srv/tftpboot/pxelinux.cfg/default not found' (1)
Not retrying...
Config file not found
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.185.46 (5 ms)
Using ethernet at ff540000 device
TFTP from server 192.168.185.253; our IP address is 192.168.185.46
Filename 'boot.scr.uimg'.
Load address: 0x500000
Loading: *
TFTP error: 'file /srv/tftpboot/boot.scr.uimg not found' (1)
Not retrying...
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.185.46 (6 ms)
Using ethernet at ff540000 device
TFTP from server 192.168.185.80; our IP address is 192.168.185.46
Filename '/bootaa64.efi'.
Load address: 0x2080000
Loading: #################################################################
         #################################################################
         #########
         3.5 MiB/s
done
Bytes transferred = 706560 (ac800 hex)
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.185.80; our IP address is 192.168.185.46
Filename 'dtb/rockchip/rk3328-rock64.dtb'.
Load address: 0x1f00000
Loading: #######
         2.3 MiB/s
done
Bytes transferred = 34461 (869d hex)
Welcome to GRUB!


More information about the U-Boot mailing list