Skip to content

beaglev-ahead update - #685

Merged
Khem Raj (kraj) merged 7 commits into
riscv:masterfrom
michaelopdenacker:beaglev-ahead-update
Sep 25, 2026
Merged

Khem Raj (kraj) merged 7 commits into
riscv:masterfrom
michaelopdenacker:beaglev-ahead-update

Conversation

@michaelopdenacker

@michaelopdenacker Michael Opdenacker (michaelopdenacker) commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Updating support for the beaglev-ahead machine:

  • Switch to the mainline linux kernel, drop the linux-beaglev-dev recipe
  • Switch to mainline opensbi, drop the opensbi-revyos recipe which was currently broken anyway
  • Document limitations

Checklist

  • [x ] I have read and understood the Contributing Changes to a Component and Recipe Style Guide sections in the Yocto Project documentation
  • [x ] I have tested this change (provide brief details below)
  • [x ] Documentation has been added/updated where necessary in the README and docs/
  • If the change is to a BSP in
    DEPRECATED.md,
    then it is maintenance-only, i.e. it does not add support for a
    previously-removed BSP (or significant features to one slated for removal)
  • (For new/modified BSPs) I have added relevant information in the README table
  • (For new/modified BSPs) The bitbake-setup templates in bitbake-registry/
    have been updated, if necessary
  • (For new/modified BSPs) A kas file has been provided in kas/
  • [x ] I have added my Signed-off-by and any other tags to each commit

How has this been tested?

Tested on a newly built image.
The image is first booted for SD, and the SD image is used to flash eMMC with the same wic image.
Then checked that the board can boot without the SD card.

All CPU cores are detected now, and we have open-source DDR training.

Comment thread conf/machine/beaglev-ahead.conf Outdated
Comment thread conf/machine/beaglev-ahead.conf Outdated
@michaelopdenacker

Copy link
Copy Markdown
Contributor Author

I updated my branch with full mainline support (though it's not finalized).
One problem is that the newly merged SD support for BeagleV is incompatible with mainline U-Boot, which is bigger than 1MB:

| wic.WicError: BeagleV boot plugin: U-Boot image exceeds the 1 MiB boot area

Adn Ehab Elkawass (@adn-dodo): could you propose a change to your WIC plugin so that we can make the U-Boot area 4 MiB big?

@adn-dodo

Copy link
Copy Markdown
Contributor

Hi Michael Opdenacker (@michaelopdenacker),
I made the change you asked for to increase the U-Boot area to 4 MiB.
I also moved the GPT entry array to sector 8192 and the first partition to an 8 MiB boundary to avoid any overlap.
beaglev-ahead-4m-uboot.patch

I attached the patch here. Let me know if you want me to change anything.

Comment thread recipes-kernel/linux/linux-mainline.bb
@michaelopdenacker

Copy link
Copy Markdown
Contributor Author

Pushed a new update.
All the known issues are fixed (in particular the number of CPUs)
Ready for review!

@michaelopdenacker

Copy link
Copy Markdown
Contributor Author

Khem Raj (@kraj) The checks are failing because of the need to add "blacksail" to LAYERSERIES_COMPAT
This can be fixed by merging #693 (for example).

Happy to rebase my branch when this is done.

@michaelopdenacker

Copy link
Copy Markdown
Contributor Author

Hi Michael Opdenacker (Michael Opdenacker (@michaelopdenacker)), I made the change you asked for to increase the U-Boot area to 4 MiB. I also moved the GPT entry array to sector 8192 and the first partition to an 8 MiB boundary to avoid any overlap. beaglev-ahead-4m-uboot.patch

I attached the patch here. Let me know if you want me to change anything.

Hi Adn Ehab Elkawass (@adn-dodo)
Thanks a lot!
Your change is in my updated branch.
Please test if you can.

@kraj Khem Raj (kraj) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@michaelopdenacker

Copy link
Copy Markdown
Contributor Author

Rebased the branch against the latest master.

@michaelopdenacker

Copy link
Copy Markdown
Contributor Author

Once these are merged, I'll use them to add support for LicheePi 4a (same SoC, fully upstream too).

Comment thread recipes-kernel/linux/linux-mainline.bb
Comment thread conf/machine/beaglev-ahead.conf Outdated
This allows to remove the "opensbi-revyos" recipe,
which has no more users in this layer.

Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Keeping the same kernel patches that all apply and
look still relevant.

This allows to remove the "linux-beaglev-dev" recipe.

Add configuration fragment to support USB.

Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
For DDR training on TH1520
Make the "beaglev-ahead" machine use it.

Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Mainline U-Boot no longer fits in the existing 1 MiB boot area.

Increase the available U-Boot area to 4 MiB and relocate the GPT
entry array accordingly. Move the first WIC partition to an 8 MiB
boundary so it does not overlap the relocated GPT metadata.

Signed-off-by: Adn Elkawass <elkawasadn@gmail.com>
Using 2 patches from https://github.com/knaerzche/u-boot/tree/th1520-beaglev-ahead
These patches are necessary to use training on single-rank DDR
memory on TH1520.

Enable support for U-Boot "bootflow" commands
https://docs.u-boot-project.org/en/latest/develop/bootstd/overview.html#bootflow

Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
The bootcmd scanned all bootdevs in order, so a board that has an image on
eMMC did not boot from an SD card that is inserted, and a board with no
bootable medium waited for the ethernet bootdev.

Scan the SD card bootdev first and the eMMC bootdev after it. The bootcmd sets
rootdev before each scan and extlinux uses it in the root argument, so one
extlinux.conf works on both media and the deploy step no longer rewrites a
copy of it with sed.

Using U-Boot's "bootflow" command requires to declare the boot partition
as "bootable" ("--active" in the .wks file).

Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Flashing with fastboot is more complicated and flashes partition
by partition only.

When U-Boot supports USB storage, we will be able to reflash
an existing image with the "ums" command.

Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
@michaelopdenacker

Copy link
Copy Markdown
Contributor Author

Removed a few obsolete comments

@kraj Khem Raj (kraj) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with the state of this patchset to merge. Lets address any other improvements via separate PRs

@kraj
Khem Raj (kraj) merged commit 40ad493 into riscv:master Sep 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants