主题 : cm10 for tiny210v2 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 32117
精华: 1
发帖: 16
金钱: 130 两
威望: 26 点
贡献值: 1 点
综合积分: 52 分
注册时间: 2010-11-10
最后登录: 2021-08-19
楼主  发表于: 2013-03-26 17:12

 cm10 for tiny210v2

管理提醒: 本帖被 xoom 设置为精华(2013-05-27)
为了搞Android弄了块tiny210v2的板。电容屏的的板子。

我这个人比较懒,而且现在工作了有点忙。要是因为板硬件差异跑不起来,我就不管了。能解决的问题,我尽量。

这个系统跑在sd卡上,所以给你的sd卡分区。第一个区放bootloader,第二个区放uImage,第三个区做为SD卡,第四个区Android根文件系统。分区大小自己看着办,够放就行。

#1.bootloader
代码:https://github.com/5victor/u-boot-tiny210.git

用的是liukun321移植的u-boot,修复了不能在tiny210v2上运行,主要是因为tiny210v2的nand flash是8K的页,还做了点其它的小美化。u-boot的环境变量是放在SD卡里面的。

u-boot编译什么的就不需要我说了吧。

编译好了,照liukun321那贴说的,烧到卡里去就能运行了。http://blog.csdn.net/liukun321/article/details/7438880

给内核的启动参数:
bootargs=console=ttySAC0,115200 root=/dev/mmcblk0p4 rw rootfstype=ext4 rootdelay=1 init=/init lcd=S70 ctp=3                                                     bootcmd=fatload mmc 0:2 0x20000000 uimage ; bootm 0x20000000
bootargs中root=/dev/mmcblk0p4就是前面为什么Android根文件系统放第4分区的原因。bootcmd中mmc 0:2这就是内核放第二区的原因。
#2.kernel
代码:https://github.com/5victor/linux-tiny210v2.git

那个电容屏和alsa-soc的驱动已经变成源码放在内核里了。我暂时需要这两个模块,所以就只弄了这两个模块的源代码了。

克隆下来代码,进去。

1.cp mini210-tvp5150_android_defconfig .config

2.把u-boot-tiny210v2编译出来的tools/mkimage放在/usr/local/bin

3.make ARCH=arm CROSS_COMPILE=(自已看着办)  uImage

把SD卡第二分区格式化成fat32,把uImage放在其根目录下。

#3.Android
先把Android或者cm源代码下下来。

然后,我移植的。

cm的在https://github.com/5victor/cm_device_samsung_tiny210

Android官方的在https://github.com/5victor/device_samsung_tiny210

把代码克隆下来后移动到device/samsung/tiny210。

1.source build/envsetup.sh

2.lunch 选你看到有tiny210字眼的项目

3.make

4.sd卡第4分区格式化成ext4格式

5.cp -a out/target/product/tiny210/root/* /sd卡根目录 注意那个*号。

6.cp -a out/target/product/tiny210/system /sd卡根目录

7.修改SD卡下*.rc *.prop的权限为644。sysem/build.prop为644。

8.修改init.rc文件

就这样了,当然,有的错误你们遇到之后才知道了。
上几张图,才有真相。




 




我靠,这样的贴居然没人顶。
源代码就在那了,居然没人对怎么把Android移植到一个新的设备感兴趣?
写得不够详细。你是愿意自己吃饭还是愿意别人把饭嚼了喂给你吃?so。遇到问题时先尝试使用搜索引擎解决,实在解决不了再请教别人。

网上各种编译u-boot、编译kernel、编译Android的文章。

还有,自己编译一个系统跑起来的收获绝对比你用SD卡刷系统或者后面出来的USB什么的刷系统收获大得多。
[ 此帖被冰柠绿茶在2013-03-31 02:33重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2013-03-27 07:11
支持一下 希望今后能不断完善
"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楼  发表于: 2013-04-05 18:08

 回 8楼(huhu2207) 的帖子

呵呵,在这个版块我没有权限。
"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楼  发表于: 2013-05-19 17:30

 回 12楼(飘之叶) 的帖子

能否把你现在文件系统镜像里的init.rc打包传上来看看?
"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楼  发表于: 2013-05-21 12:41

 回 16楼(飘之叶) 的帖子

用logcat看一下Android的log?
"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楼  发表于: 2013-05-23 12:31

 回 18楼(飘之叶) 的帖子

建议一个帖子讨论一个问题。
[   20.303707] android_usb: already disabled

这是内核打印出来的调试信息,你可以试试先从内核源代码里把打印这个信息的地方找出来,看看为什么会打印它。
"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楼  发表于: 2013-05-28 18:25

 回 23楼(pisces) 的帖子

W/dalvikvm(  128): No implementation found for native Lcom/android/server/BatteryService;.native_update ()V
W/dalvikvm(  128): threadid=11: thread exiting with uncaught exception (group=0x409f11f8)
I/Process (  128): Sending signal. PID: 128 SIG: 9
E/AndroidRuntime(  128): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread
E/AndroidRuntime(  128): java.lang.UnsatisfiedLinkError: native_update
E/AndroidRuntime(  128):        at com.android.server.BatteryService.native_update(Native Method)
E/AndroidRuntime(  128):        at com.android.server.BatteryService.update(BatteryService.java:259)
E/AndroidRuntime(  128):        at com.android.server.BatteryService.<init>(BatteryService.java:174)
E/AndroidRuntime(  128):        at com.android.server.ServerThread.run(SystemServer.java:219)


看起来问题出在没有Battery驱动实现。你可以试试把我以前写的一个dummy battery驱动整合到内核里
http://gitorious.org/android-mini2440/kernel-opencsbc/blobs/cc4f0592798f9c400e1399c7282949a932c81562/drivers/power/dummy_battery.c
"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楼  发表于: 2013-06-09 12:28

 回 28楼(pisces) 的帖子

E/AndroidRuntime(  440): java.lang.RuntimeException: eglConfig not initialized
"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."