编译该版本内核使用的编译器版本:arm-linux-gcc 3.4.1

1.获取linux-2.6.32.2

2.解压内核

3.切换到刚解压的内核目录下:

cd linux-2.6.32.2

4.修改Makefile

将以下内容修改:

修改前:

ARCH            ?= $(SUBARCH)
CROSS_COMPILE   ?=
修改后:

ARCH            ?= arm
CROSS_COMPILE   ?= arm-linux-

5.使用以下命令生成.config

make s3c2410_defconfig

6.修改平台输入时钟,由于qq2440的输入时钟为12MHz的无源晶振,故修改arch/arm/mach-s3c2440/mach-smdk2440.c文件的以下内容:

修改前:

static void __init smdk2440_map_io(void)
{
        s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
        s3c24xx_init_clocks(16934400);
        s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
}
修改后:

static void __init smdk2440_map_io(void)
{
        s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
        s3c24xx_init_clocks(12000000);//修改了原来的数据为12000000
        s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
}
7.修改mtd分区信息,修改arch/arm/plat-s3c24xx/common-smdk.c文件的以下内容:

修改前:

static struct mtd_partition smdk_default_nand_part[] = {
        [0] = {
                .name   = "Boot Agent",
                .size   = SZ_16K,
                .offset = 0,
        },
        [1] = {
                .name   = "S3C2410 flash partition 1",
                .offset = 0,
                .size   = SZ_2M,
        },
        [2] = {
                .name   = "S3C2410 flash partition 2",
                .offset = SZ_4M,
                .size   = SZ_4M,
        },
        [3] = {
                .name   = "S3C2410 flash partition 3",
                .offset = SZ_8M,
                .size   = SZ_2M,
        },
 [4] = {
                .name   = "S3C2410 flash partition 4",
                .offset = SZ_1M * 10,
                .size   = SZ_4M,
        },
        [5] = {
                .name   = "S3C2410 flash partition 5",
                .offset = SZ_1M * 14,
                .size   = SZ_1M * 10,
        },
        [6] = {
                .name   = "S3C2410 flash partition 6",
                .offset = SZ_1M * 24,
                .size   = SZ_1M * 24,
        },
        [7] = {
                .name   = "S3C2410 flash partition 7",
                .offset = SZ_1M * 48,
                .size   = SZ_16M,
        }
};

修改后:

static struct mtd_partition smdk_default_nand_part[] = {
        [0] = {
                .name   = "Bootloader",
                .size   = 0x00000000,
                .offset = 0x00030000,
        },
        [1] = {
                .name   = "Kernel",
                .offset = 0x00050000,
                .size   = 0x00200000,
        },
        [2] = {
                .name   = "Root",
                .offset = 0x00250000,
                .size   = 0x03dac000,
        }

};

8.修改s3c2440的机器码,修改arch/arm/tools/mach-types文件的内容如下:

修改前:

s3c2440                 ARCH_S3C2440            S3C2440                 362

修改后:

s3c2440                 ARCH_S3C2440            S3C2440                 782

9.给内核打yaffs2文件系统的补丁,这样就可以让内核支持yaffs2文件系统

9.1从git仓库获取yaffs2源码,获取源码的命令如下:

git clone git://www.aleph1.co.uk/yaffs2

9.2将内核补丁插入内核,使用如下方法:

 a.先进入yaffs2目录下:

  cd yaffs2

 b.yaffs2目录下有一个脚本patch-ker.sh,那么执行该脚本即可:

  ./patch-ker.sh ./patch-ker.sh c m ../linux-2.6.32.2

10.内核配置:

使用以下命令进行配置操作:

make menuconfig

需要修改的配置项如下:

10.1[*] Enable loadable module support  --->

    [*]   Forced module loading                             
    [*]   Module unloading

10.2System Type  --->

    S3C2410 Machines  --->

      [*] SMDK2410/A9M2410 ,该条目下的其他都不选

    S3C2440 Machines  --->

      [*] SMDK2440

      [*] SMDK2440 with S3C2440 CPU module,该条目下的其他都不选

    其余Machines选项下的条目均不选(不选的有s3c2400,s3c2412,s3c2442,s3c2443)

10.3Boot options  --->

    noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0

10.4Userspace binary formats  --->

     [*] Kernel support for ELF binaries,其余选项均不选

10.5File systems  --->

      [*] Miscellaneous filesystems  --->

        <*>   yaffs2 file system support

        [*]         Lets yaffs do its own ECC

10.6-*- Native language support  --->

      <*>   Codepage 437 (United States, Canada)

      <*>   Simplified Chinese charset (CP936, GB2312)

      <*>   Traditional Chinese charset (Big5)

      <*>   NLS ISO 8859-1  (Latin 1; Western European Languages)

      <*>   NLS UTF-8

11.开始编译内核:

make zImage -j5

11.1出错如下:

In file included from fs/yaffs2/yaffs_guts.c:18:
fs/yaffs2/yaffs_endian.h:32: error: parse error before "swap_loff_t"
fs/yaffs2/yaffs_endian.h:32: error: parse error before "lval"
fs/yaffs2/yaffs_endian.h:33: warning: return type defaults to `int'
fs/yaffs2/yaffs_endian.h:33: warning: function declaration isn't a prototype
fs/yaffs2/yaffs_endian.h: In function `swap_loff_t':
fs/yaffs2/yaffs_endian.h:34: error: `lval' undeclared (first use in this function)
fs/yaffs2/yaffs_endian.h:34: error: (Each undeclared identifier is reported only once
fs/yaffs2/yaffs_endian.h:34: error: for each function it appears in.)
fs/yaffs2/yaffs_endian.h:37: error: `Y_LOFF_T' undeclared (first use in this function)
fs/yaffs2/yaffs_endian.h:38: error: parse error before "vall"
fs/yaffs2/yaffs_endian.h:38: warning: statement with no effect
  CC      fs/proc/uptime.o
make[2]: *** [fs/yaffs2/yaffs_guts.o] 错误 1
make[2]: *** 正在等待未完成的任务....
  CC      fs/proc/version.o
In file included from fs/yaffs2/yaffs_checkptrw.c:16:
fs/yaffs2/yaffs_endian.h:32: error: parse error before "swap_loff_t"
fs/yaffs2/yaffs_endian.h:32: error: parse error before "lval"
fs/yaffs2/yaffs_endian.h:33: warning: return type defaults to `int'
fs/yaffs2/yaffs_endian.h:33: warning: function declaration isn't a prototype
fs/yaffs2/yaffs_endian.h: In function `swap_loff_t':
fs/yaffs2/yaffs_endian.h:34: error: `lval' undeclared (first use in this function)
fs/yaffs2/yaffs_endian.h:34: error: (Each undeclared identifier is reported only once
fs/yaffs2/yaffs_endian.h:34: error: for each function it appears in.)
fs/yaffs2/yaffs_endian.h:37: error: `Y_LOFF_T' undeclared (first use in this function)
fs/yaffs2/yaffs_endian.h:38: error: parse error before "vall"
fs/yaffs2/yaffs_endian.h:38: warning: statement with no effect
make[2]: *** [fs/yaffs2/yaffs_checkptrw.o] 错误 1
make[1]: *** [fs/yaffs2] 错误 2
make[1]: *** 正在等待未完成的任务....

对策:看来不能使用最新的yaffs2,因此从另一个内核linux-2.35.7将fs/yaffs2文件夹的内容都复制到linux-2.6.32.2/fs/中

移植linux-2.6.32.2到qq2440的更多相关文章

  1. 查看linux机器是32位还是64位的方法

    file /sbin/init 或者 file /bin/ls/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dyna ...

  2. 如何查看linux系统是32位还是64位

    1.#uname -a 如果有x86_64就是64位的,没有就是32位的 这是64位的  # uname -a  Linux desktop 2.6.35-23-generic #37-Ubuntu ...

  3. 查看linux库文件32位还是64位

    查看linux库文件32位还是64位 分类: linux2014-09-25 09:46 238人阅读 评论(0) 收藏 举报 objdump -a  *.a objdump -a  *.so

  4. 为AM335x移植Linux内核主线代码

    /********************************************************************** * 为AM335x移植Linux内核主线代码 * 说明: ...

  5. linux内核学习之三:linux中的"32位"与"64位"

    在通用PC领域,不论是windows还是linux界,我们都会经常听到"32位"与"64位"的说法,类似的还有"x86"与"x86 ...

  6. 引用 移植Linux到s3c2410上

    引用 bsky 的 移植Linux到s3c2410上来源:http://www.embed.com.cn/downcenter/Article/Catalog12/4000.htm 移植Linux到s ...

  7. linux中的"32位"与"64位"

    linux内核学习之三:linux中的"32位"与"64位" 在通用PC领域,不论是windows还是linux界,我们都会经常听到"32位" ...

  8. 【故障•监听】TNS-12518、TNS-00517和 Linux Error:32:Broken pipe

    [故障|监听]TNS-12518.TNS-00517和 Linux Error:32:Broken pipe 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱 ...

  9. 【Linux】查看所使用的Linux系统是32位还是64 位的方法

    查看所使用的Linux系统是32位还是64 位的方法 方法一:getconf LONG_BIT # getconf LONG_BIT 1 1 我的Linux是32位!!! 方法二:arch # arc ...

  10. Xilinx zynq-7000系列FPGA移植Linux操作系统详细教程

    Xilinx zynq-7000系列FPGA移植Linux操作系统详细教程 一:前言 最近手上压了一块米联客的Miz7035,一块xilinx zynq-7000系列的开发板,想着正好学习一下linu ...

随机推荐

  1. [转]从网页Web上调用本地应用程序(.jar、.exe)的主流处理方法

    这个方法主要思路是利用自定义URL Protocol来调用应用程序.浏览器在解析到自定义URL Protocol之后,会寻找注册表,然后通过注册表启动相应的程序,然后启动改程序,传入参数.对于我这个项 ...

  2. 分享一个基于HTML5实现的视频播放器【转】

    什么是hivideo? 最近一段时间在使用PhoneGap开发一个App应用,App需要播放视频,本想直接使用html5的video,但使用它在全屏播放时不支持横屏播放,只能放弃.最终决定还是自己封装 ...

  3. php实现实现代码多主从,切换,轮询,健康检查

    现在很多框架现在都提供数据库读写分离,比如CI,TP,YII,一般使用正则表达书判断sql语句是读操作,还是写操作,但是有个缺点,没有给用主动判断,比如写入操作必须去立即读取主数据库的,如果不能立即判 ...

  4. Apache Spark技术实战之6 -- spark-submit常见问题及其解决

    除本人同意外,严禁一切转载,徽沪一郎. 概要 编写了独立运行的Spark Application之后,需要将其提交到Spark Cluster中运行,一般会采用spark-submit来进行应用的提交 ...

  5. android 一个简单的服务例子

    public class MessageService extends Service { // 获取消息线程 private MessageThread messageThread = null; ...

  6. Maven:解决-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

    1.添加M2_HOME的环境变量 2.Preference->Java->Installed JREs->Edit 选择一个jdk, 添加  -Dmaven.multiModuleP ...

  7. yii2知识点理解(成员属性)

    yii2成员属性 成员变量类似于public $a; 成员属性类似于 public function a(){} 成员变量是就类的结构构成而言的概念,而属性是就类的功能逻辑而言的概念 成员属性应用: ...

  8. yiii 框架登录 判断是否是游客模式及未登录状态

    原地址:http://blog.csdn.net/a553181867/article/details/50987388 最近在利用Yii 2.0框架进行项目后台的编写,遇到的第一个问题是用户登陆,包 ...

  9. Jquery使select、radio某项选中

    select $("#class").find("option[value='123']").attr("selected",true); ...

  10. Python开发【第二章】:Python深浅拷贝剖析

    Python深浅拷贝剖析 Python中,对象的赋值,拷贝(深/浅拷贝)之间是有差异的,如果使用的时候不注意,就可能产生意外的结果. 下面本文就通过简单的例子介绍一下这些概念之间的差别. 一.对象赋值 ...