From 5ab6bd0d2392d389be34e5ae3d6ac078fbbc28c3 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Fri, 7 Feb 2025 21:59:47 +0000 Subject: [PATCH] Added some Parch Stuff --- README.md | 10 ++++++++-- mkimg | 12 ++++++------ mkrootfs | 10 +++++----- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ccd5c3c..b05a116 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ -# Arch RISC-V Scriptlet +# Parch Linux RISC-V RootFS Builder -Useful scripts for building and running Arch RISC-V Qcow image. +Useful scripts for building and running Parch Linux RISC-V Qcow image. + + +> This is only for Testing Parch Gnu/Linux on Risc-V. + + +This Script is forked from [Archriscv Scriptlet](https://github.com/CoelacanthusHex/archriscv-scriptlet) ## Prerequisite diff --git a/mkimg b/mkimg index cf705ec..7759e9f 100755 --- a/mkimg +++ b/mkimg @@ -11,7 +11,7 @@ verbose=0 use_fixed_password=0 build_firmware=1 varbose_arg= -rootfs="archriscv-$(date --rfc-3339=date).tar.zst" +rootfs="parchriscv-$(date --rfc-3339=date).tar.zst" fstype=ext4 kernel=linux kernel_suffix="" @@ -23,10 +23,10 @@ opensbi_version=v1.3.1 show_help() { cat << EOF Usage: ${0##*/} [-hvfd] [-p PASSWORD] [-r ROOTFS] [-t FSTYPE] [FILENAME] -Create Arch RISC-V distro image. +Create Parch RISC-V distro image. FILENAME generated image file name - default: 'archriscv-$(date --rfc-3339=date).qcow2' + default: 'parchriscv-$(date --rfc-3339=date).qcow2' unless the extension is qcow2, implies raw disk format -h display this help and exit @@ -71,7 +71,7 @@ parse-args() { esac done shift "$(( OPTIND-1 ))" - filename=${1:-archriscv-$(date --rfc-3339=date).qcow2} + filename=${1:-parchriscv-$(date --rfc-3339=date).qcow2} } toggle-systemd-firstboot() { @@ -99,7 +99,7 @@ then git checkout $uboot_version popd else - git clone --filter=blob:none -b $uboot_version https://github.com/u-boot/u-boot.git + git clone --depth 1 --filter=blob:none -b $uboot_version https://github.com/u-boot/u-boot.git fi pushd u-boot @@ -123,7 +123,7 @@ then git checkout $opensbi_version popd else - git clone --filter=blob:none -b $opensbi_version https://github.com/riscv-software-src/opensbi + git clone --depth 1 --filter=blob:none -b $opensbi_version https://github.com/riscv-software-src/opensbi fi pushd opensbi diff --git a/mkrootfs b/mkrootfs index 050f623..28b7128 100755 --- a/mkrootfs +++ b/mkrootfs @@ -9,19 +9,19 @@ colorize verbose=0 verbose_arg= -password='archriscv' +password='parch' show_help() { cat << EOF Usage: ${0##*/} [-hv] [-p PASSWORD] [FILENAME] -Create Arch RISC-V rootfs. +Create Parch RISC-V rootfs. FILENAME generated rootfs file name, use the archive suffix to decide the compression algorithm. - default: 'archriscv-$(date --rfc-3339=date).tar.zst' + default: 'parchriscv-$(date --rfc-3339=date).tar.zst' -h display this help and exit - -p PASSWORD set root password to PASSWORD instead of archriscv + -p PASSWORD set root password to PASSWORD instead of parch -v verbose mode EOF } @@ -46,7 +46,7 @@ parse-args() { esac done shift "$(( OPTIND-1 ))" - filename=${1:-archriscv-$(date --rfc-3339=date).tar.zst} + filename=${1:-parchriscv-$(date --rfc-3339=date).tar.zst} echo $filename }