移植4.1.36内核
kernel    2017-02-28 15:50:51    224    0    0
tianwaifeixian   kernel

我的机器配置:

>uname -a
Linux SUSE.suse 4.1.38-50-default #1 SMP PREEMPT Sun Feb 19 14:35:48 UTC 2017 (6b4d8cb) x86_64 x86_64 x86_64 GNU/Linux
/var/smdk2440/linux-4.4.1

给2440移植一个4.1的内核吧

>xz -cd linux-4.X.tar.xz | tar xvf -
>cd linux-4.1.36
>xz -cd ../patch-4.1.36.xz | patch -p1
patching file .mailmap
Reversed (or previously applied) patch detected!  Assume -R? [n]

这意思是已经打过补丁了?

>make s3c2410_defconig
scripts/kconfig/conf  --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:543: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 's3c2410_defconig'。 停止。

这个错误没有看出哪里毛病来

然后直接进行

> make menuconfig

看了一下大概信息

然后修改/arch/arm/mach-s3c24xx/mach-smdk2440.c 

晶震改为:12000000

/arch/arm/mach-s3c24xx/common-smdk.c 

NAND分区修改:

static struct mtd_partition smdk_default_nand_part[] = {
    [0] = {
        .name    = "uboot",
        .size    = SZ_256K,
        .offset    = 0,
    },
    [1] = {
        .name    = "env",
        .offset = MTDPART_OFS_APPEND,
        .size    = SZ_128K,
    },
    [2] = {
        .name    = "kernel",
        .offset = MTDPART_OFS_APPEND,
        .size    = SZ_2M,
    },
    [3] = {
        .name    = "rootfs",
        .offset    = MTDPART_OFS_APPEND,
        .size    = MTDPART_SIZ_FULL,
    }
};

然后继续:

>make s3c2410_defconfig
#
# configuration written to .config
#
> make menuconfig

这里需要配置内核信息:

【Device Drivers】--->
        Memory Technology Device (MTD) support --->
            <*>Enable UBI
【File System】--->
        Miscellaneous filesustems --->
            <*>UBIFS file system
【Kernel Features】--->
     [*] Use the ARM EABI to compile the kernel
     [*]   Allow old ABI binaries to run with this kernel (EXPERIMENTAL)​

然后:

> make uImage

等吧。。。。。。。。。。。。。。。。。。。。。。。。。。。。

配置信息截图:

------------------------

---------------------------

end

================================

>free
             total       used       free     shared    buffers     cached
Mem:       7863984    7703068     160916     491596      52364    4607560
-/+ buffers/cache:    3043144    4820840
Swap:      2097148     192756    1904392

有多少内存都不够使啊。.........

参考:

http://www.cnblogs.com/zzmv/p/5841559.html


上一篇: 编译busybox-1.26

下一篇: ack 源码搜索利器

224 人读过
立即登录, 发表评论.
没有帐号? 立即注册
0 条评论
文档导航