Compiling from master doesn't generate bootable Orange Pi PC images any more

  • I thought some stupidity on my side for a while: At some point the PROJECT=Allwinner ARCH=arm DEVICE=H3 UBOOT_SYSTEM="orangepi-pc" make image doesn't generate bootable sd card images any more. I was just using some previously written card with an older image and just exchanged the KERNEL and SYSTEM with the newly compiled one (on the first partition). Which works without any problems. Only problem: It is quite tedious (slow) to clone a card to get a fresh booting version that way. Diffing the scripts/(mk)image files there are some changes ... but they do not look very dramatic to me. Any ideas? Thank you!

  • If swapping newer KERNEL/SYSTEM to older SD card works the issue is related to u-boot which is installed to the SD card, and the card has an old version; a newly created card has a newer (non-working) version.

    jernej ?

  • I unfortunately don't have OrangePi PC to test this. I checked OrangePi Plus2E, but everything works fine. Can you connect serial console and see what, if anything, is outputed during boot with non-working U-Boot?

  • I confirm that with any of the following images, the Orange Pi PC does NOT boot:

    1. current stable image LibreELEC-H3.arm-12.0.0-orangepi-pc.img.gz
    2. current nightly for 12.0 LibreELEC-H3.arm-12.0-nightly-20240605-61123a8-orangepi-pc.img.gz
    3. current nightly for 13.0 LibreELEC-H3.arm-13.0-nightly-20240606-58f0779-orangepi-pc.img.gz

    Here is the serial console output for 2:

    Display Spoiler

    And for 3:

    Display Spoiler
  • Tried to find when it was broken. u-boot 2023.10 works OK. Starting from 2024.01 my Orange Pi PC doesn't boot.

    When I delete these patches from projects/Allwinner/devices/H3/patches/u-boot/:

    0012-DO-NOT-MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch
    0013-DO-NOT-MERGE-sunxi-Enable-SCP-SCPI-on-A33-as-well.patch

    system boots normally but can not be woken up from suspend via on-board button.

  • I checked OrangePi Plus2E, but everything works fine.

    Tried plus2e image on my Orange Pi PC and it worked.

    After some research it turned out that CONFIG_REMOTEPROC_SUN6I_AR100 in u-boot is enabled for orangepi_plus2e but not for orangepi_pc.

    The reason is that in this commit: https://github.com/LibreELEC/Libr…0b9c2db50a03683

    projects/Allwinner/patches/u-boot/0012-DO-NOT-MERGE-sunxi-Enable-remoteproc-on-H3.patch

    is replaced by

    projects/Allwinner/patches/u-boot/0011-DO-NOT-MERGE-sunxi-Enable-remoteproc-on-some-H3-boar.patch

    which enables AR100 only for Orange Pi One and Orange Pi Plus2E.

    After enabling AR100 for Orange Pi PC, it works fine too.

  • myokaski, thank you for sharing your experience, and sorry for the late response!

    First, the issue is still there for the Orange Pi PC with the latest stable image (LibreELEC-H3.arm-12.0.1-orangepi-pc.img.gz).

    I managed to flash the image for plus2e (LibreELEC-H3.arm-12.0.1-orangepi-plus2e.img.gz) and now the Orange Pi PC does boot successfully.

    Nevertheless, Ethernet is not working, but I suppose this is to be expected due to the different SBC model. This is the relevant log entry:

    [    1.567211] dwmac-sun8i 1c30000.ethernet: Error: Failed to register MDIO bus for child /soc/ethernet@1c30000/mdio-mux/mdio@2

    myokaski, would you please kindly share the steps you took for building a new working image for the Orange Pi PC?

    jernej, how can the fix mentioned here be applied to the builds regarding Orange Pi PC?

    Thanks! :)