I found that issue in my G1 few months ago.
My quick fix is
diff --git a/vold/mmc.c b/vold/mmc.c
index 0f08964..77a954a 100644
--- a/vold/mmc.c
+++ b/vold/mmc.c
@@ -148,6 +148,10 @@ static int mmc_bootstrap_card(char *sysfs_path)
sprintf(filename, "/sys%s/type", devpath);
p = read_file(filename, &sz);
p[strlen(p) - 1] = '\0';
+ if (strcmp(p, "SDIO") == 0) {
+ free(p);
+ return 0;
+ }
sprintf(tmp, "MMC_TYPE=%s", p);
free(p);
uevent_params[1] = (char *) strdup(tmp);
On Jul 17, 10:47 pm, Ke <[email protected]> wrote:
> My platform is the Overo Fire.
>
> Solution further down.
>
> The sd slot and wireless/bluetooth are both connected to the mmc
> interface at:
>
> /sys/class/mmc_host/mmc0
> and
> /sys/class/mmc_host/mmc1
>
> the sd card located at mmc0 bootstraps just fine. When VOLD attempts
> to also bootstrap mmc1, segfault occurs:
>
> bootstrap_card(/sys/class/mmc_host/mmc1/mmc1:0001):
> I/DEBUG ( 888): *** *** *** *** *** *** *** *** *** *** *** *** ***
> *** *** ***
> I/DEBUG ( 888): Build fingerprint: 'generic/generic/generic/:1.5/
> CUPCAKE/eng.demo.20090716.170157:eng/test-keys'
> I/DEBUG ( 888): pid: 887, tid: 887 >>> /system/bin/vold <<<
> I/DEBUG ( 888): signal 11 (SIGSEGV), fault addr 00000000
> I/DEBUG ( 888): r0 00000000 r1 00020000 r2 00000000 r3 80808080
> I/DEBUG ( 888): r4 00000000 r5 00000000 r6 beb40480 r7 000121cc
> I/DEBUG ( 888): r8 00000000 r9 00000000 10 00000000 fp 00000000
> I/DEBUG ( 888): ip 00000000 sp beb40458 lr 0000a813 pc
> afe0e188 cpsr 40000010
> I/DEBUG ( 888): #00 pc 0000e188 /system/lib/libc.so
> I/DEBUG ( 888): #01 pc 0000a810 /system/bin/vold
> I/DEBUG ( 888): #02 pc 0000a9be /system/bin/vold
> I/DEBUG ( 888): #03 pc 0000aa80 /system/bin/vold
> I/DEBUG ( 888): #04 pc 000097c4 /system/bin/vold
> I/DEBUG ( 888): #05 pc 0001fd6a /system/lib/libc.so
> I/DEBUG ( 888): #06 pc 0000bcb2 /system/lib/libc.so
> I/DEBUG ( 888): #07 pc b000157e /system/bin/linker
> I/DEBUG ( 888): stack:
> I/DEBUG ( 888): beb40418 000000dc
> I/DEBUG ( 888): beb4041c 00002bb0
>
> this is the content of my vold.conf:
>
> volume_sdcard {
> ## This is the direct uevent device path to the SD slot on the
> device
> media_path /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
> media_type mmc
> mount_point /sdcard
> ums_path /devices/platform/usb_mass_storage/lun0
>
> }
>
> To fix this, I kind of went around the issue all together since I
> didn't want to spend forever pinpointing the line that was causing the
> bootstrap process to segfault on the sdio wireless chip.
>
> First change is mandatory. Second change is not needed.
>
> --- a/system/core/vold/mmc.c 2009-07-02 16:15:08.000000000 -0400
> +++ b/system/core/vold/mmc.c 2009-07-17 10:35:02.000000000 -0400
> @@ -54,8 +54,14 @@
> continue;
>
> sprintf(tmp, "%s/%s", SYSFS_CLASS_MMC_PATH, de->d_name);
> - if (mmc_bootstrap_controller(tmp))
> + if (mmc_bootstrap_controller(tmp)) {
> LOG_ERROR("Error bootstrapping controller '%s' (%m)",
> tmp);
> + }
> + else {
> + //a controller has already been bootstrapped, lets stop
> trying to get more
> + //TODO: hack fix to get around segfault on boostrapping
> sdio card connected to mmc bus
> + break;
> + }
> }
>
> closedir(d);
> @@ -85,7 +91,8 @@
> if ((!strcmp(de->d_name, "uevent")) ||
> (!strcmp(de->d_name, "subsystem")) ||
> (!strcmp(de->d_name, "device")) ||
> - (!strcmp(de->d_name, "power"))) {
> + (!strcmp(de->d_name, "power")) ||
> + (!strcmp(de->d_name, "slot_name"))) {
> continue;
> }
>
> I hope this saves people some time when trying to get VOLD to work
> certain systems. I don't know why VOLD is even attempting to bootstrap
> mmc1 when only mmc0 is clearly defined in the vold.conf file. Possibly
> a bug?
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---