设为首页 加入收藏

TOP

Linux 2.6.36内核移植飞凌OK6410开发板步骤(一)
2014-11-24 07:32:36 来源: 作者: 【 】 浏览:1
Tags:Linux 2.6.36 内核 移植 OK6410 开发 步骤




开发板:飞凌OK6410 nandflash,Kernel:2.6.36.2


编译器:arm-linux-gcc-4.3.2.tgz


u-bootu-boot-1.1.6



注:编译器和u-boot 都是飞凌开发板自带的


二、 源码获得


内核源码到http://www.all.kernel.org/下载;


三、 移植步骤


1.Linux2.6.34.2内核源码放到工作目录文件夹下,并解压。


#tar xzvf linux2.6.36.2.tar.gz –c /
#pwd
/
# cd linux2.6.36.2


2. 修改内核源码根目录下的Makefile文件(CROSS_COMPILE =的值因个人情况而定,其他可以照做,蓝色部分为修改部分。)


#gedit Makefile


......
#SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
# -e s/arm.*/arm/ -e s/sa110/arm/ \
# -e s/s390x/s390/ -e s/parisc64/parisc/ \
# -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
......


#ARCH = $(SUBARCH)
#CROSS_COMPILE =


ARCH = arm
CROSS_COMPILE = /usr/local/arm/usr/local/arm/4.3.2/bin/arm-none-linux-
gnueabi-


3添加NandFlash分区信息.


修改arch/arm/mach-s3c64xx/mach-smdk6410.c文件,添加Nand Flash的分区信息和Nand Flash的硬件信息。(蓝色字体为添加部分)


#pwd


#gedit mach-smdk6410.c //add here 注意:此处的nandflash分区信息是飞凌自带的2.6.28的内核设置,由于此处要用到uboot是飞凌的,所以分区信息也要按人家的来 添加头文件 #include #include #include #include struct mtd_partition s3c_partition_info[] = {


{


.name = "Bootloader",


.offset = 0,


.size = (256*SZ_1K),


.mask_flags =MTD_CAP_NANDFLASH,


},


{


.name = "Kernel",


.offset = (256*SZ_1K),


.size = (4*SZ_1M) - (256*SZ_1K),


.mask_flags = MTD_CAP_NANDFLASH,


},


#if defined (CONFIG_SPLIT_ROOT_FILESYSTEM)


{


.name = "Rootfs",


.offset = (4*SZ_1M),


.size = (80*SZ_1M),//


},


#endif


{


.name = "File System",


.offset = MTDPART_OFS_APPEND,


.size = MTDPART_SIZ_FULL,


}


};


static struct s3c2410_nand_set s3c_nandset[]={


[0]= {


.name ="s3c24xx-nand",


.nr_chips = 1,


.nr_partitions =ARRAY_SIZE(s3c_partition_info),


.partitions =s3c_partition_info,


}


};


static struct s3c2410_platform_nand s3c_platform={


.tacls =25,


.twrph0 =55,


.sets = &s3c_nandset,


.nr_sets =ARRAY_SIZE(s3c_nandset),};


//add here


static struct platform_device *smdk6410_devices[] __initdata = {


#ifdef CONFIG_SMDK6410_SD_CH0


&s3c_device_hsmmc0,


#endif


#ifdef CONFIG_SMDK6410_SD_CH1


&s3c_device_hsmmc1,


#endif


&s3c_device_i2c0,


&s3c_device_i2c1,


&s3c_device_fb,


&s3c_device_ohci,


&s3c_device_usb_hsotg,


&s3c64xx_device_iisv4,


//add here


&s3c_device_nand,


首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Qt Embedded 4.6.2的安装和触摸屏.. 下一篇浅谈并行编程语言 Unified Parall..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis 分布式锁全解 (2025-12-25 17:19:51)
·SpringBoot 整合 Red (2025-12-25 17:19:48)
·MongoDB 索引 - 菜鸟 (2025-12-25 17:19:45)
·What Is Linux (2025-12-25 16:57:17)
·Linux小白必备:超全 (2025-12-25 16:57:14)