找回密码
 立即注册
首页 业界区 安全 全志T527/A527 Linux系统镜像的编译与生成-盈鹏飞嵌入式 ...

全志T527/A527 Linux系统镜像的编译与生成-盈鹏飞嵌入式

汹萃热 2025-9-26 11:52:49
公司最近评估T527,使用的是盈鹏飞嵌入式的T527开发板-AHD-X527,该开发板支持4路AHD摄像头输入,也可以支持6路,不过需要增加一个转换板。恰好符合我们的应用。以下操作都是在该开发板上操作,该产品介绍如下:
AHD-X527产品特性:


  • 采用Allwinner公司Cortex-A55八核A527/T527处理器,运行最高速度为2.0GHZ(T527最高1.8GHZ);
  • 支持Mali-G57 MC1 GPU,支持OpenGL ES 3.2/2.0/1.0, Valkan 1.1,OpenCL 2.0
  • 支持4K/25fps H.264视频编码,支持4K/15fps MJPEG编码;
  • 多格式4K/60fps视频解码 (H.265,H.264,VC-1, MPEG-1/2/4, VP8) ;
  • 支持双屏异显;支持HDMI 2.0B, 分辨率最高4K@60fps;支持LVDS,分辨率最高1920x1080@60fps;支持MIPI DSI,分辨率最高2.5K@60fps(与LVDS复用);
  • 支持1-4G  Bytes LPDDR4X SDRAM;
  • 支持EMMC 8G-64G大容量电子盘,可启动;
  • 支持1路USB 3.0;支持3路USB2.0 HOST和一路OTG(TYPE-C接口);
  • 支持2路I2C(其中一路支持掉电唤醒)、2路PWM(应用于背光);
  • 支持双路千兆以太网;
  • 支持3G/4G通信;
  • 支持2路UART(TTL)、支持1路RS485、支持双路CAN BUS(2.0B,仅T527支持);
  • 支持4路AHD摄像头输入,最高分辨率为1080p;支持MIPI CSI接口-1x4-lane/2x2-lane;
  • 操作系统的支持,可预装Android13/LINUX 5.15/Ubuntu 22.04;
  • 尺寸为146X119MM
AHD-X527产品功能:

1.jpeg

Linux系统镜像编译与生成

2.1、配置编译选项

在LinuxSDK根目录下,执行如下命令,进行编译环境配置。配置完后,根据提示可以使用快捷键命令进行目录切换。
Host# source ./build/envsetup.sh
点击查看代码
  1. ping@embfly-server:~/work/a527_t527/TinaLinux$ source build/envsetup.sh
  2. NOTE: The SDK(/home/ping/work/a527_t527/TinaLinux) was successfully loaded
  3. load buildroot,dragonboard,bsp...ok
  4. Invoke . build/quick.sh from your shell to add the following functions to your environment:
  5.     croot / cl                     - Changes directory to the top of the tree
  6.     cbrandy                        - Changes directory to the brandy
  7.     cspl / cboot0                  - Changes directory to the spl
  8.     csbi[10|14] / copensbi[10|14]  - Changes directory to the opensbi
  9.     cu / cuboot / cboot            - Changes directory to the uboot
  10.     cubsp / cubootbsp / cbootbsp   - Changes directory to the uboot-bsp
  11.     carisc                         - Changes directory to the arisc
  12.     ck / ckernel                   - Changes directory to the kernel
  13.     cbsp                           - Changes directory to the bsp
  14.     cbsptest                       - Changes directory to the bsptest
  15.     cdts                           - Changes directory to the kernel's dts
  16.     cchip / cchips                 - Changes directory to the chip
  17.     cbin                           - Changes directory to the chip's bin
  18.     cboard / cconfigs / cbd        - Changes directory to the board
  19.     crootfs                        - Changes directory to the rootfs
  20.     cdsp                           - Changes directory to the dsp
  21.     crtos                          - Changes directory to the rtos
  22.     crtoshal / crtos-hal           - Changes directory to the rtos-hal
  23.     cbuild                         - Changes directory to the build
  24.     cbr                            - Changes directory to the buildroot
  25.     copenssl                       - Changes directory to the product's openssl-1.0.0
  26.     cout                           - Changes directory to the product's output
  27.     ckout / ckernelout             - Changes directory to the kernel output
  28. Usage: build.sh [args]
  29.     build.sh                       - default build all
  30.     build.sh bootloader            - only build bootloader
  31.     build.sh kernel                - only build kernel
  32.     build.sh buildroot_rootfs      - only build buildroot
  33.     build.sh uboot_menuconfig       - edit uboot menuconfig
  34.     build.sh uboot_saveconfig       - save uboot menuconfig
  35.     build.sh menuconfig            - edit kernel menuconfig
  36.     build.sh saveconfig            - save kernel menuconfig
  37.     build.sh recovery_menuconfig   - edit recovery menuconfig
  38.     build.sh recovery_saveconfig   - save recovery menuconfig
  39.     build.sh buildroot_menuconfig  - edit buildroot menuconfig
  40.     build.sh buildroot_saveconfig  - save buildroot menuconfig
  41.     build.sh clean                 - clean all
  42.     build.sh distclean             - distclean all
  43.     build.sh pack                  - pack firmware
  44.     build.sh pack_debug            - pack firmware with debug info output to card0
  45.     build.sh pack_secure           - pack firmware with secureboot
  46. Usage: pack [args]
  47.     pack                           - pack firmware
  48.     pack -d                        - pack firmware with debug info output to card0
  49.     pack -s                        - pack firmware with secureboot
  50.     pack -sd                       - pack firmware with secureboot and debug info output to card0
  51. ping@embfly-server:~/work/a527_t527/TinaLinux$
