[Q] Wifi support in the kernel - HD2 Android Q&A, Help & Troubleshooting and Genera

Hey,
I've compiled my own kernel with a few tweaks and to add EB support. I used rafpigna 1.7 as a base.
However, after numerous attempts I can't get wifi working (When you attempt to activate it in gingerbread it just returns "Error"). I've tried to compile the driver as a module and into the kernel, neither works.
Anyone have any pointers, or can you tell me where to start looking?
Thanks, Rick

RickAstley said:
Hey,
I've compiled my own kernel with a few tweaks and to add EB support. I used rafpigna 1.7 as a base.
However, after numerous attempts I can't get wifi working (When you attempt to activate it in gingerbread it just returns "Error"). I've tried to compile the driver as a module and into the kernel, neither works.
Anyone have any pointers, or can you tell me where to start looking?
Thanks, Rick
Click to expand...
Click to collapse
You have to copy some modules to the rom, /system/lib/modules/ , as well from the compiled source, bcm4329.ko and tun.ko
Also check for permissions on those files and try rebooting the phone.

Related

Do any Kernels Support Linux Installer?

I've tried most of the kernels on this forum, though I haven't found one that "Linux Installer" plays nice with. Each time I try it greets me with a messages about the kernel not supporting LOOP features, and a lack of EXT2 or EXT3 support . Anybody know of a kernel or anything I can do to enable these?
Thanks!
I'm not sure how well it would work, but for ext2/3 you could compile just the module then, assuming thats all it needs, try using insmod to load it into kernel space
vaderj said:
I'm not sure how well it would work, but for ext2/3 you could compile just the module then, assuming thats all it needs, try using insmod to load it into kernel space
Click to expand...
Click to collapse
Not saying that you didn't know what I was talking about, but just so that everybody is on the same page;
http://www.androlib.com/android.application.com-galoula-linuxinstall-tFjz.aspx
I suppose I could do that to try to enable ext2 or 3, but any idea what LOOP is?
http://forum.xda-developers.com/showthread.php?p=16961006
3.3 is out. Please update, and contact me by email if any trouble. [email protected]
Galoula made a huge update; I did all translations and debug. New tutorial, new quick installation guide.
Loop is a feature of Linux kernel; the symbole name you need to activate when you rebuild kernel is:
CONFIG_BLK_DEV_LOOP=y
As of today, most ROM now support it.

[Req] tun.ko for Epic stock kernel (DI18 and EB13)

