Skip to content

U-Boot: 2021.10 → 2022.07#178

Merged
samueldr merged 42 commits intoTow-Boot:developmentfrom
samueldr:feature/u-boot-2022.07
Nov 3, 2022
Merged

U-Boot: 2021.10 → 2022.07#178
samueldr merged 42 commits intoTow-Boot:developmentfrom
samueldr:feature/u-boot-2022.07

Conversation

@samueldr
Copy link
Contributor

@samueldr samueldr commented Aug 21, 2022

Let's finish what I started a small while ago

TODO

  • Check XXX commits
  • Build all devices
  • Test enough representative devices
    • pine64-pinebookA64 (mmcboot installer from blank)
    • pine64-pinebookPro (SPI installer from blank)
    • pine64-rockpro64 [@psstoyanov / @PureTryOut]
    • pine64-pinephoneA64 [@psstoyanov / @PureTryOut]
    • pine64-pinephonePro [@PureTryOut]
    • odroid-C4 [@tpwrules]
    • odroid-N2 [@tpwrules]
    • orangePi-pc
    • pine64-pineA64LTS
    • radxa-zero2
    • libreComputer-rocRk3399PcMezzanine
    • libreComputer-amlS805xAc
    • raspberryPi-aarch64

 

  • Systems I can't test

    • radxa-RockPi4 (rk3399 was spicy this upgrade cycle, might require testing)
    • radxa-RockPi4C (same)
    • odroid-C2 (Likely fine)
    • pine64-pineA64 (Allwinner is generally boring, should be good)
    • olimex-teresI (Allwinner is generally boring, should be good)
    • orangePi-zeroPlus2H5 (Allwinner is generally boring, should be good)
  • Remove "markers" from commit history

NOTE: systems I can't test are generally covered enough by my representative set of devices. It probably won't be an issue not to test them.


Issues noticed

  • upstream regression with rk8xx
    • causing regression with USB support with at least the Pinebook Pro
  • OS Boot order might be broken again for some scenarios
    • Pinebook A64 wouldn't launch installer from installer media startup...
    • Pinebook Pro lists SD before eMMC in the boot menu...

Breaking changes

radxa-zero2

The mmc/sd device order was previously broken in the initial device enablement in 2021.10-005. This is a Tow-Boot issue, not an upstream issue, nor a vendor issue.

To upgrade Tow-Boot from 2021.10 to any further version, first use a 2021.10 mmcboot installer, then use the erase function. Once erased, boot the system from SD with the *-006 or following release of Tow-Boot and install.

Since the install base of the radxa-zero2 users using Tow-Boot is likely limited to a really limited number of units, this is a low priority breakage.

@samueldr samueldr added this to the 2022.07-006 milestone Aug 21, 2022
@samueldr samueldr changed the base branch from released to development August 21, 2022 01:43
@samueldr samueldr force-pushed the feature/u-boot-2022.07 branch 3 times, most recently from de2c87f to af5caf5 Compare August 21, 2022 02:04
@samueldr samueldr force-pushed the feature/u-boot-2022.07 branch from af5caf5 to 9e3c4f8 Compare August 22, 2022 01:28
@samueldr
Copy link
Contributor Author

samueldr commented Aug 22, 2022

Most recent push fixed build for the few leftover devices that didn't build.

Still untested on most devices. Will test later.

@tpwrules
Copy link
Contributor

Features tested and working on odroid-C4:

  • HDMI output
  • USB keyboard input
  • Serial (via official system console header) input and output
  • SD and eMMC install
  • SD and eMMC extlinux NixOS boot
  • DHCP IP acquisition

UEFI USB booting still does not work very well (SD/eMMC not detected). I wonder if I need to poke upstream about the device trees. I figured they would be synced by now but maybe there is a differing assumption somewhere.

@tpwrules
Copy link
Contributor

Features tested and working on odroid-N2 (plus):

  • HDMI output
  • USB keyboard input
  • Serial (via official system console header) input and output
  • Install to SPI from SD
  • SD and eMMC install and extlinux NixOS boot
  • SD and eMMC extlinux NixOS boot running on SPI
  • DHCP IP acquisition
  • UEFI USB NixOS ISO boot

@PureTryOut
Copy link

Tested on a RockPro64, PinePhone Pro and PinePhone, all installed to either SPI or eMMC boot partitions.. Installation works fine, booting works fine. On the RockPro64 it actually fixed #186 for me (that issue probably shouldn't have been closed till this PR has been merged) which is awesome.