复制代码
执行如下命令,配置内核平台、文件系统类型、芯片型号等信息。当./build.sh config完成之后,编译系统会生成一个方案的编译规则,其保存在在longan根目录中的.buildconfig文件里面,系统会按照该文件的编译规则进行系统编译。Host#./build.sh config点击查看代码
  1. ping@embfly-server:~/work/a527_t527/TinaLinux$ ./build.sh config
  2. ========ACTION List: mk_config ;========
  3. options :
  4. All available platform:
  5.    0. android
  6.    1. linux
  7. Choice [linux]: 1
  8. All available linux_dev:
  9.    0. bsp
  10.    1. dragonboard
  11.    2. buildroot
  12.    3. debian
  13. Choice [buildroot]: 2
  14. All available ic:
  15.    0. a523
  16.    1. a527
  17.    2. t527
  18. Choice [t527]: 2
  19. All available board:
  20.    0. ahd_t527
  21.    1. demo_linux_aiot
  22.    2. demo_linux_aiot_nand
  23.    3. demo_linux_aiot_spinand
  24. Choice [ahd_t527]: 0
  25. All available flash:
  26.    0. default
  27.    1. nor
  28. Choice [default]: 0
  29. All available kern_name:
  30.    0. linux-5.10
  31.    1. linux-5.15
  32. Choice [linux-5.15]: 1
  33. Setup BSP files
  34. INFO: kernel relative recovery defconfig: ../../../../../device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_recovery_defconfig
  35. INFO: kernel absolute recovery defconfig: /home/ping/work/a527_t527/TinaLinux/device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_recovery_defconfig
  36. INFO: Prepare toolchain ...
  37. INFO: kernel defconfig: generate /home/ping/work/a527_t527/TinaLinux/out/t527/kernel/build/.config by /home/ping/work/a527_t527/TinaLinux/device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_defconfig
  38. INFO: Prepare toolchain ...
  39. make: Entering directory '/home/ping/work/a527_t527/TinaLinux/kernel/linux-5.15'
  40. make[1]: Entering directory '/home/ping/work/a527_t527/TinaLinux/out/t527/kernel/build'
  41.   GEN     Makefile
  42. *** Default configuration is based on '../../../../../device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_defconfig'
  43. #
  44. # No change to .config
  45. #
  46. make[1]: Leaving directory '/home/ping/work/a527_t527/TinaLinux/out/t527/kernel/build'
  47. make: Leaving directory '/home/ping/work/a527_t527/TinaLinux/kernel/linux-5.15'
  48. make: Entering directory '/home/ping/work/a527_t527/TinaLinux/buildroot/buildroot-202205'
  49.   GEN     /home/ping/work/a527_t527/TinaLinux/out/t527/ahd_t527/buildroot/buildroot/Makefile
  50. Config.in.legacy:232:warning: choice value used outside its choice group
  51. #
  52. # configuration written to /home/ping/work/a527_t527/TinaLinux/out/t527/ahd_t527/buildroot/buildroot/.config
  53. #
  54. make: Leaving directory '/home/ping/work/a527_t527/TinaLinux/buildroot/buildroot-202205'
  55. INFO: buildroot defconfig is sun55iw3p1_aiot_t527_defconfig
  56. INFO: clean buildserver
  57. INFO: prepare_buildserver
复制代码
备注(1):
All available linux_dev:

  • bsp
  • dragonboard
  • buildroot
  • debian
    Choice [buildroot]: 2
    本处是选择根文件系统,可以选择使用debian根文件系统,也可以使用buildroot的根文件系统,还可以选择dragonboard根文件系统(测试主板用的根文件系统)。因为我们是要使用buildroot的根文件系统,因此选择2;
备注(2):
All available ic:

  • a523
  • a527
  • t527
Choice [t527]: 2
本处是处理器,A527和T527是PIN TO PIN兼容的,如果您购买的产品是基于A527处理器的,那么请选择A527;
备注(3):
All available board:

  • ahd_t527
  • demo_linux_aiot
  • demo_linux_aiot_nand
  • demo_linux_aiot_spinand
这个步骤是选择您的板型,例如我司的板型是AHD_T527(基于T527的板子)。选择了板型,也就选择了板型对应的相关配置文件,例如dts文件等。ahd_t527的相关配置文件目录在
/device/config/chips/t527/configs/ahd_t527,该目录的内容如下:
点击查看代码
  1. ping@embfly-server:~/work/x527_aiot_v14/TinaLinux/device/config/chips/t527/configs/ahd_t527$ tree  -L 1
  2. .
  3. ├── arisc.config
  4. ├── bin
  5. ├── BoardConfig_c906.mk
  6. ├── BoardConfig.mk
  7. ├── board.dts -> linux-5.15/board.dts
  8. ├── boottone.fex
  9. ├── buildroot
  10. ├── debian
  11. ├── dragonboard
  12. ├── dtbo
  13. ├── linux-5.10
  14. ├── linux-5.15
  15. ├── sys_config_ddr_2GB.fex
  16. ├── sys_config.fex
  17. └── uboot-board.dts
