This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:edge2:troubleshooting:edge2-uboot-uefi [2023/07/18 00:15] hyphop [Solution] |
products:sbc:edge2:troubleshooting:edge2-uboot-uefi [2023/08/28 02:14] (current) hyphop [Edge2 Uboot UEFI] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Edge2 Uboot EFI ===== | + | ~~tag> Edge2 Uboot UEFI boot~~ |
+ | |||
+ | ===== Edge2 Uboot UEFI ===== | ||
- | WIP: thinking about how to find the best way I have some ideas but I need to check all | + | <WRAP important > |
- | ```shell partitions dump | + | We recommend start 1st partition from 32768 block |
- | master@universe:/ | + | |
- | label: gpt | + | ``` |
- | label-id: 73987B6B-4974-4C94-A3E8-58AB2EB7A946 | + | sfdisk |
- | device: | + | first-lba: |
- | unit: sectors | + | / |
- | first-lba: | + | ``` |
- | last-lba: 31116254 | + | |
- | /dev/sda1 : start= | + | </WRAP> |
+ | <WRAP tip > | ||
+ | UEFI bootloader for [[:Edge2]] can be fixed/ | ||
- | ``` | + | </ |
- | ```shell SPL boot log | + | <WRAP tip > |
+ | UEFI bootloader for [[:Edge2]] can be installed via [[:OOWOW]] online images | ||
+ | </ | ||
+ | |||
+ | <WRAP tip > | ||
+ | Problems was solved: [[# | ||
+ | </ | ||
+ | |||
+ | <WRAP alert > | ||
+ | eMMC storage From **16384** to **32768** block must be reserved for boot-loader | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Default Boot problem ===== | ||
+ | |||
+ | OOWOW SPL loader can't find FIT-image at **0x4000** sector eMMC | SD | ||
+ | |||
+ | ```log OOWOW SPL boot log | ||
U-Boot SPL board init | U-Boot SPL board init | ||
Line 36: | Line 55: | ||
Trying fit image at 0x4000 sector | Trying fit image at 0x4000 sector | ||
Not fit magic | Not fit magic | ||
- | Trying fit image at 0x5000 sector | + | ... |
- | Not fit magic | + | |
``` | ``` | ||
===== Solution ===== | ===== Solution ===== | ||
- | Rebuild EFI boot as FIT image and write to **0x4000** sector | + | Write FIT image to eMMC or SD **0x4000** sector |
+ | |||
+ | ```sh write-uefi-bootloader-to-emmc | ||
+ | EFI=edge2_UEFI_Release_v0.7.1.img | ||
+ | wget https:// | ||
+ | DISK=${DISK: | ||
+ | dd skip=2048 seek=$((0x4000)) count=$((0x4000)) of=$DISK if=$EFI conv=fsync, | ||
+ | ``` | ||
+ | |||
+ | For example 1st write https:// | ||
+ | to USB flash, start OOWOW going into shell... | ||
```sh copy FIT image to eMMC | ```sh copy FIT image to eMMC | ||
- | dd if=/dev/sda skip=2048 count=3440 seek=$((0x4000)) of=/dev | + | dd if=/dev/sda skip=2048 count=$((0x4000)) |
- | /mmcblk0 | + | ``` |
+ | |||
+ | or just using oowow with Internet, start OOWOW going into shell... | ||
+ | |||
+ | ```shell oowow copy EFI loader to eMMC | ||
+ | root@edge2-00000:/# | ||
+ | | ||
+ | | ||
+ | ``` | ||
+ | |||
+ | ```shell check eMMC EFI Image header | ||
+ | root@edge2-00000:/# | ||
+ | | hexdump -C | grep " | ||
``` | ``` | ||
Line 91: | Line 130: | ||
``` | ``` | ||
+ | ===== UBOOT SPL EFI logs ===== | ||
+ | |||
+ | ```log UBOOT SPL EFI logs | ||
+ | Trying to boot from MMC1 :: 1 | ||
+ | Trying fit image at 0x4000 sector | ||
+ | ## Verified-boot: | ||
+ | ## 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) | ||
+ | ... | ||
+ | |||
+ | ``` | ||
+ | |||
+ | ===== UBOOT EFI disk partitions ===== | ||
+ | |||
+ | ```shell UBOOT EFI partitions dump | ||
+ | ~$ 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= | ||
+ | |||
+ | ``` | ||
+ | |||
+ | ===== UEFI image info ===== | ||
+ | |||
+ | ```shell UEFI-info example | ||
+ | |||
+ | ~$ ./ | ||
+ | |||
+ | /dts-v1/; | ||
+ | version = < | ||
+ | totalsize = < | ||
+ | timestamp = < | ||
+ | description = "FIT Image with ATF/ | ||
+ | # | ||
+ | |||
+ | SIZE: 0x5afc0b == 5962763 : 11646 == 5962774 | ||
+ | LAST: 7274496(14208 - 0x3780) < 7274496 < 0x6F0000 | ||
+ | |||
+ | # dd skip=2048 count=11646 of=edge2-uefi-bootloader.img if=RK3588_NOR_FLASH_REL.img conv=fsync, | ||
+ | |||
+ | / { | ||
+ | images { | ||
+ | uboot { | ||
+ | data-size = < | ||
+ | data-offset = < | ||
+ | atf-1 { | ||
+ | data-size = < | ||
+ | data-offset = < | ||
+ | atf-2 { | ||
+ | data-size = < | ||
+ | data-offset = < | ||
+ | atf-3 { | ||
+ | data-size = < | ||
+ | data-offset = < | ||
+ | optee { | ||
+ | data-size = < | ||
+ | data-offset = < | ||
+ | fdt { | ||
+ | data-size = < | ||
+ | data-offset = < | ||
+ | nvdata { | ||
+ | data-position = < | ||
+ | data-size = < | ||
+ | configurations { | ||
+ | loadables = " | ||
+ | |||
+ | 005afb70 | ||
+ | 005afb80 | ||
+ | 005afb90 | ||
+ | 005afba0 | ||
+ | 005afbb0 | ||
+ | 005afbc0 | ||
+ | 005afbd0 | ||
+ | 005afbe0 | ||
+ | 005afbf0 | ||
+ | 005afc00 | ||
+ | |||
+ | 1f206fece22135a50e929aff52105782 | ||
+ | |||
+ | edge2-uefi-bootloader.img: | ||
+ | |||
+ | |||
+ | |||
+ | ``` | ||
+ | |||
+ | ===== Downloads ===== | ||
+ | |||
+ | * [[dl>/ | ||
+ | * [[gh>/ | ||
+ | |||
===== Links ===== | ===== Links ===== | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ |