Re: KHADAS EDGE V booting hangs if I install UEFI instead of u-boot
- In reply to: Mario Marietto : "Re: KHADAS EDGE V booting hangs if I install UEFI instead of u-boot"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Aug 2025 14:12:17 UTC
On Aug 7, 2025, at 03:44, Mario Marietto <marietto2008@gmail.com> wrote: This prior one also has the GPT messed up and a U-Boot that is found, loaded, and used. > Remembering that this is the disk structure that I've got after having installed UEFI on the KHADAS Edge-V (that has a RockChip RK3399) : > > Disk /dev/sdi: 119.08 GiB, 127865454592 bytes, 249737216 sectors > Disk model: STORAGE DEVICE > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disklabel type: gpt > Disk identifier: 6265BE94-368D-4AF4-B4B7-A866CF8B2CD9 > > Dispositivo Start Fine Settori Size Tipo > /dev/sdi1 64 8063 8000 3.9M Linux filesystem > /dev/sdi2 8064 8191 128 64K Linux filesystem > /dev/sdi3 8192 16383 8192 4M Linux filesystem > /dev/sdi4 16384 24575 8192 4M Linux filesystem > /dev/sdi5 24576 32767 8192 4M Linux filesystem > /dev/sdi6 32768 262143 229376 112M EFI System > > I want also remember how I have obtained the partitions from sdi1 to sdi6 : > > dd if=idbloader.img of=/dev/sdi1 > dd if=RK3399_SDK_UEFI.img of=/dev/sdi4 > dd if=trust.img of=/dev/sdi5 > dd if=/dev/sdk1 of=/dev/sdi6 > > > Regarding "sdi6",presuming that I shouldn't do : dd if=/dev/sdk1 of=/dev/sdi6 > > because it contained the u-boot that was installed on sdk1,I have removed it and I've created a new partition,of the same size and type and label (efi esp / fat16) copying the files that are stored on the same kind of partition but on the sd card where I have installed FreeBSD for the RockPro64. > I repeat,without using dd,but only cp -r *. > > I have started the serial connection and these are the log messages that I've got : > > Welcome to minicom 2.9 > > OPTIONS: I18n > Port /dev/ttyUSB0, 11:28:12 > > Press CTRL-A Z for help on special keys > > Boot1: 2018-08-06, version: 1.15 > CPUId = 0x0 > ChipType = 0x10, 219 > SdmmcInit=2 0 > BootCapSize=100000 > UserCapSize=29820MB > FwPartOffset=2000 , 100000 > mmc0:cmd5,20 > SdmmcInit=0 0 > BootCapSize=0 > UserCapSize=121942MB > FwPartOffset=2000 , 0 > run on sd0 > StorageInit ok = 96638 > SecureMode = 0 > SecureInit read PBA: 0x4 > SecureInit read PBA: 0x404 > SecureInit read PBA: 0x804 > SecureInit read PBA: 0xc04 > SecureInit read PBA: 0x1004 > SecureInit read PBA: 0x1404 > SecureInit read PBA: 0x1804 > SecureInit read PBA: 0x1c04 > SecureInit ret = 0, SecureMode = 0 > GPT 0x3190d20 signature is wrong Per the above, your GPT is still messed up. > > LoadTrust Addr:0x4000 > No find bl30.bin > No find bl32.bin > Load uboot, ReadLba = 2000 > Load OK, addr=0x200000, size=0xf0000 Per the above 2 lines, you still have a U-Boot in place and it is found, loaded, and used. > > RunBL31 0x10000 > NOTICE: BL31: v1.3(debug):51f2096 > NOTICE: BL31: Built : 16:24:31, May 6 2019 > NOTICE: BL31: Rockchip release version: v1.1 > INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3 > INFO: Using opteed sec cpu_context! > INFO: boot cpu mask: 0 > INFO: plat_rockchip_pmu_init(1181): pd status 3e > INFO: BL31: Initializing runtime services > WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s dK > ERROR: Error initializing runtime service opteed_fast > INFO: BL31: Preparing for EL3 exit to normal world > INFO: Entry point address = 0x200000 > INFO: SPSR = 0x3c9 > PLL at FF750000: fbdiv=112, refdiv=2, postdiv1=2, postdiv2=1, vco=1344000 khz, output=672000 khz > Boot PLLs: > APLLL = 400000000 > APLLB = 24000000 > CPLL = 24000000 > DPLL = 800000000 > GPLL = 400000000 > NPLL = 24000000 > VPLL = 24000000 > PLL at FF760000: fbdiv=68, refdiv=1, postdiv1=2, postdiv2=1, vco=1632000 khz, output=816000 khz > PLL at FF760020: fbdiv=68, refdiv=1, postdiv1=2, postdiv2=1, vco=1632000 khz, output=816000 khz > PLL at FF760080: fbdiv=100, refdiv=1, postdiv1=3, postdiv2=1, vco=2400000 khz, output=800000 khz > PLL at FF7600A0: fbdiv=125, refdiv=1, postdiv1=3, postdiv2=1, vco=3000000 khz, output=1000000 khz > PLL at FF760060: fbdiv=100, refdiv=1, postdiv1=3, postdiv2=1, vco=2400000 khz, output=800000 khz > After clock init: > APLLL = 816000000 > APLLB = 816000000 > CPLL = 800000000 > DPLL = 800000000 > GPLL = 800000000 > NPLL = 1000000000 > VPLL = 24000000 > PLL at FF760000: fbdiv=54, refdiv=1, postdiv1=1, postdiv2=1, vco=1296000 khz, output=1296000 khz > PLL at FF760020: fbdiv=70, refdiv=1, postdiv1=1, postdiv2=1, vco=1680000 khz, output=1680000 khz > �������� : HANG HERE FOREVER. > > What do you suggest I do ? > > On Wed, Aug 6, 2025 at 8:05 AM Mark Millard <marklmi@yahoo.com> wrote: > On Aug 5, 2025, at 22:54, Mark Millard <marklmi@yahoo.com> wrote: > > > > On Aug 5, 2025, at 21:46, Mario Marietto <marietto2008@gmail.com> wrote: > > > >> . . . > >> > >> https://github.com/andreiw/rk3399-edk2 > >> > >> does not talk about how to fill this partition at all. > >> > >> . . . > > > > Nor should the material about building RK3399_SDK_UEFI.img > > also talk about the "efi esp" content, which is a separate > > thing. > > > > In: > > > > Number Start (sector) End (sector) Size Code Name > > 1 64 8063 3.9 MiB FFFF loader1 <-- Rk3399Pkg/Tools/Bin/idbloader.bin > > 2 8064 8191 64.0 KiB FFFF reserved1 > > 3 8192 16383 4.0 MiB FFFF reserved2 > > 4 16384 24575 4.0 MiB FFFF loader2 <-- RK3399_SDK_UEFI.img > > 5 24576 32767 4.0 MiB FFFF atf <-- Rk3399Pkg/Tools/Bin/trust.img > > 6 32768 262143 112.0 MiB EF00 efi esp > > > > "efi esp" is a particular type of msdosfs file system > > that is to contain FreeBSD's EFI Boot Loader (FreeBSD > > aarch64 context used below, not what you were using): > > > > EFI/BOOT/bootaa64.efi > > > > That file is a copy of FreeBSD's aarch64 /boot/loader.efi : > > > > # diff /boot/loader.efi /boot/efi/EFI/BOOT/bootaa64.efi > > # > > > > So: no differences. In the context for the above, > > /boot/efi is the mount point where the file system in > > the "efi esp" was mounted to be visible in the FreeBSD > > file system. > > > > Note: the EFI/BOOT/ capitalization convention is my > > personal one, not necessarily what FreeBSD normally > > uses. > > > > RK3399_SDK_UEFI looks for any finds that > > Should be "and", not "any", above. Sorry. > > > EFI/BOOT/bootaa64.efi and then loads and > > EFI/BOOT/bootaa64.efi and then loads and > > uses it. > === Mark Millard marklmi at yahoo.com