手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Android对Linux内核的改动你知道多少?

Goldfish

[日期:2011-07-28] 来源:IT168  作者:杨丰盛 [字体:大 中 小]
  我们知道Android是一个开源系统,但是并不彻底,而且Android从多个方面对Linux内核进行了改动与增强,尽管一度和Linux基金会在内核方面闹得不愉快,但是最终也达成了和解。下面将对此进行详细介绍和分析。

  1 、Goldfish

  Android模拟器通过运行一个Goldfish的虚拟CPU.Goldfish来运行arm926t指令集(arm926t属于armv5构架),并且仿真了输入/输出,比如键盘输入和LCD 输出。这个模拟器其实是在qemu之上开发的,输入/输出是基于libSDL的。既然Goldfish是被模拟器运行的虚拟CPU,那么当Android在真实的硬件设备上运行时,我们就需要去掉它,因此,只有知道Google对Goldfish做了哪些具体改动之后才能正确地去掉。据统计,Android 内核对Goldfish的改动主要涉及44个文件,具体汇总如下。

  说明 本书中在被改动的文件前面加了Chg标记,在新增的文件前面加了New标记。

  1Chgarch/arm/Makefile添加CONFIG_ARCH_GOLDFISH

  2Newarch/arm/configs/goldfish_defconfig默认配置文件

  3Newarch/arm/mach-goldfish/Kconfig为Goldfish CPU添加Kernel配置文件

  4Newarch/arm/mach-goldfish/Makefile添加board-goldfish.o

  5Newarch/arm/mach-goldfish/Makefile.boot为Goldfish CPU进行启动配置

  6Newarch/arm/mach-goldfish/audio.c Audio的输入/输出

  7Newarch/arm/mach-goldfish/board-goldfish.c中断请求、输入/输出等

  8Newarch/arm/mach-goldfish/pdev_bus.c设备总线

  9Newarch/arm/mach-goldfish/pm.c电源管理

  10Newarch/arm/mach-goldfish/switch.cSwitch控制

  11Newarch/arm/mach-goldfish/timer.c获取和设置时间

  12Chgarch/arm/mm/Kconfig添加ARCH_GOLDFISH到支持列表

  13Chgdrivers/char/Makefile添加goldfish_tty

  14Newdrivers/char/goldfish_tty.cTTY驱动

  15Chgdrivers/input/keyboard/Kconfig为Goldfish的键盘事件添加配置文件

  16Chgdrivers/input/keyboard/Makefile添加goldfish_events事件

  17Newdrivers/input/keyboard/goldfish_events.cGoldfish键盘驱动

  18Chgdrivers/mmc/host/Kconfig添加Kernel配置选项Goldfish MMC卡

  19Chgdrivers/mmc/host/Makefile添加Goldfish MMC卡驱动

  20Newdrivers/mmc/host/goldfish.c多媒体驱动

  21Chgdrivers/mtd/devices/Kconfig为Goldfish的NAND flash device添加Kernel配置选项

  22Chgdrivers/mtd/devices/Makefile添加goldfish_nand

  23Newdrivers/mtd/devices/goldfish_nand.cNAND flash驱动

  24Newdrivers/mtd/devices/goldfish_nand_reg.hNAND flash驱动

  25Chgdrivers/power/Kconfig为Goldfish的battery(电池)驱动添加kernel配置选项

  26Chgdrivers/power/Makefile添加Goldfish电池

  27Newdrivers/power/goldfish_battery.c能源和电池状态驱动

  28Chgdrivers/rtc/Kconfig为Goldfish的rtc(时钟)驱动添加Kernel配置选项

  29Chgdrivers/rtc/Makefile添加rtc-goldfish

  30Newdrivers/rtc/rtc-goldfish.c实时时钟驱动

  31Chgdrivers/video/Kconfig添加Goldfish的framebuffer

  32Chgdrivers/video/Makefile添加Goldfish的framebuffer

  33Newdrivers/video/goldfishfb.cframebuffer驱动

  34Newinclude/asm-arm/arch-goldfish/dma.h

  35Newinclude/asm-arm/arch-goldfish/entry-macro.S

  36Newinclude/asm-arm/arch-goldfish/hardware.h

  37Newinclude/asm-arm/arch-goldfish/io.h

  38Newinclude/asm-arm/arch-goldfish/irqs.h

  39Newinclude/asm-arm/arch-goldfish/memory.h

  40Newinclude/asm-arm/arch-goldfish/system.h

  41Newinclude/asm-arm/arch-goldfish/timer.h

  42Newinclude/asm-arm/arch-goldfish/timex.h

  43Newinclude/asm-arm/arch-goldfish/uncompress.h

  44Newinclude/asm-arm/arch-goldfish/vmalloc.h

linux
【内容导航】
第1页:Goldfish 第2页:YAFFS2
第3页:蓝牙 第4页:调度器(Scheduler)
第5页:Android新增的驱动 第6页:电源管理
第7页:杂项
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款