Good to go on those devices!

@psstoyanov
Copy link
Contributor

Tested with RockPro64 with TowBoot installed on the SPI:
-> USB keyboard can be used to navigate TowBoot
Systems used to boot:
-> Manjaro ARM
-> RCade v 1.0.7: https://github.com/retro-center/rcade_releases/releases/tag/1.0.7

RCade is a bit unstable at the moment but I'm not sure if that is because of the interaction between RCade's BSP kernel or something else.
Will spend a bit more time with Manjaro tomorrow on this board.

Scheduled for the next couple of days:

  • Pinebook Pro
  • PinePhone (A64)

@samueldr
Copy link
Contributor Author

samueldr commented Sep 1, 2022

RCade is a bit unstable at the moment but I'm not sure if that is because of the interaction between RCade's BSP kernel or something else.

One thing to consider is building stock U-Boot at 2022.07 for the board and compare. If it is just as unstable (which I would kinda expect) it means it's not Tow-Boot specific

@psstoyanov
Copy link
Contributor

I would expect the same but that test would be for later. The instability is odd though - I get it consistently with a few movies in Kodi in RCade but not with others.

Anyway, PBP and PinePhone will be next.

@psstoyanov
Copy link
Contributor

psstoyanov commented Sep 2, 2022

I didn't have success with Pinebook Pro and 2022.07

After flashing to the SPI, I couldn't use the keyboard to navigate either TowBoot nor Fedora Workstation's Grub menu.
I can't observe the same behaviour with 2021.10

Tow-Boot 2022.07 sha256sum of the spi.installer.img that can't use the keyboard to navigate:
a318f0cc77c85700c495868419b7259ac44428a95cb1de8da35f3f509b6be971

This is in full contrast to what I experienced with RP64 where the USB keyboard works as intended.

If someone else can confirm the same behaviour on the PinebookPro, it will be great. I've retested a couple of times but a double-check would be better

Update:
Using the binaries generated with 2022.07 on the PBP instead of the image.
The disk image generation may not be byte-reproduceable at this point of time as @samueldr noted

Binaries with 2022.07 sha256sum
$ sha256sum *
8ea8d8905f8068be983ec41909b4e401ae529c3a8e34cb9ae2532615b8238194  Tow-Boot.noenv.bin
599a3bf7bc4b7a5e19af5da804e502528bead6ccce9181010dd4603a90c5a2f2  Tow-Boot.spi.bin

@shvetsnikita
Copy link
Contributor

odroid-N2
It works for me too. Fedora 37 and Debian 12 was tested and works.

