一. 简介
本文来说明 君正X1000内核源码的编译流程。
首先,进行配置。最后进行内核源码的编译工作。
二. X1000 Kernel 3.10 Linux V8.2配置并编译
1. 参考开发板
RD_X1000_HALLEY2_EXT/Baseboard_V2.0(SPI-nor JFFS2/SPI-nand UBI).
RD_X1000_HALLEY2_EXT/Baseboard_V4.1(SPI-nor JFFS2/SPI-nand UBI).
Tags:
ingenic-linux-kernel3.10.14-x1000-v8.2-20181116
2. 编译环境:ubuntu 14.04 64bit
初次使用Manhatton 工程需要进入工程目录执行以下命令安装编译需要的工具:
$ source build/envsetup.sh (初始化编译环境)
$ autoenvsetup
3. 配置内核源码并编译(即选择对应的开发板配置)
以halley2为例,整体编译SDK:
- 选择配置:
$ source build/envsetup.sh
$ lunch ### 选择相应的开发板, 如"halley2_norflash-eng"(开发板配置目录“device/halley2/”)
Lunch menu... pick a combo:
1. halley2_spinand-eng
2. halley2_spinand_ota-eng
3. halley2_norflash-eng
4. halley2_norflash_ota-eng
5. phoenix_spinand-eng
6. phoenix_spinand_ota-eng
7. phoenix_norflash-eng
8. phoenix_norflash_ota-eng
(2) 选择3,或4,编译
输入"make" 命令进行编译:
$ make
(3) 在 /out/product/halley2/image/ 下生成烧录所需要的文件:
system.*
u-boot-with-spl.bin
uImage
注意不支持make -jN 多线程编译,如果想加快编译速度,参见Manhattan编译系统 说明文档。
三. 单独编译uboot和kernel:
(1) 编译uboot
$ cd u-boot
$ make distclean
$ make halley2_uImage_sfc_nor ### 配置参考boards.cfg
生成目标文件“u-boot-with-spl.bin”
(2) 编译kernel
$ cd kernel
$ make halley2_linux_nor_defconfig ### 配置参考"ls arch/mips/configs/halley2*" 或 "ls arch/mips/configs/phoenix*"
$ make uImage
生成目标文件“arch/mips/boot/uImage”