Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
products:sbc:edge2:troubleshooting:edge2-uboot-uefi [2023/07/18 00:31]
hyphop [UBOOT SPL EFI logs]
products:sbc:edge2:troubleshooting:edge2-uboot-uefi [2023/08/28 01:26]
hyphop [Downloads]
Line 1: Line 1:
-===== Edge2 Uboot EFI =====+~~tag> Edge2 Uboot UEFI boot~~ 
 +  
 +===== Edge2 Uboot UEFI ===== 
 + 
 +<WRAP important > 
 + 
 +We recommend start 1st partition from 32768 block 
 + 
 +``` 
 +sfdisk --dump /dev/mmcblk0 | grep -e first -e start= 
 +first-lba: 32768 
 +/dev/mmcblk0p1 : start      32768, 
 +``` 
 + 
 +</WRAP>
  
 <WRAP tip > <WRAP tip >
-Problems was solved [[#solution]], after we can start EFI loader and boot up next system+UEFI bootloader for [[:Edge2]] can be fixed/updated via [[:OOWOW]] online scripts
 </WRAP> </WRAP>
  
-```shell UBOOT EFI partitions dump +<WRAP tip > 
-master@universe:/tmp/uboot$ sfdisk --dump /dev/sda+UEFI bootloader for [[:Edge2]] can be installed via [[:OOWOW]] online images 
 +</WRAP>
  
-label: gpt +<WRAP tip > 
-label-id73987B6B-4974-4C94-A3E8-58AB2EB7A946 +Problems was solved[[#solution]], after we can start EFI loader and boot up next system 
-device: /dev/sda +</WRAP>
-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"+<WRAP alert > 
 +eMMC storage From **16384** to **32768** block must be reserved for boot-loader 
 +</WRAP>
  
-``` 
  
-```shell OOWOW SPL boot log+===== 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 44: Line 61:
 Write FIT image to eMMC or SD **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://github.com/edk2-porting/edk2-rk3588/releases/download/v0.7.1/$EFI
 +DISK=${DISK:-/dev/mmcblk0}
 +dd skip=2048 seek=$((0x4000)) count=$((0x4000)) of=$DISK if=$EFI conv=fsync,notrunc
 +```
  
 For example 1st write https://dl.khadas.com/.test/edge2_UEFI_Release_3676af4b.img  For example 1st write https://dl.khadas.com/.test/edge2_UEFI_Release_3676af4b.img 
Line 49: Line 72:
  
 ```sh copy FIT image to eMMC ```sh copy FIT image to eMMC
-dd if=/dev/sda skip=2048 count=3440 seek=$((0x4000)) of=/dev/mmcblk0+dd if=/dev/sda skip=2048 count=$((0x4000)) seek=$((0x4000)) of=/dev/mmcblk0
 ``` ```
  
 or just using oowow with Internet, start OOWOW going into shell...  or just using oowow with Internet, start OOWOW going into shell... 
  
-```sh oowow copy EFI loader to eMMC  +```shell oowow copy EFI loader to eMMC  
-curl -jKL https://dl.khadas.com/.test/edge2_UEFI_Release_3676af4b.img \+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) 
 +```
  
 +```shell check eMMC EFI Image header
 +root@edge2-00000:/# dd if=/dev/mmcblk0 skip=$((0x4000)) count=1 2>/dev/null \
 +| hexdump -C | grep "00000080  49 6d 61"
 ``` ```
  
Line 119: Line 148:
  
 ``` ```
 +
 +===== 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=        2048, size=       16384, type=F808D051-1602-4DCD-9452-F9637FEFC49A, uuid=B750E44E-833F-4A30-C38C-B117241D84D4, name="uboot"
 +
 +```
 +
 +===== UEFI image info =====
 +
 +```shell UEFI-info example
 +
 +~$ ./edge2-uefi-extract RK3588_NOR_FLASH_REL.img 
 +
 +/dts-v1/;
 + version = <0x00>;
 + totalsize = <0x5afc0b>;
 + timestamp = <0x64ebea49>;
 + description = "FIT Image with ATF/OP-TEE/UEFI";
 + #address-cells = <0x01>;
 +
 +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,notrunc
 +
 +/ {
 + images {
 + uboot {
 + data-size = <0x500000>;
 + data-offset = <0x00>;
 + atf-1 {
 + data-size = <0x3084c>;
 + data-offset = <0x500000>;
 + atf-2 {
 + data-size = <0x6000>;
 + data-offset = <0x530a00>;
 + atf-3 {
 + data-size = <0x6000>;
 + data-offset = <0x536a00>;
 + optee {
 + data-size = <0x70998>;
 + data-offset = <0x53ca00>;
 + fdt {
 + data-size = <0x1e95>;
 + data-offset = <0x5ad400>;
 + nvdata {
 + data-position = <0x6c0000>;
 + data-size = <0x30000>;
 + configurations {
 + loadables = "uboot\0atf-2\0atf-3\0optee\0nvdata";
 +
 +005afb70  67 2d 69 6f 2d 77 69 64  74 68 00 64 6d 61 73 00  |g-io-width.dmas.|
 +005afb80  23 69 6f 2d 63 68 61 6e  6e 65 6c 2d 63 65 6c 6c  |#io-channel-cell|
 +005afb90  73 00 67 70 69 6f 2d 63  6f 6e 74 72 6f 6c 6c 65  |s.gpio-controlle|
 +005afba0  72 00 23 67 70 69 6f 2d  63 65 6c 6c 73 00 67 70  |r.#gpio-cells.gp|
 +005afbb0  69 6f 2d 72 61 6e 67 65  73 00 69 6e 74 65 72 72  |io-ranges.interr|
 +005afbc0  75 70 74 2d 63 6f 6e 74  72 6f 6c 6c 65 72 00 23  |upt-controller.#|
 +005afbd0  69 6e 74 65 72 72 75 70  74 2d 63 65 6c 6c 73 00  |interrupt-cells.|
 +005afbe0  62 69 61 73 2d 70 75 6c  6c 2d 75 70 00 62 69 61  |bias-pull-up.bia|
 +005afbf0  73 2d 64 69 73 61 62 6c  65 00 64 72 69 76 65 2d  |s-disable.drive-|
 +005afc00
 +
 +1f206fece22135a50e929aff52105782  edge2-uefi-bootloader.img
 +
 +edge2-uefi-bootloader.img: Device Tree Blob version 17, size=2413, boot CPU=0, string block size=217, DT structure block size=2140
 +
 +
 +
 +```
 +
 +===== Downloads =====
 +
 +  * [[dl>/products/edge2/firmware/UEFI/]]
 +  * [[gh>/edk2-porting/edk2-rk3588/]]
  
 ===== Links ===== ===== Links =====
Line 124: Line 237:
   * https://opensource.rock-chips.com/wiki_Boot_option   * https://opensource.rock-chips.com/wiki_Boot_option
   * https://opensource.rock-chips.com/wiki_U-Boot   * https://opensource.rock-chips.com/wiki_U-Boot
 +  * https://github.com/edk2-porting/edk2-rk3588/
   * https://dl.khadas.com/.test/edge2_UEFI_Release_3676af4b.img    * https://dl.khadas.com/.test/edge2_UEFI_Release_3676af4b.img 
  
Last modified: 2023/08/28 02:14 by hyphop