Skip to content

bailuk/starfive-recipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

starfive-recipe

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.

Build image

Step 1: Build kernel

Output from this step will be kernel Debian packages in directory kernel/

Variant A: Build kernel using a build container

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 kernel

Variant B: Build kernel directly

First install dependencies to build a riscv64 kernel. See kernel/Dockerfile

cd kernel
./buld-kernel.sh # Clones or updates kernel source repository and builds kernel

Step 2: Configure image

Edit 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.

Step 3: Build image

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.sh

Output of this step is an image file: starfive.img

Step 4: Install and test image

# Write image to microSD card
dd if=starfive.img of=/dev/your-microsd-card-device

Then boot from microSD card. Preferably with USB to TTL module connected.

Credits

Based on:

Useful resources

About

Scripts and recipe to build a Debian image for starfive based devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors