Skip to content

Commit

Permalink
feat: add yocto rv32 build
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
RevySR committed Mar 2, 2024
1 parent f39dc15 commit 05893fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
model: [canmv, evb]
distro: [fedora_rv32]
distro: [yocto_rv32, fedora_rv32]
abi: [rv64ilp32, rv64]

runs-on: ubuntu-22.04
Expand Down
16 changes: 13 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RV64ILP32_TOOLCHAIN_HOME=${RV64ILP32_TOOLCHAIN_HOME:-"/opt/rv64ilp32/"}
UBOOT_RV64_REVERT_COMMIT=${UBOOT_RV64_REVERT_COMMIT:-"05c93ec8ffeeb5461f6c06b1f56b52607a699e19"}
TIMESTAMP=${TIMESTAMP:-$(date +%Y%m%d-%H%M%S)}

DISTRO=${DISTRO:-yocto_rv32} # yocto_rv32 or fedora_rv32
CHROOT_TARGET=${CHROOT_TARGET:-target}
ROOTFS_IMAGE_SIZE=2G
ROOTFS_IMAGE_FILE="k230_root.ext4"
Expand Down Expand Up @@ -107,9 +108,18 @@ function build_uboot() {
function build_rootfs() {
pushd ${OUTPUT_DIR}
{
curl -OL https://github.com/ruyisdk/mkimg-k230-rv64ilp32/releases/download/fedora_rv32_rootfs/root.ext4.zst
unzstd root.ext4.zst
mv root.ext4 ${ROOTFS_IMAGE_FILE}
if [[ $DISTRO == "fedora_rv32" ]]; then
curl -OL https://github.com/ruyisdk/mkimg-k230-rv64ilp32/releases/download/fedora_rv32_rootfs/root.ext4.zst
unzstd root.ext4.zst
mv root.ext4 ${ROOTFS_IMAGE_FILE}
elif [[ $DISTRO == "yocto_rv32" ]]; then
curl -OL https://github.com/ruyisdk/mkimg-k230-rv64ilp32/releases/download/fedora_rv32_rootfs/core-image-full-cmdline-qemuriscv32.rootfs-20240302021137.ext4.zst
unzstd core-image-full-cmdline-qemuriscv32.rootfs-20240302021137.ext4.zst
mv core-image-full-cmdline-qemuriscv32.rootfs-20240302021137.ext4 ${ROOTFS_IMAGE_FILE}
else
echo "DISTRO: ${DISTRO} ?????"
exit 1
fi
}
popd
}
Expand Down

0 comments on commit 05893fd

Please sign in to comment.