[linux][D1-H]Lichee RV Dock 全志sdk下载-编译

https://open.allwinnertech.com/#/sdk/264?menuID=36&projectName=D1-H_Tina_Open&chipId=246

image

V2.1 SDK仓库下载说明
新手指引
1.上传公钥
2.安装repo引导脚本 查看详情
3.下载代码
下载服务器统一为:sdk.allwinnertech.com
下载请注意:如有lichee和android两仓库,务必放在同一级目录

$ mkdir tina-d1-h
$ cd tina-d1-h
$ repo init -u ssh://dysonnnn@sdk.allwinnertech.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-h.xml
$ repo sync
$ repo start product-smartx-d1-h-tina-stable-v2.0 --all # 全部下载完成之后,创建分支

完成。
交叉编译工具:

dysonnnn@ubuntu:~/lichee/tina_d1_h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin
$ ./riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=./riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/dysonnnn/lichee/tina_d1_h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/../libexec/gcc/riscv64-unknown-linux-gnu/8.1.0/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/build/../source/riscv/riscv-gcc/configure --target=riscv64-unknown-linux-gnu --with-mpc=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/lib-for-gcc-x86_64-linux/ --with-mpfr=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/lib-for-gcc-x86_64-linux/ --with-gmp=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/lib-for-gcc-x86_64-linux/ --prefix=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/install --with-sysroot=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/install/sysroot --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-nls --disable-bootstrap --src=../../source/riscv/riscv-gcc --enable-checking=yes --with-pkgversion='C-SKY RISCV Tools V1.8.4 B20200702' --enable-multilib --with-abi=lp64d --with-arch=rv64gcxthead 'CFLAGS_FOR_TARGET=-O2  -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-O2  -mcmodel=medany' CC=gcc CXX=g++
Thread model: posix
gcc version 8.1.0 (C-SKY RISCV Tools V1.8.4 B20200702) 

编译打包命令如下:

source build/envsetup.sh
lunch
make -j32
pack

其中:

source build/envsetup.sh :获取环境变量
lunch 会提供方案选项以供选择,其中 lunch d1-h_nezha-tina 是 d1-h_nezha-tina 的标准方案,lunch d1-h_nezha_min-tina 是只能让系统跑起来的最小系统方案。
make -j32 :编译,其中-j后面的数字参数为编译用的线程数,可根据开发者编译用的PC实际情况选择。
pack : 打包,将编译好的固件打包成一个.img格式的固件,固件路径 /out/d1-h_nezha-tina/tina_d1-h-nezha_uart0.img。

编译过程:
报错:

image

make clean

重新编译

lunch
make -j8
pack

image

编译成功

posted @ 2023-03-18 10:21  dysonnnn  阅读(176)  评论(0编辑  收藏  举报