¿ª·¢°å£º·ÉÁèOK6410 nandflash,Kernel:2.6.36.2
±àÒëÆ÷£ºarm-linux-gcc-4.3.2.tgz
u-boot£ºu-boot-1.1.6
×¢£º±àÒëÆ÷ºÍu-boot ¶¼ÊÇ·ÉÁ迪·¢°å×Ô´øµÄ
¶þ¡¢ Ô´Âë»ñµÃ
ÄÚºËÔ´Âëµ½http://www.all.kernel.org/ÏÂÔØ£»
Èý¡¢ ÒÆÖ²²½Ö裺
1.½«Linux2.6.34.2ÄÚºËÔ´Âë·Åµ½¹¤×÷Ŀ¼Îļþ¼ÐÏ£¬²¢½âѹ¡£
#tar xzvf linux2.6.36.2.tar.gz ¨Cc /
#pwd
/
# cd linux2.6.36.2
2. ÐÞ¸ÄÄÚºËÔ´Âë¸ùĿ¼ÏµÄMakefileÎļþ£¨CROSS_COMPILE =µÄÖµÒò¸öÈËÇé¿ö¶ø¶¨£¬ÆäËû¿ÉÒÔÕÕ×ö£¬À¶É«²¿·ÖΪÐ޸IJ¿·Ö¡££©
#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,