Created
January 30, 2024 00:10
-
-
Save orangecms/b3af586726796b42400b38afa3f4c144 to your computer and use it in GitHub Desktop.
build Zephyr for VF2 / JH7110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get a toolchain; the one in current Ubuntu is not suitable, so use Zephyr's | |
# TOOLCHAIN_DL_BASE=https://github.com/zephyrproject-rtos/sdk-ng/releases/download | |
# TOOLCHAIN_VER=v0.16.5-rc1 | |
# TOOLCHAIN_TAR=toolchain_linux-x86_64_riscv64-zephyr-elf.tar.xz | |
# wget $TOOLCHAIN_DL_BASE/$TOOLCHAIN_VER/$TOOLCHAIN_TAR | |
# tar -xf $TOOLCHAIN_TAR | |
TOOLCHAIN_DIR=$(pwd)/riscv64-zephyr-elf | |
SYSROOT_DIR=$TOOLCHAIN_DIR/riscv64-zephyr-elf | |
export CROSS_COMPILE="$TOOLCHAIN_DIR/bin/riscv64-zephyr-elf-" | |
export ZEPHYR_BASE=$(pwd) | |
# python3 -m venv .venv | |
. .venv/bin/activate | |
# pip install -r scripts/requirements-base.txt | |
cmake -Bbuild -GNinja \ | |
-DBOARD=visionfive2_jh7110 \ | |
-DSYSROOT_DIR=$SYSROOT_DIR \ | |
samples/hello_world | |
ninja -Cbuild | |
# will get `build/zephyr/zephyr.bin` - about 18KB in size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sources
visionfive2
(this is WIP!)TODO