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 ...
随机推荐
- python num[y array
http://sebug.net/paper/books/scipydoc/numpy_intro.html npArr1=np.array([1,2,3],[4,5,6],[7,8,9]]) npA ...
- C++中的冒泡排序,选择排序,插入排序
最简单的插入排序:思想,两两之间比较,时间复杂度o(n^2) void bubblesort(vector<int>&vec, int n) { if (&vec==NUL ...
- error: format not a string literal and no format arguments [-Werror=format-security]
You can put this in your Application.mk to disable treating those warnings as errors: APP_CFLAGS += ...
- Jquery-------获取网页参数
看如下代码: function getURLParameter(name) { return decodeURI( (RegExp(name + '=' + '(.+?)(&|$)').exe ...
- OpenCV+QT开发环境(一):Windows环境
最近在学习openCV的开发.在搭建开发环境的时候,着实废了不少功夫,找了大量的文章资料.其实主要的开发还是在linux系统上的openCV,但是为了方便,我还是在windows上也搭建了开发环境,这 ...
- 编译dubbo2.5.4时遇到的问题及解决
dubbo的官方git地址为:https://github.com/alibaba/dubbo 按照其流程进行下载及编译,遇到的问题为: 1. 执行 mvn clean install -Dmaven ...
- 在ASP.NET MVC应用程序中实现Server.Transfer()类似的功能
在ASP.NET MVC应用程序中,如果使用Server.Transfer()方法希望将请求转发到其它路径或者Http处理程序进行处理,都会引发“为xxx执行子请求时出错”的HttpException ...
- Tesla为什么要公开专利
这是今天在网上看到Tesla公司的专利墙图片,还是比较有视觉冲击力的,正好可以转来当配图. 业界先锋Tesla日前惊世骇俗地公开电动汽车专利,赢得如潮好评:不过大家都知道,对于西方科技公司,专利历来是 ...
- python 行转列
#encoding=utf- print '中国' #二维阵列变换 行转化成列,列转化成行 lista=[[,,],[,,],[,,],[,,]] #使用列表推导 listb=[[r[col] ])) ...
- 有n个整数,使其前面各数顺序向后移m个位置,最后m个数变成最前面m个数。
#include<stdio.h> #include<stdlib.h> int main() { setvbuf(stdout,NULL,_IONBF,); //使用Ecli ...