From 04d35b2d6590b2a332c4e37ea6f7ecbebf1405d1 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 30 Oct 2019 16:20:11 +0200 Subject: [PATCH] Fix extlinux configuration for RISC-V (riscv64) - Remove fdtdir entry (we ship DTB files, but DTB is built-in into FSBL and OpenSBI; also could be in U-Boot). - Use addappend entry instead of append. This allows us to have a single disk image for QEMU virt machine and SiFive Unleashed. Signed-off-by: David Abdurachmanov --- appliance-tools.spec | 9 ++++++++- riscv-fix-extlinux-conf.patch | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 riscv-fix-extlinux-conf.patch diff --git a/appliance-tools.spec b/appliance-tools.spec index 3a9a881..1a814b7 100644 --- a/appliance-tools.spec +++ b/appliance-tools.spec @@ -12,7 +12,7 @@ Name: appliance-tools Summary: Tools for building Appliances Version: 009.0 -Release: 7.1.riscv64%{?dist} +Release: 7.2.riscv64%{?dist} License: GPLv2 URL: https://pagure.io/appliance-tools @@ -26,6 +26,10 @@ Patch0002: 0001-Leave-more-space-4MB-for-uboot-before-the-first-part.patch # Add support for zstd compression instead of xz (optional) Patch0010: appliance-tools-add-zstd.patch +# NOT upstream +# Fix extlinux configuration file for RISC-V (riscv64) +Patch0011: riscv-fix-extlinux-conf.patch + # Ensure system deps are installed (rhbz#1409536) Requires: python%{python_pkgversion}-imgcreate >= 1:25.0-2 Requires: python%{python_pkgversion}-progress @@ -70,6 +74,9 @@ rm -rf %{buildroot}%{_datadir}/doc/%{name} %{python_sitelib}/ec2convert/ %changelog +* Wed Oct 30 2019 David Abdurachmanov - 009.0-7.2.riscv64 +- Fix extlinux configuration for RISC-V (riscv64) + * Wed Oct 02 2019 David Abdurachmanov - 009.0-7.0.riscv64 - Add support for zstd compression for images (optional) diff --git a/riscv-fix-extlinux-conf.patch b/riscv-fix-extlinux-conf.patch new file mode 100644 index 0000000..99f6055 --- /dev/null +++ b/riscv-fix-extlinux-conf.patch @@ -0,0 +1,15 @@ +diff --git a/appcreate/appliance.py b/appcreate/appliance.py +index dc49bcb..f65d12a 100644 +--- a/appcreate/appliance.py ++++ b/appcreate/appliance.py +@@ -362,9 +362,7 @@ class ApplianceImageCreator(ImageCreator): + for v in versions: + extlinux += "label %s (%s)\n" % (self.name, v) + extlinux += "\tkernel %s/vmlinuz-%s\n" % (prefix, v) +- extlinux += "\tappend ro root=%s %s\n" % (rootdev, options) +- if 'extlinux-bootloader' in packages: +- extlinux += "\tfdtdir %s/dtb-%s/\n" % (prefix, v) ++ extlinux += "\taddappend ro root=%s %s\n" % (rootdev, options) + extlinux += "\tinitrd %s/%s-%s.img\n\n" % (prefix, initrd, v) + +