Tiny6410 的内核移植(拿来主义)

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

  

你可能感兴趣的:(Tiny6410 的内核移植(拿来主义))