1. 实现kernel层驱动
source "drivers/hello/Kconfig"
2)添加hello.c hello.h Makefile Kconfig Readme 5 个文件
Makefile:
# # Makefile for the input core drivers. # # Each configuration option enables a list of files. obj-$(CONFIG_HELLO) += hello.o
Kconfig:
# # Hello device configuration # menu "Mark's hello driver" config HELLO tristate "Just build a simple example..." default m endmenu
# minicom下载方式 1. dnw 2. nand erase 40000 300000 3. nand write c0008000 40000 300000
2. 为Android增加硬件抽象层(HAL)模块访问Linux内核驱动程序
折腾了半天,还是没能用mmm编译,在网上还发现这些话,干脆下个android 2.1_r2的源码好了。
Android的几个教程是基于原生的Android-2.1进行的,我们提供的Android-2.1添加了几个硬件设备的支持,你的出错就是因为没有XXX.so,因此,要编译我们的Android-2.1必须使用我们提供的编译脚本。
另外要编译我们的Android-2.1的sdk还需要对Android底层代码的几个地方进行一些修改才能编译成功,这些底层代码是针对我们的Real6410平台进行移植的,运行在pc机上的emulator会出现一些问题,建议直接下载一个2.1的sdk来编写App程序会更方便,这些写出来的App一样能够运行在板子上的Android-2.1
1)
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo >repo repo init -u https://android.googlesource.com/platform/manifest -b android-2.1_r2 repo sync
浙公网安备 33010602011771号