2.6.24.3 2440 移植

准备:
kernel2.6.25:
ftp://ftp.eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.3.tar.bz2
YAFFS2:
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2.tar.gz?view=tar

cd /usr/src
tar -zxvf linux-2.6
tar -zxvf yaffs2.

________________________________________
编译器
export PATH=/usr/local/arm/3.4.1/bin:$PATH

vi ~/.bashrc
export PATH=/usr/local/arm/3.4.1/bin:$PATH
vi Makefile
_________________________________________________
2,修改Makefile
  ARCH = arm
  CROSS_COMPILE = /usr/local/arm/3.4.1/bin/arm-linux-
_________________________________________________
vivi> part show
mtdpart info. (4 partitions)
name              offset        size        flag
------------------------------------------------
vivi            : 0x00000000    0x00020000     0  128k
param           : 0x00020000    0x00010000     0   64k
kernel          : 0x00040000    0x001c0000     0    1M+768k
root            : 0x00200000    0x03cf8000    16   60M+992k
_________________________________________________
 

vim arch/arm/plat-s3c24xx/common-smdk.c

   
    [0] = {
        .name    = "vivi",
        .size    = SZ_128K,
        .offset    = 0,
    },
    [1] = {
        .name    = "param",
        .offset = SZ_128K,
        .size    = SZ_128K,
    },
    [2] = {
        .name    = "kernel",
        .offset = SZ_128K*2,
        .size    = SZ_1M+SZ_128K*6,
    },
    [3] = {
        .name    = "root",
        .offset    = SZ_2M,
        .size    = SZ_1M*250+SZ_128K,
    }
__________________________________
vi drivers/mtd/nand/nand_base.c
查找not recomm.... 把二行去掉(提示)
________________________________
第二步:修改nand flash的参数:
在同一个文件中找到
smdk_nand_info = {
.tacls=20,
.twrph0=60,
.twrph1=20,
...
}
改成
smdk_nand_info = {
.tacls=0,
.twrph0=30,
.twrph1=0,
...
}
___________________________
vi drivers/mtd/nand/s3c2410.c
s3c2410_nand_init_chip()函数,将其中的
chip->ecc.mode=NAND_ECC_SOFT;
改成
chip->ecc.mode=NAND_ECC_NONE;

___________________________
cd yaffs2
./patch-ker.sh c ../linux-2.6.25

vi fs/Kconfig
Pseudo filesystems

config DEVFS_FS
bool "/dev file system support(OBSOLETE)"
depends on EXPERIMENTAL
default y
help
the help from binnary.


config DEVFS_MOUNT
bool "automatically mount at boot"
depends on DEVFS_FS
default y
help
The help from Binnary.


config DEVFS_DEBUG
bool "Debug devfs"
depends on DEVFS_FS
help
The help from binnary.


cp arch/arm/configs/s3c2410_defconfig .config
make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux- zImage
_______________________________________________
内核修改:
Userspace binary formats
                [ ]Kernel support for a.out and ECOFF binaries (BINFMT_AOUT) (去除该选项)

Boot options(可不设置)
          Default kernel command string
           改成:
           noinitrd root=/dev/mtdblock3 rootfstype=yaffs console=ttySAC0,115200 init=/linuxrc
 [选中]       Lets Yaffs do its own ECC
[选中]Floating Point Emulator
__________________________________________________________
vivi
param set linux_cmd_line "initrd=0x30800000,0x440000 mem=64M root=/dev/mtdblock3 init=/linuxrc console=ttySAC0"
param save
net tftp 192.168.1.156 0x30008000 zImage
net flash kernel
net tftp 192.168.1.156 0x30008000 root_china.yaffs
net flash root

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/admyww/archive/2008/09/09/2906814.aspx

你可能感兴趣的:(command,Flash,System,Path,makefile,编译器)