01 init/目录下Kconfig修改:

956行添加:

config PANIC_TIMEOUT
int "Default panic timeout"
default
help
Set default panic timeout.

02 drivers目录下Kconfig:

添加:

source "drivers/rongpin/Kconfig"

source "drivers/switch/Kconfig"

source "drivers/nfc/Kconfig"

source "drivers/gud/Kconfig"

03 drivers目录下Makefile:

添加:

obj-$(CONFIG_SWITCH)        += switch/
obj-$(CONFIG_MOBICORE_DRIVER) += gud/
obj-$(CONFIG_RPDZKJ_SYSFS) += rongpin/

04 drivers目录下:

将switch,gud,rongpin三个目录拷贝进来(对应原目录)

05

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

法二:

(对比法)

荣品的内核源码和从官方下载的内核源码不一样的有如下文件:

一 :arch

01◐arch主目录下:

①除arm、config其他全部删除

②修改config文件,在最后一行:source "kernel/gcov/Kconfig"

添加:

config HAVE_ARCH_SECCOMP_FILTER
bool
help
An arch should select this symbol if it provides all of these things:
- syscall_get_arch()
- syscall_get_arguments()
- syscall_rollback()
- syscall_set_return_value()
- SIGSYS siginfo_t support
- secure_computing is called from a ptrace_event()-safe context
- secure_computing return value is checked and a return value of -
results in the system call being skipped immediately. config SECCOMP_FILTER
def_bool y
depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
help
Enable tasks to build secure computing environments defined
in terms of Berkeley Packet Filter programs which implement
task-defined system call filtering polices. See Documentation/prctl/seccomp_filter.txt for details. source "kernel/gcov/Kconfig"

02◐在arch/arm/configs下添加:

①exynos5_defconfig

二:block

1 blk-core.c文件:

①32行添加:

#include <linux/ratelimit.h>  //add by phone at 20151117

②2122行:

switch (error) {
case -ENOLINK:
error_type = "recoverable transport";
break;
case -EREMOTEIO:
error_type = "critical target";
break;
case -EBADE:
error_type = "critical nexus";
break;
case -EIO:
default:
error_type = "I/O";
break;
}
printk(KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
error_type, req->rq_disk ? req->rq_disk->disk_name : "?",
(unsigned long long)blk_rq_pos(req));
}

换成:

switch (error) {
case -ENOLINK:
error_type = "recoverable transport";
break;
case -EREMOTEIO:
error_type = "critical target";
break;
case -EBADE:
error_type = "critical nexus";
break;
case -ETIMEDOUT:
error_type = "timeout";
break;
case -ENOSPC:
error_type = "critical space allocation";
break;
case -ENODATA:
error_type = "critical medium";
break;
case -EIO:
default:
error_type = "I/O";
break;
}
printk_ratelimited(KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
error_type, req->rq_disk ?
req->rq_disk->disk_name : "?",
(unsigned long long)blk_rq_pos(req)); }

2 partition-genneric.c文件下:

①219行,添加:

static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct hd_struct *part = dev_to_part(dev); add_uevent_var(env, "PARTN=%u", part->partno);
if (part->info && part->info->volname[])
add_uevent_var(env, "PARTNAME=%s", part->info->volname);
return ;
}

②233行添加:

.uevent        = part_uevent,

三:drivers

1 Makefile:

103行添加:

obj-$(CONFIG_SWITCH)        += switch/

139行(最后添加):

obj-$(CONFIG_MOBICORE_DRIVER)    += gud/
obj-$(CONFIG_RPDZKJ_SYSFS) += rongpin/

2 Kconfig:

第3行添加:

source "drivers/rongpin/Kconfig"   //add by phone at 20151117

第100行添加:

source "drivers/switch/Kconfig"   //add by phone at 20151117

第146行添加:

source "drivers/nfc/Kconfig"

source "drivers/gud/Kconfig"

3 将

四:include

五:kernel

六:lib

七:mm

八:net

九:security

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

android4.4内核移植的更多相关文章

  1. 【转】 linux内核移植和网卡驱动(二)

    原文网址:http://blog.chinaunix.net/uid-29589379-id-4708911.html 一,内核移植步骤: 1, 修改顶层目录下的Makefile ARCH       ...

  2. 【转】 linux内核移植和驱动添加(三)

    原文网址:http://blog.chinaunix.net/uid-29589379-id-4708909.html 原文地址:linux内核移植和驱动添加(三) 作者:genehang 四,LED ...

  3. linux 3.4.103 内核移植到 S3C6410 开发板 移植失败 (问题总结,日本再战!)

    linux 3.4.103 内核移植到 S3C6410 开发板 这个星期差点儿就搭在这里面了,一開始感觉非常不值得,移植这样的浪费时间的事情.想立刻搞定,然后安安静静看书 & coding. ...

  4. Linux内核移植

    实验步骤:(1)准备工作(2)修改顶层Makefile(3)修改falsh 分区(4)配置编译内核 下面以Linux2.6.30.4内核移植到gec2440为例: 一.准备工作:建立工作目录,下载内核 ...

  5. Linux内核移植到JZ2440

    一.准备工作:1.Linux内核:Linux2.6.22.6,可从www.kernel.org上下载:2.交叉工具编译链:arm-linux-gcc-3.4.5-glibc-2.3.6:3.yaffs ...

  6. ARM-Linux内核移植之(二)——Linux2.6.22内核移植

    平台:mini2440  交叉工具链:arm-linux-gcc-4.3.2 一.内核移植基本知识 移植内核也叫构建BSP(boardsupprot packet).BSP的作用有两个:一是为内核运行 ...

  7. linux 内核移植和根文件系统的制作【转载】

    原文地址:http://www.cnblogs.com/hnrainll/archive/2011/06/09/2076214.html 1.1 Linux内核基础知识 在动手进行Linux内核移植之 ...

  8. linux 内核移植和根文件系统的制作

    1.1 Linux内核基础知识 在动手进行Linux内核移植之前,非常有必要对Linux内核进行一定的了解,下面从Linux内核的版本和分类说起. 1.1.1  Linux版本 Linux内核的版本号 ...

  9. linux内核(二)内核移植(DM365-DM368开发攻略——linux-2.6.32的移植)

    一.介绍linux-2.6.32: Linux-2.6.32的网上介绍:增添了虚拟化内存 de-duplicacion.重写了 writeback 代码.改进了 Btrfs 文件系统.添加了 ATI ...

随机推荐

  1. C#TCPClient应用-一个简单的消息发送和接收

    TcpSend窗口用于发送消息,另外写一个用于接收消息的应用程序,消息接受到以后,必须要关闭接收消息的窗口,才能在接收新的消息,不知道怎么能解决这个问题. 源代码: 发送消息的窗口代码 using S ...

  2. 利用Vagrant搭建多平台环境

    Vagrant 是一个创建和分发虚拟化开发环境的工具,使用ruby编写,本身并不包含虚拟机管理软件,因此我们需要配合Vagrant安装一个虚拟机软件.Vagrant支持VMware, Virtual ...

  3. kali linux安装vm

    https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-10.0.2-1744117.i386.bundle v ...

  4. 1934: [Shoi2007]Vote 善意的投票 - BZOJ

    Description幼儿园里有n个小朋友打算通过投票来决定睡不睡午觉.对他们来说,这个问题并不是很重要,于是他们决定发扬谦让精神.虽然每个人都有自己的主见,但是为了照顾一下自己朋友的想法,他们也可以 ...

  5. shell find and rm

    按时间删除命令: 删除当前目录下30天以前的所有文件: find . -type f -ctime + -exec rm -fr {} \; 删除当前目录下30天以前的所有目录: find . -ty ...

  6. BZOJ 4341 [CF253 Printer] 解题报告

    乍一看这个题好像可以二分优先度搞搞... 实际上能不能这么搞呢...? 我反正不会... 于是开始讲我的乱搞算法: 首先肯定要把任务按照优先度排序. 用一棵在线建点的线段树维护一个时刻是否在工作. 然 ...

  7. 【HDOJ】【3853】LOOPS

    概率DP/数学期望 kuangbin总结中的第7题 其实跟UVA 11762 Race To 1 那道题差不多……直接推下公式,然后倒推即可 Trick:有的点可能是p1[i][j]==1……这样的点 ...

  8. 2014 Multi-University Training Contest 7

    官方解题报告:http://blog.sina.com.cn/s/blog_a19ad7a10102uzd4.html Magical Forest http://acm.hdu.edu.cn/sho ...

  9. 解决eclipse打开报错:failed to create the java virtual ma

    在Eclipse安装目录下找到:eclipse.ini 将如下参数改为: --launcher.XXMaxPermSize 128M ------------------------------- 说 ...

  10. 有n个整数,使其前面各数顺序向后移m个位置,最后m个数变成最前面m个数。

    #include<stdio.h> #include<stdlib.h> int main() { setvbuf(stdout,NULL,_IONBF,); //使用Ecli ...