复制代码
备注(4):
如过程中出现提示"ython:python: command not found",表示系统没有找到Python,参考如下步骤解决:
(1)检查是否安装了Python:
Host#        python --version
如果没有安装,可以执行如下命令进行安装Python(推荐安装Python3)。
Host#        sudo apt update
Host#        sudo apt install python3 -y
(2)执行如下命令,创建一个符号链接使系统将python指向python3。
Host#        sudo ln -s /usr/bin/python3 /usr/bin/python
备注(5):
配置完成后,在根目录下会生成一个.buildconfig文件,该文件保存了本次配置的参数。这些配置参数包括内核的编译配置文件、bootloader的编译配置文件、还有buildroot的配置参数(如选择buildroot根文件系统)等,可以通过核对该文件的内容保证配置的正确。例如:以下的配置指定了处理器器是a527,见LICHEE_IC=a527;指定的板型是ahd_a527,见LICHEE_BOARD=ahd_a527;指定了buildroot的编译配置是sun55iw3p1_aiot_a527_defconfig,见LICHEE_BR_DEFCONF=
sun55iw3p1_aiot_a527_defconfig;指定了u-boot的编译配置是buildroot的编译配置是sun55iw3p1_a527_axp717b_defconfig ,见
LICHEE_BRANDY_DEFCONF=sun55iw3p1_a527_axp717b_defconfig
点击查看代码
  1. export LICHEE_PLATFORM=linux
  2. export LICHEE_LINUX_DEV=buildroot
  3. export LICHEE_IC=a527
  4. export LICHEE_BOARD=ahd_a527
  5. export LICHEE_FLASH=default
  6. export LICHEE_KERN_NAME=linux-5.15
  7. export LICHEE_KERNEL_ARCH=arm64
  8. export LICHEE_ARCH=arm64
  9. export LICHEE_KERN_VER=linux-5.15
  10. export LICHEE_KERNEL_VERSION=5.15.147
  11. export LICHEE_KERN_DEFCONF=bsp_defconfig
  12. export LICHEE_KERN_DEFCONF_RT=
  13. export LICHEE_BUILDING_SYSTEM=buildroot
  14. export LICHEE_BR_VER=202205
  15. export LICHEE_BR_DEFCONF=sun55iw3p1_aiot_a527_defconfig
  16. export LICHEE_DEFCONFIG_FRAGMENT=
  17. export LICHEE_PRODUCT=
  18. export LICHEE_BRANDY_VER=2.0
  19. export LICHEE_BRANDY_DEFCONF=sun55iw3p1_a527_axp717b_defconfig
  20. export LICHEE_BRANDY_UBOOT_VER=
  21. export LICHEE_BRANDY_BUILD_OPTION=
  22. export LICHEE_COMPILER_TAR=aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz
  23. export LICHEE_ROOTFS=target-arm64-10.3
  24. export LICHEE_RAMFS=
  25. export LICHEE_BUSSINESS=
  26. export LICHEE_BR_RAMFS_CONF=
  27. export LICHEE_CHIP=sun55iw3p1
  28. export LICHEE_RTOS_PROJECT_NAME=
  29. export LICHEE_DSP_PROJECT_NAME=
  30. export LICHEE_PACK_HOOK=
  31. export LICHEE_PACK_SECURE_TYPE=
  32. export LICHEE_REDUNDANT_ENV_SIZE=
  33. export LICHEE_BRANDY_SPL=
  34. export LICHEE_COMPRESS=
  35. export LICHEE_NO_RAMDISK_NEEDED=
  36. export LICHEE_RAMDISK_PATH=
  37. export LICHEE_KERN_DEFCONF_RECOVERY=bsp_recovery_defconfig
  38. export LICHEE_USE_INDEPENDENT_BSP=true
  39. export LICHEE_INDEPENDENT_PACK=
  40. export LICHEE_BOOT0_BIN_NAME=
  41. export LICHEE_EFEX_BIN_NAME=
  42. export LICHEE_EFEX_DEFCONF=
  43. export ANDROID_CLANG_PATH=
  44. export ANDROID_TOOLCHAIN_PATH=
  45. export ANDROID_CLANG_ARGS=
  46. export LICHEE_BSP_STAGING=
  47. export LICHEE_GEN_BOOT0_DTS_INFO=
  48. export LICHEE_KERN_SYSTEM=
  49. export LICHEE_KERN_DEFCONF_RELATIVE=../../../../../device/config/chips/a527/configs/ahd_a527/linux-5.15/bsp_defconfig
  50. export LICHEE_KERN_DEFCONF_ABSOLUTE=/home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/configs/ahd_a527/linux-5.15/bsp_defconfig
  51. export LICHEE_KERN_DEFCONF_RECOVERY_RELATIVE=../../../../../device/config/chips/a527/configs/ahd_a527/linux-5.15/bsp_recovery_defconfig
  52. export LICHEE_KERN_DEFCONF_RECOVERY_ABSOLUTE=/home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/configs/ahd_a527/linux-5.15/bsp_recovery_defconfig
  53. export LICHEE_CROSS_COMPILER=aarch64-none-linux-gnu
  54. export LICHEE_TOP_DIR=/home/ping/work/x527_aiot_v14/TinaLinux
  55. export LICHEE_CBBPKG_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/platform
  56. export LICHEE_BRANDY_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/brandy/brandy-2.0
  57. export LICHEE_BUILD_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/build
  58. export LICHEE_BR_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/buildroot/buildroot-202205
  59. export LICHEE_DEVICE_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/device
  60. export LICHEE_KERN_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/kernel/linux-5.15
  61. export LICHEE_BSP_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/bsp
  62. export BSP_TOP=
  63. export LICHEE_PLATFORM_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/platform
  64. export LICHEE_SATA_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/test/SATA
  65. export LICHEE_DRAGONABTS_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/test/dragonabts
  66. export LICHEE_DRAGONBAORD_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/test/dragonboard
  67. export LICHEE_TOOLS_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/tools
  68. export LICHEE_COMMON_CONFIG_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/device/config/common
  69. export LICHEE_CHIP_CONFIG_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527
  70. export LICHEE_BOARD_CONFIG_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/configs/ahd_a527
  71. export LICHEE_PRODUCT_CONFIG_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/device/target/
  72. export LICHEE_OUT_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/out
  73. export LICHEE_BRANDY_OUT_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/bin
  74. export LICHEE_BR_OUT=/home/ping/work/x527_aiot_v14/TinaLinux/out/a527/ahd_a527/buildroot/buildroot
  75. export LICHEE_PACK_OUT_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/out/a527/ahd_a527/pack_out
  76. export LICHEE_TOOLCHAIN_PATH=/home/ping/work/x527_aiot_v14/TinaLinux/out/toolchain/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu
  77. export LICHEE_PLAT_OUT=/home/ping/work/x527_aiot_v14/TinaLinux/out/a527/ahd_a527/buildroot
  78. export LICHEE_BOARDCONFIG_PATH="/home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/configs/default/BoardConfig.mk /home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/configs/ahd_a527/BoardConfig.mk /home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/configs/ahd_a527/buildroot/BoardConfig.mk /home/ping/work/x527_aiot_v14/TinaLinux/out/BoardConfig-select.mk /home/ping/work/x527_aiot_v14/TinaLinux/device/config/chips/a527/configs/default/BoardConfig-conditions.mk"
  79. export LICHEE_ARISC_PATH=/home/ping/work/x527_aiot_v14/TinaLinux/brandy/arisc
  80. export LICHEE_DRAMLIB_PATH=/home/ping/work/x527_aiot_v14/TinaLinux/brandy/dramlib
  81. export LICHEE_KERN_TYPE=
  82. export LICHEE_POSSIBLE_BIN_PATH="bin /bin configs/ahd_a527/bin configs/ahd_a527//bin configs/ahd_a527/buildroot/bin configs/ahd_a527/buildroot//bin"
  83. export QT_INSTALL_DIR=/home/ping/work/x527_aiot_v14/TinaLinux/out/a527/ahd_a527/buildroot/buildroot/host/usr/bin
