按照韦东山课程上说的进行内核比编译的时候出现了如下的错误:
使用的开发板是jz2440但是编译选项中只有 s3c2440的选项
andrew@andrew-Thurley:/work/svn_linux/linux$ make s3c2410_defconfig
Makefile:416: *** mixed implicit and normal rules: deprecated syntax
Makefile:1449: *** mixed implicit and normal rules: deprecated syntax
make: *** No rule to make target 's3c2410_defconfig'。 停止。
这种警告经过百度是因为,安装的make版本太新了,你有两种解决方案:
- 安装老板的make这是和多人都不愿意做的
- 更改makefile规则
我采用的是第二个:
步骤如下:
根据错误提示:
修改416行和1449行
416修改前
config %config: scripts_basic outputmakefile FORCE1
416行修改后:
%config: scripts_basic outputmakefile FORCE1
1449 行修改前:
/ %/: prepare scripts FORCE1
1449 行修改后:
%/: prepare scripts FORCE
修改后编译会出现:
S3C2410 UART to use for low-level debug (DEBUG_S3C2410_UART) [0] 0
*
* Security options
*
Enable access key retention support (KEYS) [N/y/?] n
Enable different security models (SECURITY) [N/y/?] n
*
* Cryptographic options
*
Cryptographic API (CRYPTO) [N/y/?] n
*
* Library routines
*
CRC-CCITT functions (CRC_CCITT) [N/m/y/?] n
CRC16 functions (CRC16) [N/m/y/?] n
CRC ITU-T V.41 functions (CRC_ITU_T) [N/m/y/?] n
CRC32 functions (CRC32) [Y/?] y
CRC32c (Castagnoli, et al) Cyclic Redundancy-Check (LIBCRC32C) [N/m/y/?] n
#
# configuration written to .config
#
从最后一句可以看出,最后的文件写进了 .config 文件:
紧接着执行:
make menuconfig
若是出现错误,多半是因为你缺少库文件,使用如下命令:
sudo apt-get install libncurses5-dev libncursesw5-dev
安装好依赖的库文件就可以使用
make menuconfig
进行编译了:
执行之后会出现如下界面:
这样就可以,在make s3c2410_defconfig 的基础之上,进行菜单配置的修改了,而不是使用菜单对每一项进行配置。
或者直接使用厂家提供的文件,进行编译:
cp config_ok .config
在经过上述过程之后,编译
make uImage
会出现
"mkimage" command not found - U-Boot images will not be built
提示缺少 mkimage,命令,这个命令是在编译u-boot的时候生成的,只需要将u-boot/tools/mkimage文件拷贝到你电脑的/usr/bin/目录中即可;
再次编译会在指定的目录下生成 uImage文件
编译成功之后会提示是你生成文件的目录:
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
Image arch/arm/boot/uImage is ready