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 ...
随机推荐
- 因修改system密码导致expdp备份失败
今天发现一套系统的逻辑备份失效了,检查了一下,发现主要是由于之前其他管理员修改了system用户的密码,导致备份不成功了.为了今后此类的问题发生,修改expdp的脚本连接部分如下:expdp \' / ...
- 外企iOS开发的笔试题
一组外企iOS开发的笔试题,您能回答出来吗?从群里收集来的. (miki西游@mikixiyou的文档,原文链接: http://mikixiyou.iteye.com/blog/1546376 转 ...
- How to tune SharePoint 2010 Server for better performance?
http://social.technet.microsoft.com/wiki/contents/articles/7926.sharepoint-2010-tips-for-dealing-wit ...
- iOS 计算 日期 距离 当前 系统的日期 相差 多少
#pragma mark - 时间计算函数 - (NSTimeInterval)intervalSinceNow:(NSString *) theDate { NSDateFormatter * da ...
- 写一个EF的CodeFirst的Demo
写一个EF的CodeFirst的Demo 今天打算写一个关于EF的CodeFirs的一个小Demo.先略说一个EF的三种与数据库,怎么说,叫映射么,好吧,那就这么叫吧,就是一个是ModelFirst就 ...
- AvalonDock 2.0+Caliburn.Micro+MahApps.Metro实现Metro风格插件式系统(一)
随着IOS7由之前UI的拟物化设计变为如今的扁平化设计,也许扁平化的时代要来了,当然我们是不是该吐槽一下,苹果什么时候也开始跟风了,自GOOGLE和微软界面扁平化过后,苹果也加入了这一队伍. Aval ...
- C#系统缓存全解析
原文:http://blog.csdn.net/wyxhd2008/article/details/8076105 目录(?)[-] 系统缓存的概述 页面输出缓存 页面局部缓存 文件缓存依赖 数据库缓 ...
- bug集合
解决方法:vertical-align:top; 垂直对齐方式:对浮动元素无效浮动类: ie 6 7要在一行显示多个div要 给每一个元素浮动 否则会出间隙. ie6双倍边距bug 1. bug条件 ...
- 安装 SQL SERVER PROFILER
SQL SERVER 2008 R2 (10.50.40) 版本,安装 SQL SERVER PROFILER:通过 command prompt,使用以下命令:setup.exe /FEATURES ...
- 使用NodeJs,实现数据抓取
学习笔记 前言 近期做一个数据抓爬工具,最开始使用的是C#控制台应用,同时正则表达式去过滤数据,看着还行,可每次运行都依附于.net framework很是不爽,于是想整点其他的方法.本人还是比较喜欢 ...