复制代码
2.2、编译LinuxSDK

2.2.1、全局编译LinuxSDK

根据实际项目需要,配置完内核选项以及文件系统选项。在LinuxSDK根目录下执行如下命令,可一键编译SPL、U-Boot、Linux内核和文件系统。
Host#  ./build.sh
等待编译完成,完成界面如下所示:
点击查看代码
  1. ……
  2. Created filesystem with 9199/131072 inodes and 245346/524288 blocks
  3. /home/ping/work/x527_aiot_v14/TinaLinux/build/bin/make_ext4fs -s -l 2147483648 /home/ping/work/x527_aiot_v14/TinaLinux/out/a527/ahd_a527/buildroot/rootfs.ext4  /home/ping/work/x527_aiot_v14/TinaLinux/out/a527/ahd_a527/buildroot/buildroot/target
  4. Error: max_leb_cnt too low (2544 needed)
  5. Parallel mksquashfs: Using 32 processors
  6. Creating 4.0 filesystem on /home/ping/work/x527_aiot_v14/TinaLinux/out/a527/ahd_a527/buildroot/rootfs.squashfs, block size 131072.
  7. Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
  8.         compressed data, compressed metadata, compressed fragments, no xattrs
  9.         duplicates are removed
  10. Filesystem size 215811.70 Kbytes (210.75 Mbytes)
  11.         35.76% of uncompressed filesystem size (603444.42 Kbytes)
  12. Inode table size 79730 bytes (77.86 Kbytes)
  13.         25.45% of uncompressed inode table size (313282 bytes)
  14. Directory table size 87710 bytes (85.65 Kbytes)
  15.         43.01% of uncompressed directory table size (203953 bytes)
  16. Number of duplicate files found 90
  17. Number of inodes 8727
  18. Number of files 6982
  19. Number of fragments 795
  20. Number of symbolic links  1142
  21. Number of device nodes 0
  22. Number of fifo nodes 0
  23. Number of socket nodes 0
  24. Number of directories 603
  25. Number of ids (unique uids + gids) 1
  26. Number of uids 1
  27.         root (0)
  28. Number of gids 1
  29.         root (0)
  30. INFO: pack rootfs ok ...
  31. INFO: ----------------------------------------
  32. INFO: build OK.
  33. INFO: ----------------------------------------
