Hi,

for bigger exposure, let me cross-mail this issue / question of
mine:  I am trying to boot OBSD on an ARM board which doesn't have any
sd-card slot and at least currently can't use USB in U-Boot and
doesn't have ethernet port.

I have prepared the GPT partition scheme on the eMMC using
rkdeveloptool and created UBOOT, EFI, ROOTFS and USERDATA partitions
using the following parameters:  

CMDLINE:
mtdparts=:
0x00002000@0x00004000(uboot),
0x00040000@0x00028000(EFI),
0x00c00000@0x00078000(rootfs),
-@0x00cb8000(userdata:grow)

It seems rkdeveloptool assigns a randomly selected GUID for the
partitions [1]. This can be an issue later.

Then I have downloaded the miniroot74.img however writing it simply
to the eMMC as the guides shows would break my GPT partition scheme.
Therefore i have loop-mounted the miniroot image, and then dd-ed the
EFI and the data partition into standalone images so i can write 
them into the correct location.

Then i wrote the images using rkdeveloptool to the MMC and i was able
to start the OBSD EFI bootloader. (i have no idea how U-boot supposed
to boot OBSD in non-EFI way). 

It shows some detected drives:

---

disks: sd0* sd1 sd2 sd3 sd4
>> OpenBSD/arm64 BOOTAA64 1.18
boot>

---

Maybe dumping the raw content of a partition on a GPT partition is
not the most elegant way, but i haven't found any other way so far and
i have the feeling it should work, however in reality it doesnt.

U-Boot states the following about the partitions:

---

Partition Map for MMC device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00004000      0x00005fff      "uboot"
        attrs:  0x0000000000000000
        type:   8dcd1602-5214-43f9-ffef-c49a4ee450b7
        guid:   5a30833f-8c43-47b1-a41d-84d40883d0c6
  2     0x00028000      0x00067fff      "EFI"
        attrs:  0x0000000000000000
        type:   1124e418-9008-41f8-9e3d-8d872216c8a1
        guid:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
  3     0x00078000      0x00c77fff      "rootfs"
        attrs:  0x0000000000000000
        type:   fbd4486a-e42c-448d-d4e9-7f5c324a7843
        guid:   824cc7a0-36a8-11e3-890a-952519ad3f61
  4     0x00cb8000      0x00e8ffde      "userdata"
        attrs:  0x0000000000000000
        type:   bbaf4f47-230d-45b6-feae-e4b35f300b00
        guid:   824cc7a0-36a8-11e3-890a-952519ad3f62

---

So we have unique partition IDs and the partition types listed here.
As far as i know, OpenBSD's data partition should have
824CC7A0-36A8-11E3-890A-952519AD3F61 type, but as i have 
explained, the rkdeveloptool doesn't lets me assign a specific
type to the partitions.   

Do i think it correctly that the OBSD EFI loader checks and accepts
only partitions with the correct type to boot from? ( i tried to find
the answer using the sources, but the i am not that good with C). 

Thanks for all your hints.

In case you are interested, here you can find more info about my
experiences so far with this board, see [2].

[1] : 
https://github.com/rockchip-linux/rkdeveloptool/blob/46bb4c073624226c3f05b37b9ecc50bbcf543f5a/main.cpp#L695
[2] : https://extrowerk.com/2023-10-30/Geniatech-XPI-3566-ZERO-SBC.html

Best regards, 
--Z--

--Z--

Reply via email to