Added some Parch Stuff

This commit is contained in:
Sohrab Behdani 2025-02-07 21:59:47 +00:00
parent f054f45cc4
commit 5ab6bd0d23
3 changed files with 19 additions and 13 deletions

View file

@ -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 ## Prerequisite

12
mkimg
View file

@ -11,7 +11,7 @@ verbose=0
use_fixed_password=0 use_fixed_password=0
build_firmware=1 build_firmware=1
varbose_arg= varbose_arg=
rootfs="archriscv-$(date --rfc-3339=date).tar.zst" rootfs="parchriscv-$(date --rfc-3339=date).tar.zst"
fstype=ext4 fstype=ext4
kernel=linux kernel=linux
kernel_suffix="" kernel_suffix=""
@ -23,10 +23,10 @@ opensbi_version=v1.3.1
show_help() { show_help() {
cat << EOF cat << EOF
Usage: ${0##*/} [-hvfd] [-p PASSWORD] [-r ROOTFS] [-t FSTYPE] [FILENAME] 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 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 unless the extension is qcow2, implies raw disk format
-h display this help and exit -h display this help and exit
@ -71,7 +71,7 @@ parse-args() {
esac esac
done done
shift "$(( OPTIND-1 ))" shift "$(( OPTIND-1 ))"
filename=${1:-archriscv-$(date --rfc-3339=date).qcow2} filename=${1:-parchriscv-$(date --rfc-3339=date).qcow2}
} }
toggle-systemd-firstboot() { toggle-systemd-firstboot() {
@ -99,7 +99,7 @@ then
git checkout $uboot_version git checkout $uboot_version
popd popd
else 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 fi
pushd u-boot pushd u-boot
@ -123,7 +123,7 @@ then
git checkout $opensbi_version git checkout $opensbi_version
popd popd
else 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 fi
pushd opensbi pushd opensbi

View file

@ -9,19 +9,19 @@ colorize
verbose=0 verbose=0
verbose_arg= verbose_arg=
password='archriscv' password='parch'
show_help() { show_help() {
cat << EOF cat << EOF
Usage: ${0##*/} [-hv] [-p PASSWORD] [FILENAME] 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 FILENAME generated rootfs file name, use the archive suffix to decide
the compression algorithm. 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 -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 -v verbose mode
EOF EOF
} }
@ -46,7 +46,7 @@ parse-args() {
esac esac
done done
shift "$(( OPTIND-1 ))" shift "$(( OPTIND-1 ))"
filename=${1:-archriscv-$(date --rfc-3339=date).tar.zst} filename=${1:-parchriscv-$(date --rfc-3339=date).tar.zst}
echo $filename echo $filename
} }