Re: KHADAS EDGE V booting hangs if I install UEFI instead of u-boot
Mario Marietto <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <CA+1FSiiHiCWAb3xXyBeCmn_+45MbMy3+aLBiXP-UU6X49U6j6A@mail.gmail.com> |
First of all,I want to install UEFI on RK3399 and the KHADAS board has that chip. Then,I got the necessary files here : https://personalbsd.org/download/UEFI-RK3399/ Then,using gparted on Linux I have partitioned the sd card using this data : 1 64 8000 2 8064 128 3 8192 8192 4 16384 8192 5 24576 8192 6 32768 229376 And I've got this partition scheme (all the slots are empty) : 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 Then I reduced partition sdi6 from 112M to 50M and I did : 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 sdk1 is the EFI partition installed on another sd card where I have installed FreeBSD for the RockPro64...(realized now : where there is installed u-boot !!!) . Disk /dev/sdk: 183.35 GiB, 196865949696 bytes, 384503808 sectors Disk model: MassStorageClass 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: 224BEEEC-6B6B-11EF-83C6-002590EC5BF2 Dispositivo Start Fine Settori Size Tipo /dev/sdk1 32768 135167 102400 50M EFI System /dev/sdk2 135168 368345087 368209920 175.6G FreeBSD UFS /dev/sdk3 368345088 384499711 16154624 7.7G FreeBSD swap Ok,now I have understood the error. But i still does not understand how to "build" sdi6,because the tutorial on the github : https://github.com/andreiw/rk3399-edk2 does not talk about how to fill this partition at all. On Wed, Aug 6, 2025 at 6:06 AM Mario Marietto <[email protected]> wrote: > You can read about the procedure that I have followed from this first post > on the FreeBSD forum : > > > https://forums.freebsd.org/threads/how-to-boot-freebsd-installed-on-the-sd-card-on-the-khadas-edge-v-instead-of-android.98463/post-710783 > > (don't worry,that's not a long thread). > > > > On Wed, Aug 6, 2025 at 5:44 AM Mark Millard <[email protected]> wrote: > >> On Aug 5, 2025, at 20:04, Mario Marietto <[email protected]> wrote: >> >> > Hello. >> > Finally I’ve been able to setup a serial connection with the board with >> the goal to understand why the KHADAS EDGE V does not boot FreeBSD if I >> make the installation of UEFI instead of u-boot and I’ve gathered these log >> messages : >> >> I only have a basic type note here: >> >> What you show below references "uboot" as something >> being loaded. >> >> > Boot1: 2018-08-06, version: 1.15 >> > CPUId = 0x0 >> > ChipType = 0x10, 218 >> > 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 = 89823 >> > 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 >> > LoadTrust Addr:0x4000 >> > No find bl30.bin >> > No find bl32.bin >> > Load uboot, ReadLba = 2000 >> >> Note the "uboot" above. Seems to be loading a U-Boot. >> >> > Load OK, addr=0x200000, size=0xf0000 >> >> Note that the "uboot" loaded OK. >> >> > >> > 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 >> > �������� : FROZEN : No more messages. >> > >> > >> > it’s not clear why it hangs. Do you have a vague idea why it hangs >> there ? >> > And more important,do you know where / to whom I can ask ? >> > Don't suggest to me the KHADAS forum. I detected a low quality of help >> for the newbies if they have complicated problems to solve. >> > Their help is good only for the business users. I'm not. >> > Thanks. >> >> I do not see any evidence above that UEFI was involved. >> (But I've never dealt with a KHADAS EDGE V.) >> >> Looks like an attempted "uboot" based boot to me. >> >> You may need to give a lot more detail about how you >> have things set up, possibly for both a working U-Boot >> (if you have such a context) and for what you did to >> configure for UEFI, providing for a compare/contrast >> inspection. >> >> I have no clue what you installed that was a UEFI >> or where/how it was installed or how the system was >> told to try to put it to use. >> >> But, again, I've no knowledge of the specific type >> of context that you have so my notes are very limited. >> >> === >> Mark Millard >> marklmi at yahoo.com >> >> > > -- > Mario. > -- Mario.