主题 : 移植Android2.1(附获取freerunner 2.1 源码的方法) 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 17407
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
贡献值: 0 点
综合积分: 2 分
注册时间: 2010-03-28
最后登录: 2010-06-16
30楼  发表于: 2010-06-05 15:59
描述:emulator
图片:
下载编完所有的android2.1源码后,为什么模拟器运行起来没有具体内容啊?
[root@localhost images]# emulator -avd cupcake -sysdir /root/android_src/out/target/product/generic/ -system /root/android_src/out/target/product/generic/system.img -data /root/android_src/out/target/product/generic/userdata.img -ramdisk /root/android_src/out/target/product/generic/ramdisk.img -kernel /root/android_src/prebuilt/android-arm/kernel/kernel-qemu




还有按了menu键也这样,是不是加载那些镜像文件有问题?或者编译的镜像文件有问题呢?我再次启动加上-show-kernel参数,输出启动信息如下:

Uncompressing Linux.......................................................................................... done, booting the kernel.
Initializing cgroup subsys cpu
Linux version 2.6.29-00261-g0097074 (digit@digit.mtv.corp.google.com) (gcc version 4.4.0 (GCC) ) #14 Tue Feb 2 15:49:02 PST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU: VIVT data cache, VIVT instruction cache
Machine: Goldfish
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 24384
Kernel command line: qemu=1 console=ttyS0 android.checkjni=1 android.qemud=ttyS1 android.ndns=3
Unknown boot option `android.checkjni=1': ignoring
Unknown boot option `android.qemud=ttyS1': ignoring
Unknown boot option `android.ndns=3': ignoring
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 96MB = 96MB total
Memory: 93844KB available (2540K code, 679K data, 104K init)
Calibrating delay loop... 181.04 BogoMIPS (lpj=905216)
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
net_namespace: 520 bytes
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
checking if image is initramfs... it is
Freeing initrd memory: 156K
goldfish_new_pdev goldfish_interrupt_controller at ff000000 irq -1
goldfish_new_pdev goldfish_device_bus at ff001000 irq 1
goldfish_new_pdev goldfish_timer at ff003000 irq 3
goldfish_new_pdev goldfish_rtc at ff010000 irq 10
goldfish_new_pdev goldfish_tty at ff002000 irq 4
goldfish_new_pdev goldfish_tty at ff011000 irq 11
goldfish_new_pdev smc91x at ff012000 irq 12
goldfish_new_pdev goldfish_fb at ff013000 irq 13
goldfish_new_pdev goldfish_audio at ff004000 irq 14
goldfish_new_pdev goldfish_mmc at ff005000 irq 15
goldfish_new_pdev goldfish_memlog at ff006000 irq -1
goldfish_new_pdev goldfish-battery at ff014000 irq 16
goldfish_new_pdev goldfish_events at ff015000 irq 17
goldfish_new_pdev goldfish_nand at ff016000 irq -1
goldfish_new_pdev goldfish-switch at ff017000 irq 18
goldfish_new_pdev goldfish-switch at ff018000 irq 19
goldfish_pdev_worker registered goldfish_interrupt_controller
goldfish_pdev_worker registered goldfish_device_bus
goldfish_pdev_worker registered goldfish_timer
goldfish_pdev_worker registered goldfish_rtc
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered smc91x
goldfish_pdev_worker registered goldfish_fb
goldfish_audio_probe
goldfish_pdev_worker registered goldfish_audio
goldfish_pdev_worker registered goldfish_mmc
goldfish_pdev_worker registered goldfish_memlog
goldfish_pdev_worker registered goldfish-battery
goldfish_pdev_worker registered goldfish_events
goldfish_pdev_worker registered goldfish_nand
goldfish_pdev_worker registered goldfish-switch
goldfish_pdev_worker registered goldfish-switch
ashmem: initialized
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
yaffs Feb  2 2010 15:48:32 Installing.
msgmni has been set to 183
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
allocating frame buffer 320 * 480, got ffa10000
Console: switching to colour frame buffer device 40x30
console [ttyS0] enabled
loop: module loaded
nbd: registered device at major 43
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@cam.org>
eth0 (smc91x): not using net_device_ops yet
eth0: SMC91C11xFD (rev 1) at c684c000 IRQ 12 [nowait]
eth0: Ethernet addr: 52:54:00:12:34:56
goldfish nand dev0: size 4000000, page 2048, extra 64, erase 131072
goldfish nand dev1: size 4000000, page 2048, extra 64, erase 131072
goldfish nand dev2: size 4000000, page 2048, extra 64, erase 131072
mice: PS/2 mouse device common for all mice
*** events probe ***
events_probe() addr=0xc6854000 irq=17
events_probe() keymap=qwerty2
input: qwerty2 as /devices/virtual/input/input0
goldfish_rtc goldfish_rtc: rtc core: registered goldfish_rtc as rtc0
logger: created 64K log 'log_main'
logger: created 256K log 'log_events'
logger: created 64K log 'log_radio'
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
goldfish_rtc goldfish_rtc: setting system clock to 2010-06-03 17:17:39 UTC (1275585459)
Freeing init memory: 104K
mmc0: new SD card at address e118
mmcblk0: mmc0:e118 SU02G 200 MiB
mmcblk0:
init: cannot open '/initlogo.rle'
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
yaffs tragedy: Bad object type, 1854998237 != 4, for object 122539569 at chunk 13567 during scan
yaffs tragedy: Bad object type, 1722134475 != 8, for object 161941314 at chunk 13566 during scan
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
yaffs_read_super: isCheckpointed 0
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs_read_super: isCheckpointed 0
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/playmp3', disabling 'bootsound'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/etc/init.goldfish.sh', disabling 'goldfish-setup'
init: cannot find '/system/bin/qemud', disabling 'qemud'
init: cannot find '/system/bin/logcat', disabling 'goldfish-logcat'
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5407
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11054 分
注册时间: 2008-01-16
最后登录: 2014-11-22
31楼  发表于: 2010-06-05 17:32
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/app_process', disabling 'zygote'
...

看起来system.img没有被内核正确挂载。你修改过/init.rc吗?

root@localhost images]# emulator -avd cupcake -sysdir /root/android_src/out/target/product/generic/ -system /root/android_src/out/target/product/generic/system.img -data /root/android_src/out/target/product/generic/userdata.img -ramdisk /root/android_src/out/target/product/generic/ramdisk.img -kernel /root/android_src/prebuilt/android-arm/kernel/kernel-qemu

如果你想自己指定image的位置,不需要再指定-avd参数;
“-data /root/android_src/out/target/product/generic/userdata.img”应该改成“-init-data /root/android_src/out/target/product/generic/userdata.img”, emulator启动后默认会把userdata分区的数据保存到/root/android_src/out/target/product/generic/下的userdata-qemu.img里
"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: 22796
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
贡献值: 0 点
综合积分: 2 分
注册时间: 2010-06-07
最后登录: 2010-06-07
32楼  发表于: 2010-06-07 10:44

 回 楼主(shinelk) 的帖子

大哥,我的FL2440开发板能移植android系统吗,我看都是介绍的mini2440的资料。经过哪些修改可以移植到我的板子上啊,期待你的回复。
级别: 新手上路
UID: 15570
精华: 0
发帖: 28
金钱: 140 两
威望: 28 点
贡献值: 0 点
综合积分: 56 分
注册时间: 2010-03-07
最后登录: 2010-06-28
33楼  发表于: 2010-06-09 19:41
我用freerunner的源码进行编译出现了一下错误:
target thumb C: libc_common <= bionic/libc/bionic/eabi.c
target thumb C: libc_common <= bionic/libc/arch-arm/bionic/libgcc_compat.c
target thumb C: libc_common <= bionic/libc/arch-arm/bionic/sigaction.c
target thumb C: libc_common <= bionic/libc/string/bcopy.c
target thumb C: libc_common <= bionic/libc/string/strcmp.c
target thumb C: libc_common <= bionic/libc/string/strncmp.c
target thumb C: libc_common <= bionic/libc/unistd/socketcalls.c
target StaticLib: libc_common (out/target/product/generic/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a)
target SharedLib: libc (out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
out/target/product/generic/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(abort.o): In function `abort':
/opt/lyman/freerunner/bionic/libc/unistd/abort.c:126: relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__libc_android_abort' defined in .glue_7 section in /opt/lyman/freerunner/prebuilt/linux-x86/toolchain/armv4t-android-eabi-4.2.1/bin/../lib/gcc/armv4t-android-eabi/4.2.1/interwork/libgcc.a(_clz.o)
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so] Error 1
请问什么原因?谢谢!
级别: 新手上路
UID: 15570
精华: 0
发帖: 28
金钱: 140 两
威望: 28 点
贡献值: 0 点
综合积分: 56 分
注册时间: 2010-03-07
最后登录: 2010-06-28
34楼  发表于: 2010-06-09 20:31
什么原因呢?
级别: 新手上路
UID: 23025
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
贡献值: 0 点
综合积分: 2 分
注册时间: 2010-06-11
最后登录: 2017-09-13
35楼  发表于: 2010-06-11 06:38
具体是什么原因呢
级别: 新手上路
UID: 23084
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
贡献值: 0 点
综合积分: 2 分
注册时间: 2010-06-12
最后登录: 2010-06-12
36楼  发表于: 2010-06-12 13:54
     羡慕!!!强大!!!到底怎么弄的啊··· ···
级别: 新手上路
UID: 7596
精华: 0
发帖: 12
金钱: 75 两
威望: 29 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2009-07-21
最后登录: 2013-10-31
37楼  发表于: 2010-06-20 21:19
现在还有人在更新吗?
吸血姜丝
级别: 新手上路
UID: 13029
精华: 0
发帖: 39
金钱: 195 两
威望: 39 点
贡献值: 0 点
综合积分: 78 分
注册时间: 2010-01-17
最后登录: 2010-11-19
38楼  发表于: 2010-06-21 14:58
看看上TS之后,是不是趴龟了
级别: 新手上路
UID: 20886
精华: 0
发帖: 4
金钱: 25 两
威望: 5 点
贡献值: 0 点
综合积分: 8 分
注册时间: 2010-05-09
最后登录: 2017-09-13
39楼  发表于: 2010-06-21 23:58
我的1.5  屏幕显示不全
我要升级 学习中