VisionFive 2使用手册

编译bsp

1
git clone https://github.com/starfive-tech/VisionFive2.git
1
2
cd VisionFive2
git submodule update --init --recursive
1
make -j$(nproc)

安装工具链

1
git clone --recursive https://github.com/riscv/riscv-gnu-toolchain

下载工具链

可以在https://toolchains.bootlin.com/下载交叉编译工具链。需要对指令集架构和libc进行选择,这里使用riscv 64和glibc,点击Download stable即可下载。

1
xu1@ubuntu:~/test$ tar -xvf riscv64-lp64d--glibc--stable-2023.08-1.tar.bz2

编译内核

1
2
3
4
5
6
7
8
cd $VF2_WORK_DIR
git clone https://github.com/starfive-tech/linux.git
pushd linux/
git checkout JH7110_VisionFive2_devel
cp arch/riscv/configs/starfive_visionfive2_defconfig .config
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- olddefconfig
nice make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- -j$(nproc) bindeb-pkg KDEB_COMPRESS=xz LOCALVERSION=-starfive
popd

安装内核

1
2
3
4
5
6
sudo cp $VF2_WORK_DIR/linux-image-5.15.0-*.deb ./riscv-chroot-snapshots/root
sudo chroot $VF2_WORK_DIR/riscv-chroot-snapshots
dpkg -i /root/*.deb
mkdir /lib/firmware
sync
exit

6u工具编译

1
2
3
4
5
6
7
8
9
10
11
12
13
#基本第一次才会编译,正常情况不需要编译,以下假设代码目录是agate_6u

#2.1 xel库编译(除非是改变tools/acl/cfgm1文件夹下面的代码,否则不需要编译)
cd agate_6u/trunk/tools/acl/cfgm1
./build_lib.sh

#2.2 acl编译(除非是改变tools/acl/app目录下的代码,否则不需要编译)
cd agate_6u/trunk/tools/acl/app
sudo ./build.sh

#2.3 nanomsg编译(除非是改变tools/nanomsg目录下的代码,否则不需要编译)
cd agate_6u/trunk/tools/nanomsg
./build.sh

6u编译命令

1
2
3
4
#交换
sudo ./build-db.sh l3 lskd5760
#安全
sudo ./build.sh rootfs

fpga代码库

1
ssh://dnsnat@192.168.137.16/~/workspace/database/workspace/database/repertory/gateway_fpga

httpserver编译安装

1
./configure --prefix=/opt/web/lighttpd-1.4.30-x86 --host=i686-pc-linux --build=i686-pc-linux --disable-FEATURE --enable-shared --disable-static --disable-lfs --disable-ipv6 --without-PACKAGE --without-valgrind --without-openssl --without-kerberos5 --without-pcre --without-zlib --without-bzip2 --without-lua 

php


VisionFive 2使用手册
http://witbit.cn/EMBEDDED/VisionFive 2使用手册.html
作者
朝彻
发布于
2025年2月13日
许可协议