1

我想在模拟器上构建和运行 CynongenMod 10.2。首先,我的开发机器没问题(它为 crespo 构建了 CM 10.2,为摩托罗拉 Defy 构建了 CM fork...为三星 p4 平板电脑构建了 CM 10.1)。

为了为模拟器构建 CM 10.2,我执行以下步骤: 早餐金鱼:下载内核和金鱼相关的东西 mka:进行完整构建 构建完成:所有 .img 文件都在 $OUT 文件夹中。似乎一切正常......但是如果我运行“emulator -show-kernel”它会阻塞很多错误:

init: could not import file '/init.carrier.rc' from '/init.rc'
init: do_chown: Could not access /selinux/booleans
init: do_chown: Could not access /sys/fs/selinux/booleans
init: cannot open '/initlogo.rle'
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
block 1177 is bad
block 1182 is bad
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
fs_mgr: Cannot mount filesystem on /dev/block/mtdblock0 at /system
init: fs_mgr_mount_all returned an error
yaffs tragedy: no more erased blocks
[....]
yaffs tragedy: no more erased blocks
init: cannot find '/system/bin/sysinit', disabling 'sysinit'
init: Unable to open persistent property directory /data/property errno: 2
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/qemu-props', disabling 'qemu-props'
init: cannot find '/system/bin/auditd', disabling 'auditd'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/surfaceflinger', disabling 'surfaceflinger'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/drmserver', disabling 'drm'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/handle_compcache', disabling 'compcache'
init: cannot find '/system/bin/qemud', disabling 'qemud'
init: cannot find '/system/bin/logcat', disabling 'goldfish-logcat'
init: cannot find '/system/etc/init.goldfish.sh', disabling 'goldfish-setup'
init: cannot find '/system/bin/sh', disabling 'console'

似乎是 EXT4 图像文件的错误:模拟器不接受 EXT4 文件系统,但只接受 yaffs?

问题很简单:是否可以在模拟器上运行 CM 构建?

4

2 回答 2

1

是的,我和你有同样的问题,然后我运行命令:

mkyaffs2image -f out/target/product/generic/system out/target/product/generic/system_yaffs2.img

emulator -kernel out/target/product/generic/zImage  -system out/target/product/generic/system_yaffs2.img -ramdisk out/target/product/generic/ramdisk.img -data out/target/product/generic/data_yaffs2.img -partition-size 1024  -show-kernel -verbose

等待几分钟,模拟器就可以启动了。

但是 ril 服务似乎是 coredump,所以 3G 网络将无法工作。我正在寻找如何解决这个问题。

于 2013-11-11T02:55:02.717 回答
0

我尝试用另一种方式: *) 编辑 system/core/rootdir/init.rc 文件并更改挂载命令:

on fs
# mount mtd partitions
    # Mount /system rw first to give the filesystem a chance to save a checkpoint
    mount ext4 mtd@system /system
    mount ext4 mtd@system /system ro remount
    mount ext4 mtd@userdata /data nosuid nodev
    mount ext4 mtd@cache /cache nosuid nodev

输出是:

fs_mgr: Cannot mount filesystem on /dev/block/mtdblock0 at /system
init: fs_mgr_mount_all returned an error
init: cannot find '/system/bin/sysinit', disabling 'sysinit'
init: Unable to open persistent property directory /data/property errno: 2
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'

*) 使用之前的 init.rc 文件,从 GIT 源编译新的金鱼内核并编辑 .config 文件

CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y

然后使用“emulator -show-kernel -kernel ~/goldfish/arch/arm/boot/zImage”运行模拟器

输出是:

init: could not import file '/init.carrier.rc' from '/init.rc'
init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
init: do_chown: Could not access /selinux/booleans
init: cannot open '/initlogo.rle'
goldfish_nand_read: invalid read, start 0, len 200, dev_size 21560000, write_size 800
end_request: I/O error, dev mtdblock0, sector 2
EXT4-fs (mtdblock0): unable to read superblock
goldfish_nand_read: invalid read, start 0, len 200, dev_size c200000, write_size 800
end_request: I/O error, dev mtdblock1, sector 2
EXT4-fs (mtdblock1): unable to read superblock
goldfish_nand_read: invalid read, start 0, len 200, dev_size 4000000, write_size 800
end_request: I/O error, dev mtdblock2, sector 2
EXT4-fs (mtdblock2): unable to read superblock
goldfish_nand_read: invalid read, start 0, len 200, dev_size 21560000, write_size 800
end_request: I/O error, dev mtdblock0, sector 2
EXT4-fs (mtdblock0): unable to read superblock
fs_mgr: Cannot mount filesystem on /dev/block/mtdblock0 at /system
init: fs_mgr_mount_all returned an error
init: cannot find '/system/bin/sysinit', disabling 'sysinit'
于 2013-11-11T10:10:07.880 回答