Need help in understanding Yocto and U-boot build process for Star64
#1
Like many of you, I came across the work that @Fishwaldo did to get Linux working on the Star64.

I'm new to Yocto and the lower level of building Linux for embedded systems. I would love it if someone/Fishwaldo could do an ELI5 on what he did for the `meta-pine64` layer (btw, there seems to be a different `meta-pine64` layer mentioned on the openembedded page but that's specifically for ARM chips).

From what I understand:

1. He forked/branched off the Linux kernel.
2. Applied OEM drivers as patches from StarFive.
3. Used that in the new Yocto layer he built.

My questions (for now) are:

1. How did he/you guys find the U-boot partition map? I have seen the JH7110 Boot User Guide, but I haven't been able to figure out how U-boot mentions the partition sizes in their documentation.
2. I couldn't quite find where StarFive mentions that their drivers are not compatible with the newer 6.1xx Linux kernel, forcing @Fishwaldo to use the 5.1xx kernel. Ideally, one would be able to download the source tree and place the patches in the tree to compile it with bitbake in Yocto, yes?

Would greatly appreciate any replies to this thread! I'm very new to this, and I would like to be a part of the effort to take RISC-V forward, even if I'm only doing it for myself. I'm looking at the Star64 alongside the OSEdge as an alternative to Coral.ai's TPUs and would like to learn to build my images for both of them.

Thanks!
  Reply
#2
(04-23-2024, 10:37 AM)InterestedinFOSS Wrote: Like many of you, I came across the work that @Fishwaldo did to get Linux working on the Star64.

I'm new to Yocto and the lower level of building Linux for embedded systems. I would love it if someone/Fishwaldo could do an ELI5 on what he did for the `meta-pine64` layer (btw, there seems to be a different `meta-pine64` layer mentioned on the openembedded page but that's specifically for ARM chips).

From what I understand:

1. He forked/branched off the Linux kernel.
2. Applied OEM drivers as patches from StarFive.
3. Used that in the new Yocto layer he built.

My questions (for now) are:

1. How did he/you guys find the U-boot partition map? I have seen the JH7110 Boot User Guide, but I haven't been able to figure out how U-boot mentions the partition sizes in their documentation.
2. I couldn't quite find where StarFive mentions that their drivers are not compatible with the newer 6.1xx Linux kernel, forcing @Fishwaldo to use the 5.1xx kernel. Ideally, one would be able to download the source tree and place the patches in the tree to compile it with bitbake in Yocto, yes?

Would greatly appreciate any replies to this thread! I'm very new to this, and I would like to be a part of the effort to take RISC-V forward, even if I'm only doing it for myself. I'm looking at the Star64 alongside the OSEdge as an alternative to Coral.ai's TPUs and would like to learn to build my images for both of them.

Thanks!

Fishweldo often appear at Star64 and Nutcracker chatroom, you may able to seek advise with him on these two chatroom.
  Reply
#3
[quote pid="122119" dateline="1713890250"]
1. How did he/you guys find the U-boot partition map? I have seen the JH7110 Boot User Guide, but I haven't been able to figure out how U-boot mentions the partition sizes in their documentation.
2. I couldn't quite find where StarFive mentions that their drivers are not compatible with the newer 6.1xx Linux kernel, forcing @Fishwaldo to use the 5.1xx kernel. Ideally, one would be able to download the source tree and place the patches in the tree to compile it with bitbake in Yocto, yes?
[/quote]

You found the right doc but not everything is documented.

Regarding emmc/sd card:
BootROM loads from the GPT partition with type ID 2E54B353-1271-4842-806F-E436D6AF6985.
Upstream OpenSBI loads the second partition but you can do anything you want if you compile your own.
Upstream U-Boot is still looking for the right way to do a standardized boot - again, it's up to you.
Search for extlinux.conf in the U-Boot docs if your interested.

I've collected some information in this script:
https://github.com/yogo1212/arch-linux-s..._image#L52

You should be able to create an image using your own OpenSBI and U-Boot:

Code:
ROOTFS_IMG=.. UBOOT_ITB=.. UBOOT_SPL=.. ./compile_image /dev/mmcblk0

Just remember to give U-Boot something to work with (e.g. /boot/extlinux/extlinux.conf)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  star64 bootable images, u-boot, sbi, forum? hexdump 4 2,215 11-12-2024, 05:02 AM
Last Post: Paul Avery
  Star64/Starpro64 kernel building global 0 237 10-04-2024, 08:36 PM
Last Post: global
  Star64 distro overview October 2023 tantamount 6 2,942 10-04-2024, 08:32 PM
Last Post: global
  [Star64] UART activity stopped yogo1212 0 805 02-11-2024, 04:34 PM
Last Post: yogo1212
  Star64 Mechanicals nbxmike 4 3,019 01-16-2024, 04:35 AM
Last Post: oilumiun12
  Armbian and AltLinux for Star64 (RISC-V) balbes150 28 11,030 11-24-2023, 06:26 AM
Last Post: balbes150
  [Article] Star64 JH7110: Experiments with OpenSBI (Supervisor Binary Interface) lupyuen 0 847 10-28-2023, 06:55 PM
Last Post: lupyuen
  [Article] Star64: Strange Workaround for TFTP Timeout in U-Boot Bootloader lupyuen 0 934 10-05-2023, 07:22 PM
Last Post: lupyuen
  star64-image-minimal-star64-2.1 & X fonts tantamount 0 770 10-02-2023, 07:02 PM
Last Post: tantamount
  [Article] Star64 JH7110: Power Up the Display Controller with U-Boot Bootloader lupyuen 0 1,020 09-02-2023, 10:13 AM
Last Post: lupyuen

Forum Jump:


Users browsing this thread: 1 Guest(s)