[elbe-devel] [PATCH 1/1] riscv64 support
Benedikt Spranger
b.spranger at linutronix.de
Mon Sep 18 17:35:15 CEST 2023
Add initial support for the new supported Debian architecture riscv64.
Co-developed-by: Hartmut Eilers <eilers at linutronix.de>
Signed-off-by: Benedikt Spranger <b.spranger at linutronix.de>
---
elbepack/xmldefaults.py | 13 ++++++++
examples/riscv64.xml | 66 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)
create mode 100644 examples/riscv64.xml
diff --git a/elbepack/xmldefaults.py b/elbepack/xmldefaults.py
index 888b8886..f1d9c8eb 100644
--- a/elbepack/xmldefaults.py
+++ b/elbepack/xmldefaults.py
@@ -152,6 +152,18 @@ i386_defaults = {
"elfcode": "Intel 80386",
}
+riscv64_defaults = {
+ "arch": "riscv64",
+ "interpreter": "qemu-system-riscv64",
+ "userinterpr": "qemu-riscv64-static",
+ "console": "ttyS0,115200n1",
+ "machine": "sifive_u",
+ "nicmodel": "virtio",
+ "triplet": "riscv64-linux-gnu",
+ "sdkgccpkg": "g++-riscv64-linux-gnu",
+ "elfcode": "RISC-V 64 bit",
+}
+
archindep_defaults = {
"name": "elbe-buildenv",
"size": "20G",
@@ -174,6 +186,7 @@ defaults = {"armel": armel_defaults,
"ppc64el": ppc64el_defaults,
"amd64": amd64_defaults,
"i386": i386_defaults,
+ "riscv64": riscv64_defaults,
"nodefaults": {}}
def get_random_mac():
diff --git a/examples/riscv64.xml b/examples/riscv64.xml
new file mode 100644
index 00000000..bf2b66e7
--- /dev/null
+++ b/examples/riscv64.xml
@@ -0,0 +1,66 @@
+<!--
+SPDX-License-Identifier: 0BSD
+SPDX-FileCopyrightText: Linutronix GmbH
+-->
+<ns0:RootFileSystem xmlns:ns0="https://www.linutronix.de/projects/Elbe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" created="2009-05-20T08:50:56" revision="6" xsi:schemaLocation="https://www.linutronix.de/projects/Elbe dbsfed.xsd">
+ <project>
+ <name>RISC-V 64 example</name>
+ <version>1.0</version>
+ <description>
+ example for testing RISC-V 64
+ </description>
+ <buildtype>riscv64</buildtype>
+ <mirror>
+ <primary_host>deb.debian.org</primary_host>
+ <primary_path>/debian</primary_path>
+ <primary_proto>http</primary_proto>
+ </mirror>
+ <suite>sid</suite>
+ </project>
+ <target>
+ <hostname>elbe-riscv64</hostname>
+ <domain>tec.linutronix.de</domain>
+ <passwd>foo</passwd>
+ <console>ttyS0,115200</console>
+ <images>
+ <msdoshd>
+ <name>riscv64.img</name>
+ <size>1900MiB</size>
+ <partition>
+ <size>remain</size>
+ <label>rfs</label>
+ </partition>
+ </msdoshd>
+ </images>
+ <fstab>
+ <bylabel>
+ <label>rfs</label>
+ <mountpoint>/</mountpoint>
+ <fs>
+ <type>ext4</type>
+ <fs-finetuning>
+ <device-command>tune2fs -i 0 {device}</device-command>
+ </fs-finetuning>
+ </fs>
+ </bylabel>
+ <bydev>
+ <source>none</source>
+ <mountpoint>/sys/kernel/debug</mountpoint>
+ <fs>
+ <type>debugfs</type>
+ </fs>
+ </bydev>
+ </fstab>
+ <finetuning>
+ <rm>var/cache/apt/archives/*.deb</rm>
+ </finetuning>
+ <pkg-list>
+ <pkg>linux-image-riscv64</pkg>
+ <pkg>openssh-client</pkg>
+ <pkg>openssh-server</pkg>
+ <pkg>less</pkg>
+ <pkg>bash</pkg>
+ <pkg>vim-nox</pkg>
+ </pkg-list>
+ </target>
+</ns0:RootFileSystem>
--
2.40.1
More information about the elbe-devel
mailing list