Bug 1958429 - saveenv corrupts u-boot image in SPI on Pinebook Pro
Summary: saveenv corrupts u-boot image in SPI on Pinebook Pro
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: uboot-tools
Version: rawhide
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-07 21:41 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2022-06-28 01:32 UTC (History)
7 users (show)

Fixed In Version: uboot-tools-2022.04-2.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-28 01:32:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2021-05-07 21:41:49 UTC
Description of problem:
I flashed the u-boot SPI image following the steps from https://nullr0ute.com/2021/05/fedora-on-the-pinebook-pro/ . Then, I enabled the built-in eMMC and booted the Fedora 34 Workstation raw image from an SD card by interrupting auto-boot and executing `run bootcmd_mmc1`. I installed updates, which included a new kernel and rebooted the machine. At this point it failed to boot. Disabling the eMMC doesn't help. It doesn't boot from SPI and it doesn't boot from an SD card.

Version-Release number of selected component (if applicable):
uboot-tools-2021.04-3.fc34.aarch64

How reproducible:
Unknown

Steps to Reproduce:
1. Flash u-boot to SPI by following https://nullr0ute.com/2021/05/fedora-on-the-pinebook-pro/
2. boot Fedora 34 Workstation raw image
3. install kernel update and reboot

Actual results:

U-Boot TPL 2021.04 (Apr 28 2021 - 00:00:00)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2021.04 (Apr 28 2021 - 00:00:00 +0000)
Trying to boot from MMC2
Card did not respond to voltage select! : -110
spl: mmc init failed with error: -95
Trying to boot from SPI
fdt_find_or_add_subnode: fit-images: FDT_ERR_BADSTRUCTURE
fdt_find_or_add_subnode: fit-images: FDT_ERR_BADSTRUCTURE
fdt_find_or_add_subnode: fit-images: FDT_ERR_BADSTRUCTURE
fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
spl_perform_fixups: could not find/create '/chosen'
fdt_find_or_add_subnode: memory: FDT_ERR_BADSTRUCTURE
SPL: arch_fixup_fdt err - -11

Expected results:
Successful boot.

Comment 1 Dominik 'Rathann' Mierzejewski 2021-05-08 21:04:24 UTC
Here's one critical piece of information. I ran "saveenv" at u-boot prompt after booting u-boot from SPI flash. That seems to corrupt the uboot image in SPI. I've just managed to reproduce the issue by doing just that.

Comment 2 Ben Cotton 2022-05-12 16:22:43 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Peter Robinson 2022-06-01 11:53:30 UTC
Not sure about this, still needs verification, although in most cases there shouldn't need to be env changes

Comment 4 Peter Robinson 2022-06-12 13:40:10 UTC
Finally got time to look at this and have a fix in process

Comment 5 Peter Robinson 2022-06-12 14:30:23 UTC
Fix posted upstream: https://lists.denx.de/pipermail/u-boot/2022-June/486254.html

Comment 6 Fedora Update System 2022-06-12 19:39:38 UTC
FEDORA-2022-61cf1c64f6 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-61cf1c64f6

Comment 7 Fedora Update System 2022-06-13 01:00:34 UTC
FEDORA-2022-61cf1c64f6 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-61cf1c64f6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-61cf1c64f6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-06-28 01:32:38 UTC
FEDORA-2022-61cf1c64f6 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.