-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for RISC-V 64bit architecture
Basic support of riscv64 architecture. Shim is not supported yet, will be added later. Signed-off-by: Loic Devulder <[email protected]>
- Loading branch information
Showing
11 changed files
with
228 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
examples/tumbleweed/patches/0001-fix-dmsquash-live-restore-compatibility-with-earlier.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 0e780720efe6488c4e07af39926575ee12f40339 Mon Sep 17 00:00:00 2001 | ||
From: Laszlo Gombos <[email protected]> | ||
Date: Fri, 24 Feb 2023 01:57:19 +0000 | ||
Subject: [PATCH] fix(dmsquash-live): restore compatibility with earlier | ||
releases | ||
|
||
Follow-up to 40dd5c90e0efcb9ebaa9abb42a38c7316e9706bd . | ||
--- | ||
modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh | ||
index 62d1b5e7..a98e258c 100755 | ||
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh | ||
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh | ||
@@ -403,6 +403,10 @@ fi | ||
|
||
ROOTFLAGS="$(getarg rootflags)" | ||
|
||
+if [ "$overlayfs" = required ]; then | ||
+ echo "rd.live.overlay.overlayfs=1" > /etc/cmdline.d/dmsquash-need-overlay.conf | ||
+fi | ||
+ | ||
if [ -n "$overlayfs" ]; then | ||
if [ -n "$FSIMG" ]; then | ||
mkdir -m 0755 -p /run/rootfsbase | ||
-- | ||
2.35.3 |
90 changes: 90 additions & 0 deletions
90
examples/tumbleweed/patches/0001-fix-overlayfs-split-overlayfs-mount-in-two-steps.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
From bddffedae038ceca263a904e40513a6e92f1b558 Mon Sep 17 00:00:00 2001 | ||
From: David Cassany <[email protected]> | ||
Date: Fri, 22 Sep 2023 16:28:48 +0200 | ||
Subject: [PATCH] fix(overlayfs): split overlayfs mount in two steps | ||
|
||
This commit splits the creation of required overlayfs underlaying | ||
directories and the actual overlayfs mount. This way it is still | ||
possible to mount the overlayfs with the generated sysroot.mount that | ||
dmsquash-live creates. | ||
|
||
The overlayfs tree is created in a pre-mount hook so it is executed | ||
before sysroot.mount is started. Otherwise sysroot.mount starts and | ||
fails before mount hooks are executed. | ||
|
||
Signed-off-by: David Cassany <[email protected]> | ||
--- | ||
modules.d/90overlayfs/module-setup.sh | 1 + | ||
modules.d/90overlayfs/mount-overlayfs.sh | 13 ------------- | ||
modules.d/90overlayfs/prepare-overlayfs.sh | 21 +++++++++++++++++++++ | ||
3 files changed, 22 insertions(+), 13 deletions(-) | ||
create mode 100755 modules.d/90overlayfs/prepare-overlayfs.sh | ||
|
||
diff --git a/modules.d/90overlayfs/module-setup.sh b/modules.d/90overlayfs/module-setup.sh | ||
index 27aa7cfa..893e2dc3 100755 | ||
--- a/modules.d/90overlayfs/module-setup.sh | ||
+++ b/modules.d/90overlayfs/module-setup.sh | ||
@@ -15,4 +15,5 @@ installkernel() { | ||
|
||
install() { | ||
inst_hook mount 01 "$moddir/mount-overlayfs.sh" | ||
+ inst_hook pre-mount 01 "$moddir/prepare-overlayfs.sh" | ||
} | ||
diff --git a/modules.d/90overlayfs/mount-overlayfs.sh b/modules.d/90overlayfs/mount-overlayfs.sh | ||
index 7e2da1a8..e1d23fb4 100755 | ||
--- a/modules.d/90overlayfs/mount-overlayfs.sh | ||
+++ b/modules.d/90overlayfs/mount-overlayfs.sh | ||
@@ -3,24 +3,11 @@ | ||
type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh | ||
|
||
getargbool 0 rd.live.overlay.overlayfs && overlayfs="yes" | ||
-getargbool 0 rd.live.overlay.reset -d -y reset_overlay && reset_overlay="yes" | ||
getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay="" | ||
|
||
ROOTFLAGS="$(getarg rootflags)" | ||
|
||
if [ -n "$overlayfs" ]; then | ||
- if ! [ -e /run/rootfsbase ]; then | ||
- mkdir -m 0755 -p /run/rootfsbase | ||
- mount --bind "$NEWROOT" /run/rootfsbase | ||
- fi | ||
- | ||
- mkdir -m 0755 -p /run/overlayfs | ||
- mkdir -m 0755 -p /run/ovlwork | ||
- if [ -n "$reset_overlay" ] && [ -h /run/overlayfs ]; then | ||
- ovlfsdir=$(readlink /run/overlayfs) | ||
- info "Resetting the OverlayFS overlay directory." | ||
- rm -r -- "${ovlfsdir:?}"/* "${ovlfsdir:?}"/.* > /dev/null 2>&1 | ||
- fi | ||
if [ -n "$readonly_overlay" ] && [ -h /run/overlayfs-r ]; then | ||
ovlfs=lowerdir=/run/overlayfs-r:/run/rootfsbase | ||
else | ||
diff --git a/modules.d/90overlayfs/prepare-overlayfs.sh b/modules.d/90overlayfs/prepare-overlayfs.sh | ||
new file mode 100755 | ||
index 00000000..87bcc196 | ||
--- /dev/null | ||
+++ b/modules.d/90overlayfs/prepare-overlayfs.sh | ||
@@ -0,0 +1,21 @@ | ||
+#!/bin/sh | ||
+ | ||
+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh | ||
+ | ||
+getargbool 0 rd.live.overlay.overlayfs && overlayfs="yes" | ||
+getargbool 0 rd.live.overlay.reset -d -y reset_overlay && reset_overlay="yes" | ||
+ | ||
+if [ -n "$overlayfs" ]; then | ||
+ if ! [ -e /run/rootfsbase ]; then | ||
+ mkdir -m 0755 -p /run/rootfsbase | ||
+ mount --bind "$NEWROOT" /run/rootfsbase | ||
+ fi | ||
+ | ||
+ mkdir -m 0755 -p /run/overlayfs | ||
+ mkdir -m 0755 -p /run/ovlwork | ||
+ if [ -n "$reset_overlay" ] && [ -h /run/overlayfs ]; then | ||
+ ovlfsdir=$(readlink /run/overlayfs) | ||
+ info "Resetting the OverlayFS overlay directory." | ||
+ rm -r -- "${ovlfsdir:?}"/* "${ovlfsdir:?}"/.* > /dev/null 2>&1 | ||
+ fi | ||
+fi | ||
-- | ||
2.35.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.