I don't own any D1 hardware anymore, so this is untested and your mileage may vary.
These scripts compile, copy, bake, unpack and flash a ready to use RISC-V Archlinux.
With "ready to use" i mean that it boots, you still need to configure everything!
Special thanks to smaeul for all their work!
Find a precompiled image under the Actions artifacts. The image has no configuration or whatsoever!
Also have a look at the forks that have emerged over time or similar projects like a make file based approch.
There are multiple sources for an Archlinux image:
sifivearchriscv)pacman -Sy riscv64-linux-gnu-gcc swig cpio python3 python-setuptools base-devel bc
chroot into the RISC-V image, you also need arch-install-scripts qemu-user-static qemu-user-static-binfmtconsts.sh to your needs. For example, you may want to select a different DTB for a different board variant.1_compile.sh which compiles everything into the output folder.2_create_sd.sh /dev/<device> to flash everything on the SD card.apt install -y gcc-riscv64-linux-gnu bison flex python3-dev libssl-dev swig cpio python3-setuptools build-essential bc
chroot into the RISC-V image, you also need arch-install-scripts qemu-user-staticconsts.sh to your needs. For example, you may want to select a different DTB for a different board variant.1_compile.sh which compiles everything into the output folder.2_create_sd.sh /dev/<device> to flash everything on the SD card.Simply loop it using sudo losetup -f -P <file> and then use /dev/loopX as the target device.
The second script requires arch-install-scripts, qemu-user-static-bin (AUR) and binfmt-qemu-static (AUR) for an architectural chroot.
If you don't want to use/do this, change USE_CHROOT to 0 in consts.sh.
Keep in mind, that this is just a extracted rootfs with no configuration. You probably want to update the system, install an editor and take care of network access/ssh
Some commits are pinned, this means that in the future this script might stop working since often a git HEAD is checked out. This is intentional.
The second script uses sudo for root access. Like any random script from a random stranger from the internet, have a look at the code first and use at own risk!
Things are rebuild whenever the corresponding output/<file> is missing. For example, the kernel is rebuilt when there is no Image file.
nezha_defconfig since i found them more reliable
Shell
96.9%
Dockerfile
3.1%
I don't own any D1 hardware anymore, so this is untested and your mileage may vary.
These scripts compile, copy, bake, unpack and flash a ready to use RISC-V Archlinux.
With "ready to use" i mean that it boots, you still need to configure everything!
Special thanks to smaeul for all their work!
Find a precompiled image under the Actions artifacts. The image has no configuration or whatsoever!
Also have a look at the forks that have emerged over time or similar projects like a make file based approch.
There are multiple sources for an Archlinux image:
sifivearchriscv)pacman -Sy riscv64-linux-gnu-gcc swig cpio python3 python-setuptools base-devel bc
chroot into the RISC-V image, you also need arch-install-scripts qemu-user-static qemu-user-static-binfmtconsts.sh to your needs. For example, you may want to select a different DTB for a different board variant.1_compile.sh which compiles everything into the output folder.2_create_sd.sh /dev/<device> to flash everything on the SD card.apt install -y gcc-riscv64-linux-gnu bison flex python3-dev libssl-dev swig cpio python3-setuptools build-essential bc
chroot into the RISC-V image, you also need arch-install-scripts qemu-user-staticconsts.sh to your needs. For example, you may want to select a different DTB for a different board variant.1_compile.sh which compiles everything into the output folder.2_create_sd.sh /dev/<device> to flash everything on the SD card.Simply loop it using sudo losetup -f -P <file> and then use /dev/loopX as the target device.
The second script requires arch-install-scripts, qemu-user-static-bin (AUR) and binfmt-qemu-static (AUR) for an architectural chroot.
If you don't want to use/do this, change USE_CHROOT to 0 in consts.sh.
Keep in mind, that this is just a extracted rootfs with no configuration. You probably want to update the system, install an editor and take care of network access/ssh
Some commits are pinned, this means that in the future this script might stop working since often a git HEAD is checked out. This is intentional.
The second script uses sudo for root access. Like any random script from a random stranger from the internet, have a look at the code first and use at own risk!
Things are rebuild whenever the corresponding output/<file> is missing. For example, the kernel is rebuilt when there is no Image file.
nezha_defconfig since i found them more reliable
Shell
96.9%
Dockerfile
3.1%