odroid-c4
Fedora 37 boot fine (I didn't tested Debian 12) but only from USB drive. Neither eMMC nor microSD is detected (Tow-Boot is flashed to microSD) - I not sure if it's Linux 5.19 or Tow-Boot issue. On a side note, maximum resolution is 1920x1080 instead of native 2560x1600 (hardware support up to 4K),

roc-rk3399-pc
USB doesn't work at all now (there is no such issue with Tow-Boot 2021.10-005) and #183 is still reproducible.

@Strit
Copy link
Contributor

Strit commented Sep 8, 2022

Using the binaries generated with 2022.07 on the PBP instead of the image.

Did this work @psstoyanov or still no keyboard/USB?

@psstoyanov
Copy link
Contributor

Using the binaries generated with 2022.07 on the PBP instead of the image.

Did this work @psstoyanov or still no keyboard/USB?

I haven't checked for USB on the Pinebook Pro. After the integrated kb didn't work, I didn't proceed further with testing.

Uart definitely required before testing ⚠️

I can try it again just to check USB with it.

Strangely, no one else has reported any tests with Pinebook Pro and 2022-07 so far 😐

@Strit
Copy link
Contributor

Strit commented Sep 9, 2022

I haven't checked for USB on the Pinebook Pro. After the integrated kb didn't work, I didn't proceed further with testing.

As far as I know, the keyboard in the PBP is on the USB bus. So if the keyboard does not work at all, then USB likely does not work.

@ItsHarper

This comment was marked as resolved.

@CameronNemo
Copy link

FYI: https://lists.denx.de/pipermail/u-boot/2022-July/489246.html

Several people have run into this issue, including me, but others have not. May be wise to revert that commit or test the PBP further. Not sure why people would see the issue on vanilla U-Boot but not Tow-Boot.

@samueldr
Copy link
Contributor Author

samueldr commented Sep 18, 2022

Pinebook Pro, confirmed:

  • On-device keyboard not working
  • sysreset not working

These are likely to be platform specific issues (well, rk808 already tracked down), but I say so because the Pinebook (A64) doesn't have any problem with its USB keyboard.


Backported the rk8xx workaround

And it fixes both problems. It also totally makes sense that power management issues can cause USB stuff to fail in some ways.

Thank you @CameronNemo, tracking down that issue first here helped.

@samueldr samueldr force-pushed the feature/u-boot-2022.07 branch 3 times, most recently from 99cc41c to 96c19c7 Compare September 19, 2022 04:23
@samueldr
Copy link
Contributor Author

"Fixed" the boot order issues. A two-parter:

  • I had only implemented a change for allwinner, since changes upstream brought more trouble. I never actually applied the changes to the build.
  • I never ended-up forward porting the rockchip and amlogic boot order fixes.

This was easy.

This mainly serves to fix USB support.
The previous enablement also synced the device tree with Linux, which
brought in aliases.

Upstream U-Boot deletes these aliases in the U-Boot device tree.

These aliases change the ordering of the devices. So we were using the
wrong ordering, according to upstream.
Syncing back with the current one from Nixpkgs.
mkfs.vfat: Label can be no longer than 11 characters
@samueldr samueldr force-pushed the feature/u-boot-2022.07 branch from dbbbf5a to 01561f0 Compare November 3, 2022 02:26
@samueldr
Copy link
Contributor Author

samueldr commented Nov 3, 2022

Force-push details

  • Cleaned-up history
  • Fixed eMMC naming on amlogic
  • Fixed boot order on amlogic
  • Made erase scripts handle failure better
  • Fixed radxa-zero2 mmc boot index due to oversight in initial port (see main PR description)
  • Fixed libreComputer-rocRk3399Pc USB (and other related changes from upstream)
  • Fixed libreComputer-amlS805xAc eMMC naming now that amlogic naming is changed and fixed

@samueldr samueldr force-pushed the feature/u-boot-2022.07 branch from 01561f0 to b9b6642 Compare November 3, 2022 03:51
@samueldr samueldr marked this pull request as ready for review November 3, 2022 03:51
@samueldr
Copy link
Contributor Author

samueldr commented Nov 3, 2022

@shvetsnikita wrote:

roc-rk3399-pc USB doesn't work at all now (there is no such issue with Tow-Boot 2021.10-005) and #183 is still reproducible.

I don't know for #183, I'll have to look into it, but at the very least I have added fixes that should now fix USB with the 2022.07 upgrade.

@samueldr
Copy link
Contributor Author

samueldr commented Nov 3, 2022

I didn't think initially I would need to test all devices to merge, and almost merged earlier without deeper testing, but I'm glad I waited.

I ended-up finding issues that were hardware-specific. I would have had to deal with them anyway after the upgrade otherwise.

I am unable to test the Rock Pi 4 family of devices at the moment. I'll have to try and rope a tester in before cutting the actual release. There were changes affecting RK3399 systems and I haven't even looked at how likely or unlikely it is that they will have some breakage.

I'll merge within 24 hours.

@samueldr samueldr merged commit 1168fca into Tow-Boot:development Nov 3, 2022
@samueldr samueldr deleted the feature/u-boot-2022.07 branch November 3, 2022 22:00
@shvetsnikita
Copy link
Contributor

shvetsnikita commented Nov 5, 2022

I have added fixes that should now fix USB with the 2022.07 upgrade.

Just tested "feature/u-boot-2022.07" and "development" branches. On both branches USB Type-A ports works now (I didn't tested Type-C ports yet) although both throw USB-related errors in both cases, even if no USB devices is attached ("Failed to get clocks"). However, there is severe regression on development branch (I flashed it to SPI) - right after "Please press ... to enter the boot menu." Tow-Boot starting to scan mmc, print stack trace and then reboot. I can get into the menu if I press Esc soon enough, but even if I choice USB I still getting same outcome. Yet somehow spiinstaller works fine, I seeing issue only when I have Tow-Boot installed in SPI (shared image was not tested).

@samueldr
Copy link
Contributor Author

samueldr commented Nov 5, 2022

Moving to #209.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

9 participants