Hello - I am attempting to connect to a cisco vpn using the instructions here but have run into a "common" problem- I copied a post over on the EVO forum- I have exactly the same problem- could some one help me out to compile a tun.ko that is compatible with the current stock kernel- thanks in advance!!! The instructions are found here
I am attempting to get vpnc (for cisco vpn) working on the epic but have run into a snag getting the tun.ko module loaded. When I attempt to insmod tun.ko I get exec format error and dmesg yields
tun: version magic '2.6.32.9-27220-g328f560 preempt mod_unload ARMv7 ' should be '2.6.29-a2443432 preempt mod_unload ARMv7 '
I found an excellent post (#12) by sjakub at hxxp://forum.xda-developers.com/showthread.php?t=630703&page=2
which describes step by step how to overcome this but unfortunately I have no access to linux in order to attempt this myself.
Would anyone be kind enough to compile the proper file for please?
Thanks very much.
Click to expand...
Click to collapse
jimmyz said:
could some one help me out to compile a tun.ko that is compatible with the current stock kernel
Click to expand...
Click to collapse
Does this work?
Mirror link (does not require forum login):
tun-DI18.zip
Thanks- will try it a soon as I get home!
EDIT: I did not receive any errors with your file- I will report back as soon as I try to connect to VPN!
Sent from my SPH-D700 using XDA App
I was able to insmod it, but my modem is down at home so I can't start my VPN.
I'll be jumping for joy if this works, I beat my head against the wall trying to find a good tun.ko for DI18 a few days back.
And I'm tunneled in. Seems to be working but I'm having trouble getting my traffic to route right so far, but I doubt that's related to the tun.ko.
Thanks a ton!
Hemick said:
And I'm tunneled in. Seems to be working but I'm having trouble getting my traffic to route right so far, but I doubt that's related to the tun.ko.
Thanks a ton!
Click to expand...
Click to collapse
what version of the VPN connections are you using? Could you find it on the market?
mkasick said:
Does this work?
Click to expand...
Click to collapse
Mkasick- thanks again for the tun.ko!!! After some troubleshooting (I needed to append a domain setting) I got it to work!!!!!
Can you please set up a way to donate to you- I would like to buy you a beer! I was going to ask for a kernel that automatically loads tun.ko but the vpn_connections apk seems to do it automatically
thanks again for you help!!!!
jimmyz said:
Can you please set up a way to donate to you- I would like to buy you a beer!
Click to expand...
Click to collapse
I appreciate the gratitude. Unfortunately I think it would take me far longer to figure out how to setup donations than it did to compile the module. So, in the meantime, enjoy a beer yourself as a "thanks" to me.
Thank you for this
I have been waiting for this too. Now I need to generate an OpenVPN configuration for our ssl VPN.
I registered just so I could download this module.
I must be doing something wrong because when I try to insmod I get init_module 'tun.ko' failed (Exec format error). I'm at 2.1-update1, 2.6.29, and SPH-D700 ECLAIR.DI18 so guess I'm not holding my mouth right.
flash_c4 said:
I must be doing something wrong because when I try to insmod I get init_module 'tun.ko' failed (Exec format error). I'm at 2.1-update1, 2.6.29, and SPH-D700 ECLAIR.DI18 so guess I'm not holding my mouth right.
Click to expand...
Click to collapse
I decided to try and copy the file over again and this time it worked so something must have happened during the transfer the first time.
How does one "install" this module? I have the Xtreme 1.0.1 kernel and I ran "insmod -v tun.ko" and it seems to stop the FC on the cisco ipsec vpn. But the module does not survive a reboot. I'm guessing I need to recompile it into the kernel? Can someone post some steps on how to do that?
Also, when using the vpn, after hitting connect, it immediately says failed. I'm not sure if that's because I didn't get tun.ko installed correctly, or just bad credential.
you all rock
first time poster, short time lurker...just started flashing my droid a few weeks ago, and am now also playing with an epic.
just wanted to comment on how much i liked this thread, even though i understand, uh, not much of it. you all rock! keep up the open source mentality and for my part i'll keep purchasing/donating for things i enjoy using. And hefting beers for all of you
jimmyz said:
Mkasick- thanks again for the tun.ko!!! After some troubleshooting (I needed to append a domain setting) I got it to work!!!!!
Can you please set up a way to donate to you- I would like to buy you a beer! I was going to ask for a kernel that automatically loads tun.ko but the vpn_connections apk seems to do it automatically
thanks again for you help!!!!
Click to expand...
Click to collapse
droid is currently running UD 2.0 with Chevy 1.25 low voltage kernel - fast and awesome!! quadrant in the 1100s
epic currently using syndicate fully loaded 1.0.2 but also tried and liked the froyo betas... quadrant = 1207
Kernel module
Having the tun.ko file alone might not work. For example, I have a Desire HD. I extracted the kernel config from /proc/config.gz and saw that the TUN/TAP module was not even included in the kernel as a module (M). Correct me if I'm wrong but if the kernel isn't even compiled for support for a module, the module will not load even if you try to load the tun.ko module using insmod/modprobe. Your kernel either needs to have the module selected as (M) or (Y) - if you want it buit-in.
Therefore, I had to:
(1) grab the Desire HD sources from http://developer.htc.com
(2) extract the config for that kernel from /proc/config.gz
(3) Also get hold of the android ndk compiler for x-platform compilation for the arm architecture.
(4) compile the kernel sources using that config file in (2) but also with support for tun.ko as a module (m). You can do this with the command 'make menuconfig' in the kernel sources dir. The kernel sources I grabbed from the url above from htc seemed to have a few files missing. One of them was the ntrig.c file, which I got from the main android kernel sources instead.
(5) Once I got them compiled, this generated the kernel as bZimage a few modules (including tun.ko).
(6) For me the next issue was to get the kernel on my device because unless you have a bootloader than ignores signatures on the kernel, you won't be able to upload your new kernel.
(7) I flashed my bootloader to clockworkmod. Used this guide: http://forum.xda-developers.com/showthread.php?t=805327
(8) once i unlocked the bootloader I issued a 'fastboot flash zimage zImage' (my compiled version of the kernel)
(9) Uploaded the tun.ko too and did an insmod to loads tun.ko and it worked.
rcboosted said:
How does one "install" this module?
Click to expand...
Click to collapse
You don't, you have to "insmod" it on every reboot.
rcboosted said:
I'm guessing I need to recompile it into the kernel?
Click to expand...
Click to collapse
You can compile a kernel with the tun driver built-in, so you don't need to rely on an external module. But it's tougher to keep up with kernel updates that way. Ask in the thread of your favorite kernel where to obtain the source and instructions for compiling it.
shakeup said:
Correct me if I'm wrong but if the kernel isn't even compiled for support for a module, the module will not load even if you try to load the tun.ko module using insmod/modprobe. Your kernel either needs to have the module selected as (M) or (Y) - if you want it buit-in.
Click to expand...
Click to collapse
That's not the case. The kernel does need to be compiled with general module support, but this will always be the case since the Epic uses a fair number of proprietary driver modules.
Setting a particular driver to be compiled as a module (=m) in the kernel config simply means the module, and any of its dependencies, are built alongside the kernel. The kernel itself is the same in either case, unless the module requires a kernel option/driver that can't be compiled as a module, which is rare these days, but was more common in Linux 2.4 and earlier.
In any event, the tun.ko posted here does work with stock DI18.
Edit: There is an issue when you try to compile a driver module that requires an option to be enabled in a different driver that's built-in to the kernel you're using but is currently disabled. I can't think of a good example of such at the moment, but I think I have ran into it in the past.
It's obvious I'm no linux or android expert by any means. I have no clue how to compile a kernel or recompile a module. So all this talk about recompiling is way over my head.
I'm just trying to connect to a IPSec vpn server using vpnc client (http://code.google.com/p/get-a-robot-vpnc/). Currently running Epic Experience rom and the latest Xtreme kernel. Everytime I tried to connect, it fails immediately. I've verified my credentials are correct, so I don't know what else I can do except wait for CM 6 to come out for the Epic.
rcboosted said:
Everytime I tried to connect, it fails immediately.
Click to expand...
Click to collapse
I'm not familiar with that particular program, but you can get a better idea of what's going wrong with a logcat dump.
For example, your credentials might be correct, but your phone might still have difficulty resolving the server, negotiating the connection, etc.
Thanks for the help. I tried logcat and the authentication part seems to be ok, this is what happens after the authentication:
D/VPN_Connections(29594): done interacting with vpnc
D/VPN_Connections(29594): process stderr:
D/VPN_Connections(29594): Read vpnc process line as null
D/VPN_Connections(29594): Attempt to read vpnc process id did not return anything
D/VPN_Connections(29594): process had died, return as failed connection
It doesn't tell me much, but maybe it means something to you.
rcboosted said:
It's obvious I'm no linux or android expert by any means. I have no clue how to compile a kernel or recompile a module. So all this talk about recompiling is way over my head.
I'm just trying to connect to a IPSec vpn server using vpnc client (http:/9/code.google.com/p/get-a-robot-vpnc/). Currently running Epic Experience rom and the latest Xtreme kernel. Everytime I tried to connect, it fails immediately. I've verified my credentials are correct, so I don't know what else I can do except wait for CM 6 to come out for the Epic.
Click to expand...
Click to collapse
I would guess you need a tun.ko specifically for that kernel you are using (Xtreme)- maybe its best to go back to stock- use the tun.ko in this thread and see if you can get it to work?

Kexec for MS2? (Diagnosis needed)

Alright, so I bought my Milestone II then realized what MOTO had done. What a shame.
So after looking around, I found Freemymoto.com. Droid X kexec module based off MS1 kexec code (look on google, the original is still available).
So this got me thinking and working. I got a development suite on to my MS2. (Debian chroot with Sid and GCC 4.2.1) Pulled the kernel sources from MOTO GPL and went to work. After a couple of mins, its clear the Droid X and MS2 kernel code bases are slightly different.
So after an hour of modifying the code for the MS2, I have been able to compile a kexec module and kexec-tools, insert the module and load the the "new" (from GPL sources) kernel in to the kernel space...
This is where I need some help/advise from the experts.
I get an /proc/atags not found. (not a huge deal just means I should not get bootargs, can work on that later with my setup) But when I go to hit the kexec -e to execute the new kernel, the usb disconnects and the screen freezes for 20 seconds or so. Then it takes me back to the moto bootloader and boots in to the standard kernel.
Bummer.
So any advice on catching the kernel panic and subsequent reboot in logs or serial? I'm not sure how to diagnose the problem. The problem compounds itself since I don't even know if I am producing a functional kernel.
I am pretty new at kernel hacking but amateur programming for years. Not to mention, I've only have had an android phone for about 2 months now.
Thanks
PizzaRoll
There there are not many (or not even a single) dev on this forum, you should take a look at the IRC of And-Developers: irc.freenode.net #milestone-modding
Scrylax_CZ (cant rly spell his name) hes a dev i believe
89% of them are MS1 modders, but they work on the MS2 aswell (just not that much) but still, they are good as i noticed, just try asking in their channel
PS: also visit and-developers.com
Thanks, I'll have a look.
Sent from my MotoA953 using XDA App
PizzaRoll,
I don't know if this will be of any help, but I think you can apply the 2ndinit + sh hijack technique to have some logs stored in /data. I was able to apply this on the Motorola Stock ROM, so I can Overclock and Undervolt my Milestone2 at boot time. The binaries from Milestone1 works quite well on my Milestone2, even the overclocking modules.
I was also trying to Port MIUI for Milestone2 and used the 2ndinit technique to be able to read the logcat after the system failed reboot.
What I've done:
- Installed Droid2 Bootstrap: to have custom recovery and to be able to boot into this recovery mode after the system crashes.
- Installed 2ndinit and sh hijack manually.
- Copied original logwrapper binary to mylogwrapper and modified the init.rc in /system/etc/rootfs. This was needed because Droid2 Bootstrapper conflicts with sh hijack technique.
- In init.rc, after mounting /data and after booting or not into clockwork recovery I added a line like this: exec /log-init.sh. Where log-init.sh just runs "/system/bin/logcat >> /data/logcat.log &"
If you need more detailed info I can provide that later. I will need to review my steps.
Also, I too am a developer skilled in C/C++ and linux, but I have no experience at all in kernel development. Also I an quite busy, but I may be able to provide some help
r2beta0 said:
PizzaRoll,
I don't know if this will be of any help, but I think you can apply the 2ndinit + sh hijack technique to have some logs stored in /data. I was able to apply this on the Motorola Stock ROM, so I can Overclock and Undervolt my Milestone2 at boot time. The binaries from Milestone1 works quite well on my Milestone2, even the overclocking modules.
I was also trying to Port MIUI for Milestone2 and used the 2ndinit technique to be able to read the logcat after the system failed reboot.
What I've done:
- Installed Droid2 Bootstrap: to have custom recovery and to be able to boot into this recovery mode after the system crashes.
- Installed 2ndinit and sh hijack manually.
- Copied original logwrapper binary to mylogwrapper and modified the init.rc in /system/etc/rootfs. This was needed because Droid2 Bootstrapper conflicts with sh hijack technique.
- In init.rc, after mounting /data and after booting or not into clockwork recovery I added a line like this: exec /log-init.sh. Where log-init.sh just runs "/system/bin/logcat >> /data/logcat.log &"
If you need more detailed info I can provide that later. I will need to review my steps.
Also, I too am a developer skilled in C/C++ and linux, but I have no experience at all in kernel development. Also I an quite busy, but I may be able to provide some help
Click to expand...
Click to collapse
would it be possible to port MIUI for the MS2? that would be awesome
Bigdaddy168 said:
would it be possible to port MIUI for the MS2? that would be awesome
Click to expand...
Click to collapse
Without the sources, I don't think so.
I was trying to Merge the Milestone1 MIUI version into the Milestone2 Stock ROM, but my efforts were not able to produce a stable version. It consisted into disassembling both frameworks and adding into MIUI's support for the Native methods required by motorola proprietary libs. I was able to boot into MIUI, but not for long. The system crashed a few moments after booting due to invalid calls to the graphics library. I was stuck at that point and gave up due to a lack of time. But the experience was good to increase my knowledge about android inner structure
Unfortunately, I haven't had much time this week to playground with 2ndboot and the sh hack. I like the idea. Im still working on what the problem is exactly.
The old saying is true. Defining your problem (root cause) is the most difficult part.
Sent from my MotoA953 using XDA App
oh rad, 2ndinit works on MS2? that's helpful to know
smacky_wolf said:
oh rad, 2ndinit works on MS2? that's helpful to know
Click to expand...
Click to collapse
Yeps, it works on mine. I'll take some time to write a guide from the scratch and post it here on XDA. I'm also trying to help santiemanuel to get it to work on his ROM, but I may be missing some detail.
r2beta0 said:
Yeps, it works on mine. I'll take some time to write a guide from the scratch and post it here on XDA. I'm also trying to help santiemanuel to get it to work on his ROM, but I may be missing some detail.
Click to expand...
Click to collapse
I just got the MS2 a couple days ago, so I'm really interested in custom ROMs for it, but I'm a total n00b when it comes to xda and custom ROMS, only having the experience of downloading and flashing ROMs for other phones in the past. With that said, I'd be VERY intersted in a guide for the MS2. Please let us know when its up! Thanks
PizzaRoll said:
Unfortunately, I haven't had much time this week to playground with 2ndboot and the sh hack. I like the idea. Im still working on what the problem is exactly.
The old saying is true. Defining your problem (root cause) is the most difficult part.
Sent from my MotoA953 using XDA App
Click to expand...
Click to collapse
I've just finished my guide on how to enable 2nd-init on MS2. You can check it out here. Maybe this can help you into defining the root cause of the problem, as you can add logcat and dmesg to custom init before calling the kexec. I store my logs at /data so I can read them on the next reboot (getting into clockwork recovery and being able to use adb shell).

[DEV] ICS Kernel Sources

**DEV ONLY**
Acer released ICS kernel sources for A200. Like HC sources, it seems to support picasso board as well.
Tried to compil with config from leaked kernel. Had to fix a build issue, but all went fine.
ATM It doesn't boot, and dunno why. I tried to enable console to check what's wrong without success.
picasso and picasso_e config are really closed.
Maybe someone can do some magic with this =)
Kernel sources : http://global-download.acer.com/GDF...AB&Step3=A200&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
ICS A500 Config : http://minus.com/memdYnyCy#3 - http://pastebin.com/CfErz5cz
vache said:
**DEV ONLY**
Acer released ICS kernel sources for A200. Like HC sources, it seems to support picasso board as well.
Tried to compil with config from leaked kernel. Had to fix a build issue, but all went fine.
ATM It doesn't boot, and dunno why. I tried to enable console to check what's wrong without success.
picasso and picasso_e config are really closed.
Maybe someone can do some magic with this =)
Kernel sources : http://global-download.acer.com/GDF...AB&Step3=A200&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
ICS A500 Config : http://minus.com/memdYnyCy#3 - http://pastebin.com/CfErz5cz
Click to expand...
Click to collapse
I had the same idea yesterday. There were some drivers missing missing im moving from HC and atmel touch yas529 compass and some camera drivers need work to compile. Also the memory carveout will need to be changed to boot on orig bootloader.
vache said:
**DEV ONLY**
Acer released ICS kernel sources for A200. Like HC sources, it seems to support picasso board as well.
Tried to compil with config from leaked kernel. Had to fix a build issue, but all went fine.
ATM It doesn't boot, and dunno why. I tried to enable console to check what's wrong without success.
picasso and picasso_e config are really closed.
Maybe someone can do some magic with this =)
Kernel sources : http://global-download.acer.com/GDF...AB&Step3=A200&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
ICS A500 Config : http://minus.com/memdYnyCy#3 - http://pastebin.com/CfErz5cz
Click to expand...
Click to collapse
if you dont mind me asking... how did you get past the build issue? im getting a mess of errors....
EDIT:
got it. nvm. (shows how much a few weeks of research and learning gets me )
Sorry, wrong place. Delete Post.
has anyone had any luck getting this to boot? i cant get anything out of it :/ no adb no nothing. ideas?
EDIT:
just an observation, the size of this kernel after its compiled is aprox. 3.3 mb, where as the kernel in the leaked copy is aprox. 3.4 mb. which reinforces my belief that something is missing here. which seeing as it is not our "official" source would make sense... going to keep researching.
okay, so i got it to compile, and i got it to sort of boot. it turns on, after the acer screen all it does is display garbage on the screen, nothing useful, just random pixels then reboots. still no adb. it also appears to begin the boot sequence as it looks like its reading my flashdrive the exact same way it does with a normal boot. im going to mess with the video driver libs, and use ones that are designed for this kernel and report back. if anyone thinks they can help let me know, or post here.
EDIT:
i think the garbage is normal with the old bootloader. i hope some of the stuff im posting is helpful lol
Grrr,,
Well on the unlocked bootloader the kernel sorta boots:
However I'm running into the following:
Code:
[ 1.131021] Unpacking initramfs...
[ 1.146564] Initramfs unpacking failed: uncompression error
This then followed by much more errors that Init can't be found/executed and an automatic reboot.
(FYI I have the stock ICS kernel in a recovery image that I used to read out the last_kmsg of my kernels attempt to boot)
This issue came up both with a patched a200 and a510 kernel (with the stock ICS config as a template).. so something is up.. did they change the location of the initrc image?
all versions of code I have say (for Tegra2):
Code:
zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000
params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100
initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000
from: arch/arm/mach-tegra/Makefile.boot
(I know my code may be missing some drivers and camera is not quite initializing correctly.. but nothing related to init.. and besides a camera init warning nothing went wrong up too that point. I expect Init to be read, particuarly since the bootloader ought to have loaded the ramdisk into ram .. we are just de-compressing the cpio archive.. The uncompression error seems like a generic message for something unexpected reading the gzip data.. thus I wonder if it was just loaded elsewhere)
Edit:
Still lost..
The ramdisk is being loaded.. and position not static but passed into the kernel by the bootloader:
parse_tag_initrd2: 0x05000000,0x161e0e (an added debug string)
The first few bytes of the file are correct and the length is right.. but the CRC32 dosn't check out.. so something is overwrittiing it... seems odd that far into ram.
being slightly curious, I looked at the URL and changed the Step3=A200 to Step3=A500, got a download, don't know if its the same though..
Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
LC = looks like the language - maybe change this to eng.. maybe its possible to get the correct download by altering the URL..
http://global-download.acer.com/GDF...AB&Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
kiwi_mat said:
being slightly curious, I looked at the URL and changed the Step3=A200 to Step3=A500, got a download, don't know if its the same though..
Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
LC = looks like the language - maybe change this to eng.. maybe its possible to get the correct download by altering the URL..
http://global-download.acer.com/GDF...AB&Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
Click to expand...
Click to collapse
it old kernel source 4.0.3 for A200 (dating 21.02.2012)
ready...
set...
GO
http://global-download.acer.com/GDFiles/Document/App.%20Guide/App.%20Guide_Acer_1.0_A_A.zip?acerid=634729317909661533&Step1=Tablet&Step2=ICONIA%20TAB&Step3=A500&OS=a08&LC=en&BC=Acer&SC=AAP_9
compiled the following from the supplied defconfigs for testing purposes, flash at your own risk:
picasso_defconfig-signed.zip
picasso_e_defconfig-signed.zip
vangogh_defconfig-signed.zip
waydownsouth said:
On your marks...
Get set...
GO
Click to expand...
Click to collapse
And after waiting 5h longer my local mirror at last had the file.
Github
I hate dealing with kernels w/o full git history.. since asking acer for their git tree probably won't achieve results:
I've integrated the code on top of a nvidia tegra sample git repository (to re-add git history) and uploaded the source to my github:
https://github.com/ezterry/AcerTabKernel
Tag: A500_ICS_4.0.3_OfficialDrop is identical to the code in the acer ZIP
(actually master also is at the time of this writing, but bits and pieces of my own hackery may be added to that)
Feel free to clone to your own projects (or use github as a download mirror)
Quick Test
I did a quick test, took the config.gz from ICS, and built the kernel, (then re-patched with my script for system r/w) just to make sure the kernel we had could be re-created, appears to have booted my A500 Public Recovery Image without incident.
Code:
[email protected]:/ # [email protected]:~$ adb shell
~ # uname -a
Linux localhost 2.6.39.4+ #1 SMP PREEMPT Sun May 20 02:06:41 EDT 2012 armv7l GNU/Linux
~ # cat /proc/version
Linux version 2.6.39.4+ ([email protected]) (gcc version 4.4.3 (GCC) ) #1 SMP PREEMPT Sun May 20 02:06:41 EDT 2012
also checked the picasso_defconfig with the config in the stock rom:
Code:
[email protected]:/usr-vm/android/aosp/acer-kernel/kernel$ diff .config arch/arm/configs/picasso_defconfig
4d3
< # Thu Mar 29 22:57:19 2012
1337d1335
< # CONFIG_TOUCHSCREEN_CYPRESS is not set
2826c2824
< CONFIG_ACER_SECURE_MOUNT=y
---
> # CONFIG_ACER_SECURE_MOUNT is not set
so only change is CONFIG_ACER_SECURE_MOUNT was added to the stock rom (meaning we don't need to configure it out (or rum the hack script I've been running) to allow system remount.
Building crash course
I'll keep this short since its 3:20AM and I know most reading this thread have built an android kernel before but here is the crash course: (remember this uses linux to build)
Have an android build tree or my Public Recovery tree on your computer
add the arm toolchain to your path
eg: export PATH=<path/to/android/tree/root>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
change directory into where you extracted the kernel code (or cloned it into)
run:
export ARCH=arm;export CROSS_COMPILE=arm-eabi-;export KERNEL_DIR=`pwd`
run 'make picasso_defconfig' to get acer's default .config (or fetch your own template)
if you want to re-configure parts of the kernel run 'make menuconfig'
to build run 'make -j5' (where 5 ought to be the number of cores in your computer +1)
This generates the zImage that is then placed in the boot.img with mkbootimg
to get modules prepared for install run 'make modules_install INSTALL_MOD_PATH=./build'
This will set up modules as if installed on your linux box in a ./build sub directory these are then manually installed into the rom
----
Ok now with this update its well past my bedtime.. I'll poke more when I am awake
waydownsouth said:
ready...
set...
GO
http://global-download.acer.com/GDF... TAB&Step3=A500&OS=a08&LC=en&BC=Acer&SC=AAP_9
compiled the following from the supplied defconfigs for testing purposes, flash at your own risk:
picasso_defconfig-signed.zip
picasso_e_defconfig-signed.zip
vangogh_defconfig-signed.zip
Click to expand...
Click to collapse
Looks like Acer figured you out. The file is no longer available at that address. I get a 404 error.
Sent from my A500 using XDA Premium HD app
BakaNeko59 said:
Looks like Acer figured you out. The file is no longer available at that address. I get a 404 error.
Sent from my A500 using XDA Premium HD app
Click to expand...
Click to collapse
Works just fine for me. Are you running an ad blocker?
amphi66 said:
Works just fine for me. Are you running an ad blocker?
Click to expand...
Click to collapse
Not all of the Acer download mirrors got the file at the same time.. so its possible some are not synced yet.
Sent from my Galaxy Nexus using Tapatalk 2
waydownsouth said:
ready...
set...
GO
http://global-download.acer.com/GDF... TAB&Step3=A500&OS=a08&LC=en&BC=Acer&SC=AAP_9
compiled the following from the supplied defconfigs for testing purposes, flash at your own risk:
picasso_defconfig-signed.zip
picasso_e_defconfig-signed.zip
vangogh_defconfig-signed.zip
Click to expand...
Click to collapse
Put it into a boot.img flashed it with the modules and running nice (no need to use the systemRW hack) , any OC posible for next release ? (a500)
Will do more testing ................
ezterry said:
Not all of the Acer download mirrors got the file at the same time.. so its possible some are not synced yet.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
It already shows in here as well: http://support.acer.com/product/default.aspx?modelId=3851
Is it just me or when you use self compiled kernel cpufreq doesn't work well?
Skrilax_CZ said:
Is it just me or when you use self compiled kernel cpufreq doesn't work well?
Click to expand...
Click to collapse
Not here , I only used the zImage and put it together with the ramdisk I use for my tweaked kernel and it is very smooth with almost no browser glitches , in fact I didn't have any today.
I got the highest score with this one 2740 quadrant .
I also didn't use the modules , I used the stock one from Acer , I did notice a little performance drop using the modules that came with the kernel waydownsouth build so I switch to the stock ones from the Acer 1.031.00 release.
Skrilax_CZ said:
Is it just me or when you use self compiled kernel cpufreq doesn't work well?
Click to expand...
Click to collapse
No problem here..
and even now a test build with overclock:
http://forum.xda-developers.com/showpost.php?p=26432810&postcount=4
(richardtrip's patches merged cleanly once i found them..)
Still not sure what to do about the initrd issue some people are having with my recovery.. (any insight into the logic in these bootloaders about how it loads the ramdisk into ram?)
Do you happen to have a mirror or another address for the Acer source to download the single file? I still get a 404 error on three different systems and two different browsers (including my tab itself) when I try http://global-download.acer.com/GDFiles/Document/App. Guide/App. Guide_Acer_1.0_A_A.zip.
Thanks

My setup with Ubuntu and a custom permissive Kernel

Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play). It turned out to be quite a bit of work getting everything working because of Knox and SELinux. Eventually I got a custom kernel working that allows me to toggle SELinux between permissive and enforcing.
I attached an Odin flashable tar that works on the SM-P900 (wifi version). I am on the North American version, so I have no idea whether it will work in other regions. If you flash this kernel then there are a few things you need to know:
I'm assuming you already have root on your device.
When you boot it will still be in "Enforcing" mode. This change simply allows you to use the "setenforce" terminal command or any of the apps on Google Play that do this for you.
You might experience some wifi weirdness after you flash the kernel. You just need to open up /system/build.prop and change ro.securestorage.support from true to false and then reboot to resolve the issue.
If you have a different version of the device or want to compile it yourself for any reason I wrote an article describing how I compiled it here:
http://graemehill.ca/compiling-permissive-android-kernel/
I also did a few other things to fix the keyboard and get linux running properly, so if you're interested in that I described my setup in more detail here:
http://graemehill.ca/turning-a-galaxy-note-pro-into-a-linux-laptop/
Thank you for this!
Sent from my SM-P900 using Tapatalk
trying to build kernel
I'm trying to follow your guide to compile a kernel from source. I have installed (on my Win 8.1_64 PC) Android SDK/NDK. GnuWin32, JavaJRE, and downloaded SM-P900 kernel source.
I'm getting errors at "Apply Kernel Config" step.
here's the output: http://pastebin.com/yFqDrNY8
Thanks for your help
Don :good:
dodo99x said:
I'm trying to follow your guide to compile a kernel from source. I have installed (on my Win 8.1_64 PC) Android SDK/NDK. GnuWin32, JavaJRE, and downloaded SM-P900 kernel source.
I'm getting errors at "Apply Kernel Config" step.
here's the output: http://pastebin.com/yFqDrNY8
Thanks for your help
Don :good:
Click to expand...
Click to collapse
It looks like you're in Windows. To my knowledge it is not possible to compile a Linux kernel in windows. I would recommend downloading virtual box and installing some Linux distro in there. This is what I was talking about in the "environment" section at the top of the article.
For android development I find that you need access to a lot of tools where some are only available on Windows and others are only available on Linux so a Windows PC with a Linux VM is ideal in my opinion.
Oh ok, no problem. I just misread the guide. I've setup a build environment in a vm before to compile aosp for my Nexus 10. Shouldn't be too hard to do it again. I recently rebuilt my pc so the vm I had got nuked.
Sent from my SM-P900 using Tapatalk
ok I got my Ubuntu VM up and running using this guide
http://forum.xda-developers.com/showpost.php?p=50748836&postcount=25
installed android NDK to ~android/NDK, and unzipped the kernel source to ~android/kernel
followed your guide to build a SELinux permissive kernel but i'm getting some errors when trying to compile. here's the output:
http://pastebin.com/Npdu7J5h
EDIT: retried doing the EXPORT command and now it seems to be compiling
dodo99x said:
EDIT: retried doing the EXPORT command and now it seems to be compiling
Click to expand...
Click to collapse
When you export a variable in the terminal it only exists for that one session, so if you open a new terminal instance you need to run the command again. If you want to set it permanently normally you can just put the export command into ~/.bashrc
Oh I see. I'll give that a try. I was able to create a new boot.img following the rest of your guide. I have yet to try flashing it though. Will have to find some info about all the kernel options that can be set. Hopefully be able to integrate HMP to get all eight cores running at the same time.
Sent from my SM-P900 using Tapatalk
Cool, let us know how that goes. I wonder how much it would affect battery life.
Graeme H said:
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play). It turned out to be quite a bit of work getting everything working because of Knox and SELinux. Eventually I got a custom kernel working that allows me to toggle SELinux between permissive and enforcing.
I attached an Odin flashable tar that works on the SM-P900 (wifi version). I am on the North American version, so I have no idea whether it will work in other regions. If you flash this kernel then there are a few things you need to know:
I'm assuming you already have root on your device.
When you boot it will still be in "Enforcing" mode. This change simply allows you to use the "setenforce" terminal command or any of the apps on Google Play that do this for you.
You might experience some wifi weirdness after you flash the kernel. You just need to open up /system/build.prop and change ro.securestorage.support from true to false and then reboot to resolve the issue.
If you have a different version of the device or want to compile it yourself for any reason I wrote an article describing how I compiled it here:
http://graemehill.ca/compiling-permissive-android-kernel/
I also did a few other things to fix the keyboard and get linux running properly, so if you're interested in that I described my setup in more detail here:
http://graemehill.ca/turning-a-galaxy-note-pro-into-a-linux-laptop/
Click to expand...
Click to collapse
I tried to install this using VBox Odin and I couldnt get it to work. Tried using BOOTLOADER and also PDA. Not sure the correct one but neither worked for me. Also, Moblie ODin hasnt yet worked but when it does, things will be much easier for me at least.
I have a newly rooted SM-900. I will have to find time someday to compile the kernel against what I have. Must be a slightly newer version than the one you posted. That is only thing I can think since I just got my 12.2. Thanks for the detailed info.
Camera?
Hey, thanks for the great kernel. It's working as expected to enable permissive mode, but I'm having one issue with it. When I use your kernel, the camera is disabled (says something like "Camera Failed"), and it won't work even when trying different software besides stock, like Google Camera. Anyway, clearing cache, etc. doesn't do anything, but the camera works again when I flash the stock kernel. Is this related to permissive mode or something else with the settings?
aarstar said:
Hey, thanks for the great kernel. It's working as expected to enable permissive mode, but I'm having one issue with it. When I use your kernel, the camera is disabled (says something like "Camera Failed"), and it won't work even when trying different software besides stock, like Google Camera. Anyway, clearing cache, etc. doesn't do anything, but the camera works again when I flash the stock kernel. Is this related to permissive mode or something else with the settings?
Click to expand...
Click to collapse
The camera fails for me too. I dumped a logcat and isolated the issue here:
W/ActivityManager( 2746): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
V/ApplicationPolicy( 2746): isApplicationStateBlocked userId 0 pkgname com.google.android.GoogleCamera
But... the camera is not a huge deal. It did, however, break wifi. I did not get a logcat of that yet, but I would assume it is also a permission issue.
Wifi works for me using the fix mentioned in the OP. Also, thanks for looking into the camera issue. I agree it's not a big deal, and it's easily fixed by flashing the stock kernel, until someone figures out a proper fix.
aarstar said:
Wifi works for me using the fix mentioned in the OP. Also, thanks for looking into the camera issue. I agree it's not a big deal, and it's easily fixed by flashing the stock kernel, until someone figures out a proper fix.
Click to expand...
Click to collapse
Wow, I totally missed that entire line in the OP... You literally just made my whole day. I fought this all day long, desperate to get ubuntu working. Thank you for pointing that out.
I get "xt_mark.h" is missing (no such file or directory) error. Any idea why that may be?
I'm using the source for p900 international hoping that I may sidestep the camera issue that way (by enabling permissive to the international kernel I mean), but as it stands it does not compile.
I've googled it but until now it was/is to no avail...
Graeme H said:
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play).
Click to expand...
Click to collapse
Hey Graeme H,
we both have the same intention. I am downloading the international Kernel at the moment and will compile it again for you guys. The download takes a little longer as I am at vacations.
I am going this route: doviak.net/debian-kit/debian-kit_p00.html . In the future I would like to have arch linux running on this device but a customized debian would be okay for the beginning, too.
Eventually I will try to use framebuffer instead of vnc or something like that. I would love to use sublime-text and dwm on that device with that resolution
Good luck guys. I will try to update.
Edit: hehe I have dwm in front of me now and the resolution is so high that I am barely able to read
Compiled the kernel and flashed in on my device but my camera is still not working. Maybe we need to edit the config:
# Camera sensor devices
#
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_VS6624 is not set
# CONFIG_VIDEO_MT9M032 is not set
# CONFIG_VIDEO_MT9P031 is not set
# CONFIG_VIDEO_MT9T001 is not set
# CONFIG_VIDEO_MT9V011 is not set
# CONFIG_VIDEO_MT9V032 is not set
# CONFIG_VIDEO_TCM825X is not set
# CONFIG_VIDEO_SR030PC30 is not set
# CONFIG_VIDEO_NOON010PC30 is not set
CONFIG_VIDEO_S5K6B2=y
# CONFIG_S5K6B2_CSI_C is not set
CONFIG_S5K6B2_CSI_D=y
CONFIG_S5K6B2_POSITION_FRONT=y
# CONFIG_S5K6B2_POSITION_REAR is not set
CONFIG_VISION_MODE=y
# CONFIG_VIDEO_M5MOLS is not set
# CONFIG_VIDEO_S5K6AA is not set
Click to expand...
Click to collapse
Rather than each people compiles its kernel, could someone put a link to download the international kernel compiled? I think this would allow more people to get this kernel. Thank
PHP:
smylion said:
Rather than each people compiles its kernel, could someone put a link to download the international kernel compiled? I think this would allow more people to get this kernel. Thank
Click to expand...
Click to collapse
Compiled from Kitkat source. [ur#l]erhan.es/upload/sm-p900-permissive-intl.tar[/url] (odin)
Thank you but the link does not work
smylion said:
Thank you but the link does not work
Click to expand...
Click to collapse
Sorry, it is erhan.es/upload/sm-p900-intl-permissive.tar

Categories

Resources