Use gcc-10 to build 5.8 riscv backport kernel for focal

Bug #1913864 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-riscv-5.8 (Ubuntu)
Invalid
High
Unassigned
Focal
Fix Released
Critical
Colin Ian King

Bug Description

== SRU RISC-V 5.8 Focal backport kernel ==

The 5.8 RISC-V kernel has boot issues when compiled with gcc 9. This can be fixed by building it with gcc-10.

== Fix ==

Use gcc-10, e.g.:

diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in
index 9c1e956092bf..3b920328caff 100644
--- a/debian.master/control.stub.in
+++ b/debian.master/control.stub.in
@@ -68,7 +68,7 @@ Section: devel
 Priority: optional
 Provides: linux-source
 Depends: ${misc:Depends}, binutils, bzip2, coreutils
-Recommends: libc-dev, gcc, make
+Recommends: libc-dev, gcc-10, make
 Suggests: libncurses-dev | ncurses-dev, kernel-package, libqt3-dev
 Description: Linux kernel source for version PKGVER with Ubuntu patches
  This package provides the source code for the Linux kernel version
diff --git a/debian/rules b/debian/rules
index 627ca3cb968f..425d33b35fde 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,7 @@
 #

 DEBIAN=$(shell awk -F= '($$1 == "DEBIAN") { print $$2 }' <debian/debian.env)
+gcc=gcc-10

 # dpkg-buildpackage passes options that are incomptatible
 # with the kernel build.

== Testing ==

Without the fix, the kernel will panic during boot. With the fix, the kernel boots fine.

== Where problems could occur ==

Using a different compiler version can always introduce subtle object code differences and hence potential bugs, however, the same gcc version is being used to build the groovy variant of the same kernel and we know that this works fine w/o any observable gcc specific issues.

Changed in linux (Ubuntu):
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → Colin Ian King (colin-king)
Revision history for this message
Stefan Bader (smb) wrote :

Pulling severity back to high (critical would be data corruption/loss in production)

affects: linux (Ubuntu) → linux-riscv-5.8 (Ubuntu)
Changed in linux-riscv-5.8 (Ubuntu Focal):
assignee: nobody → Colin Ian King (colin-king)
importance: Undecided → High
status: New → In Progress
Changed in linux-riscv-5.8 (Ubuntu):
assignee: Colin Ian King (colin-king) → nobody
importance: Critical → High
status: In Progress → Invalid
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I approve.

Changed in linux-riscv-5.8 (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in linux-riscv-5.8 (Ubuntu Focal):
milestone: none → ubuntu-20.04.2
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Bumped priority to Critical as we can't really release 20.04.2 without a working linux-riscv kernel.

Changed in linux-riscv-5.8 (Ubuntu Focal):
importance: High → Critical
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

$ uname -a
Linux ubuntu 5.8.0-14-generic #16~20.04.3-Ubuntu SMP Mon Feb 1 16:33:19 UTC 2021 riscv64 riscv64 riscv64 GNU/Linux

boot & provision successful using testflinger.

previous kernel failed to provision.

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

This bug was fixed in the package linux-riscv-5.8 - 5.8.0-14.16~20.04.3

---------------
linux-riscv-5.8 (5.8.0-14.16~20.04.3) focal; urgency=medium

  * focal/linux-riscv-5.8: 5.8.0-14.16~20.04.3 -proposed tracker (LP: #1914039)

  * Use gcc-10 to build 5.8 riscv backport kernel for focal (LP: #1913864)
    - [Packaging] Use gcc-10 for riscv 5.8 kernel build

 -- Kleber Sacilotto de Souza <email address hidden> Mon, 01 Feb 2021 15:39:27 +0100

Changed in linux-riscv-5.8 (Ubuntu Focal):
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.