[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1006926: marked as done (flash-kernel: add support for SiFive Unmatched board)



Your message dated Fri, 22 Apr 2022 19:48:50 +0000
with message-id <E1nhzGs-000Ekk-HK@fasolo.debian.org>
and subject line Bug#1006926: fixed in flash-kernel 3.105
has caused the Debian Bug report #1006926,
regarding flash-kernel: add support for SiFive Unmatched board
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1006926: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006926
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: flash-kernel
Version: 3.104
Severity: wishlist
Tags: patch

As boards using the riscv64 architecture can be booted from U-Boot via the booti command like arm64 boards we should start adding these to the package.

The three appended patches

* add a bootscr.uboot-generic script for riscv64
* provide the database entry for the SiFive Unmatched board
* enable building on riscv64

The main benefit of the package I see is that when booting via GRUB it can be used to supply the newest device-tree before launching GRUB via the preboot hook.

Best regards

Heinrich
From 94d1eba3ffdfdca6917a7975b35197f1aae70e26 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 8 Mar 2022 11:03:16 +0100
Subject: [PATCH 3/3] debian/control: enable building for riscv64

riscv64 boards use device-trees. So we should provide the flash-kernel
package for them.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 debian/control | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index d37b6d5..89e6751 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Vcs-Git: https://salsa.debian.org/installer-team/flash-kernel.git
 Rules-Requires-Root: no
 
 Package: flash-kernel
-Architecture: arm64 armel armhf
+Architecture: arm64 armel armhf riscv64
 Depends: ${misc:Depends},
          devio,
          initramfs-tools (>= 0.92f),
@@ -31,7 +31,7 @@ Section: debian-installer
 Priority: standard
 Package-Type: udeb
 Build-Profiles: <!noudeb>
-Architecture: arm64 armel armhf
+Architecture: arm64 armel armhf riscv64
 XB-Subarchitecture: kirkwood orion5x s3c24xx mx5 generic
 Provides: bootable-system
 Depends: cdebconf-udeb, installed-base
-- 
2.34.1

From d43ffd2af4fd5387fa20909ccf0b51fbbba76626 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 8 Mar 2022 10:18:49 +0100
Subject: [PATCH 2/3] db/all.db: add SiFive HiFive Unmatched A00

Add the SiFive HiFive Unmatched board to the database.

Ubuntu uses the 'generic' flavor while Debian uses 'riscv64'.
Add both to the database.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 db/all.db | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/db/all.db b/db/all.db
index 951effe..585e45c 100644
--- a/db/all.db
+++ b/db/all.db
@@ -1719,6 +1719,13 @@ Boot-DTB-Path: /boot/dtb
 Required-Packages: u-boot-tools
 Bootloader-Sets-Incorrect-Root: no
 
+Machine: SiFive HiFive Unmatched A00
+Kernel-Flavors: generic riscv64
+DTB-Id: sifive/hifive-unmatched-a00.dtb
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
 Machine: Sinlinx SinA31s Development Board
 Kernel-Flavors: armmp armmp-lpae
 Boot-Script-Path: /boot/boot.scr
-- 
2.34.1

From 44be15212b83a2c72de6a0c8a79c49cef7442494 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 8 Mar 2022 11:24:30 +0100
Subject: [PATCH 1/3] riscv64: add bootscr.uboot-generic

riscv64 uses booti not bootz. So we have to add a separate
bootscr.uboot-generic.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 bootscript/riscv64/bootscr.uboot-generic | 56 ++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 bootscript/riscv64/bootscr.uboot-generic

diff --git a/bootscript/riscv64/bootscr.uboot-generic b/bootscript/riscv64/bootscr.uboot-generic
new file mode 100644
index 0000000..33f90d2
--- /dev/null
+++ b/bootscript/riscv64/bootscr.uboot-generic
@@ -0,0 +1,56 @@
+# Bootscript using the new unified bootcmd handling
+#
+# Expects to be called with the following environment variables set:
+#
+#  devtype              e.g. mmc/scsi etc
+#  devnum               The device number of the given type
+#  bootpart             The partition containing the boot files
+#  distro_bootpart      The partition containing the boot files
+#                       (introduced in u-boot mainline 2016.01)
+#  prefix               Prefix within the boot partiion to the boot files
+#  kernel_addr_r        Address to load the kernel to
+#  fdt_addr_r           Address to load the FDT to
+#  ramdisk_addr_r       Address to load the initrd to.
+#
+# The uboot must support the booti and generic filesystem load commands.
+
+if test -n "${console}"; then
+  setenv bootargs "${bootargs} console=${console}"
+fi
+
+setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@
+@@UBOOT_ENV_EXTRA@@
+
+if test -z "${fk_kvers}"; then
+   setenv fk_kvers '@@KERNEL_VERSION@@'
+fi
+
+# These two blocks should be the same apart from the use of
+# ${fk_kvers} in the first, the syntax supported by u-boot does not
+# lend itself to removing this duplication.
+
+if test -n "${fdtfile}"; then
+   setenv fdtpath dtbs/${fk_kvers}/${fdtfile}
+else
+   setenv fdtpath dtb-${fk_kvers}
+fi
+
+if test -z "${distro_bootpart}"; then
+  setenv partition ${bootpart}
+else
+  setenv partition ${distro_bootpart}
+fi
+
+@@UBOOT_PREBOOT_EXTRA@@
+
+load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers} \
+&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}${fdtpath} \
+&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
+&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
+&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
+
+load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz \
+&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtb \
+&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img \
+&& echo "Booting Debian from ${devtype} ${devnum}:${partition}..." \
+&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
-- 
2.34.1


