SRU: Detect RAM size automatically

Bug #1965260 reported by Heinrich Schuchardt
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nezha-boot0 (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

https://github.com/smaeul/sun20i_d1_spl/commits/d1-2022-01-22, commit 525883d3721f4c4d78b498e780b44e85d0676abf contains patches to detect the RAM size automatically.

[Impact]

If the memory is not discovered automatically, the Nezha can't boot without an additional memory node in the device tree: the issue is that the Nezha boards comes now with 2 different amounts of memory, 1GB or 2GB. So the additional device tree node can't cover both boards.

It is essential to backport this fix to Jammy as we intend to provide first support for the Nezha board in 22.04.1.

[Test Plan]

To test the fix is correct, one can simply use this nezha-boot0 and check that the next stage bootloader (u-boot-nezha) advertises the right amount of memory for the board, which is displayed at boot right after the banner:

U-Boot 2022.04 (Apr 21 2022 - 09:19:39 +0000)

DRAM: 1 GiB
sunxi_set_gate: (CLK#24) unhandled

Additionally to that, do general dogfooding to see if the new version still works as expected.

[Where problems could occur]

The update will not introduce regressions as this package is *not* used since we did not deliver images for the Nezha board yet, support for this board is an additional feature scheduled for 22.04.1.

[Other Info]

Note that this only fixes the memory detection from boot0 to u-boot, another similar patch is needed for u-boot-nezha to patch the kernel device tree.

Note #2: the SRU backports more than just the fix, see comment #10.

Changed in nezha-boot0 (Ubuntu):
assignee: nobody → Heinrich Schuchardt (xypron)
tags: added: fr-1944
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

nezha-boot0 - 20220228+g0ad88bf-0ubuntu1 is available in ppa:ubuntu-risc-v-team/develop for sponsoring. But a feature freeze exception for Jammy is needed.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
summary: - Detect RAM size automatically
+ FFE: Detect RAM size automatically
Changed in nezha-boot0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: FFE: Detect RAM size automatically

Usually packages in Ubuntu are modified from Debian, and thus gain ubuntuX suffix and require XSBC-Original-Maintainer header as to who maintains said package in Debian. As per historic agreements.

This package, despite 0ubuntuX version number, is not maintained in Debian and thus should not specify XSBC-Original-Maintainer header.

If lintian warning is annoying, one can specify it as lintain-override. See http://manpages.ubuntu.com/manpages/jammy/man1/dh_lintian.1.html

Revision history for this message
Brian Murray (brian-murray) wrote :

From a release team perspective I'm okay with this change happening past Feature Freeze.

Changed in nezha-boot0 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

It's not ideal that upstream doesn't really tag releases, so the version number is a bit non-standard. But I don't think the previous versioning was 'correct' from the upstream POV as well, so why not. Let me sponsor this as is.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nezha-boot0 - 20220228+g0ad88bf-0ubuntu1

---------------
nezha-boot0 (20220228+g0ad88bf-0ubuntu1) kinetic; urgency=medium

  * Update to current upstream, commmit 0ad88bfdb723
    - Provides automatic detection of RAM size (LP: #1965260)

 -- Heinrich Schuchardt <email address hidden> Thu, 17 Mar 2022 09:46:33 +0100

Changed in nezha-boot0 (Ubuntu):
status: Triaged → Fix Released
description: updated
Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

This still needs to be SRUed to Jammy.

Changed in nezha-boot0 (Ubuntu):
status: Fix Released → Confirmed
assignee: Heinrich Schuchardt (xypron) → nobody
summary: - FFE: Detect RAM size automatically
+ SRU: Detect RAM size automatically
Revision history for this message
Lukas Märdian (slyon) wrote :
Changed in nezha-boot0 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

After some discussion with the SRU team (@sil2100) we agreed that this should be an exception to the full-version-backport SRU policy, due to very low regression risk.

I've used the latest debdiff provided (containing "commmit" -> "commit" typo fix in d/changelog and correct "Maintainer:" headers in d/control). I've slightly adopted the version string: "20220228+g0ad88bf-0ubuntu1" -> "20220228+g0ad88bf-0ubuntu1~22.04.1" in order to provide a proper upgrade path from Jammy to Kinetic.

https://launchpad.net/ubuntu/jammy/+queue?queue_state=1&queue_text=nezha-boot0

Changed in nezha-boot0 (Ubuntu Jammy):
status: New → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Heinrich, or anyone else affected,

Accepted nezha-boot0 into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nezha-boot0/20220228+g0ad88bf-0ubuntu1~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

description: updated
Changed in nezha-boot0 (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Alexandre Ghiti (alexghiti) wrote (last edit ):

Unfortunately, the package contains an error that needs to be fixed, otherwise it does not write itself to the corresponding partition.

Please see https://bugs.launchpad.net/ubuntu/+source/nezha-boot0/+bug/1979315

tags: added: verification-failed verification-failed-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Lukas Märdian (slyon) wrote :

I've sponsored the fix for LP: #1979315 into Kinetic.

And re-uploaded the Jammy SRU as nezha-boot0_20220228+g0ad88bf-0ubuntu2~22.04.1, including the fix from LP: #1979315, dropping the previous version.

IMO we can recycle this bug report to do the SRU verification again, once re-accepted by the SRU team. No need to do two SRU verifications (on this bug and 1979315) just for a typo.

Changed in nezha-boot0 (Ubuntu Jammy):
status: Fix Committed → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Heinrich, or anyone else affected,

Accepted nezha-boot0 into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nezha-boot0/20220228+g0ad88bf-0ubuntu2~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nezha-boot0 (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
removed: verification-failed verification-failed-jammy
Revision history for this message
Alexandre Ghiti (alexghiti) wrote :

I tested both kinetic and jammy packages and it correctly writes itself in the right partition. It booted normally afterwards so the new packages are ok!

ubuntu@ubuntu:~$ sudo dpkg -i nezha-boot0_20220228+g0ad88bf-0ubuntu2~22.04.1_all.deb
(Reading database ... 56643 files and directories currently installed.)
Preparing to unpack nezha-boot0_20220228+g0ad88bf-0ubuntu2~22.04.1_all.deb ...
Unpacking nezha-boot0 (20220228+g0ad88bf-0ubuntu2~22.04.1) over (20220228+g0ad88bf-0ubuntu2~22.04.1) ...
Setting up nezha-boot0 (20220228+g0ad88bf-0ubuntu2~22.04.1) ...
96+0 records in
96+0 records out
49152 bytes (49 kB, 48 KiB) copied, 0.0268513 s, 1.8 MB/s

ubuntu@ubuntu:~$ sudo dpkg -i nezha-boot0_20220228+g0ad88bf-0ubuntu2_all.deb
(Reading database ... 56643 files and directories currently installed.)
Preparing to unpack nezha-boot0_20220228+g0ad88bf-0ubuntu2_all.deb.1 ...
Unpacking nezha-boot0 (20220228+g0ad88bf-0ubuntu2) over (20220228+g0ad88bf-0ubuntu2~22.04.1) ...
Setting up nezha-boot0 (20220228+g0ad88bf-0ubuntu2) ...
96+0 records in
96+0 records out
49152 bytes (49 kB, 48 KiB) copied, 0.0263927 s, 1.9 MB/s

tags: added: verification-done verification-done-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nezha-boot0 - 20220228+g0ad88bf-0ubuntu2~22.04.1

---------------
nezha-boot0 (20220228+g0ad88bf-0ubuntu2~22.04.1) jammy; urgency=medium

  * Update to current upstream, commit 0ad88bfdb723
    - Provides automatic detection of RAM size (LP: #1965260)
    - d/postinst: Fix model string 'NeZha' -> 'Nezha'

 -- Alexandre Ghiti <email address hidden> Mon, 20 Jun 2022 14:28:46 +0200

Changed in nezha-boot0 (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers