[Q] VPN of ICS doesn't work - Huawei Ideos X5 U8800

ICS's VPN doesn't work on my U8800. Is it a bug that hasn't been fixed on Aurora ICS? Anybody has the same problem? Is there a solution for it?

VPN in U8800 Aurora does not work
dmzsdx said:
ICS's VPN doesn't work on my U8800. Is it a bug that hasn't been fixed on Aurora ICS? Anybody has the same problem? Is there a solution for it?
Click to expand...
Click to collapse
I have the same problem. Test Aurora 1.12a, 2.02 and 2.04. I allways do all wipes (cache, data, dalvik). PPTP VPN does not work for mee.

Same here, That renders Onavo Extend unusable. From what i gathered so far, it seems to be a kernel issue and not a rom issue. As users from all kinds of phones report the same behaviour on their ICS roms and so far the only way around is a proper kernel.

ArbiterGR said:
Same here, That renders Onavo Extend unusable. From what i gathered so far, it seems to be a kernel issue and not a rom issue. As users from all kinds of phones report the same behaviour on their ICS roms and so far the only way around is a proper kernel.
Click to expand...
Click to collapse
What about Openvpn?

try kernel 3.08.
flesh it,and try again.for 10....

Try with the new kernel for ics, you can find it on my signature.
Regards
Sent from my U8800 using xda premium

Solution of PPTP VPN problem on custom ICS ROMs
I use Aurora 2.11a now. I have two major problems:
- PPTP VPN not works
- SIP VoIP (only Linphone Video works, but quality not good, other program eg CSipSimple does not work - make/receive calls but voice is not transfered)
I found why PPTP VPN does not work.
I use logcat and found that mtpd can't create PPPoX socket. I found many people has this problem with ICS custom ROMs.
This problem is caused by missing protocol support in kernel.
I compiled and loaded kernel modules (load in terminal by insmod). PPTP VPN connects now withou problems.
Needed kernel modules:
insmod slhc.ko
insmod ppp_generic.ko
insmod pppox.ko
insmod pppopns.ko
I made test without encryption. I suppose that for encrypted PPTP connection more modules will be needed. Eg ppp_mppe.ko for MPPE encryption or ppp_deflate.ko for deflate compression. I will make some tests later.
I suggest add needed modules (with auto modprobe support) to the rom. But I can't put results of my tests to developer posts. I have not made 10 helpful posts.
Please send my solution to DZO.

More tests PPTP VPN in Aurora 2.11a (ICS ROM)
I made more tests:
1. And confirm that for connection to Linux poptop PPTP server (via WiFI) without compression and ancryption this kernel modules are needed: slhc.ko, ppp_generic.ko, pppox.ko, pppopns.ko
2. I also succesfully connect to Microsoft ISA server with MPPE encryption activated. As I suppose in previous post, in this case ppp_mppe.ko module is needed too.
I use mobile phone for work. Not working connection to company ISA VPN PPTP server was major problem for me in Aurora. Now I can connect. Wow. (I have only one big problem with Aurora now - SIP VoIP.)
I did not test PPTP with deflate and bsd compressions (I suppose ppp_deflate.ko and bsd_comp.ko will be needed). I also not tested l2tp and ipsec configurations. (I don't have prepared VPN servers for this.)
There is two ways now. Staticaly compile all code to the kernel or compile kernel modules.
I prefer to add kernel modules to rom. And this modules will be loaded to RAM automaticaly when user needs it (user use VPN, eg as wlan driver module is loaded only when WiFI is used).
DZO, please can you add this to Aurora ROM.

Tests deflate and BSD compression in PPTP VPN in Aurora 2.11a (ICS ROM)
I changed configuration of my Linux poptop PPTP server and test deflate and BSD compresion. Both is working with Aurora ROM. This additional modules are needed ppp_deflate.ko and bsd_comp.ko for this.
I still not tested l2tp and ipsec configurations. (I don't have prepared VPN servers for this.)

Autoloading kernel modules
>There is two ways now. Staticaly compile all code to the kernel or compile kernel modules.
>I prefer to add kernel modules to rom. And this modules will be loaded to RAM automaticaly when user needs it (user use VPN, eg as wlan driver module is loaded only when WiFI is used).
Kernel can load modules automaticaly. Kernel calls "modprobe" for this. But in Aurora and probably in other roms is not corectly configured path to "modprobe" in kernel.
In Aurora kernel is default path "/sbin/modprobe". But "/system/xbin/modprobe" is right.
If you set correct path to "modprobe" in kernel than modules ppp_mppe.ko, ppp_deflate.ko, bsd_comp.ko will be automaticaly loaded to ram when needed. (You have to copy this modules to /system/lib/modules ofcourse). No need to compile thist code staticaly to kernel.
Set correct path to modprobe may be done in startup scripts by:
echo /system/xbin/modprobe > /proc/sys/kernel/modprobe

JaRo1 said:
>There is two ways now. Staticaly compile all code to the kernel or compile kernel modules.
>I prefer to add kernel modules to rom. And this modules will be loaded to RAM automaticaly when user needs it (user use VPN, eg as wlan driver module is loaded only when WiFI is used).
Kernel can load modules automaticaly. Kernel calls "modprobe" for this. But in Aurora and probably in other roms is not corectly configured path to "modprobe" in kernel.
In Aurora kernel is default path "/sbin/modprobe". But "/system/xbin/modprobe" is right.
If you set correct path to "modprobe" in kernel than modules ppp_mppe.ko, ppp_deflate.ko, bsd_comp.ko will be automaticaly loaded to ram when needed. (You have to copy this modules to /system/lib/modules ofcourse). No need to compile thist code staticaly to kernel.
Set correct path to modprobe may be done in startup scripts by:
echo /system/xbin/modprobe > /proc/sys/kernel/modprobe
Click to expand...
Click to collapse
You should let DZO know about this

Strange, all those modules are built into the kernel already:
Code:
[email protected]:/proc # gzip -d < config.gz | grep PPP
CONFIG_PPP=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_MPPE=y
CONFIG_PPPOE=y
CONFIG_PPPOLAC=y
CONFIG_PPPOPNS=y
[email protected]:/proc # gzip -d < config.gz | grep BSD
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_PPP_BSDCOMP=y
# CONFIG_BSD_DISKLABEL is not set
[email protected]:/proc # gzip -d < config.gz | grep SLHC
CONFIG_SLHC=y
[email protected]:/proc #
I wonder why they aren't being used. I'll look into it.

dzo said:
Strange, all those modules are built into the kernel already:
Code:
[email protected]:/proc # gzip -d < config.gz | grep PPP
CONFIG_PPP=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_MPPE=y
CONFIG_PPPOE=y
CONFIG_PPPOLAC=y
CONFIG_PPPOPNS=y
[email protected]:/proc # gzip -d < config.gz | grep BSD
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_PPP_BSDCOMP=y
# CONFIG_BSD_DISKLABEL is not set
[email protected]:/proc # gzip -d < config.gz | grep SLHC
CONFIG_SLHC=y
[email protected]:/proc #
I wonder why they aren't being used. I'll look into it.
Click to expand...
Click to collapse
yay! my hero !

dzo said:
Strange, all those modules are built into the kernel already:
Code:
[email protected]:/proc # gzip -d < config.gz | grep PPP
CONFIG_PPP=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_MPPE=y
CONFIG_PPPOE=y
CONFIG_PPPOLAC=y
CONFIG_PPPOPNS=y
[email protected]:/proc # gzip -d < config.gz | grep BSD
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_PPP_BSDCOMP=y
# CONFIG_BSD_DISKLABEL is not set
[email protected]:/proc # gzip -d < config.gz | grep SLHC
CONFIG_SLHC=y
[email protected]:/proc #
I wonder why they aren't being used. I'll look into it.
Click to expand...
Click to collapse
Hello DZO.
Yes I see. After my post "http://forum.xda-developers.com/showpost.php?p=25872580&postcount=7" you staticaly build needed modules to kernel. Thank you.
I never wrote that staticaly linked modules are not used. I didn't test your kernel with staticaly linked modules. But this is one solution. This is simple solution. All code compile staticaly and create one superbig kernel with all drivers compiled in.
I prefer another solution. Create smaller kernel and many modules with working autoloading. If user use pptp then modules will be automaticaly loaded to ram. If user don't use pptp than modules are not loaded to ram. The same we can do with tun/tap driver - create module tun.ko. (Is staticaly linked now.)
I am working on second solution. I am using your older binary kernel (without staticaly linked modules for PPTP VPN). And I compiled needed modules from your kernel sources (from git). And made tests.
Now I have working kernel modules autoloading. If user use PPTP then kernel automaticaly loads all needed modules.
I made this:
1. I added to directory "/system/lib/modules" needed modules:
bsd_comp.ko, ppp_deflate.ko, ppp_generic.ko, ppp_mppe.ko, pppopns.ko, pppox.ko, slhc.ko
2. I Set correct path to modprobe in kernel:
echo /system/xbin/modprobe > /proc/sys/kernel/modprobe
3. I generate files with information about modules and copy to directory "/system/lib/modules":
modules.alias, modules.dep, modules.dep.bb, modules.symbols
I don't know which solution is better for Aurora ROM.
- Compile one big kernel with all code is simple and does not depend on modprobe (autoloading modules support) functionality. May be more reliable solution.
- Compile code as modules probably has advantage for users who don't use this code (eg do not use VPN). Probably in this case kernel use less RAM. But I don't compare this two solutions (kernel whith staticaly linken code and without). So I don't have concrete numbers.
For DZO:
I attached archive with files (modules and info). May be helpful for you. May be not. Its on you what solution you choose. Please add to starting script this in anycase: echo /system/xbin/modprobe > /proc/sys/kernel/modprobe
Once again I thank you for your work.

hi,
Can you explain the procedure how to load with insmod file ppp_mppe.ko in to my device. I copied in the folder /system/lib/modules/ file ppp_mppe.ko that you sent. I get the message "Exec format error" when trying to load command: insmod /system/lib/modules/ppp_mppe.ko in terminal. My device is a Samsung GT-P5100 with ICS 4.0.4

Dzo,
Have you made any progress with this one? Just wondering if there is a solution for us?
Thanks for the time and effort!!

so did you get PPTP vpn working?
with ample googling this thread seems to be closest to having a working PPTP vpn.
(other than a german thread from 2010: http://www.android-hilfe.de/motorola-milestone/20823-endlich-pptp-vpn-root.html
i'm on cm7.2 - in dire need of working PPTP - it seems that this is an android-wide problem, though i did have it working on my previous phone, also on cm7.2.
so where are we with this? and if loading add'l modules gets it working, could you please hold my hand a bit through the process - i'm a noob and it seems a bit complicated this stuff here.

JaRo1 said:
2. I Set correct path to modprobe in kernel:
echo /system/xbin/modprobe > /proc/sys/kernel/modprobe
Click to expand...
Click to collapse
Sorry ı've same promblem and ı need help. I cant understand second step.please exlplain it me?
I wait your help.

Related

A500 v3.2 stock (2.6.36.3+) kernel modules

/*Update Nov 09 2011: Added cryptoloop.ko */Update
/*Update Nov 02 2011: Added option.ko for some usb 3G modems and asix.ko for usb ethernet adapters that uses Asix AX88772 chipset */Update
*/Update Oct 12 2011: NTFS support comes standard with the 3.2's kernel, so I removed ntfs.ko module. */Update
Since I could not find all the modules I needed, and did not want to bug devs any more, I decided to bite the bullet and compile myself.
These are for the plain 3.2 kernel, which is 2.6.36.3+
I compiled the following modules, which are all in the same 7zip file:
Network:
tun.ko #for openvpn
option.ko #for some 3G modems
asix.ko #for usb ethernet adapters that uses Asix AX88x72 chipset​
Filesystem:
cifs.ko #windows shares
nfs.ko #unix/linux shares
isofs.ko #cd iso images
udf.ko #cd udf images​
USB to serial converter:
ftdio_sio.ko #ftdi usb2serial converters. Prolific chipset is already in the kernel so I did not compile that.​
I have tested these under the stock 3.2 with root rom, the one in http://forum.xda-developers.com/showthread.php?t=1290318 and they load fine without errors on dmesg.
Enjoy.
Let me know if you need any other modules and I will try to compile them.
I have a request I have looked around and have not been able to find this module anywhere. It is the joydev module that supports many gamepads, joysticks and even some racing wheels. The source is available and even some modules for other devices but nothing for any tegra devices. I have a transformer myself but being the same hardware the module should work on either device. I have included the list of devices that are supported by the driver and the source for the driver. Any help would be greatly appreciated.
Supported devices:
http://atrey.karlin.mff.cuni.cz/~vojtech/input/hardware.html
Source:
https://github.com/netarchy/android_kernel_TF101/blob/master/drivers/input/joydev.c
This is kind of beyond my skillset as I do not know how to patch the kernel tree so that this driver shows on the menuconfig. Sorry.
Could you please build usb_wwan.ko and option.ko for 2.6.36.3+ ?
VicDeo said:
Could you please build usb_wwan.ko and option.ko for 2.6.36.3+ ?
Click to expand...
Click to collapse
usb_wwan seems to be statically compiled into the kernel already (USB driver for GSM and CDMA modems), so there isn't any module but it is always there in the kernel.
I am going to update the original post for the option.ko shortly.
Getting some errors on some of these. Anyone else having issues?
Tried these from both /system/lib/modules and sdcard.
option.ko:
Code:
insmod: init_module '/sdcard/modules/option.ko' failed (Invalid argument)
nfs.ko:
Code:
insmod: init_module '/sdcard/modules/nfs.ko' failed (No such file or directory)
Triple checked that the nfs.ko file was there and named correctly.
Following modules have installed fine.
asix, ftdi_sio, and cifs
I've just checked those two on my a500. It seems like option.ko is statically linked into the kernel, because on dmesg it says "option: module is already loaded". If I am guessing it correct (e.g. driver is statically linked in the kernel) than it means you don't need the .ko at all.
For the nfs, it throws bunch of "unknown symbol" errors on dmesg, I am guessing it cannot read symbols from the kernel. If that's the case, it would need a new kernel with a modified makefile, which is beyond my abilities unfortunately.
How to make the system load the module automatically when boot up? Thanks
mcmugchu said:
How to make the system load the module automatically when boot up? Thanks
Click to expand...
Click to collapse
That I don't know, I manually load them whenever I need.
mcmugchu said:
How to make the system load the module automatically when boot up? Thanks
Click to expand...
Click to collapse
You need system/etc/init.d folder with modules file.
I posted a patch for testing here is link maybe it works , flash with cwm.
Based on this thread. so all credits go to OP.
http://www38.zippyshare.com/v/75708872/file.html
Hi does anybody know if these support netbios name, i can't download and try right now. I've only found modules that works with the ip but not the name. Not practical when moving a lot.
Thanks
Hi,
I am using the same kernel 2.6.36.3+ and I'd like to have please:
eeprom_93cx6.ko, mac80211.ko, rtl8187.ko
Thank you in advance and if you can provide a tutorial that would be awesome!
Thanks!!
Good jobs.
but the modules don't work on Sumsung P7500 tablet,(Kernel 2.6.36.4)
htt p:// droidbasement.com /db-blog/?p=2395
10.1 3G, Touchwiz UX (HC 3.1 (stock); GT-P7500):
boot-cm_2636.4_p4_ux-oc-xtra-vfpv3-d16_fp-112011.zip
insmod isofs.ko, I got a error message" Exec format error"
Can you compile them for this kernal version? Thanks!
I need isofs.ko,udf.ko to support DVD image files.

[HELP] OpenVPN settings about tun.ko

I just changed my kernel with nAa's v6 kernel from stock. I believe that tun.ko or tun/tap (correct me if im wrong) is already in kernel so i have to delete modules in /system/lib/modules to avoid conflict. Now my problem is how can I locate the path of tun.ko if it is already in the kernel. When I am using stock kernel the path in my openvpn setting of tun.ko is is system/lib/modules/tun.ko, but now I have nAa's kernel what path should i put in the openvpn setting coz if i only put tun.ko in the setting it doesnt work. Anyone can help me? Thank you.
Try modprobe I guess. haha mwah
modprobe is only for modules operation. you have no module per se to work with so modprobe is not the right command to work with.
have you tried just letting your openvpn run? I think it will automatically use whatever is provided in the kernel hence no need to specify anything for module at all.

[EXPERIMENTAL/TOOLS/GUIDE/ADV.] Toolchain gcc 4.6.3 Cygwin/Linux/OSX; kernel builds

The following contains binaries, and instructions for use of an experimental newer toolchain than those included in the android pre-built package.
This is provided to allow existing linux kernel developers experiment with the updated version of GCC (besides the complicated building instructions the code just has a small patch for a known issue with android and 4.6.* otherwise is directly from GNU (see build information below)
The packages I'm also providing to help developers current on windows (With cygwin but no other virtual environment) to start exploring android Linux kernel development for their devices. (In addition to a OSX toolchain for more advanced mac users)
due to the slight differences between kernels on different devices this How To is intended to be used for advanced users who can adjust for the differences required for the devices specific kernel.
I may add additional guides to this thread if I find a need for them.
[size=+1]Binary Toolchains[/size]
I have two versions of a GCC-4.6.3 toolchain
1) For x86 linux: toolchain-4.6.3.tar.bz2 (Sha1: c8c57aba6ad92e9acddf29ba8620ba880be09a81)
2) For Cygwin (windows): toolchain-4.6.3.cygwin.tar.bz2 (Sha1: 6947e1c1ba95195019f542eb8ba0708667b63eca)
3) For OSX (mac/darwin): toolchain-4.6.3.darwin.tar.bz2 (Sha1: 9a977f0672863fdd9501383a6ad1e30723281f68)
[size=-1]> The linux version was built via this script: http://pastebin.com/b2dZ8YtG (or in the included toolchain_notes.txt)
> The cygwin/darwin version uses the same source however has a slightly modified script (see the included toolchain_notes.txt for the updated script)[/size]
[size=+1]System Requirements[/size]
Note I have a 64bit debian linux box, and a 64bit version of WIndows7 Pro running cygwin, while I believe these binaries ought to be compatible with all x86 linux and cygwin installs these have not been tested by a wide number of people yet.
> Linux users: If you have a working android build environment likely no additional requirements are needed. In addition you must build any kernel/android utilities from a case sensitive filesystem or disk image.
> OSx users: the cygwin packages will give you an idea of what is required, please also see the README in the tar.bz2 about manually installing elf.h
> Cygwin users: as its unlikely you have compiled a kernel with cygwin up to this point you may wish to ensure the following packages are installed (as well as any cygwin recommends to be used with them):
vim
vim-common
make
cmake
lzop
gcc
gcc-core
gcc-g++
wget
git
git-compleation
libncurses-devel
python​
Cygwin users must also set their NTFS file partition to allow case sensitive files:
To do this open regedit and change:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
to 0
after this reboot and the NTFS kernel will allow cygwin to use case sensitive files (ie 'AbC' and 'aBc' as two different files)​
[size=+1]Advanced Kernel Building Guide[/size]
Since may devices are slightly different this can only be a high level kernel building guide
Please ask for any specific directions from the current kernel maintainer.
To most people who have built kernels before this will look familiar, the most important part is preparing your local environment to use the new toolchain,
1) If you have not already download the tar.bz2 above, (pick the one for the computer you are preparing to build kernels on)
2) extract the file (for the sake of this guide I will assume it is extracted into a ~/android directory)
ie on cygwin you might:
mkdir -p ~/android
cd ~/android
tar -xjvf toolchain-4.6.3.cygwin.tar.bz2
Note: steps one and two are just properly installing the toolchain, you will not need
to repeat them to build a different kernel.
2.b) OSX Only: check elf.h
open ~/android/toolchain-4.6.3/README in a text editor and check if elf.h is installed, otherwise manually install it as per the readme
3) fetch your kernel source into the ~/android directory and change into the
source codes root directory
(this can be via a git repo or tarball)
example if you wanted my ACER a100/a500 source you might run:
git clone git://github.com/ezterry/AcerTabKernel.git
cd AcerTabKernel
change this to match the source you are fetching
4) In the root directory of the kernel source (~/android/AcerTabKernel in the about a100/a500 example) update the environment for the cross compiler
add the toolchain to your path:
export PATH=$HOME/android/toolchain-4.6.3/bin:$PATH​
set the cross compile:
export ARCH=arm
export CROSS_COMPILE=arm-linux-androideabi-
export KERNEL_DIR=`pwd`​
(this will need to be done once for each terminal you use to run any of the following make commands)
5) Grab your configuration
From the device:
adb pull /proc/config.gz
gzip -dc config.gz > .config
or from a prepared configuration if it's included in your code base by running
make _defconfig
example for the a100/a500 code base is 'make vangogh_defconfig' for the a100 and 'make picasso_defconfig' for the a500
6) Customize configuration
just run menuconfig and use the UI to update settings
make menuconfig​
7) building the kernel (zImage)
This is normal at this point with 'make -j'
so for a quad core CPU you can run
make -j5​
(note: the wrong number in the -j argument will not harm the build but may slow down the building process by either using too few threads or needing to keep track of too many)
8) If it worked you will now have the kernel in arch/arm/boot/zImage
this can be injected into the boot.img (as the kernel, using an existing ramdisk) as is
If it failed for your kernel your kernel source may need one of the common patches
9) Building modules
the following will prepare the modules in subdirectory mod:
make modules
rm -rf mod
mkdir mod
cp `find ./ | grep .ko$` modules.order mod/​
After these commands [if no errors] you can simply copy the contents of mod/ to /system/lib/modules on your device, note it is recommended usually to remove the existing contents of /system/lib/modules unless there is a closed source module required from the previous build despite the new kernel.
[size=+1]Common Patches Required[/size]
If your kernel has not been built for the new toolchain or on cygwin before you may require some of these common patchs: (I've thus far only tested this on my Acer A100/A500 source)
wireless/bcm4329 for GCC-4.6.3:
https://github.com/ezterry/AcerTabKernel/commit/123f32e27e2c74f1c1789ae5d6d5a1c04e1e264c
linux kernel module patch for cygwin (broken elf.h):
https://github.com/ezterry/AcerTabKernel/commit/220db49593cf6b9f3b556e2f4b75b2f6d3ff556c
Error compiling security/smc/bridge_pub2sec.S (I required the cygwin elf patch and this patch to build the Franco galaxy nexus kernel)
0001-Fix-build-error-with-4.6.3-toolchain-smc-0.patch
(use 'git am 0001-Fix-build-error-with-4.6.3-toolchain-smc-0.patch' to apply)
OSX stat patches (fixes errors between GNU and BSD stat):
https://github.com/ezterry/AcerTabKernel/commit/0c49df3cc1a05a0ccd98201511cdc0534aaeb35a
Errors loading newly built modules (modules appear to build cleanly but wont install):
simply add -fno-pic to CFLAGS_MODULE
https://github.com/ezterry/AcerTabKernel/commit/c5ed0fcb014d36936a86ad253f15af43de2f644a
(I can add others here if highlighted to me, and as I find them)
[size=+1]Other Toolchain uses[/size]
The linux toolchain can be used to build android components, however this requires various manipulation to the android /build git repository as currently various other toolchains have hard coded paths into the prebuilt repo. If you intend to incorporate this into your build it may be best to inject the toolchain into your prebuilt repo rather than expect your users to download the links above, ensure to keep the compile notes as it explains how to get the source code to the toolchains)
On cygwin/osx it may also be possible to build android applications however I've not yet tested this as the scripts to make a proper build are complex when attempted outside the android build tree.
Excellent!!! thanks Man!!! Has been looking for one of these
Added in the OSX version of the toolchain (and some related patches)
Also if you are having problems with your modules built with this toolchain a CFLAG fixes it. (see note in common patches)
FINALLY!!! Great Instructions followed them to the T and BAM got my kernel compiled!!!
wow your toolchain is so small, many thanks, just compiled a kernel for my LG P500 gonna test it, thanks again
Bookmarked for testing when I wake up...
I can almost put: "Building under Windows is not currently supported." (quote from google), unofficially at least, out of my mind...
I have been spoiled by Windows for far too long I fear, my attempt for this last week at getting Linux setup and building CM9 has been nothing but a complete FAILURE, too many single line entrys for different distributions/package combo's, commands I dont know and cant find because of wildcard portions of them and lack of understanding, and not enough scripts like the wonderful Compile CM9 script someone put up (cant run it because all the pre-req's arent setup).
Good god Ill be jumping for joy if this works tomorrow on WinBlows!
EDIT: never mind, problem solved, what I need to know now won't be solved here
I wish i knew how to go about doing this..
Thanks
Thanks For ........... i Really need It .........
Hammerfest said:
Bookmarked for testing when I wake up...
I can almost put: "Building under Windows is not currently supported." (quote from google), unofficially at least, out of my mind...
I have been spoiled by Windows for far too long I fear, my attempt for this last week at getting Linux setup and building CM9 has been nothing but a complete FAILURE, too many single line entrys for different distributions/package combo's, commands I dont know and cant find because of wildcard portions of them and lack of understanding, and not enough scripts like the wonderful Compile CM9 script someone put up (cant run it because all the pre-req's arent setup).
Good god Ill be jumping for joy if this works tomorrow on WinBlows!
Click to expand...
Click to collapse
If you succeed tell me how to do it in a more familiar way
I get errors regading the processor not being supported?
brfield said:
I get errors regading the processor not being supported?
Click to expand...
Click to collapse
Sorry I can't support devs that have not learned cut copy and paste.
You probably forgot to export some of the environment variables or are just trying to run a arm binary on your PC and or a x86 binary on your arm device.
But why am I guessing? Why don't we know what you tried to run and what the actual text of the error was.. what type of kernel you tried to build, what you are running?
These packages are for developers if you feel like using them its time to learn to how to trouble shoot a problem and write a ticket to explain said problem clearly to others with at least some information to give us a chance to understand.
Sent from my Galaxy Nexus using Tapatalk 2
Great guide. Have the bcm4329 wireless module, so followed the tips and everything compiled and works!
Thanks!
one question,how to compiled android kernel with -O3 optimization?
jxxhwy said:
one question,how to compiled android kernel with -O3 optimization?
Click to expand...
Click to collapse
Um, in general its recommended you don't:
-O3 is not recommended for the kernel as many low level parts require the assembly code generated to remain as is and not be optimized as will be by some of the options -O3 enables thus likely reducing the stability of your kernel.
---
That said the menuconfig has an option to optimize for size (-Os) if enabled else -O2
For other optimization (including tuning for your cpu) you can add them to the CFLAGS_KERNEL/CFLAGS_MODULE in the make file.)
For -O3 like functionality you could add the increment to the line:
-finline-functions, -funswitch-loops, -fpredictive-commoning, -fgcse-after-reload, -ftreel-vectorize, -ftree-partial-pre and -fipa-cp-clone
-Ofast is -O3 with -ffast-math as well
If you do build with all the -O3 or-Ofast options ensure you test the kernel for stability and run some benchmarks. (as it may not actually be faster depending on the cache misses)
The first option I'd start pruning was the one mentioned in my reference below -fgcse-after-reload.
If you really insist on -O3 rather than just adding the optimization you want that are not in O2,it can be added also in the Makefile where the configure flag is checked and its added to KBUILD_CFLAGS
Obviously all and any of this is at your own risk, anything that breaks you have to find a way to fix it.
Reference:
Gcc optimize options:
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Talk of O3 and the kernel (not android specific)
http://unix.stackexchange.com/questions/1597/compiling-gnu-linux-with-o3-optimization
ezterry,thank you very much!
I want to build cm9 kernel using toolchain 4.6.3.
How to replace the default GCC 4.4.3 to 4.6.3 version?
BTW,I use the way -- make bootimage
jxxhwy said:
ezterry,thank you very much!
I want to build cm9 kernel using toolchain 4.6.3.
How to replace the default GCC 4.4.3 to 4.6.3 version?
BTW,I use the way -- make bootimage
Click to expand...
Click to collapse
If you are asking in a cm9 build tree.. its a pain, best is to update the cm kernel makefile to point the build chain temporarily.
If you mean just to compile by hand as described in the op
Once the kernel is compiled find an anykernel update.zip or manually use mkbootimg or fastboot to merge it with the ram disk. Cm9 targets mkbootimg and unpackbootimg (if I'm not mistaken) will build the applications to unpack your current (or the default cm9) boot image and re-create them with your custom kernel built from hand.
Now,I runing script file:
#Let's make sure the environment is clean and ready to compile the kernel
echo "Cleaning house!!"
make mrproper
echo "House cleaned, lets build a kernel!!!"
#
# Lets set the kernel defconfig
echo "defconfig = cyanogenmod_iprj_defconfig"
make ARCH=arm cyanogenmod_iprj_defconfig
#
# Let's build a kernel
echo "Now compiling kernel, go get a soda! "
ARCH=arm CROSS_COMPILE=~/Android/sourcecm9/cm9/toolchain-4.6.3/bin/arm-linux-androideabi- make zImage -j4
#
if [ -f arch/arm/boot/zImage ]; then
echo "Plague has been compiled!!! You can find it in arch/arm/boot/zImage"
else
echo "Kernel did not compile, please check for errors!!"
fi
but,I got some error output:
/home/xxx/cm9/toolchain-4.6.3/bin/arm-linux-androideabi-ld: cannot find usr/initramfs_data.o: No such file or directory
thanks again!!!
I think that means there is an issue with your config..
Most android kernels require initramfs, but don't specify a file, as its provided by the bootloader.. However in your case it is trying to embed it into the kernel.
Sent from my A500 using Tapatalk 2
ezterry said:
I think that means there is an issue with your config..
Most android kernels require initramfs, but don't specify a file, as its provided by the bootloader.. However in your case it is trying to embed it into the kernel.
Sent from my A500 using Tapatalk 2
Click to expand...
Click to collapse
issue has been resolved by myslef.Thanks for your time.

[Modules] CF-root Kernel modules (governors) (for ALL)+ USB OTG research (for DEV)

Warning: This topic requires some technical/computer skills!
I have compiled some modules for the CF-root kernel by ketut.kumajaya (b84 to be precise). These can be compiled to work on other kernels also if anybody is interested
Modules with brief description:
cpufreq_intellidemand.ko / cpufreq_ondemandx.ko :
CPU scaling governors. More information here.
isofs.ko :
CD filesystem for mounting CD / DVD images as loop devices or USB CD drives
ntfs.ko :
NTFS filesystem support. Useful for mounting NTFS formatted drives
Download
How to load modules?
1. Extract and copy modules to any location on /data or /system (root explorer, es explorer, adb etc)
2. Insert module into kernel (terminal emulator / script manager / adb shell )
Code:
insmod /path/to/module.ko
3. Check if module is loaded correctly
Code:
lsmod
It should show LIVE! against the module name
4. Enjoy!
Example script to load all modules. Can be pushed to /system/etc/init.d or run with script manager to load modules at boot
Code:
#!/system/bin/sh
# load modules
insmod /system/lib/modules/cpufreq_intellidemand.ko
insmod /system/lib/modules/cpufreq_ondemandx.ko
insmod /system/lib/modules/isofs.ko
Please remeber to correct the path if different.
Part below is DEV only
I compiled this in the hope of getting USB OTG working. I am herewith attaching the required modules.
All the modules are loading properly and showing LIVE! on lsmod..
dmesg also ok.
But still, on connecting USB drive, dmesg does not show anything at all.. Also no voltage to the drive..
Anybody more advanced can try to figure out if any additional modules are needed. Also, I may try loading the scsi module in the ramdisk and see if there is any difference..
Thanks for your time.
shardul_seth said:
I compiled this in the hope of getting USB OTG working. I am herewith attaching the required modules.
All the modules are loading properly and showing LIVE! on lsmod..
dmesg also ok.
But still, on connecting USB drive, dmesg does not show anything at all.. Also no voltage to the drive..
Anybody more advanced can try to figure out if any additional modules are needed. Also, I may try loading the scsi module in the ramdisk and see if there is any difference..
Thanks for your time.
Click to expand...
Click to collapse
You will need an external powersource like a USB hub to power the device. The won't be able to power the bus, it is prety unlikly that they have connected the vbus supply for the bus to the PMIC to power the bus. Also you would need to tell the PMIC to power the bus, this won't happen automatical.
Also it would be nice if you don't violate the GPL and publish the source you used to compile
coolya said:
You will need an external powersource like a USB hub to power the device. The won't be able to power the bus, it is prety unlikly that they have connected the vbus supply for the bus to the PMIC to power the bus. Also you would need to tell the PMIC to power the bus, this won't happen automatical.
Also it would be nice if you don't violate the GPL and publish the source you used to compile
Click to expand...
Click to collapse
Thanks for your prompt reply. Exactly my thoughts..
As for the source, it was forked from skynet28's kernel source on github. I had to adjust the vermagic value to match ketut's kernel, so that it would load without error!
I could easily compile for my primary device (Neo V), post here, so I thought i could try for my wife's ACE too!!
So,if add the kernel modules to Cf-root by decompiling the ramdisk and then compile it back,it would work?
*Not a kernel expert*
Prawesome said:
So,if add the kernel modules to Cf-root by decompiling the ramdisk and then compile it back,it would work?
*Not a kernel expert*
Click to expand...
Click to collapse
First of all its not compile-decompile ramdisk...to answer the query yes you can place modules in ramdisk and tell init.rc to load them at boot
Sent from Galaxy Ace which just landed on "MOON"
Prawesome said:
So,if add the kernel modules to Cf-root by decompiling the ramdisk and then compile it back,it would work?
*Not a kernel expert*
Click to expand...
Click to collapse
Yes, everything except USB OTG
But easier will be to have a script in init.d folder to load whatever modules you want..
The ISO images can be mounted as loop devices with the following commands once the module is Live!
Code:
#!/system/bin/sh
# mount cd iso script by shardul_seth
if [ ! -d /mnt/sdcard/isofs1 ]; then mkdir /mnt/sdcard/isofs1; fi
busybox mount -o loop -t isofs /path/to/cd.iso /mnt/sdcard/isofs1
Oh...Alright guys @shardul_seth,what if i want to implement this in a rom?
You are free to, just give credit

[B928] OC kernel 0.1 [one-hit wonder]

This will not be worked on any longer thanks to Huawei's incompetence. I'm glad my main phone isn't by them. I leave my 0.2 diff attached (which did make my phone faster FWIW - and has fsync() control. Not of use to me, but people who use a modified libsqlite would like it...). Feel free to apply it and see if you can somehow fix dhd.ko loading.
Hi,
Not one for names, so this shall be known as "OC kernel" This is built from the ICS U8800pro source that Huawei put out.
Install at your own risk; I take no responsibilty for any damage that may occur through the usage of this kernel.
Features:
ADB as root
Overclocking enabled (thanks to genokolar)
Undervolting interface added (from genokolar, who took it from a SE kernel modder somewhere) - I think SetXperia can use it
SIO I/O scheduler added
SmartassV2 cpufreq scheduler (AnDyX mod) - although I think ondemand does a bit better IMO
sysfs entry to turn off keypad lights (I wrote an applet for this some time back, I'll dig it out later)
Logcat is always enabled now as the ServiceMenu toggle doesn't work anymore
Minimum display backlight is set to 15, but I think Android needs a framework change to use it. You could try RootDim
Kernel actually builds (and Bluetooth works)
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
CIFS as module
Extras:
Change schedulers and phone speed:
Use a tool like No Frills CPU or SetCPU.
Turn off button lights:
Install the ButtonLight widget and add it to your main screen. I've published the source before in another thread; seek it out if you're after its (bad) code.
It's buggy the first few times you run it, but works fine after that.
Dim screen to 14:
The minimum backlight level is now set to 15. RootDim from the Play Store lets you set it to that.
Mount Windows shares:
Grab CifsMounter and point it to the cifs.ko in /system/lib/modules. You may also need to insmod nls_utf8.ko and md4.ko.
Enable ZRAM (taken from Siyah kernel):
(Note I've not used ZRAM so I have nothing to say on its stability, good or bad)
Grab a BusyBox binary from somewhere
Run the following commands:
Code:
echo 90 > /proc/sys/vm/swappiness #You must set the swappiness high to ensure that the compressed RAM is accessed first!
echo $SIZE > /sys/devices/virtual/block/zram0/disksize #Set size to whatever you wish. 100MB is 104857600 = 100 * 1024 * 1024
busybox mkswap /dev/block/zram0
busybox swapon /dev/block/zram0
Dump the lines in install-recovery.sh if you want to be ZRAMMed every time you boot the phone (although in that case, make sure you have
Code:
busybox swapoff /dev/block/zram0 > /dev/null 2>&1 #Use > /dev/null 2>&1 for every busybox command in install-recovery.sh as it will discard any messages outputted
echo 1 > /sys/devices/virtual/block/zram0/reset
before the lines above)
Install:
Flash the attached ZIP in CWM recovery. You should backup your original boot.img and /system/lib/modules first
Source:
Take http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and apply attached diff
at last..xaaxxaa!!but why with modules too???whats their use?
pikachukaki said:
at last..xaaxxaa!!but why with modules too???whats their use?
Click to expand...
Click to collapse
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
qwerty12 said:
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
Click to expand...
Click to collapse
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
pikachukaki said:
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
Click to expand...
Click to collapse
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
qwerty12 said:
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
Click to expand...
Click to collapse
You did a great job i couldnt even compile the kernel without changes!!you did great!!
the difference is obvious !!
Sent from my U8800Pro using xda premium
Pika When U add This Kernet To ur ROM?
As expected from qwerty12!
Great job!
I'll also request a guide on how to build the kernel like pika asked.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
husen4u said:
Pika When U add This Kernet To ur ROM?
Click to expand...
Click to collapse
I wont!just d/w it and flash it!simple!
Sent from my U8800Pro using xda premium
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
husen4u said:
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
Click to expand...
Click to collapse
From now on i wont ever go back to GB ever again! if our luck changes and someone release cm9 i will forget what gb is!! there are some small bugs but the rom is usable for everyday!!
Moihack said:
As expected from qwerty12!
Great job!
Click to expand...
Click to collapse
Thank you
I'll also request a guide on how to build the kernel like pika asked.
Click to expand...
Click to collapse
Certainly, sir.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
Click to expand...
Click to collapse
Unfortunately I won't be working on this anymore unless Huawei get back to my request for the source to the the dhd.ko module (which they may not have to comply with because the license for the module states "Unless you and Broadcom execute a separate written software license agreement governing use of this software" so the U8800pro version may not be under GPL). I made (well, found on the Internet) more optimizations but the Wi-Fi refuses to turn on because the dhd.ko module refuses to load. Only way I can get something working is to build the source that Huawei give or attempt to force other versions of the bcm source to load, but it's unlikely that would work.
--
Anyway, a small guide.
I used an x86_64 laptop running (X)ubuntu 12.04.1 to follow these steps. This page was a great resource.
Prerequisites:
A computer running GNU/Linux (a Mac should work in theory - the same toolchain we use is built for it, too, but I have no idea how OS X works)
git installed (apt-get install --no-install-recommends git-core is enough under Ubuntu)
sudo apt-get install flex bison gperf build-essential libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib abootimg
Getting ADB working
One of the best things to do is getting ADB set up, as you then have easy communication with the device. It's not essential but you'll just end up wasting time transferring files through other, longer means.
Grab the Linux platform tools ZIP from here: http://www.hariadi.org/android/manually-download-of-android-sdk-tools-and-sdk-platform-tools/. Extract the adb binary from the zip file, preferably to somewhere in your $PATH. chmod 755 it. chown, if necessary.
Next, open http://aur.archlinux.org/packages/an/android-udev/android-udev.tar.gz and, doing all this as root (sudo in Terminal etc.), place 51-android.rules in /lib/udev/rules.d/ (not the best place - but it works), chmod 644 it and chown root:root it.
Next, execute /usr/sbin/groupadd adbusers, followed by gpasswd -a USERNAME adbusers, USERNAME being the user you normally log on with.
Restart (while you can force Linux to see the new group through the, well, newgrp command udev will not "see" the new rule, despite how much you try with udevadm).
That should be ADB set up (give it a test, remembering to enable USB debugging mode on the phone first!).
On to preparing your workarea.
--
Create a new folder in your home folder and cd to it. This folder will house the prebuilt folder of toolchains and other stuff, and the kernel source in a folder of its own.
In this folder, execute git clone --depth 1 https://android.googlesource.com/platform/prebuilt.git and move onto the next step, since the download takes a while. That command grabs the prebuilt toolchain from Google using Git, but doesn't obtain a deep history for each file to make the download quicker.
Open http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and save the source to your Downloads directory. After git has finished running, still in the folder with the "prebuilt" folder, execute tar jxf ~/Downloads/HUAWEI_U8800pro<tab - as in actually press tab> and you should have a kernel folder alongside the prebuilt one.
Building the kernel
cd to this new kernel folder.
First things first: make sure that Bluetooth is properly enabled by editing the Makefile. Find the line #ifeq ($(ENABLE_BTLA_VER30),true) and comment out every line in that section except for KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30 so you end up with this:
Code:
#/* < DTS2012020604357 zhangyun 20120206 begin */
# Add Huawei Marco for different BT chip
#ifeq ($(ENABLE_BTLA_VER30),true)
KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30
#endif
#ifeq ($(ENABLE_BLUEZ_VER30),true)
#KBUILD_CFLAGS += -DHUAWEI_BT_BLUEZ_VER30
#endif
#/* DTS2012020604357 zhangyun 20120206 end > */
Commenting out the offending code leaves you with a kernel that builds but a Bluetooth module that won't start up - the same also applies if you try to build with the other define.
You can also make things easier for yourself by replacing the following
Code:
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
with
Code:
ARCH ?= arm
CROSS_COMPILE ?= ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
else you will have to put "ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" after "make" each time. Remember this as I'll be assuming that you went for the option to edit the Makefile. I also assume that the prebuilt folder is above the kernel one. Adjust CROSS_COMPILE if necessary.
The ARCH variable is self-explanatory, but the CROSS_COMPILE variable (and the toolchain that it's pointing to) need to be set because the standard GNU development tools that apt installs don't produce output that an ARM processor can understand. So you cross-compile: the tools are for the X86 architecture but produce ARM output. 4.4.3 is chosen because the stock kernel is compiled with GCC 4.4.3 (if you run "adb shell cat /proc/version" you'll see). The arm-eabi-4.4.3 folder is chosen over arm-linux-androideabi-4.4.x because it specifies that magic "3" (I know, bad way to decide but it works), and over i686-android-linux-4.4.3 because we don't want to produce code for the PC.
Get the current configuration in use by the stock kernel (as that's a good point to start from - a known working configuration): http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source#Configure_the_Build
I'd also recommend placing a copy of .config as arch/arm/configs/<your funky name here> so that if .config gets deleted (make clean etc.) you can run make <the name you gave to the file in arch/arm/configs> and have .config come back again.
(cp arch/arm/configs/<the name you gave to the file> .config if you didn't modify the Makefile to specify the ARM arch.)
Run make oldconfig (not always necessary - generally it's invoked if you've applied a patch that introduces a new config option and the option then needs to go into your .config. Run make menuconfig afterwards and customize away.
When you're done, run make -jX - X as in the number of cores you have + 1. So, in my case, with a quad-core processor and HyperThreading enabled on all of them, "make -j9" works for me. If the compile went OK, you'll be left with a message saying that arch/arm/boot/zImage is ready. If not, run "make" without the -jX argument and make should stop where the error occurs. Have fun fixing the error!
Assuming that you have a new, shiny zImage, it's now time to put it into your boot.img.
Updating your boot.img:
Google have tools for this purpose but I've never used them so I don't know how they work. abootimg works fine for this, however.
Pull the current boot.img off your phone: adb pull /.cust_backup/image/boot.img.. I'd recommend creating a backup somewhere.
Create a new directory to store the boot.img in on your computer and run abootimg -x boot.img (if you had fun enabling every option in the kernel, you'll see why I'm telling you to use the -x option first rather than directly use the -u option). Now run abootimg -u boot.img -k <path to your newly built zImage>.
If this succeeds, yay! If not and you're told it's too big for the boot image, then don't worry. Take the size it's saying that the zImage is and convert that number into hex. Edit bootimg.cfg and change the value of the bootsize setting into the number you just converted into hex. We'll now repack again, but this time running abootimg -u boot.img -f bootimg.cfg -k <path to your newly built zImage>. This should work.
Sending the boot.img to the phone
If your ADB is already running as root, you can do the following to upload the new bootimg:
Code:
adb shell mount -o remount,rw /.cust_backup
adb push boot.img /.cust_backup/image/
adb reboot
If not, just reboot into pink screen mode and copy and paste.
Check System Settings and the version number should've changed. Congratulations!
Extras
Installing the modules:
OK, so you decided to build parts of the kernel as a module and you want to actually, y'know, have the modules present on the device. After building the kernel, execute:
make INSTALL_MOD_STRIP=1 modules_install INSTALL_MOD_PATH=<any folder name here>
If you look in that folder, you'll find the modules neatly wrapped up in folders, along with other text files. These text files are useless on a stock ROM because there's no modprobe - you need BusyBox for that. And since we don't want to have them seperated in folders (this is how the stock kernel does it), the files would be wrong, anyway. If you want to use modprobe and have BusyBox installed, you can run depmod on the phone after transferring the modules.
To get the modules into one folder make the directory "modules" in a folder higher-up to where the modules are stored, and then run for i in `find . | grep ko`; do mv "$i" ../modules/; done to move them into that folder.
At this point, I'd just recommend using my OC_Kernel.zip and replacing the modules in that. Or you can adb push them over to the /system/lib/modules folder (after issuing an "adb remount" - assuming that ADB is running as root in the first place).
Making ADB run as root:
As root on your computer, (we want to preserve permissions) use abootimg to split the boot image and extract the contents of the initrd:
abootimg -x boot.img && mkdir newramdisk && cd newramdisk && zcat ../initrd.img | cpio -i --no-absolute-filenames (--no-absolute-filenames is important! I trashed a Ubuntu install by leaving it out - the initrd contains ARM binaries of core Linux programs and if the initrd.img contains an absolute path of "/" then these files will get placed in /)
Make any changes you desire to the initrd. To have adb run as root, just edit /default.prop and set ro.secure to 0. Make sure that the editor you used didn't leave any backup files.
When you're done, run find . -print | cpio -o -H newc | gzip -n -9 > ../initrd.img and this will put the modified initrd folder back into initrd.img.
After that run cd .. ; abootimg -u boot.img -r initrd.img to actually put the initrd.img back into the boot.img.
If you run into a space error, you can do one of three things:
if you only made a single change (like enabling ADB), check to see that there is no backup file (default.prop~) littered about
you can remove the lengthy comments and copyright notices from the files to make space
you can use the trick we used earlier with abootimg to increase the size number in bootimg.cfg for the initrd
Overclocking:
Just look at the acpuclock C file (and possibly relevant cpufreq changes - but I can't remember) in my "OC kernel" diff. Make sure that the option in the kernel config is selected to limit the speeds to the U8800pro's native 1GHz, otherwise the phone will boot at 2GHz!
Rebuilding the Wi-Fi module:
I hope to be able to write this one since it's apparently needed in some cases, but it depends on if Huawei come through
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
matteof93 said:
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
Click to expand...
Click to collapse
Honestly, I have no idea. What toolchain are you using and where was your .config obtained from? Even when the Bluetooth thing was giving me errors, I never once saw that
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
matteof93 said:
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
Click to expand...
Click to collapse
I don't know why the same toolchain works on my laptop but not yours :\
Someone with a similar problem (same?) solved it by using an older toolchain: http://forum.xda-developers.com/showpost.php?p=27294383&postcount=7157
thanks thanks thanks.....i saw that post this morning but i did not noticed the post with the solution
UPDATE: NOW KERNEL COMPILED CORRECTLY....this means that tomorrow i know what to do
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
qwerty your owning us some instructions!!xaaxxa
pikachukaki said:
qwerty your owning us some instructions!!xaaxxa
Click to expand...
Click to collapse
Done, check the first post
I also won't be working on this. My email (which does clearly state what I want, even if it's long-winded):
Dear Sir/Madam,
I recently built a kernel for my U8800pro from your sources and it
works fine, except that the Wi-Fi will not start because the dhd.ko
module that comes with the B928 firmware refuses to load into my
modified kernel. After looking around, the bcm4329 source is what I
need to build (usually distributed outside of the kernel); however, it
seems that the U8800pro uses a customized version. After looking at
the strings of the dhd.ko on the B928 firmware, I have seen many
strings that are present in that dhd.ko binary do not appear in:
* bcm_4.218.248.6_7x25_wifi_driver.tar from the Huawei Device website,
despite it having the same version number
* the bcm4329 source in the Qualcomm CodeAurora Git repository
* the bcm4329 source on the NyVIDIA Tegra Git repository
Furthermore, the strings also do not appear in the ICS kernel nor the
Gingerbread one. I can only conclude that Huawei have their own
specialized version of the bcm4329 4.218.248.6 source for the U8800pro
that is distributed outside the kernel. I understand that Qualcomm
allow the option to let the vendor arrange to have the code
distributed under a different license provided that the vendor makes
an agreement beforehand with Qualcomm. Otherwise it becomes GPLed by
default. If Huawei chose to make an agreement, then I have no right to
ask. However, I believe it is still licensed under the GPL for two
reasons:
* Running modinfo on the dhd.ko from the B928 firmware says this:
"license: GPL v2
* Both bcm_4.218.248.6_7x25_wifi_driver.tar.gz and
[S7][SoftWare]S7_Broadcom_BCM4329_4.218.205.0_Open_Source are under
the GPL
I would like to request the source code, please, of the bcm4329
4.218.248.6 source that is modified for the U8800pro if the code is
under the GPL
Best regards
Click to expand...
Click to collapse
was met with the following generic response:
Dear Customer,
Thank you for contacting Huawei device.
This is our website link http://www.huaweidevice.com/worldwide/searchResult.
do?method=execute&searchString=U8800pro where you can download the secure
code for U8800pro to you.
Once again thank you for contacting Huawei device.
Best Regards.
Huawei Device Customer Care Team.
Click to expand...
Click to collapse
Since my U8800pro is not my main phone anymore, I do not have the energy to fight. Nor do I want to work on Huawei's kernel, where you have to be careful about what you change or the Wi-Fi module won't load (and Huawei won't give you the source - which they should do since I'm sure it's under GPL). matteof93 will most likely produce something better or when everyone starts producing their own kernels and make enough improvements to be hit with the same issue as I, they'll start to get more emails and listen
@qwerty at the last command it said that device is busy...also is there any way that you can make it for init.d so it will be easier??thx!!

Categories

Resources