Android核心和驅動篇 Android核心介紹

2021-06-21 03:53:30 字數 1365 閱讀 1918

一般來說,我們會基於乙個平台標準核心配置選項來配置android核心,你可以根據具體的硬體平台來選擇android核心的配置選項,可以參考下面的android核心配置列表:

一般需要支援的核心選項

android_paranoid_network

ashmem

config_fb_mode_helpers

config_font_8x16

config_font_8x8

config_yaffs_short_names_in_ram

dabearlysuspend

fbfb_cfb_copyarea

fb_cfb_fillrect

fb_cfb_imageblit

fb_deferred_io

fb_tileblitting

high_res_timers

inotify

inotify_user

input_evdev

input_gpio

input_misc

leds_class

leds_gpio

lock_kernel

lkogger

low_memory_killer

misc_devices

new_leds

no_hz

power_supply

preempt

ramfs

rtc_class

rtc_lib

switch

switch_gpio

tmpfs

uid_stat

uid16

usb_function

usb_function_adb

user_wakelock

video_output_control

wakelock

yaffs_auto_yaffs2

yaffs_fs

yaffs_yaffs1

yaffs_yaffs2

但是android推薦不要支援下面兩個功能:

config_yaffs_disable_lazy_load

dnotify

配置好後,就可以用toolchain來編譯核心了。編譯核心比較簡單,以emulator的kernel為例:

- git clone git: kernel-emulator

- cd kernel-emulator

- export arch=arm

- export cross_compile=arm-eabi-

- export path=path

- make goldfish_defconfig

- make

Android 架構解析及驅動 鍵盤篇

android 架構解析及驅動 鍵盤篇 一 使用者空間 adroid 2.1 架構解析 7 鍵盤 以上鏈結,詳細介紹了android使用者空間按鍵的操作,最終通過不斷輪詢所有裝置,直到讀取有pollin事件產生的裝置狀態 if mfds i revents pollin 1 struct platf...

核心驅動 阻塞型驅動

1 定義 等待佇列頭部 wait queue head t key q 2 初始化 等待佇列頭部 init waitqueue head key q 3 等待事件發生 wait event key q,key num 4 喚醒等待事件 wake up key q 查詢按鍵狀態 key.c inclu...

核心驅動驅動物件 Driver OBJECT

目錄在核心中.每乙個驅動模組都是乙個驅動物件.都有乙個driver object結構體代表.可以想象成驅動物件是乙個程序容器.容納百川.下面針對驅動物件做一下簡單的成員輸出.以熟悉驅動物件.驅動物件結構如下 typedef struct driver object driver object typ...