minis3c2440移植之内核移植
一、将linux-2.6.18.tar内核源代码的压缩包拷贝到linux的根目录下进行解压,然后进入linux-2.6.18的目录下修改配置文件。
二、修改Makefile配置文件
1、第176行
2、第177行
三、在linux-2.6.18的目录下打开终端执行
四、打开终端在linux-2.6.18的目录下执行make menuconfig的操作,修改内核配置文件(说明:括号前面加*表示选中该选项)
1、System Type
2、System Type
[*] SMDK2440和[*]
3、Floating point emulation
4、Device Drivers
5、Device Drivers
6、Device Drivers
7、Device Drivers
8、Device Drivers
[*] Samsung S3C2410/S3C2440/S3C2442/S3C2412 Serial port support
[*]
9、File systems
[*]
[*]
[*]
10、File systems--->Network File Systems
11、File systems--->Miscellaneous filesystems--->选中文件系统类型[*] Compressed ROM file system support (cramfs),烧录的时候的文件系统为root. Cramfs。
12、File systems---> Pseudo filesystems
五、在linux-2.6.18的目录flash分区等配置文件的修改:
1、在arch/arm/mach-s3c2410/目录下的common-smdk2440.c中第194行中将修改为s3c24xx_init_clocks(12000000);//初始化实时时钟的时间
2、在arch/arm/mach-s3c2410/目录下的common-smdk.c修改flash分区为:
static struct mtd_partition smdk_default_nand_part[] = {
};
六、编译内核生成uImage
1、在linux-2.6.18下make clean;
2、然后将u-boot-2009.08/tools下的mkimage拷贝到/bin目录下,因为uImage由二进制文件zImage生成,而此时/bin下没有整个二进制命令。
3、然后再在linux-2.6.18下make uImage,编译通过之后就会在linux-2.6.18/arch/arm/boot下生成二进制文件uImage。
评论