flash-kernel is not triggered on RISC-V

Bug #1992990 reported by Alexandre Ghiti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin (Ubuntu)
Fix Released
High
Dan Bungert

Bug Description

The live installer image fails to install a bootable system on the SiFive Unmatched board because the device tree that the kernel is using is the u-boot one, not the one in the kernel. This is because flash-kernel is not triggered during the installation process since a recent patch prevented it to run in a chroot.

But this patch also introduced a new environment variable to circumvent this: curtin should use this variable when installing the kernel so that flash-kernel is correctly triggered and installs the dtbs at the right place for GRUB.

I tested the following patch locally and it works fine:

diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
index 40011660..efb72ce4 100644
--- a/curtin/commands/curthooks.py
+++ b/curtin/commands/curthooks.py
@@ -373,7 +373,10 @@ def install_kernel(cfg, target):
         distro.install_packages(fk_packages.split(), target=target)

     if kernel_package:
- distro.install_packages([kernel_package], target=target)
+ env = os.environ.copy()
+ env["FK_FORCE"] = "yes"
+ env["FK_FORCE_CONTAINER"] = "yes"
+ distro.install_packages([kernel_package], target=target, env=env)
         return

     # uname[2] is kernel name (ie: 3.16.0-7-generic)
--
2.34.1

Related branches

Changed in curtin (Ubuntu):
milestone: none → ubuntu-22.10
Dan Bungert (dbungert)
Changed in curtin (Ubuntu):
assignee: nobody → Dan Bungert (dbungert)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Dan Bungert (dbungert) wrote :

This has been merged to the Curtin and Subiquity main branches. When you get a chance @Alexandre, please retest by using the edge snap. This can be done with the command 'sudo snap refresh --edge subiquity' or by adding subiquity-channel=edge to the kernel command line.

Dan Bungert (dbungert)
Changed in curtin (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Dan Bungert (dbungert) wrote :

We believe a fix for this can be found in Subiquity 22.10.1. On
install you will be offered to update to the new version of the
installer if network is available, or you can perform a manual update
by running the follwing in a terminal:
sudo snap refresh subiquity

Changed in curtin (Ubuntu):
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

Remote bug watches

Bug watches keep track of this bug in other bug trackers.