主题 : 一起来做mini2440的Android的根文件系统 复制链接 | 浏览器收藏 | 打印
Just do it
级别: 侠客
UID: 2754
精华: 4
发帖: 66
金钱: 2435 两
威望: 873 点
贡献值: 40 点
综合积分: 212 分
注册时间: 2008-12-07
最后登录: 2016-04-13
楼主  发表于: 2009-09-01 21:20

 一起来做mini2440的Android的根文件系统

一直以来都在用比人的Android文件系,想自己做一个
S3C2440属于armv4类型的CPU,freeruner项目的Android介绍了如何从源码来编译
Android系统,详细步骤如下面的网站:
http://wiki.openmoko.org/wiki/Android_porting
目前状态:编译PASS,但启动后不会出现logo,一直处于黑屏状态
Android的粉丝们,如果感兴趣的话,git代码后,看是否能成功的做好这个系统,
有问题的话QQ49121715交流
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-09-08 12:58
引用第6楼jeefjiang于2009-09-08 11:58发表的  :
不知道怎么样改才能出现图形界面,实际上从logcat看,系统是在运行的

我也正在做这个事情,现在已经可以正常启动到Home画面了,但touchscreen和keyboard还不能用。
你把你做的步骤和启动的logcat输出再贴一遍吧,我看看和我的有什么差别
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-09-09 09:35

E/AudioHardwareALSA( 1634): Unable to attach mixer to device AndroidPlayback: No such file or directory
E/AudioHardwareALSA( 1634): Unable to attach mixer to device default: No such file or directory
E/AudioHardwareALSA( 1634): Unable to attach mixer to device AndroidRecord: No such file or directory
E/AudioHardwareALSA( 1634): Unable to attach mixer to device default: No such file or directory
I/DEBUG   ( 1617): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1617): Build fingerprint: 'neo/freerunner/freerunner/:1.0/TC3/eng.jeef.20090827.161235:eng/test-keys'
I/DEBUG   ( 1617): pid: 1634, tid: 1634  >>> /system/bin/mediaserver <<<
I/DEBUG   ( 1617): signal 11 (SIGSEGV), fault addr 00000010

这个问题我也遇到过,因为内核里没有mini2440的UDA1341 ALSA驱动,系统找不到一个可以用音频设备,造成mediaserver不断异常退出,进而造成Android Runtime无法正常运行。
我的解决办法是移植了http://repo.or.cz/w/linux-2.6/mini2440.git里的UDA1341 ALSA驱动。
另外,Android似乎还需要power supply class驱动,用来侦测电池电量,否则系统启动会因为无法知道电池剩余电量而自动关机。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-09-09 09:37
顺便说一句,你可以用koolu更新一些的cupcake branch:

repo init -u git://git.koolu.org/freerunner/platform/manifest.git -b cupcacke
repo sync
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2009-09-09 10:19
这是我用koolu cupcake做的image在clean boot时logcat的输出,供你参考
附件: koolu_cupcake_boot_logcat.zip (10 K) 下载次数:48
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2009-09-09 12:58
引用第14楼jeefjiang于2009-09-09 12:19发表的  :
恩,谢谢了,不过不能显示UI应该和音频驱动没什么关系,我用带有音频驱动的内核一样会出现这个现象。请问你的Linux内核编译和文件系统的编译时分开进行的吧

我在koolu的内核源代码里(git://git.koolu.org/kernel/openmoko.git)加入了mini2440的支持,它在执行make TARGET_PRODUCT=freerunner的时候会一起编译。
要让Android的UI正常跑起来,至少zygote service要能够正常启动
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2009-09-14 12:05
建议你先读一读这篇文章,了解一下Android上key layout和key charmap的原理
http://www.kandroid.org/android_pdk/keymaps_keyboard_input.html

我说明一下为什么用shinelk的内核和文件系统,可以用K4键作为MENU key解锁键盘:
1. 内核中的按键驱动对于K1, K2, K3, K4, K5, K6这6个键的scan code分别是75,74,73,71,72,70 (详细内容见内核源代码http://www.arm123.com.cn/android/android-kernel-20090825.tgz 中的/drivers/char/mini2440_buttons.c)
2. 文件系统(http://www.arm123.com.cn/android/android-fs-20090825.tgz)中没有包含mini2440键盘对应的key layout文件(.kl文件),因此Android将用默认的/system/usr/keylayout/qwerty.kl, 在这里面你会发现,MENU键对应的scan code为‘71’

复制代码
  1. key 70   BACK              WAKE_DROPPED
  2. key 71   MENU              WAKE_DROPPED
  3. key 72   SOFT_RIGHT        WAKE
  4. key 73   VOLUME_DOWN
  5. key 74   DPAD_CENTER       WAKE_DROPPED
  6. key 75   VOLUME_UP
  7. ...

以上就是为了支持mini2440按键而在加入qwerty.kl里加入的东西。

知道该怎么做了?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2009-09-14 12:12
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."