From 7096c6415bb124e696095f57357fd4f070eab933 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 1 Sep 2025 13:17:11 +0300 Subject: [PATCH] Add riscv64 support --- config.yaml | 4 +++ files/0001-Add-x86_64_v2-support.patch | 7 +++-- files/0002-Add-riscv64-support.patch | 43 ++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 files/0002-Add-riscv64-support.patch diff --git a/config.yaml b/config.yaml index 057ffdf..cf95a69 100644 --- a/config.yaml +++ b/config.yaml @@ -9,8 +9,12 @@ actions: email: "eabdullin@almalinux.org" line: - "Add x86_64_v2 support" + - "Add riscv64 support" - add_files: - type: "patch" name: "0001-Add-x86_64_v2-support.patch" number: 1000 + - type: "patch" + name: "0002-Add-riscv64-support.patch" + number: 1001 diff --git a/files/0001-Add-x86_64_v2-support.patch b/files/0001-Add-x86_64_v2-support.patch index 4782bf2..ca8ef99 100644 --- a/files/0001-Add-x86_64_v2-support.patch +++ b/files/0001-Add-x86_64_v2-support.patch @@ -1,7 +1,7 @@ -From ac5808bd2045da5fd0af937fb84755d75e155a92 Mon Sep 17 00:00:00 2001 +From e0ad11289a08b7317e8d0d9af9965c2916308a29 Mon Sep 17 00:00:00 2001 From: soksanichenko Date: Fri, 13 Sep 2024 09:24:59 +0300 -Subject: [PATCH] Add x86_64_v2 support +Subject: [PATCH 1/2] Add x86_64_v2 support --- src/pylorax/treebuilder.py | 1 + @@ -20,4 +20,5 @@ index 2c6b5d8..47f8747 100644 's390x': 's390.tmpl', 'aarch64': 'aarch64.tmpl', -- -2.39.3 (Apple Git-146) +2.39.5 (Apple Git-154) + diff --git a/files/0002-Add-riscv64-support.patch b/files/0002-Add-riscv64-support.patch new file mode 100644 index 0000000..f2f69eb --- /dev/null +++ b/files/0002-Add-riscv64-support.patch @@ -0,0 +1,43 @@ +From c2064cd37a33a1238bb3f1ec6bf2a89228543871 Mon Sep 17 00:00:00 2001 +From: eabdullin +Date: Mon, 1 Sep 2025 13:05:59 +0300 +Subject: [PATCH 2/2] Add riscv64 support + +--- + src/pylorax/installer.py | 7 +++++++ + src/pylorax/treebuilder.py | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/src/pylorax/installer.py b/src/pylorax/installer.py +index 7fe6795..308349e 100644 +--- a/src/pylorax/installer.py ++++ b/src/pylorax/installer.py +@@ -161,6 +161,13 @@ class QEMUInstall(object): + "arches": ["s390x"], + "machine": "s390-ccw-virtio" + }, ++ "riscv64": { ++ "cmd": "/usr/libexec/qemu-kvm", ++ "arches": ["riscv64"], ++ "machine": "virt", ++ "uefi": ["riscv/RISCV_VIRT_CODE.qcow2", "riscv/RISCV_VIRT_VARS.qcow2"], ++ "uefi_machine": "virt", ++ }, + } + + def __init__(self, opts, iso, ks_paths, disk_img, img_size=2048, +diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py +index 47f8747..40be1f9 100644 +--- a/src/pylorax/treebuilder.py ++++ b/src/pylorax/treebuilder.py +@@ -37,6 +37,7 @@ from pylorax.executils import runcmd, runcmd_output, execWithCapture + templatemap = { + 'x86_64': 'x86.tmpl', + 'x86_64_v2': 'x86_v2.tmpl', ++ 'riscv64': 'riscv64.tmpl', + 'ppc64le': 'ppc64le.tmpl', + 's390x': 's390.tmpl', + 'aarch64': 'aarch64.tmpl', +-- +2.39.5 (Apple Git-154) + -- 2.47.3