1下載linux-2.6.38的源碼,ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.tar.bz2
2解壓 tar xvfj /mnt/Ubuntu/linux-2.6.38.tar.bz2 -C .
3vi Makefile 191行改為 ARCH ?= arm
4cp arch/arm/configs/s3c6400_defconfig .config(如果省略的話,後面會找不到System Type)
5make menuconfig
General setup->(/usr/4.5.1/bin/arm-linux-) Cross-compiler tool prefix 我將編譯器解壓到了/usr/4.5.1目錄
System Type->[*] MINI6410 選上,其他的可以去掉,不確定的可以參考友善之臂的
6 拷貝友善的drivers/mtd/nand/s3c_nand.c
arch/arm/plat-samsung/include/plat/regs-nand.h
drivers/mtd/nand/s3c_nand_mlc.fo
drivers/mtd/nand/nand_base.c
到相應的文件夾下
7修改drivers/mtd/nand/Kconfig,我也不願意改了,直接拷貝掉了
8drivers/mtd/nand/Makefile中20行增加
obj-$(CONFIG_MTD_NAND_S3C) += s3c_nand.o
末尾再增加
S3C_NAND_MLC_SRC = $(shell ls drivers/mtd/nand/s3c_nand_mlc.c 2>/dev/null)
ifeq ($(S3C_NAND_MLC_SRC),)
obj-$(CONFIG_MTD_NAND_S3C) += s3c_nand_mlc.fo
else
obj-$(CONFIG_MTD_NAND_S3C) += s3c_nand_mlc.o
endif
這步要是不願意改的話,直接拷貝覆蓋即可
9然後再make
menuconfig
Device Drivers--->
<*> Memory Technology Device (MTD) support --->
[*] MTD partitioning support
[*] Command line partition table parsing
<*> Direct char device access to MTD devices
<*> Caching block device access to MTD devices
<*> NAND Device Support --->
< > NAND Flash support for Samsung S3C SoCs 去掉不要選
<*> NAND Flash support for S3C SoC
[*] S3C NAND Hardware ECC