rv1126-rv1109-环境搭建-全部编译的方法

主要参考:Rockchip_Developer_Guide_Linux_Software_CN.pdf /

SDK-Rockchip_RV1126_RV1109_Quick_Start_Linux_CN.pdf

找对文档事半功倍!为什么这么说,因为没找对绕了路!别笑!

//解压源码,基础略过
tar xvf rv1126_rv1109_linux_v3.0.2_20230724.tgz -C rv1126_rv1109
cd rv1126_rv1109
.repo/repo/repo sync -l
.repo/repo/repo sync -c

gcc一定切到对应的

arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../libexec/gcc/arm-linux-gnueabihf/6.3.1/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: '/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/snapshots/gcc.git~linaro-6.3-2017.05/configure' SHELL=/bin/bash --with-mpc=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/sysroots/arm-linux-gnueabihf --with-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-checking=release --disable-bootstrap --enable-languages=c,c++,fortran,lto --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu
Thread model: posix
gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)

注意这个6.3.1一定要切到:文档说的

 切换之后就没什么问题了,

 这里要选择编译的主板

 ./build.sh lunch

You're building on Linux
Lunch menu...pick a combo:

1. rockchip_defconfig
2. rockchip_38x38_emmc_defconfig
3. rockchip_38x38_spi_nand_ab_defconfig
4. rockchip_38x38_spi_nand_defconfig
5. rockchip_ab_v13_defconfig
6. rockchip_battery_evb_defconfig
7. rockchip_robot_defconfig
8. rockchip_sl_defconfig
9. rockchip_slc_nand_v12_defconfig
10. rockchip_sllock_defconfig
11. rockchip_spi_nand_defconfig
12. rockchip_spi_nor_tb_v13_defconfig
13. rockchip_spi_nor_v12_defconfig
14. rockchip_tb_v13_defconfig
15. rockchip_trailcamera_defconfig
16. rockchip_v10_v11_defconfig
17. rockchip_v12_defconfig
Which would you like? [1]:

//1. rockchip_defconfig

1. rockchip_defconfig 

 我为什么这么选呢:看我的主板

 

 根据文档选.

环境变量 

source envsetup.sh
Top of tree: /home/sdk/work/rk/rv1126_rv1109

You're building on Linux
Lunch menu...pick a combo:

0. non-rockchip boards
......
77. rockchip_rv1126_battery_evb
78. rockchip_rv1126_evb_dualcam_tb
79. rockchip_rv1126_evb_spi_nor_tb
80. rockchip_rv1126_evb_tb
81. rockchip_rv1126_robot
82. rockchip_rv1126_robot_recovery
83. rockchip_rv1126_rv1109
84. rockchip_rv1126_rv1109_cvr
85. rockchip_rv1126_rv1109_facial_gate
86. rockchip_rv1126_rv1109_libs
87. rockchip_rv1126_rv1109_ramboot_uvcc
88. rockchip_rv1126_rv1109_recovery
89. rockchip_rv1126_rv1109_sl
90. rockchip_rv1126_rv1109_spi_nand
91. rockchip_rv1126_rv1109_spi_nand_recovery
92. rockchip_rv1126_rv1109_tiny
93. rockchip_rv1126_rv1109_uvcc
94. rockchip_rv1126_rv1109_uvcc_spi_nand
95. rockchip_rv1126_rv1109_uvcc_spi_nor
96. rockchip_rv1126_sllock
97. rockchip_rv1126_snapshot
98. rockchip_rv1126_trailcamera
Which would you like? [0]: 83

 83. rockchip_rv1126_rv1109

///

然后是剖析./build.sh 的原理

sdk@ubuntu:~/work/rk/rv1126_rv1109$ ./build.sh -h
Usage: build.sh [OPTIONS]
Available options:
app-clean          - clean buildroot app
app-rebuild        - rebuild buildroot app
app-sync           - sync buildroot app
lunch              - choose defconfig
*_defconfig        - switch to specified defconfig
    Available defconfigs:
        rockchip_38x38_emmc_defconfig
        rockchip_38x38_spi_nand_ab_defconfig
        rockchip_38x38_spi_nand_defconfig
        rockchip_ab_v13_defconfig
        rockchip_battery_evb_defconfig
        rockchip_defconfig
        rockchip_robot_defconfig
        rockchip_sl_defconfig
        rockchip_slc_nand_v12_defconfig
        rockchip_sllock_defconfig
        rockchip_spi_nand_defconfig
        rockchip_spi_nor_tb_v13_defconfig
        rockchip_spi_nor_v12_defconfig
        rockchip_tb_v13_defconfig
        rockchip_trailcamera_defconfig
        rockchip_v10_v11_defconfig
        rockchip_v12_defconfig
olddefconfig       - resolve any unresolved symbols in .config
savedefconfig      - save current config to defconfig
menuconfig         - interactive curses-based configurator
kernel             - build kernel
modules            - build kernel modules
linux-headers      - build linux-headers
loader             - build loader (uboot|spl)
uboot              - build u-boot
spl                - build spl
uefi               - build uefi
wifibt             - build Wifi/BT
rootfs             - build rootfs (default is buildroot)
buildroot          - build buildroot rootfs
yocto              - build yocto rootfs
debian             - build debian rootfs
recovery           - build recovery
pcba               - build PCBA
security_check     - check contidions for security features
createkeys         - build secureboot root keys
security_uboot     - build uboot with security paramter
security_boot      - build boot with security paramter
security_recovery  - build recovery with security paramter
security_rootfs    - build rootfs and some relevant images with security paramter (just for dm-v)
firmware           - generate and check firmwares
updateimg          - build update image
otapackage         - build OTA update image
sdpackage          - build SDcard update image
all                - build all basic image
save               - save images and build info
allsave            - build all & firmware & updateimg & save
cleanall           - cleanup
post-rootfs        - trigger post-rootfs hook scripts
shell              - setup a shell for developing
help               - usage

Default option is 'allsave'.

总结一下脚本指令即可


./build.sh lunch
//1. rockchip_defconfig 
source envsetup.sh
//83. rockchip_rv1126_rv1109

./build.sh

./build.sh uboot
./build.sh kernel
./build.sh rootfs
./build.sh updateimg

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

旋风旋风

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值