--- End Message ---
--- Begin Message ---
Source: flash-kernel
Source-Version: 3.105
Done: Vagrant Cascadian <vagrant@debian.org>

We believe that the bug you reported is fixed in the latest version of
flash-kernel, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1006926@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@debian.org> (supplier of updated flash-kernel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 22 Apr 2022 12:26:15 -0700
Source: flash-kernel
Architecture: source
Version: 3.105
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Vagrant Cascadian <vagrant@debian.org>
Closes: 982369 983498 1006926
Changes:
 flash-kernel (3.105) unstable; urgency=medium
 .
   [ Matthias Klose ]
   * Allow building without the udeb package. (Closes: #983498)
 .
   [ Heinrich Schuchardt ]
   * all.db: add support for ODROID-C4, -HC4, -N2, -N2Plus (Closes: #982369)
 .
   [ Date Huang ]
   * functions: skip flash-kernel in all EFI system
 .
   [ Henry-Nicolas Tourneur ]
   * Add Librem5r4 (Evergreen).
 .
   [ Heinrich Schuchardt ]
   * bootscript: unify generic boot scripts
   * db/all.db: add SiFive HiFive Unmatched A00 (Closes: #1006926)
   * debian/control: enable building for riscv64
   * db: add BeagleV Starlight Beta board to the database
 .
   [ Vagrant Cascadian ]
   * functions: Use dpkg --print-architecture to determine architecture.
 .
   [ Heinrich Schuchardt ]
   * db: add Microchip PolarFire-SoC Icicle Kit to the database
 .
   [ Johannes Schauer Marin Rodrigues ]
   * Add MNT Reform 2
 .
   [ Vagrant Cascadian ]
   * debian/control: Update Standards Version to 4.6.0, no changes.
Checksums-Sha1:
 c35f1d1381b42e54ee6a3a93274078e42a5cdb70 1293 flash-kernel_3.105.dsc
 76ea8a3419dd70e31210680c5dbb92c2f54b8aae 75204 flash-kernel_3.105.tar.xz
 0e5b2ec610ac0d2582ca6db216412138f8cecaa0 5576 flash-kernel_3.105_arm64.buildinfo
Checksums-Sha256:
 c52e32b05f2e24fb59b08f77266900ee5234d39e53548aef085b7c01d42ff6c3 1293 flash-kernel_3.105.dsc
 36cc09405f9cc05a86a486f0ab285700a8d53f79e584ef73e6cafbafb1ccc87a 75204 flash-kernel_3.105.tar.xz
 2ce74f135c3546217b4a88971a0a8c7aa0a5fe02b625f1a1ee56d415832d54eb 5576 flash-kernel_3.105_arm64.buildinfo
Files:
 ff993ad6042d7898d86c50a345f3cc14 1293 utils optional flash-kernel_3.105.dsc
 5ba5f81fe42c92a6d1396138b4fb5fed 75204 utils optional flash-kernel_3.105.tar.xz
 bbd648e1e418a02947db33013064c0a4 5576 utils optional flash-kernel_3.105_arm64.buildinfo

-----BEGIN PGP SIGNATURE-----

iIkEARYKADEWIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYmMCWhMcdmFncmFudEBk
ZWJpYW4ub3JnAAoJENxRj8h/lxaqedQA/2NM7cTdGXvHTOUzDVlyK8/pdpmuEqhv
ESwjTB07G0e5AP4g3yP3vmLyzfiR9lqPjmtRhtppXSCj3wbaq/P/FY+ABQ==
=HYuU
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: