Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:edge2:troubleshooting:edge2-uboot-uefi

This is an old revision of the document!


Edge2 Uboot EFI

Problems was solved solution, after we can start EFI loader and boot up next system

UBOOT EFI partitions dump
master@universe:/tmp/uboot$ sfdisk --dump /dev/sda
 
label: gpt
label-id: 73987B6B-4974-4C94-A3E8-58AB2EB7A946
device: /dev/sda
unit: sectors
first-lba: 34
last-lba: 31116254
 
/dev/sda1 : start=        2048, size=       16384, type=F808D051-1602-4DCD-9452-F9637FEFC49A, uuid=B750E44E-833F-4A30-C38C-B117241D84D4, name="uboot"
OOWOW SPL boot log
U-Boot SPL board init
U-Boot SPL 2017.09 (May 12 2023 - 11:40:17)
Failed to set cpub01
Failed to set cpub23
I2c2 speed: 100000Hz
MCU: boot mode 0x20: 1, flag 0x92: 3
MCU: boot flag < 83
board_boot_order: /chosen found, using spl_boot_device()
!!! same-as-spl: 
+++ /mmc@fe2e0000: 
!!! /mmc@fe2c0000: 
!!! /mmc@fe2e0000: 
!!! /spi@fe2b0000/flash@1: 
Trying to boot from MMC1 :: 0
Trying fit image at 0x4000 sector
Not fit magic
...

Solution

Write FIT image to eMMC or SD 0x4000 sector

For example 1st write https://dl.khadas.com/.test/edge2_UEFI_Release_3676af4b.img to USB flash, start OOWOW going into shell…

copy FIT image to eMMC
dd if=/dev/sda skip=2048 count=3440 seek=$((0x4000)) of=/dev/mmcblk0

or just using oowow with Internet, start OOWOW going into shell…

oowow copy EFI loader to eMMC
root@edge2-00000:/# curl -jkL \
 https://dl.khadas.com/.test/edge2_UEFI_Release_3676af4b.img \
 -r$((2048*512))-$(((2048+3440)*512)) | dd seek=$((0x4000)) of=$(mmc_disk)
check eMMC
root@edge2-00000:/# dd if=/dev/mmcblk0 skip=$((0x4000)) count=1 | hexdump -C
 
1+0 records in
1+0 records out
512 bytes copied, 0.000668208 s, 766 kB/s
00000000  d0 0d fe ed 00 00 08 b3  00 00 00 38 00 00 07 e8  |...........8....|
00000010  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
00000020  00 00 00 cb 00 00 07 b0  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00000040  00 00 00 03 00 00 00 04  00 00 00 a7 00 00 00 00  |................|
00000050  00 00 00 03 00 00 00 04  00 00 00 9d 00 1a da 57  |...............W|
00000060  00 00 00 03 00 00 00 04  00 00 00 93 64 5d 13 d5  |............d]..|
00000070  00 00 00 03 00 00 00 1f  00 00 00 00 46 49 54 20  |............FIT |
00000080  49 6d 61 67 65 20 77 69  74 68 20 41 54 46 2f 4f  |Image with ATF/O|
00000090  50 2d 54 45 45 2f 55 45  46 49 00 00 00 00 00 03  |P-TEE/UEFI......|
000000a0  00 00 00 04 00 00 00 0c  00 00 00 01 00 00 00 01  |................|
000000b0  69 6d 61 67 65 73 00 00  00 00 00 01 75 62 6f 6f  |images......uboo|
000000c0  74 00 00 00 00 00 00 03  00 00 00 04 00 00 00 c1  |t...............|
000000d0  00 10 00 00 00 00 00 03  00 00 00 04 00 00 00 b5  |................|
000000e0  00 00 00 00 00 00 00 03  00 00 00 05 00 00 00 00  |................|
000000f0  55 45 46 49 00 00 00 00  00 00 00 03 00 00 00 0b  |UEFI............|
00000100  00 00 00 20 73 74 61 6e  64 61 6c 6f 6e 65 00 00  |... standalone..|
00000110  00 00 00 03 00 00 00 06  00 00 00 25 61 72 6d 36  |...........%arm6|
00000120  34 00 00 00 00 00 00 03  00 00 00 07 00 00 00 2a  |4..............*|
00000130  55 2d 42 6f 6f 74 00 00  00 00 00 03 00 00 00 05  |U-Boot..........|
00000140  00 00 00 2d 6e 6f 6e 65  00 00 00 00 00 00 00 03  |...-none........|
00000150  00 00 00 04 00 00 00 39  00 20 00 00 00 00 00 01  |.......9. ......|
00000160  68 61 73 68 00 00 00 00  00 00 00 03 00 00 00 20  |hash........... |
00000170  00 00 00 af 43 5a 62 74  4c df d5 01 33 2d 58 d0  |....CZbtL...3-X.|
00000180  28 fe b1 37 45 eb 6c e5  84 f6 e9 f6 ca 69 77 af  |(..7E.l......iw.|
00000190  5f 8b c8 a5 00 00 00 03  00 00 00 07 00 00 00 3e  |_..............>|
000001a0  73 68 61 32 35 36 00 00  00 00 00 02 00 00 00 02  |sha256..........|
000001b0  00 00 00 01 61 74 66 2d  31 00 00 00 00 00 00 03  |....atf-1.......|
000001c0  00 00 00 04 00 00 00 c1  00 02 f7 64 00 00 00 03  |...........d....|
000001d0  00 00 00 04 00 00 00 b5  00 10 00 00 00 00 00 03  |................|
000001e0  00 00 00 15 00 00 00 00  41 52 4d 20 54 72 75 73  |........ARM Trus|
000001f0  74 65 64 20 46 69 72 6d  77 61 72 65 00 00 00 00  |ted Firmware....|
00000200

UBOOT SPL EFI logs

UBOOT SPL EFI logs
Trying to boot from MMC1 :: 1
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(909ea14106...) + OK
## Checking uboot 0x00200000 ... sha256(435a62744c...) + OK
## Checking fdt 0x00300000 ... sha256(c07f4a4d71...) + OK
## Checking atf-2 0x000f0000 ... sha256(6a970ae6b4...) + OK
## Checking atf-3 0xff100000 ... sha256(3ea8cf0d7e...) + OK
## Checking optee 0x08400000 ... sha256(fde0860845...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000)
Total: 126.537 ms
...
UEFI firmware (version 3676af4b built at 16:11:00 on May 11 2023)
...
Last modified: 2023/07/18 00:38 by hyphop