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


    主要参考:Rockchip_Developer_Guide_Linux_Software_CN.pdf /

    SDK-Rockchip_RV1126_RV1109_Quick_Start_Linux_CN.pdf

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

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

    gcc一定切到对应的

    1. arm-linux-gnueabihf-gcc -v
    2. Using built-in specs.
    3. COLLECT_GCC=arm-linux-gnueabihf-gcc
    4. 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
    5. Target: arm-linux-gnueabihf
    6. 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
    7. Thread model: posix
    8. gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)

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

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

     这里要选择编译的主板

    1. ./build.sh lunch
    2. You're building on Linux
    3. Lunch menu...pick a combo:
    4. 1. rockchip_defconfig
    5. 2. rockchip_38x38_emmc_defconfig
    6. 3. rockchip_38x38_spi_nand_ab_defconfig
    7. 4. rockchip_38x38_spi_nand_defconfig
    8. 5. rockchip_ab_v13_defconfig
    9. 6. rockchip_battery_evb_defconfig
    10. 7. rockchip_robot_defconfig
    11. 8. rockchip_sl_defconfig
    12. 9. rockchip_slc_nand_v12_defconfig
    13. 10. rockchip_sllock_defconfig
    14. 11. rockchip_spi_nand_defconfig
    15. 12. rockchip_spi_nor_tb_v13_defconfig
    16. 13. rockchip_spi_nor_v12_defconfig
    17. 14. rockchip_tb_v13_defconfig
    18. 15. rockchip_trailcamera_defconfig
    19. 16. rockchip_v10_v11_defconfig
    20. 17. rockchip_v12_defconfig
    21. Which would you like? [1]:
    22. //1. rockchip_defconfig

    1. rockchip_defconfig 

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

     

     根据文档选.

    环境变量 

    1. source envsetup.sh
    2. Top of tree: /home/sdk/work/rk/rv1126_rv1109
    3. You're building on Linux
    4. Lunch menu...pick a combo:
    5. 0. non-rockchip boards
    6. ......
    7. 77. rockchip_rv1126_battery_evb
    8. 78. rockchip_rv1126_evb_dualcam_tb
    9. 79. rockchip_rv1126_evb_spi_nor_tb
    10. 80. rockchip_rv1126_evb_tb
    11. 81. rockchip_rv1126_robot
    12. 82. rockchip_rv1126_robot_recovery
    13. 83. rockchip_rv1126_rv1109
    14. 84. rockchip_rv1126_rv1109_cvr
    15. 85. rockchip_rv1126_rv1109_facial_gate
    16. 86. rockchip_rv1126_rv1109_libs
    17. 87. rockchip_rv1126_rv1109_ramboot_uvcc
    18. 88. rockchip_rv1126_rv1109_recovery
    19. 89. rockchip_rv1126_rv1109_sl
    20. 90. rockchip_rv1126_rv1109_spi_nand
    21. 91. rockchip_rv1126_rv1109_spi_nand_recovery
    22. 92. rockchip_rv1126_rv1109_tiny
    23. 93. rockchip_rv1126_rv1109_uvcc
    24. 94. rockchip_rv1126_rv1109_uvcc_spi_nand
    25. 95. rockchip_rv1126_rv1109_uvcc_spi_nor
    26. 96. rockchip_rv1126_sllock
    27. 97. rockchip_rv1126_snapshot
    28. 98. rockchip_rv1126_trailcamera
    29. Which would you like? [0]: 83

     83. rockchip_rv1126_rv1109

    ///

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

    1. sdk@ubuntu:~/work/rk/rv1126_rv1109$ ./build.sh -h
    2. Usage: build.sh [OPTIONS]
    3. Available options:
    4. app-clean - clean buildroot app
    5. app-rebuild - rebuild buildroot app
    6. app-sync - sync buildroot app
    7. lunch - choose defconfig
    8. *_defconfig - switch to specified defconfig
    9. Available defconfigs:
    10. rockchip_38x38_emmc_defconfig
    11. rockchip_38x38_spi_nand_ab_defconfig
    12. rockchip_38x38_spi_nand_defconfig
    13. rockchip_ab_v13_defconfig
    14. rockchip_battery_evb_defconfig
    15. rockchip_defconfig
    16. rockchip_robot_defconfig
    17. rockchip_sl_defconfig
    18. rockchip_slc_nand_v12_defconfig
    19. rockchip_sllock_defconfig
    20. rockchip_spi_nand_defconfig
    21. rockchip_spi_nor_tb_v13_defconfig
    22. rockchip_spi_nor_v12_defconfig
    23. rockchip_tb_v13_defconfig
    24. rockchip_trailcamera_defconfig
    25. rockchip_v10_v11_defconfig
    26. rockchip_v12_defconfig
    27. olddefconfig - resolve any unresolved symbols in .config
    28. savedefconfig - save current config to defconfig
    29. menuconfig - interactive curses-based configurator
    30. kernel - build kernel
    31. modules - build kernel modules
    32. linux-headers - build linux-headers
    33. loader - build loader (uboot|spl)
    34. uboot - build u-boot
    35. spl - build spl
    36. uefi - build uefi
    37. wifibt - build Wifi/BT
    38. rootfs - build rootfs (default is buildroot)
    39. buildroot - build buildroot rootfs
    40. yocto - build yocto rootfs
    41. debian - build debian rootfs
    42. recovery - build recovery
    43. pcba - build PCBA
    44. security_check - check contidions for security features
    45. createkeys - build secureboot root keys
    46. security_uboot - build uboot with security paramter
    47. security_boot - build boot with security paramter
    48. security_recovery - build recovery with security paramter
    49. security_rootfs - build rootfs and some relevant images with security paramter (just for dm-v)
    50. firmware - generate and check firmwares
    51. updateimg - build update image
    52. otapackage - build OTA update image
    53. sdpackage - build SDcard update image
    54. all - build all basic image
    55. save - save images and build info
    56. allsave - build all & firmware & updateimg & save
    57. cleanall - cleanup
    58. post-rootfs - trigger post-rootfs hook scripts
    59. shell - setup a shell for developing
    60. help - usage
    61. Default option is 'allsave'.

    总结一下脚本指令即可

    1. ./build.sh lunch
    2. //1. rockchip_defconfig 
    3. source envsetup.sh
    4. //83. rockchip_rv1126_rv1109
    5. ./build.sh
    6. ./build.sh uboot
    7. ./build.sh kernel
    8. ./build.sh rootfs
    9. ./build.sh updateimg

  • 相关阅读:
    html转pdf(总结五种方法Java)
    JD-怎样获取别人家店铺商品的API接口呢??
    云计算面试题【后期】
    如何检测和克服MLOps中的模型漂移
    本机idea连接虚拟机中的Hbase
    Redis入门到通关之Redis数据结构-List篇
    云计算安全的新挑战:零信任架构的应用
    求解答 sql 的行有条件复制数据
    【ACM学习】【STL】关联容器基本功能
    商业新闻|你还在用传统搜索引擎吗?
  • 原文地址:https://blog.csdn.net/longmin96/article/details/133033962