Scripts and recipe to build a Debian image for starfive based devices.
- Build kernel from source (directly or inside container)
- Build image using a debos recipe
- Tested with VisionFive2 board.
Output from this step will be kernel Debian packages in directory kernel/
cd kernel
./build-image.sh # Builds debian based build image with all dependencies to build a riscv64 kernel
./build-kernel-using-container.sh # Clones or updates kernel source repository and builds kernelFirst install dependencies to build a riscv64 kernel. See kernel/Dockerfile
cd kernel
./buld-kernel.sh # Clones or updates kernel source repository and builds kernelEdit image/build.sh to pass arguments to debos recipe image/starfive.yaml.
Add custom files:
- Add files to
image/overlays/user-home(file system overlay for/home/default-user/) - Add files to
image/overlays/system-custom(file system overlay for/
To enable ssh with private key: pass -t ssh:true and
add key to image/overlays/user-home/.ssh/authorized_keys.
If authorized_keys exists, password login from ssh will be disabled.
This will build an image by running debos inside the official debos container.
The user running this script needs permission for accessing /dev/kvm.
See debos projekt for more information.
cd image
./build.shOutput of this step is an image file: starfive.img
# Write image to microSD card
dd if=starfive.img of=/dev/your-microsd-card-deviceThen boot from microSD card. Preferably with USB to TTL module connected.
▮
Based on: