Ambarella SDK build 步驟解析


Make Target Options

make命令如下:

make <Tab> <Tab>  /*列出所有支持的目標(命令行輸入make, 再按兩下Tab鍵)*/
make <Target>     /*編譯特定的目標*/
make -jN          /*使用多核CPU構建*/

 

下面列出了一些最常用的目標:

make defconfig_public_linux  /*使用默認的kernel配置*/
make menuconfig_public_linux /*顯示kernel配置界面*/
make menuconfig              /*顯示amboot配置界面*/
make show_configs            /*顯示所有配置文件*/
make sync_build_mkcfg        /*准備 make 文件和 AmbaConfig 文件*/
make amboot                  /*Build Amboot*/
make linux                   /*Build Linux Kernel*/
make prepare_private_drivers /*Prepare private drivers*/
make build_private_drivers   /*Build private drivers*/
make clean_private_drivers   /*Clean private drivers*/
make clean                   /*Delete out directory*/
make distclean               /*Delete all temporary objects in compilation*/
make rtsp_server             /*Compile the program rtsp_server*/

 

編譯

進入到 h2_linux_sdk/ambarella/boards/h2_everest 目錄下,依次執行以下步驟,即可編譯出所需image。

# make sync_build_mkcfg            /* prepare the make file and AmbaConfig file*/
# make h2everest_broadcast_config  /*生成amboot的 .config 文件*/
# make defconfig_public_linux      /*使用默認的kernel配置(ambarella_h2_defconfig)*/
# make -j8

 

修改amboot配置

在執行完'make h2everest_broadcast_config'后,amboot的配置文件.config生成,需要對amboot的配置進行修改的話,執行:

# make menuconfig

執行完以后 'make -j8'編譯即可。

 

可以把修改生成的.config拷貝成h2everest_XXX_config,以后直接執行:

make h2everest_XXX_config

來生成amboot的.config,非常方便。

修改kernel配置

進入到 h2_linux_sdk/ambarella/boards/h2_everest目錄下,

1.clean up the old target template
# make clean    

 

2.apply the default kernel configuration
# make defconfig_public_linux

 

3.display and modify the kernel configuration according to the requirement
# make menuconfig_public_linux  

 

4.create the specific kernel configuration
# mkdir config/kernel
# cp     -dpRf      ../../out/h2_everest/kernel/linux-4.4_everest/.config        config/kernel/ambarella_XXX_defconfig
# make menuconfig
  [*] Ambarella Linux Configuration  ---> 
     (ambarella_XXX_defconfig) Linux Default Configuration

 

5.rebuild the firmware
# make -j8

 

注意:

[*] Ambarella Linux Configuration  ---> 
     (ambarella_XXX_defconfig) Linux Default Configuration
  • 執行'make menuconfig'可以選擇默認的kernel配置文件,上述選的就是ambarella_XXX_defconfig文件;
  • 'make defconfig_public_linux'執行的操作是拷貝ambarella_XXX_defconfig到ambarella/out/h2_everest/kernel/linux-4.4_everest/下,拷貝后的文件為.config;
  • 'make menuconfig_public_linux'命令對kernel配置進行修改,此時修改的配置文件是ambarella/out/h2_everest/kernel/linux-4.4_everest/.config


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM