android4.4内核移植
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内核移植的更多相关文章
- 【转】 linux内核移植和网卡驱动(二)
原文网址:http://blog.chinaunix.net/uid-29589379-id-4708911.html 一,内核移植步骤: 1, 修改顶层目录下的Makefile ARCH ...
- 【转】 linux内核移植和驱动添加(三)
原文网址:http://blog.chinaunix.net/uid-29589379-id-4708909.html 原文地址:linux内核移植和驱动添加(三) 作者:genehang 四,LED ...
- linux 3.4.103 内核移植到 S3C6410 开发板 移植失败 (问题总结,日本再战!)
linux 3.4.103 内核移植到 S3C6410 开发板 这个星期差点儿就搭在这里面了,一開始感觉非常不值得,移植这样的浪费时间的事情.想立刻搞定,然后安安静静看书 & coding. ...
- Linux内核移植
实验步骤:(1)准备工作(2)修改顶层Makefile(3)修改falsh 分区(4)配置编译内核 下面以Linux2.6.30.4内核移植到gec2440为例: 一.准备工作:建立工作目录,下载内核 ...
- Linux内核移植到JZ2440
一.准备工作:1.Linux内核:Linux2.6.22.6,可从www.kernel.org上下载:2.交叉工具编译链:arm-linux-gcc-3.4.5-glibc-2.3.6:3.yaffs ...
- ARM-Linux内核移植之(二)——Linux2.6.22内核移植
平台:mini2440 交叉工具链:arm-linux-gcc-4.3.2 一.内核移植基本知识 移植内核也叫构建BSP(boardsupprot packet).BSP的作用有两个:一是为内核运行 ...
- linux 内核移植和根文件系统的制作【转载】
原文地址:http://www.cnblogs.com/hnrainll/archive/2011/06/09/2076214.html 1.1 Linux内核基础知识 在动手进行Linux内核移植之 ...
- linux 内核移植和根文件系统的制作
1.1 Linux内核基础知识 在动手进行Linux内核移植之前,非常有必要对Linux内核进行一定的了解,下面从Linux内核的版本和分类说起. 1.1.1 Linux版本 Linux内核的版本号 ...
- linux内核(二)内核移植(DM365-DM368开发攻略——linux-2.6.32的移植)
一.介绍linux-2.6.32: Linux-2.6.32的网上介绍:增添了虚拟化内存 de-duplicacion.重写了 writeback 代码.改进了 Btrfs 文件系统.添加了 ATI ...
随机推荐
- YARN环境搭建 之 一:CentOS7.0系统配置
一.我缘何选择CentOS7.0 14年7月7日17:39:42发布了CentOS 7.0.1406正式版,我曾使用过多款Linux,对于Hadoop2.X/YARN的环境配置缘何选择CentOS7. ...
- epoll分析
Epoll详解及源码分析 1.什么是epoll epoll是当前在Linux下开发大规模并发网络程序的热门人选,epoll 在Linux2.6内核中正式引入,和select相似,都是I/O多路复用 ...
- MAC 平台 QT编写iphone程序,加载iphone模拟器失败解决办法
本日这么多年一直做C++开发,最近要做QT项目,被QT做界面的新特性所吸引.QSS QML的确是亮点. 还有一个就是跨平台这方面,自己玩了玩. 用的QT 的开发包是在官网上下载 qt-opensour ...
- 0x01第一个汇编程序
;将由text db 10,20,30,40定义的4个数相加,并输出其和. .386 ;指明指令集 .model flat,stdcall ;平坦模式,函数右边的参数先入栈 option cas ...
- Ubuntu 14.04 安装 Xilinx ISE 14.7 全过程
生命在于折腾. 这个帖子作为我安装xilinx ISE 14.7版本一个记录.希望给需要的人一些帮助,这些内容绝大部分也是来源于互联网. 软硬件: lsb_release -a No LSB modu ...
- Encog
http://www.heatonresearch.com/encog/ https://www.mql5.com/zh/articles/252
- DB天气app冲刺二阶段第十天
昨天困到不行了 所以就写了那么几句..所以今天好好写写了要.. 今天的收获了一个很重要的问题 就还是api接口的事情,以前的那个接口虽然能用但是总是不稳定,今天由决定百度的一下然后就发现了一个很好用的 ...
- EXT心得--并非所有的items配置对象都属于EXT的内置类
之前我对EXT的items中未指明xtype的配置对象有一个错误的认识--即虽然某个items未指明它下面的某个组件的xtype,但这个组件肯定属性EXT的某个类.然而今天在查看actioncolum ...
- Extjs关于FormPanel布局
Extjs关于FormPanel布局 FormPanel有两种布局:form和column,form是纵向布局,column为横向布局.默认为后者.使用layout属性定义布局类型.对于一个复杂的布局 ...
- C# 虚方法 与 隐藏方法(new) 区别
重写和隐藏的定义: 重写:继承时发生,在子类中重新定义父类中的方法,子类中的方法和父类的方法是一样的 例如:基类方法声明为virtual(虚方法),派生类中使用override申明此 ...