复制代码
执行如下命令,打包生成Linux系统镜像文件。将新生成的系统镜像固化至核心板即可更新系统。
Host#  ./build.sh pack
点击查看代码
  1. ……
  2. Begin Parse sys_partion.fex
  3. AddPartion boot-resource.fex BOOT-RESOURCE_FEX
  4. AddPartion very boot-resource.fex BOOT-RESOURCE_FEX
  5. FilePath: boot-resource.fex
  6. FileLength=b75400
  7. AddPartion env.fex ENV_FEX000000000
  8. AddPartion very env.fex ENV_FEX000000000
  9. FilePath: env.fex
  10. FileLength=20000
  11. AddPartion boot.fex BOOT_FEX00000000
  12. AddPartion very boot.fex BOOT_FEX00000000
  13. FilePath: boot.fex
  14. FileLength=19e0800
  15. AddPartion rootfs.fex ROOTFS_FEX000000
  16. AddPartion very rootfs.fex ROOTFS_FEX000000
  17. FilePath: rootfs.fex
  18. FileLength=39ffeb78
  19. BuildImg0
  20. Dragon execute image.cfg SUCCESS !
  21. ----------image is at----------
  22. 1.1G    /home/ping/work/x527_aiot_v14/TinaLinux/out/a527_linux_ahd_a527_uart0.img
复制代码
最后生成的镜像位于目录out目录下。
2.2.2、编译某buildroot组件报错的解决办法

如编译过程中出现某个buildroot组件报错,按照如下办法进行处理。编译buildroot某个组件时,都会在对应组件目录生成如下几个文件,例如:以编译ahd_a527板型(a527的处理器)产品时bluez5_utils-5.54的组件为例(编译该组件的目录是/out/a527/ahd_a527/buildroot/buildroot/build/bluez5_utils-5.54),这些文件分别是.stamp_downloaded/.stamp_extracted/.stamp_built/.stamp_configured/.stamp_installed/.stamp_patched/.stamp_staging_installed/.stamp_target_installed等以.stamp_开头的隐藏文件(查看请使用ls -al指令),它们的命名分别体现了一个buildroot组件编译的整个过程,例如:.stamp_built表示编译过程;.stamp_configured表示配置过程;.stamp_patched表示打补丁的过程;.stamp_downloaded表示下载过程。如果您编译过程中报一个莫名奇妙的问题,有可能是编译过程出错,您希望重新编译该代码,办法是删除.stamp_built这个文件,即可重新编译该组件,同时会把编译好的文件安装到target的根文件系统。如果您增加了一个补丁,那么您要删除.stamp_patched文件,表示打补丁过程没有完成,那么编译系统就会重新打补丁,然后走完编译该组件的所有过程。
2.2.3、清除编译生成文件

如如果生成一个新板型的固件,需要执行如下命令清除所有之前生成的文件,重新进行编译。
Host#  ./build.sh distclean
Host#  ./build.sh
2.2.4、单独编译u-boot或者内核等

如需单独编译U-Boot、Linux内核或文件系统,可参照本章节内容进行局部编译。
(1)U-Boot编译
在LinuxSDK根目录下执行如下命令,单独编译U-Boot,并打包生成新的Linux系统镜像。
Host# ./build.sh bootloader
Host# ./build.sh pack
(2)内核编译
在LinuxSDK根目录下执行如下命令,单独编译Linux内核,并打包生成新的Linux系统镜像。
Host# ./build.sh kernel
Host# ./build.sh pack
(3)文件系统编译
在LinuxSDK安装目录下执行如下命令,单独编译文件系统,并打包生成新的Linux系统镜像。
Host#  ./build.sh buildroot
Host#  ./build.sh pack

来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

相关推荐

您需要登录后才可以回帖 登录 | 立即注册