Jump to content

[Development][ROM] Stock FROYO + 2.6.32 kernel


Guest pier11

Recommended Posts

I believe the problem resides in .32 kernel with regard to wifi integration. Particular place is drivers/mmc/host/msm_sdcc.c

There happens integration of wifi module as SDIO card into kernel. It worth (re)studying the same .29 kernel file, and changes huawei made there vs. code aurora original version (I can post a diff if needed).

Please post. I also think the issue resides somewhere in kernel. This is what currently prevents me from combining kernel .32 with cm6-clean.

Didn't you re-do the wifi integration once to aviod reboots? This means there are two different ways that both made wifi connect initially. Now we'll need to find the third way ;)

Totally unrelated idea: when shrinking ascend rom to fit our system partition, it came to my mind that maybe it doesn't need to fit at all. Couldn't we just maybe make a folder like system_app inside data partition, and on system partition, have a symlink app -> /data/system_app? Totally untested idea, but basically this should be possible to do with the update script. One could even think of moving system_app to sdcard instead of data. Or, combine with data2ext: real "data" will be on sd-ext, now unused partition "userdata" could hold system/app.... just an idea....not for ascend, but in general

Edited by dr.flo
Link to comment
Share on other sites

Totally unrelated idea: when shrinking ascend rom to fit our system partition, it came to my mind that maybe it doesn't need to fit at all. Couldn't we just maybe make a folder like system_app inside data partition, and on system partition, have a symlink app -> /data/system_app? Totally untested idea, but basically this should be possible to do with the update script. One could even think of moving system_app to sdcard instead of data. Or, combine with data2ext: real "data" will be on sd-ext, now unused partition "userdata" could hold system/app.... just an idea....not for ascend, but in general

I saw one rom, as I remember, where all apps from /system/app resided in /data/app

This is something I wanted to implement at some point... Because even with +10MB extra space achieved from installation of TRE/CHT8000 roms is still not enough to quickly load for tests roms from phones that have 512MB flash (vs. 256MB in Pulse).

A downside of installing system apps anywhere other than system partition is that user looses option to wipe/factory_reset his phone (all system apps will be removed such render the phone useless)...

Edited by pier11
Link to comment
Share on other sites

A downside of installing system apps anywhere other than system partition is that user looses option to wipe/factory_reset his phone (all system apps will be removed such render the phone useless)...

Not if we put them inside a folder on nomal sdcard (fat partition, not sd-ext, which is wiped as well). The filesystem fat shouldn't be a problem? Folder should be hidden to make accidental deletion less likely. I know it's not as safe as having the files in system, but if it's the only way to run a fully featured rom, people might well accept it. Also, there could be an update.zip that simple restores the moved system apps in case they got erased.

Edited by dr.flo
Link to comment
Share on other sites

Please post. I also think the issue resides somewhere in kernel. This is what currently prevents me from combining kernel .32 with cm6-clean.

true, that's the last serious issue to overcome.

attached diff to closest code aurora file.

may be something with suspend/resume logic...

kernel-2.6.29-U8220-Eclair-ORIG.5865c0e84f6b22dd1a6f6592b65ba42d54126d5f.urw.msm_sdcc.c.diff.zip

Link to comment
Share on other sites

what's this - doesn't seem to be in your code, only in theirs


#ifdef CONFIG_MMC_MSM7X00A_RESUME_IN_WQ

Don't know if that's relevant, but it has RESUME in its name... and 7x00a... reminds me a bit to qdsp7200a...

also, whole msmsdcc_resume(struct platform_device *dev) function might be relevant

Edited by dr.flo
Link to comment
Share on other sites

@dtox125 and all,

I run this rom with the latest kernel from normal (froyo-huawei) branch, not compat. With recent two additions to kernel USB_ANDROID_RNDIS and USB_ANDROID_CDC_ECM, the rom agreed to tether via usb! (well ok there is no radio functional yet to tether to, but anyway :)

here are some errors, but UI said it is tethered. Icon for tethering appeared in notification area..

EDIT:

error is because android part wanted

