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
本文来自博客园,作者:闹闹爸爸,转载请注明原文链接:https://www.cnblogs.com/wanglouxiaozi/p/9687467.html