日期:2014-05-16  浏览次数:20673 次

嵌入式linux移植总结

修改并编译内核

增加或修改arch/xx/mach-xx.c文件,

修改MACHINE_START第一个参数为ID,

在static void __init xx_map_io(void)中修改时钟s3c24xx_init_clocks(12000000);

修改nand信息在static struct mtd_partition smdk_default_nand_part[]修改分区信息,和static struct s3c2410_nand_set smdk_nand_sets[]中.partitions  = smdk_default_nand_part,static struct s3c2410_platform_nand mini6410_nand_info中.sets  = mini6410_nand_sets,static void __init mini6410_machine_init(void)中设置nand信息s3c_nand_set_platdata(&mini6410_nand_info),static struct platform_device *mini6410_devices[] __initdata中添加nand驱动&s3c_device_nand

在arch/tools/mach-types中增加ID:名字 Kconfig宏 mach-xx.c中START的ID 编号

在Kconfig中增加,config节点

在Makefile中增加,obj-$(CONFIG_MACH_xx)+= mach-xx.o

添加yaffs驱动补丁

配置内核,make menuconfig,添加yaffs驱动、增加eabi接口支持

编译内核,make zImage

构建根文件系统

基础目录bin,lib,etc,proc,sys,dev,usr,sbin,tmp,mnt,

建立基础设备consol(c 5 1),null(c 1 3)

编译busybox,make menuconfig

编译安装bootloader

建立/board/xx/xx目录

修改机器码include/asm-arm/mach-types.h

顶级Makefile中增加xx_config : unconfig
 @$(MKCONFIG) $(@:_config=) arm  xx samsung s3c64xx

board/xx/Makefile中增加COBJS := xx.o flash.o

在cpu/xx/start.S和xx.c中修改时钟

修改串口速率cpu/xx/xx/speed.c