/sys/devices/platform/msm_hsusb/gadget/switchusb
but in kernel we don't expose it yet, as
# CONFIG_USB_AUTO_INSTALL is not set
It's needed to revisit usb auto-switch functionality in kernel... Might bring back usb identity to Huawei to be compatible with old drivers...
$ ./adb shell netcfg

lo   	UP	127.0.0.1   	255.0.0.0   	0x00000049

dummy0   DOWN  0.0.0.0 		0.0.0.0 		0x00000082

rmnet0   DOWN  0.0.0.0 		0.0.0.0 		0x00001002

rmnet1   DOWN  0.0.0.0 		0.0.0.0 		0x00001002

rmnet2   DOWN  0.0.0.0 		0.0.0.0 		0x00001002

usb0 	UP	192.168.42.129  255.255.255.0   0x00001043

tunl0	DOWN  0.0.0.0 		0.0.0.0 		0x00000080

Edited by pier11
Link to comment
Share on other sites

tried to trick stock u8150 libhardware_legacy.so by symlinked in /wifi directory:

ln -s /system/wifi/ar6000.ko dhd.ko
as it has this entries:
/data/misc/wpa_supplicant

/wifi/dhd.ko

firmware_path=/system/wifi/firmware.bin nvram_path=/system/wifi/nvram.txt
then it failed to load broadcom firmware. Useless...
<3>[1345, WifiService] [ 5160.982018] ar6000: Unknown parameter `firmware_path'

Link to comment
Share on other sites

I just downloaded the u8110 eclair rom - wanted to to look at wifi there.

First thing I noticed - wpa_supplicant there is v5 but uses wext driver, not awext as v5 does for us in CMx

Problem: notes.txt says you have used a kernel with cm6 ramdisk, which means that in init.rc it will initialize with -dawext.

Maybe that's the reason wifi doesn't run there. As you posted recently, u8110 has our wifi, so we could expect at least that u8110 rom to have working wifi... do you still have the original boot.img of that rom somewhere?

Edited by dr.flo
Link to comment
Share on other sites

i think true issue is that cm6 libhardware_legacy.so tries to open command sockets somewhere else than defined in wpa_supplicant.conf.

cm6 rom has special symlink for it.

Here are my notes:

libhardware_legacy.so (strings):

cm6.1:

/data/system/wpa_supplicant

/system/wifi/ar6000.ko

u8220:

/data/system/wpa_supplicant

/system/wifi/ar6000.ko

u8150:

/data/misc/wpa_supplicant

/wifi/dhd.ko

firmware_path=/system/wifi/firmware.bin nvram_path=/system/wifi/nvram.txt

cm6.1 (init.qcom.rc):

symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant

wpa_supplicant.conf:

cm6.1:

update_config=1

ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi

u8150:

update_config=1

ctrl_interface=DIR=/data/misc/wpa_supplicant GROUP=system

As for u8110 rom, the version in this thread is pretty intact though shrunk a bit. OK, here is the boot.

Edited by pier11
Link to comment
Share on other sites

we're getting closer...

i think true issue is that cm6 libhardware_legacy.so tries to open command sockets somewhere else than defined in wpa_supplicant.conf.

cm6.1 (init.qcom.rc):

symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant

couldn't we (at least while testing...) just make the same symlink?

cm6 libhardware_legacy.so is built from source. Since I have a cm6 build environment ready, I should be able to compile a libhardware_legacy.so variant with different strings... after discovering how and where they get generated of course. Maybe they're hardcoded, then it would be easy... anyways, it can't be really hard to figure it out.

But if it's only that filepath, why not just trying symlinks first?

Edited by dr.flo
Link to comment
Share on other sites

I did:

- exchange libhardware_legacy.so

- exchange wpa_supplicant

- edit init.rc in ramdisk in a way like in posted link

result:

E/WifiHW ( 1268): Unable to open connection to supplicant on "eth0": No such file or directory

I/wpa_supplicant( 2092): CTRL-EVENT-STATE-CHANGE id=-1 state=0

E/wpa_supplicant( 2092): Failed to disable WPA in the driver.

E/WifiHW ( 1268): Supplicant not running, cannot connect

E/WifiHW ( 1268): Supplicant not running, cannot connect

E/WifiHW ( 1268): Supplicant not running, cannot connect

maybe the symlink stuff is the only thing that was still missing in above configuration. Unfortunately I've already wiped that rom and didn't keep a backup. I'll try again tomorrow...

Link to comment
Share on other sites

symlinked as:

cd /data/system/

ln -s /data/misc/wpa_supplicant wpa_supplicant
i run stock wpa_supplicant from u8150 and it doesn't complaint on anything
/system/bin/wpa_supplicant -Dwext -ieth0 -W -c/data/misc/wifi/wpa_supplicant.conf
, while the one from cm6.1 could not open control sockets due to some missing permissions...wondering is it hardcoded to do that on /data/misc/wifi/wpa_supplicant directory instead of /data/misc/wpa_supplicant ?.. EDIT: this is what cm6.1 supplicant says if replaced:
# /system/bin/wpa_supplicant -Dawext -ieth0 -W -c/data/misc/wifi/wpa_supplicant.conf

chown[ctrl_interface]: Operation not permitted
loaded ar6000 manually EDIT2: logcat confirms:
E/WifiHW  ( 1302): Unable to open connection to supplicant on "/data/system/wpa_supplicant/eth0": Connection refused

I/wpa_supplicant( 1653): CTRL-EVENT-STATE-CHANGE id=-1 state=0

E/wpa_supplicant( 1653): Failed to disable WPA in the driver.

E/WifiHW  ( 1302): Supplicant not running, cannot connect

or driver - ar6000 - should be loaded in some special mode?.. I noticed when it's loaded by android, it does not expose wireless extensions at all, bit if manually - does...

Edited by pier11
Link to comment
Share on other sites

1. Updated u8150 reference rom on the first post with:

- working USB tethering

- sound fix

- display density fix

- latest kernel (git commit: e428313be70cb168dcbe9f03ce0d36221218a19d)

2. Many changes in froyo-huawei kernel branch with regard to USB. Now it changes pid (as seen by connected PC) as modes are switching in UI: normal, mass storage, usb tethering. Identity now is Huawei, not Qualcomm. But part of pid is different because newer usb subsystem is used. Pids are the same as on Ideos, Ideos X3.

If I turn on USB tethering, my Linux laptop recognizes network connection and switches to it. I can ping the phone. (Obviously no Internet, as no radio yet)

Edited by pier11
Link to comment
Share on other sites

2. Many changes in froyo-huawei kernel branch with regard to USB. Now it changes pid (as seen by connected PC) as modes are switching in UI: normal, mass storage, usb tethering. Identity now is Huawei, not Qualcomm. But part of pid is different because newer usb subsystem is used. Pids are the same as on Ideos, Ideos X3.

Once again, my adb stopped working (ubuntu 10.04). I didn't download any sdk for getting adb, I just used one I found on the net. Could you upload your adb binary? Replacing the binary did the trick last time. I run adb with sudo for the 1st time per session, so it's not a permission problem.

Link to comment
Share on other sites

, while the one from cm6.1 could not open control sockets due to some missing permissions...wondering is it hardcoded to do that on /data/misc/wifi/wpa_supplicant directory instead of /data/misc/wpa_supplicant ?..

I don't know if this has anything to do with it, but.....

Back when we were cooking 2.1 roms with the dsixda kitchen, we would have to go in and manually delete the /system/etc/wifi file, create a /system/etc/wifi folder, and then copy wpa_supplicant.conf into the new /system/etc/wifi/ folder. If we didn't do that, wifi wouldn't work.

Link to comment
Share on other sites

Once again, my adb stopped working (ubuntu 10.04). I didn't download any sdk for getting adb, I just used one I found on the net. Could you upload your adb binary? Replacing the binary did the trick last time. I run adb with sudo for the 1st time per session, so it's not a permission problem.

here is mine from sdk

Link to comment
Share on other sites

Guest lloco73

About wifi i do not know if this is of interest but if you compare the file where wifi saves networks you'll see that they are stored in different ways.

i've compared the CM7.2 file with the FLB1.7 and there are 2 lines missing for each saved network. Also if you replace the file from flb to cm7.2 it want detect any network. no compatibility between files.

I observed this when tried to recover my wifi networks from a backup with Titanium backup.

Edited by lloco73
Link to comment
Share on other sites

here is mine from sdk

didn't work for me....?

lsusb says

(normal mode) Bus 001 Device 020: ID 12d1:1031 Huawei Technologies Co., Ltd.

(usb storage on) Bus 001 Device 021: ID 12d1:1005 Huawei Technologies Co., Ltd

is this the same as with your device?

Edited by dr.flo
Link to comment
Share on other sites

didn't work for me....?

lsusb says

(normal mode) Bus 001 Device 020: ID 12d1:1031 Huawei Technologies Co., Ltd.

(usb storage on) Bus 001 Device 021: ID 12d1:1005 Huawei Technologies Co., Ltd

is this the same as with your device?

mine are:

(normal mode) Bus 001 Device 104: ID 12d1:1035 Huawei Technologies Co., Ltd

(usb storage on) Bus 001 Device 105: ID 12d1:1005 Huawei Technologies Co., Ltd.

(usb tetheting on) Bus 001 Device 100: ID 12d1:1039 Huawei Technologies Co., Ltd.

adb is available only in normal mode.

EDIT:

it's pretty weird why cd rom only mode is used as normal for you... While mine normal mode is a proper one.

#define PID_ONLY_CDROM              	0x1031

Edited by pier11
Link to comment
Share on other sites

it's pretty weird why cd rom only mode is used as normal for you... While mine normal mode is a proper one.

#define PID_ONLY_CDROM              	0x1031

when turning on tethering, it switches to ID 12d1:1039 like yours, also linux recognizes usb0 network interface. All fine.

Just normal mode differs....

Maybe a different HW revision * that makes kernel .32 decide it has some other mode? With older kernels (all v32 before tethering) adb was working fine on linux. Now it suddenly decides to have a different pid? might also happen with other phones, not just mine?

* we for sure have different HW, since camera sensor differs. Maybe other minor things also differ...

Link to comment
Share on other sites

With older kernels (all v32 before tethering) adb was working fine on linux. Now it suddenly decides to have a different pid?

well because I've finally ported usb auto-pid system from Huawei. This is what Android expects in fact. At least the android compiled by Huawei. It also helps to recognize usb mode on PC. For example my Ubuntu did not recognize usb-tethering before that change.

What's you particular model of phone? 8230? 8220-6?

Link to comment
Share on other sites

well because I've finally ported usb auto-pid system from Huawei. This is what Android expects in fact. At least the android compiled by Huawei. It also helps to recognize usb mode on PC. For example my Ubuntu did not recognize usb-tethering before that change.

What's you particular model of phone? 8230? 8220-6?

Simple U8220, no -6 and no 8230 (would like to have that much ram though)

auto pid is ok, I didn't want to complain about that in general, just about my phone changing to pid different than yours.

Edited by dr.flo
Link to comment
Share on other sites

Simple U8220, no -6 and no 8230 (would like to have that much ram though)

what's in your:

cat sys/devices/platform/msm_hsusb_periphera/fixusb
EDIT: attach please your dmesg (soon after reboot) here. Going to look at initialization. I know, no adb, but in Terminal emulator...
dmesg > /sdcard/dmesg.txt

Edited by pier11
Link to comment
Share on other sites

what's in your:

cat sys/devices/platform/msm_hsusb_periphera/fixusb

where is this? on phone? then how to get without adb.... ok i could extract terminal from some rom, copy to sd card, then install and type in the command. will do when I get home...

Link to comment
Share on other sites

where is this? on phone? then how to get without adb.... ok i could extract terminal from some rom, copy to sd card, then install and type in the command. will do when I get home...

OK, and the dmesg if possible as in my post above.

I should start adding Terminal Emulator to rom :) :)

Looking at auto-pid code, very interesting stuff :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.