[Bug 1936370] Re: u-boot-sifive does not upgrade u-boot on disk
William Wilson
1936370 at bugs.launchpad.net
Tue Aug 17 03:56:38 UTC 2021
The verification passed for focal.
ubuntu at ubuntu:~$ apt-cache policy u-boot-sifive
u-boot-sifive:
Installed: 2021.01+dfsg-3ubuntu0~20.04.1
Candidate: 2021.01+dfsg-3ubuntu0~20.04.3
Version table:
2021.01+dfsg-3ubuntu0~20.04.3 500
500 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main riscv64 Packages
*** 2021.01+dfsg-3ubuntu0~20.04.1 500
500 http://ports.ubuntu.com/ubuntu-ports focal-updates/main riscv64 Packages
100 /var/lib/dpkg/status
ubuntu at ubuntu:~$ sudo strings /dev/disk/by-partlabel/loader* | grep 202 | grep U-Boot
U-Boot SPL 2021.07+dfsg-0ubuntu4 (Jun 25 2021 - 18:21:47 +0000)
U-Boot 2021.07+dfsg-0ubuntu4 (Jun 25 2021 - 18:21:47 +0000)
ubuntu at ubuntu:~$ sudo apt install u-boot-sifive
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
u-boot-sifive
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 442 kB of archives.
After this operation, 10.2 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main riscv64 u-boot-sifive riscv64 2021.01+dfsg-3ubuntu0~20.04.3 [442 kB]
Fetched 442 kB in 0s (1010 kB/s)
(Reading database ... 69916 files and directories currently installed.)
Preparing to unpack .../u-boot-sifive_2021.01+dfsg-3ubuntu0~20.04.3_riscv64.deb ...
Unpacking u-boot-sifive:riscv64 (2021.01+dfsg-3ubuntu0~20.04.3) over (2021.01+dfsg-3ubuntu0~20.04.1) ...
Setting up u-boot-sifive:riscv64 (2021.01+dfsg-3ubuntu0~20.04.3) ...
148+1 records in
148+1 records out
76219 bytes (76 kB, 74 KiB) copied, 0.0370269 s, 2.1 MB/s
1378+1 records in
1378+1 records out
705608 bytes (706 kB, 689 KiB) copied, 1.02033 s, 692 kB/s
ubuntu at ubuntu:~$ sudo strings /dev/disk/by-partlabel/loader* | grep 202 | grep U-Boot
U-Boot SPL 2021.01+dfsg-3ubuntu0~20.04.3 (Jul 30 2021 - 14:38:17 +0000)
U-Boot 2021.01+dfsg-3ubuntu0~20.04.3 (Jul 30 2021 - 14:38:17 +0000)
The above test was performed on the Unmatched. I did the same test on
the Unleashed via testflinger, and observed the same results. I also
booted the images in qemu, and did an apt upgrade of u-boot-sifive,
during which I saw no issues.
** Tags removed: verification-needed verification-needed-focal
** Tags added: verification-done verification-done-focal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to u-boot in Ubuntu.
https://bugs.launchpad.net/bugs/1936370
Title:
u-boot-sifive does not upgrade u-boot on disk
Status in u-boot package in Ubuntu:
Fix Released
Status in u-boot source package in Focal:
Fix Committed
Status in u-boot source package in Hirsute:
New
Status in u-boot source package in Impish:
Fix Released
Bug description:
[Impact]
* u-boot-sifive package currently does not upgrade bootloader on
loader1/loader2 partitions.
* there have now been bugs identified, meaning that upgrading u-boot
is required to upgrade from v5.8 kernel to v5.11 (i.e. either in-
focal, or from focal to hirsute).
* Add maintainer script that identifies if the machine one is running
on is unleashed or unamtched, and appropriately upgrades the
bootloader on loader1/loader2 partitions.
[Test Plan]
* Boot older unleashed or unmatched image
* Check version strings of loader1/loader2 partitions
$ sudo strings /dev/disk/by-partlabel/loader* | grep 202 | grep U-Boot
* Upgrade u-boot-sifive to latest package
* Check version strings of loader1/loader2 partitions, they should
have changed
$ sudo strings /dev/disk/by-partlabel/loader* | grep 202 | grep U-Boot
* Reboot, and observe on the serial console that u-boot version
number is incremented to the latest one.
* Repeat the test twice, once with unleashed board, once with
unmatched board
* Upgrade the package under qemu VM and observe no side-effects / no
attempts to upgrade anything.
[Where problems could occur]
* It is not possible to atomically upgrade loader1 and loader2 simultaniously.
* A backup of loader1 and loader2 partitions is not stored anywhere.
* Thus in case of errors rollback of older u-boot is not performed.
* However if dd of one or the other partition fails, it is unlikely that one can restore the backup.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1936370/+subscriptions
More information about the foundations-bugs
mailing list