Folio 100 - Kernel development - Folio 100 Android Development

This thread should serve as a general source of information for those patching and extending the kernel.
Anyone who does changes to the kernel should drop a note here (especially on those builds that go into FolioMod or TnT)
I'll also try to keep a list of patches and a current config file in the first post of this thread.
Just to make sure that anyone has a common base, the Folio 100 kernel source can be found at TegraMid wiki: http://tegramid.com/wiki/Main_Page
To upgrade to nvidia-10.9.8 apply the attached patch to the source tree.
Note that the zip file also contains a disabled folder, this contains 3 patches that were NOT applied as they prevent the folio from booting.
There were quite a few changes for handling audio devices, this may fix the issues with bluetooth headsets and sound coming from speaker and headphone (not tested though), also there was a change in some wakeup configuration structure for wlan, so this may also fix the wakeup issue.
Changes from DerArtem to support 3G Modems are not (yet) included in the kernel.
I also had two freezes when booting the system wuith this kernel (system_server not responding) however I could not reproduce them.

OK, I'm stupid!
Forget the patches above, I pushed the updated kernel images to the wrong directory (/sdcard instead of /sdcard/sdcard-disk0) So I was constantly flashing the last plain folio kernel on the device.
Damn you shell scripts!!!

Updated the patches above, the kernel should work and everyone should be able to recompile with the patch applied.
I've also attached a binary for users to test the kernel.

weeds2000 said:
Updated the patches above, the kernel should work and everyone should be able to recompile with the patch applied.
I've also attached a binary for users to test the kernel.
Click to expand...
Click to collapse
How do we install these files? Or do we better just wait for a new foliomod version?

killerbie said:
How do we install these files? Or do we better just wait for a new foliomod version?
Click to expand...
Click to collapse
If you look into update-nvidia-10.9.8.zip file, you could see that it is normal update file for kernel. So that I guess you rename update-nvidia-10.9.8.zip to update.zip and then update as any other update. But you should better always know what you are doing. If not, wait for full foliomod update.
To weeds2000: thanks for keeping kernel repository updated for the others.

weeds2000 said:
Updated the patches above, the kernel should work and everyone should be able to recompile with the patch applied.
I've also attached a binary for users to test the kernel.
Click to expand...
Click to collapse
Hedphones plus speakers issue seem solved, many thanks!
Foliowidget correctly report battery status and AP name but to set buttons light or display properties don't works.

Rom cooking
Most tools found to build Android ROM is for linux .Is there tools to build android ROM in WINDOWS environment?

Rom cooking
Most tools found to build Android ROM is for linux .Is there tools to build android ROM in WINDOWS environment?

This kernel is based on the stock Toshiba Kernel with modifiactions from DerArtem.
I've added UTF8 NLS support as required by the vold patch as well as the lag on wakeup fix.
Could someone please confirm that 3G support is still working with this build. As I don't have a 3G modem I cannot test this.

weeds2000 said:
This kernel is based on the stock Toshiba Kernel with modifiactions from DerArtem.
I've added UTF8 NLS support as required by the vold patch as well as the lag on wakeup fix.
Could someone please confirm that 3G support is still working with this build. As I don't have a 3G modem I cannot test this.
Click to expand...
Click to collapse
i can try install already on folionotion?? just for not reinstall the system..

I cannot guarantee that this works, but in case you cannot boot it should be enough to just flash the ROM again without making a Factory Reset.
Make sure you have an adb connection or some way to get an update.zip to your SD Card in case the device does not boot.

check out wifi drivers from here:
http://git.chromium.org/gitweb/?p=atheros.git;a=summary

is it possible to enable the tunnel support in the kernel?

Has anyone emailed toshiba to request the latest source? it took amout a month to arrive last time (on cd)

Could you please PM me the address you have writen the request to?
I searched the toshiba page yesterday, but couldn't find a developer page or something like that.
Or should I simply contact customer support?

weeds2000, can you attach the precompiled toolchain? i got smp compile error so maybe it is the toolchain im using.
what i did was:
1) download and extract the source
2) download and patch the tegra patch you attached in post 1
3) download the tegra config file you attached in post 1 and extract the config to .config to kernel directory
4) make ARCH=arm CROSS_COMPILE=/path_to_crosstoolchain/arm-eabi-
it was 2am when i did it so maybe i missed something.. lol
EDIT: Nevermind, found the toolchain from android.com.
PS. Anyone happens to have a copy of Tegra 250 technical datasheet?

Hmm.. Cannot get it to boot into OS.. The kernel booted and adb ran..
Also tried the binary you have attached in post #1 but also doesnt boot into OS. Did you get it to boot at your end?
Attached are dmesg and logcat

The image in post #1 should work with FolioMod 1.3. As the display/touchscreen driver seems to have changed it may not work with 1.4.
I'm not 100% sure, but this looks like a problem with the nvrm_daemon binary which is not started or has crashed.

please implemet tun.ko
Hi,
i need the tun.ko for the folio, so i can connect via vpnc to my fritzbox and make phonecalls for free over wlan hotspots. (like i do on my desire)
Please can you provide a tun.ko for this.
Cheers

xoom honeycomb source / git
Just got a note from MCLP on the honeycomb git.
so i downloaded it, and extracted the config.gz from xoom tablet (boot.img, that is) .
the kernel completely compiles without a single error, and no questions on the .config file i used, so the xoom config.gz matches the environment of the git (Koush said he also used it to compile the recovery kernel for xoom)
git is here
View attachment config.zip xoom edition.
now's the question if we can make it run on Folio
update:
removed(too many bugs) is the 2.6.36.3 with the Folio100 ODM_KIT included, i don't see any chance of making it work without, as i read the odmkit, its toshiba custom drivers + tegra for betelguese platform. this is NOT a working source, but inprogress.. but maybe someone else can assist?

Related

[Q] archos gen8_gpl_froyo kernel build

Just for fun and because I can, I started to work on recompiling the kernel for my Archos 10.1 (gen8) device.
I'm working with the Archos provided gen8_gpl_froyo source tarball.
Apart from some small stuff I could work out, like unterminated double quoted strings in config.in files, patches that don't apply to sources because the sources contain symlinks where files are expected, and of course the rounds of what-do-I-need-on-my-host (automake, texinfo, ...) - I got both a working kernel compile, and all the rest of the build.
I proceeded to menuconfig in some stuff I'd like to have in the kernel, as modules, like netfilter conntracking / NAT support, advanced (policy) routing, namespaces, nfsd. Also went smoothly.
I can successfully start that kernel on an existing Uruk 0.7 install, by untarring my self built modules over what Uruk comes with in /lib/modules/2.6.29-omap1/kernel, depmod that, and use the Uruk's /root/initramfs.cpio.gz together with my self built zImage for flashing through the recovery menu.
The system then boots up fine, I can verify it is running the kernel, I can load the netfilter conntracking / NAT modules, and even install an state ESTABLISHED rule which does what it should.
HOWEVER - and that's why I open this thread, there is constant chatter, coming from the kernel, being written to logcat. This uses quite a bit of CPU, probably for the logging work, so I rapidly reverted to the Uruk's own kernel.
What I would like to know, is whether somebody else has seen the following kernel messages in a similar scenario, and knows what I did wrong / how I can work around that?
Code:
03-06 15:33:56.816 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.816 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
03-06 15:33:56.847 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.847 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
03-06 15:33:56.878 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.878 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
It is a constant repetition of these two lines, I just showed three instances so you can get a feel for the frequency from the timestamps.
The function names / messages are nowhere to be found in the archos released source code, nor in the modules compiled from there.
They reside in two module files that lie directly in /lib/modules/, named hdmicec.ko and hdmitx.ko
The hdmitx.ko module is loaded when I boot into my kernel. Loading hdmicec.ko by hand does not improve the situation. Also, under the normal Uruk 0.7 kernel, only the hdmitx.ko is loaded.
Update 7.3.: the situation stays the same after I modified my .config to be, except for the diverse modules I additionally selected, identical to the kernel /proc/config.gz found on Uruk 0.7. There seem to be several things missing that are in Uruk 0.7, i.e. the interactive CPU governor, and filesystem caches.
I also compared the loaded modules after boot, and apart from module size, it is the same list with Uruk 0.7 and my kernel.
Trying again to use my kernel, I also noticed that the tablet freezes as soon as I try to start WLAN. Still pings (on the g_ether USB connection I use), but the GUI is frozen and ssh connections, too.
It seems to me that the gen8_froyo_gpl source released by Archos is somewhat lacking...
Where can I find the Uruk 0.7 kernel tree, or some other kernel that is Known Good?
Latest kernel source you can find here:
http://sauron.pourix.com/UrukDroid/
conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
Anyway - entire wifi stock is a mess .. sadly
$aur0n said:
Latest kernel source you can find here:
http sauron.pourix.com /UrukDroid/
Click to expand...
Click to collapse
Thanks! What is the build system are you using?
I'm not exactly confident that the one I built from the Archos GPL package, is good.
But it seems to work! I successfully compiled your kernel, with your .config, and run that now. Wifi is working so far, my g_ether usb network connection works, too, and no funny hdmi messages are showing.
Now I'm going to build in some of the stuff I wanted of the networking stuff, and see what breaks wifi exactly. I would _love_ to have conntrack / NAT available.
Update built again with various networking stuff enabled, advanced routing and namespaces among them, but consciously NOT with conntracking. Guess what - tiwlan_drv.ko does not load! When triggered through the UI that results in an apparent complete hang, but when trying insmod from a shell it is benign. All in all that's good - the wlan problems probably don't have anything to do with conntracking, and I have a half way easy test case to start "bisecting" which build option makes it fail. Now if I only had more time today...
Anyway, thanks again Sauron for providing such a good basis for playing!
$aur0n said:
conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
Click to expand...
Click to collapse
After some compile / flash / test cycles I'm pretty convinced that anything which changes the layout / size of struct net_device or struct sk_buff, breaks that binary tiwlan_drv.ko thing - which is probably to be expected...
Some googling around, did not find me any source code to that tiwlan_drv.ko, only loads of people copying it around between various systems in binary form (argh...)
Do you have source for that module available, so I could try and recompile it when the struct layout changes?
Here's a list of config defines that should probably be left alone, gleaned from looking at the struct definitions:
Code:
options that change sk_buff:
CONFIG_XFRM=y
CONFIG_NF_CONNTRACK=n
CONFIG_BRIDGE_NETFILTER=n (switches on when enabling bridge driver,
but can be switched off separately - bridge
itself builds and module loads)
CONFIG_NET_SCHED=n (so no tc / traffic shaping / queueing)
CONFIG_NET_CLS_ACT=n
CONFIG_IPV6_NDISC_NODETYPE=n?
CONFIG_MAC80211=n
CONFIG_NET_DMA=n?
CONFIG_NETWORK_SECMARK=n
options that change net_device:
CONFIG_WIRELESS_EXT=y
CONFIG_NET_DSA=n
CONFIG_NETPOLL=n (switched on / needed by netconsole... sigh)
CONFIG_NET_NS=n (would love to have that, lxc could work well then...)
CONFIG_DCB=n
CONFIG_COMPAT_NET_DEV_OPS=y
You can try with this source
http://processors.wiki.ti.com/index.php/OMAP35x_Wireless_Connectivity_Release_Notes_beta_3_release
I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
$aur0n said:
I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
Click to expand...
Click to collapse
Thank you! I looked into the stuff a bit, it is certainly the right code set. It's a pretty huge pack overall, packing a kernel and userlevel stuff, even a copy of the iptables source , but I already located the driver itself...
I'll see that I extract the driver only parts into your kernel tree, somewhere under staging, and get it to build and maybe even work from there.
Will need some time to do that, and I'm rather busy with other work this week - next week maybe.
tiwlan_drv rebuild - no success so far
Hi $auron,
was able to take some time yesterday and today to work on the tiwlan_drv source code you pointed out. Unfortunately I did not get it to run.
I successfully built a module, inside your kernel tree, by incrementally dumping .c and .h files from the TI code drop into a subdir of drivers/staging/ and finding out which -DEFINES it needs to build, and some small code mangling was also neccessary.
However, the resulting module fails to properly load, first with some GPIO allocation message which I could get around (not present in the .ko file from Archos), and then in a request_irq call during initialization. Looking at that second failure point I notice that the more hardware / board oriented parts of the code look not at all like what objdump can tell me about the Archos binary...
Given my nonexistent ARM assembler skills, I cannot go forward at that point with ease, so I'm trying to chicken out by asking some Archos people for the source... No idea whether that will work...
UPDATE: no reply from Archos so far...
I try to sidestep the issue by moving the problematic elements of skbuff and net_device from the middle of the struct, to the end.
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
Golomidov said:
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
Click to expand...
Click to collapse
In Uruk 1.6 kernel has compiled in conntrack/nat.
$aur0n said:
In Uruk 1.6 kernel has compiled in conntrack/nat.
Click to expand...
Click to collapse
Yes, but there are other options that are missing in your kernel - targets owner and multiport - and because of that orbot transparent proxy doesn't work
Could you please tell how did you achieve that? I mean how did you compile UD kernel with conntrack/nat support?
(btw, I have changed init and installation scripts in UD for it to work with latest archos devices - a35dm for exmple)
EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?
---------- Post added at 03:06 PM ---------- Previous post was at 02:48 PM ----------
Golomidov said:
EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?
Click to expand...
Click to collapse
Nope, it didn't work
$aur0n said:
In Uruk 1.6 kernel has compiled in conntrack/nat.
Click to expand...
Click to collapse
$aur0n, could you please share the knowledge how did you manage to compile kernel with tiwlan driver and conntrack features?
Community will appreciate it! Thanks!
Golomidov said:
$aur0n, could you please share the knowledge how did you manage to compile kernel with tiwlan driver and conntrack features?
Community will appreciate it! Thanks!
Click to expand...
Click to collapse
It's all all written somewhere in developers thread of uruk droid.
$aur0n said:
It's all all written somewhere in developers thread of uruk droid.
Click to expand...
Click to collapse
Confirmed! tiwlan has been compiled and tested with nat/conntrack and targets owners and multiport.
Since openaos is down pasting here instruction:
Code:
How to build the WLAN source provided by archos
Kernel module released at http://gitorious.org/archos/archos-gpl-gen8/trees/master/hardware/ti/wlan/wl1271
Download the above mentioned sources.
cd .../hardware/ti/wlan/wl1271/platforms/os/linux
Now setup your environment by editing wl_env.bash or do it manually on the commandline in my case it was:
export CROSS_COMPILE=/usr/src/gen8/buildroot/build_arm/staging_dir/usr/bin/arm-linux-
export ARCH=arm
export HOST_PLATFORM=zoom2
export KERNEL_DIR=/usr/src/gen8/buildroot/linux/
Then type make and wait a few minutes and you are done. The tiwlan_drv.ko will appear in .../hardware/ti/wlan/wl1271/platforms/os/linux This gives you only the module. I am still looking at how the tiwlan_loader needs to be compiled.
More info can also be found http://omappedia.com/index.php?title=Wilink_Linux&redirect=no
If you use wl_env.bash then don't forget to
# source wl_env.bash
after editing and before make
thanks everybody!

kernel development 1.2 mytouch

I'm trying to get a functional config for the 1.2 mytouch but I'm having trouble tracking down the exact source to the MT3G-Fender-1.2-2.6.35.12-10M-test4.zip kernel but it's proving rather tricky. I can't seem to determine what the source to this kernel is and where to pull it.
If anyone can point me in the correct direction i can start on some work.
I pulled some pre-packaged git repo from ezterry's github. ezterry-kernel-biff-testing-5fba47e
I pulled my config from the running kernel from the zip i mentioned above running on my phone.
I built the kernel produced from using that config and the wlan.ko module.
Using this guide : http://forum.androidcentral.com/htc...how-build-your-own-kernel-package-source.html
I just want to be sure the kernel source i'm starting out with doesn't need extra patches that weren't included in the github pull in order to get it to work on the 1.2.
thanks for any help.
I'm also looking at cyanogenmod's github and will probably build a kernel against that pull this week as well.
Still, would like to know what sets the kernel i mentioned above apart from just straight pulls of these repos. That's the only part really confusing me.
Hey I was wondering if you could make this kernel your building an OverClock kernel too. No one has built one for our MyTouchs 1.2 that is truly for this device.
The Max OC I've been able to pull of is 725 without the phone freezing and rebooting.
Idk just thought it would be a good idea for your kernel!
Sent from my Fender using XDA Premium App
overclocking stability is less about the kernel and more about your particular hardware. Some phones just by manufacturing luck can achieve faster clocks than stock to varying degrees. 710 is considered to be the average max i believe. Anything faster is in the far minority of units. People who hack the cpufreq table to get these higher clocks limit to what they consider safe to stop people from actually destroying their hardware (which is possible).
Though, these "oc kernels" should have their patches posted somewhere. It's difficult to track down where exactly these kernel zips are coming from and thus to find out what their source is. Legally they need to either be shipped with the source or shipped with files pointing to the source or have the source available from the same place the binary was downloaded from. thus far I'm just guessing as to what the actual source is to the kernel i'm currently using and hoping all the necessary changes and patches are committed to the github that I believe the kernel is ultimately based from.
cellsafemode said:
I'm trying to get a functional config for the 1.2 mytouch but I'm having trouble tracking down the exact source to the MT3G-Fender-1.2-2.6.35.12-10M-test4.zip kernel but it's proving rather tricky. I can't seem to determine what the source to this kernel is and where to pull it.
If anyone can point me in the correct direction i can start on some work.
Click to expand...
Click to collapse
Hi I built this kernel.. later versions have a SOURCES file with the url's to the source I used. I added that after I started seeing it posted outside of the rom thread I originally posted it to
This is a build off of Pershoots github source
https://github.com/pershoot/kernel-2635
including Ezterry's 10Meg patch to the 32a mem map (Fender/1.2 is 32a/b hi-bred)
https://github.com/ezterry/kernel-b...9fca2404a4fa24384d11f8422ced65920bf06#L0R1355
and Farmatito's usb drain patches 001 - 022 excluding bfs
http://forum.xda-developers.com/showthread.php?t=1010932
and wlan.ko from Cyanogen's sources
the .config can be obtained using kernel-sources/scripts/extract-ikconfig
or adb pull /proc/config.gz config.gz
and as for Overclocking have a look at Dumfuq's githib
https://github.com/dumfuq/cm-kernel/commit/9f113c9e0acf19f57a35acbb85bd6f5cc2e76bb2
I get reboots at anything over 595
edit: I build these kernels because usb mount does not work with 2.6.34 on Gingerbread roms and more recent Cyanogen kernels had the green tint issue. Since the green tint issue is fixed and I think 2.6.34.8 works better on Froyo I haven't been working with 2.6.35 at all lately
cellsafemode said:
I'm trying to get a functional config for the 1.2 mytouch but I'm having trouble tracking down the exact source to the MT3G-Fender-1.2-2.6.35.12-10M-test4.zip kernel but it's proving rather tricky. I can't seem to determine what the source to this kernel is and where to pull it.
....
I just want to be sure the kernel source i'm starting out with doesn't need extra patches that weren't included in the github pull in order to get it to work on the 1.2.
Click to expand...
Click to collapse
you need to ask the person that build 2.6.35.12 based kernels.. [see ratkings comment]
My github has sources for 2.6.34.7/8 and 2.6.36.4 tags match my public builds (I think they are all tagged if not check the notes with my release of the kernel for the correct commit)
I also had some 2.6.35.9-11 builds from cm-kernel sources (exact commits and patches if needed mentions on the posts with the kernels) but the last one off those was in January.. and besides the january one the builds were 32b/2708+ only since that was the reason to re-build cm. sources with little modification.
I too get issues over 595. Wifi will not work etc. at 595 everything is happy.
I pulled the .config, and you cleared everything up. I was just wondering if those extra patches or anything that made booting to the 1.2 correctly were missing from the standard github kernels that I've found.
I have two jobs so time is very limited but I'm hopeful to boot my own compiled kernel this weekend and then work on modifying the accelerometer driver, specifically the parts that handle determining orientation in order to create a sysfs file that controls orientation locking. Write a 1 to the file and it always reports the same orientation that it's currently in, tricking the entire android system into thinking you are never changing your orientation... write a 0 and it reports the real orientation.. and so on. Then write a little app that can be used as a widget or kept in notification bar so you can easily tap lock the orientation whenever needed. Allowing true landscape and portrait locking on any mytouch 3g.
Uhh yeah I trimmed that way down.. no debugging at all (I like to live dangerously)
later tests were less insane
http://www.mediafire.com/file/eqgv0sbb7t4c57s/config-test7
the only other thing to note is that kernel/mkbootimg.sh was edited to force the base address to 10000000 instead of copying the address of the previous kernel.. thats really why I posted it as for Fender/1.2 only. I didn't want anyone messing that up and blaming me when re-flashing Pershoots kernel didn't correct it
It looks like the 1.2 patch is something that basically changes the 32A so if you patch your kernel source to support 1.2, you break building 32A kernels (you have to then have two trees or continually apply and remove the patch between builds). Is that the case, does the patch make your tree a 1.2 only tree when building for the 32A ?
If so I can edit the patch to introduce a kernel config under the saphire board selection to choose if you want to build for the mytouch 1.2 or 32A or 32B directly. So there is no confusion. Then instead of replacing values in the source like the patch does, wrap them in IFdef macros based on the kernel config options.
Then it should be easy to roll out 3 kernel compiles and do something similar to an auto kernel package and utilize a little logic to determine which to use. A rev board with 2.22 radio == 1.2 (i forget if there is another locale where the radio is different for the 1.2). Others can be chosen based on board rev only.
cellsafemode said:
It looks like the 1.2 patch is something that basically changes the 32A so if you patch your kernel source to support 1.2, you break building 32A kernels (you have to then have two trees or continually apply and remove the patch between builds). Is that the case, does the patch make your tree a 1.2 only tree when building for the 32A ?
If so I can edit the patch to introduce a kernel config under the saphire board selection to choose if you want to build for the mytouch 1.2 or 32A or 32B directly. So there is no confusion. Then instead of replacing values in the source like the patch does, wrap them in IFdef macros based on the kernel config options.
Then it should be easy to roll out 3 kernel compiles and do something similar to an auto kernel package and utilize a little logic to determine which to use. A rev board with 2.22 radio == 1.2 (i forget if there is another locale where the radio is different for the 1.2). Others can be chosen based on board rev only.
Click to expand...
Click to collapse
Um... all my kernels to my knowledge work on 32a old radio, 1.2/32b old radio and 2708+ 32b new radios..
Just 3 config files and #ifs for the changes.. ebi1=3.22 radio, ebi0=2.22 radio, and 2708+ = 32b with 2.22.27.08+ radios. (And thus 3 binaries in the auto kernels)
Note the ebi1/ebi0 have both 32a and 32b versions that is what you see with the smi size logic in the kernel
ok. I read the description of the 10M patch above wrong and thought it was also enabling 1.2 support ...
Also, I'm wondering why exactly we use an initrd/initramfs setup. Our rootfs drivers are all compiled in so what's the real reason we bother with initrd ? Seems like we could speed up loading time if we avoid having to decompress and use an initramfs image and just get right into mounting root
OK, sweet. I have 2.6.36.4-s2 working 100% on my mytouch 1.2. Now i can move forward with some actual development.
cellsafemode said:
Also, I'm wondering why exactly we use an initrd/initramfs setup. Our rootfs drivers are all compiled in so what's the real reason we bother with initrd ? Seems like we could speed up loading time if we avoid having to decompress and use an initramfs image and just get right into mounting root
Click to expand...
Click to collapse
i might be wrong but i think android mounts the partitions directly to places in the initrd. never does a switch root out of it like most linux distros.
but im a noob and might be wrong lol
tvall said:
i might be wrong but i think android mounts the partitions directly to places in the initrd. never does a switch root out of it like most linux distros.
but im a noob and might be wrong lol
Click to expand...
Click to collapse
The normal configuration is:
/ = ramdisk and contains init and adbd on the rom (and all of recovery)
/system = system partition
/cache = cache partition
/data = is userdata partition or internal MMC card depending on the device's design
/data/data = userdata if the device has an internal MMC card
** dream/sapphire only has /data on the MTD partition .. no internal MMC card.. just the external one (sd-card)
Can it be changed .. well that is more of a rom design than a kernel question.. just set the bootimage's command line to match if needed... but the above is aosp's expectation.
OK,
2.6.36.4-s2 ezterry kernel for mytouch 1.2
http://signal-lost.homeip.net/files/2.6.36.4-s2-cellsafe.zip.torrent
Source code at
http://signal-lost.homeip.net/files/ezterry_2.6.36.4-s2.torrent
Seed if you download. tTorrent app is a full torrent app for your phone. Or you can just load it on your computer (ideal) and then move it over usb while in recovery.
This is basically rattking's kernel install package with some minor asthetic edits to the install script and layout. The kernel is based off an older rattking .config with necessary changes to match configuration changes in the newer kernel as well as changes to certain schedulers and included drivers and features.
edit:
If you have trouble connecting to the torrent, make sure encryption is on.
IF you still have problems.. the direct link is http://signal-lost.homeip.net/files/2.6.36.4-s2-cellsafe.zip But it would be nice if the torrent was used.
edit2:
Some info about the latest kernel for those who haven't checked it out...
the 10M patch is already applied in the upstream source, so you'll have that. I also turned on all the unsafe frequencies, but default you move around between 122 and 595. You can override that however with user apps.
NOTE: Swap is not enabled with this kernel. .. that's about all the important stuff for now. I just wanted to get a good stable starting point before i start diving in and breaking stuff.
New version with some bugfixes.
I forgot to add in scsi support so the mass storage feature can function... some other minor changes too.
http://signal-lost.homeip.net/files/2.6.36.4-s2-cellsafe2.zip.torrent
7 hours of constant audio playback with the regular music player, on and off texting and web browsing over 3g (3g enabled entire time) and still got 50% power. I gotta compare to other kernels but that sounds pretty decent considering by now i'd be plugging the phone in.
my next half day off when i'm not 2 jobbing it i'll patch up the sensors so that I can enable and disable updating the orientation sensor via sysfs. Should be trivial then to have real orientation locking that's application independent. Should be sweet !
Is your kernel mainly for gingerbread, or froyo? If I understand right, ezTerry's 2.6.36.4 kernels are for gingerbread...
I've only tested it against gingeryoshi so I would say gingerbread or newer

[Q] Kernel source compiling for Xoom.

Hi I looked for sometime for answers but could not find anything relevant.
Looking to get the ftdi VCP drivers to install on Xoom. Which means I either have to compile a kernel or add them as a module. I can not for the life of me find the correct source tree.
I downloaded kernel 2.6.36.3 from google which matches my kernel version.
My kernel version on the tablet is 2.6.36.3-gb899258 .
When I cross compile the module and try to do an insmod its complaining about the magic version is different which leads me to believe that I have the wrong kernel.
Where can I get the right stock kernel?
If i can not find it there is another option to download the config.gz from the device and recompile another version of the kernel with native support for the ftdi drivers.. How do i just install just the kernel on the device? Is it a uImage bzImage and how do I just flash that?
cd
Thanks
edit:
scrap that ...
sorry, not really helpful in your case
I'm assuming you got your source from here? This is the link from the Android website:
git clone https://android.googlesource.com/kernel/tegra.git
If you decide to go the route of compiling another kernel source, the easiest way (and a good way to keep snapshots of various configs) would be to use Koush's AnyKernel to flash the kernel. I don't know anything about what you're trying to do but I hope that helps some.
Yep the code comes from there.....
I finally got it to work , I downloaded the stock kernel from google then when I make the modules I had to modify the Makefile to get it to match the kernel versions.
It seems to work for now...
Thanks for your help

The Theory of Everything (Building MTK from saucery) asop cm miui ubuntu

Welcome​
I have started this thread for the THEORETICAL development of the mt6732/mt6752 from source if such a thing happened to exist which of course it does not.
While compiling from source is pretty well documented :good: compiling MTK is not so well documented especially the mt6732/6752.
I have tried to keep this thread as ambiguous as possible and hopefully we will be left in peace to iron out any difficulties.
DO's:
I am a Total Noob myself to compiling from source but experienced enough to use the xda search box, Google and Youtube first before asking any questions. If your still confused after using the above then by all means ask here.
DON'T s:
If your a noob who should happen upon this thread then by all means read and learn but please respect the dev's by not asking random question without searching first :fingers-crossed:
SHARING:
Please only share things of a sensitive nature with recognised members who you know and via the PM. :good:
Lets just see how far we can push this Kernel
Recommended Reading:
[GUIDE]Building a Kernel from source{Mediatek}
Build Kernel MT6577 - Can't boot after build
How To Port CyanogenMod Android To Your Own Device
XDA:DevDB Information
k01q_e k01q_h, Kernel for all devices (see above for details)
Contributors
bigrammy
Kernel Special Features: Remains to be seen
Version Information
Status: Testing
Created 2015-02-25
Last Updated 2015-02-25
I am here, reporting for duty. If anyone wants an extra "potato" because he has too much "ketchup" for use feel free to ask me
Just to be clear
I am new to compiling from source in any shape or form
I believe the kernel to be not a problem and I know dev's are working on getting our phone on cm and maybe others :fingers-crossed:
But me being me I am very curious and would like to understand how we would go about doing what @varun.chitre15 managed to do for the mt6582 Here
I have the PC all setup for building now thanks to @carliv great guide Here and the cm and android tut's I also found this useful guide on youtube by Dave Bennet Here
Our device is not on the cm or google repo so how do we add it locally.
Do we need any special commands for mediatek
Could we use the mt6582 repo and substitute or mod the files
As you can see I have more questions than answers as normal :laugh:
I dont want to tread on any toes here or take over current developing but just want to learn as said in the OP there is a lack of mtk guides regarding this.
If I missed a clear mtk guide then please post the link to it. :good:
In short your looking at manifests. http://wiki.cyanogenmod.org/w/Doc:_Using_manifests
carliv (I think) posted the device config on github - link in your SPFlash thread somewhere.
Found it: https://github.com/carliv/device_elephone_p6000?files=1
Vendor files
I have compiled and flashed a kernel, I've been running it for 24+ hours with no obvious issues. It's honestly very easy to just get it to build if you don't try to make major changes.
I have (very lazily) tried to change a couple of things in the config to fix the known issues (OTG, compass): unfortunately I have no way to test the OTG function right now, while the compass did not magically start working. On the other hand, the notification light issue which is introduced by V8.4 is not strictly or exclusively kernel-dependent, since I am running V8.3 with my own kernel and the notification function is intact. That's all I can share at the moment.
xenonism said:
I have compiled and flashed a kernel, I've been running it for 24+ hours with no obvious issues. It's honestly very easy to just get it to build if you don't try to make major changes.
I have (very lazily) tried to change a couple of things in the config to fix the known issues (OTG, compass): unfortunately I have no way to test the OTG function right now, while the compass did not magically start working. On the other hand, the notification light issue which is introduced by V8.4 is not strictly or exclusively kernel-dependent, since I am running V8.3 with my own kernel and the notification function is intact. That's all I can share at the moment.
Click to expand...
Click to collapse
Can you switch on and post the /proc/config ?
Regarding the notification lights, I think v8.4 introduced the custom partition (might be wrong on that). Running grep -r "ro.notification.breath" /system/ the only result I got was services.odex (might have been settings.odex). I've bak(smali)ed it but couldn't see the difference between the two that would explain the change.
HypoTurtle said:
Can you switch on and post the /proc/config ?
Regarding the notification lights, I think v8.4 introduced the custom partition (might be wrong on that). Running grep -r "ro.notification.breath" /system/ the only result I got was services.odex (might have been settings.odex). I've bak(smali)ed it but couldn't see the difference between the two that would explain the change.
Click to expand...
Click to collapse
The config file is attached to the post, it's too big to paste it.
I have tried the new ROM which came out today, then flashed my kernel. I can't use either SIM card anymore. Flashed the boot.img that comes with the ROM - same. I guess I gotta go back to V8.3 for now.
The new ROM doesn't seem to be the same as the OTA: it reports as: Elephone_P6000_02_V8.0_20150206.
About the notification issues (which bothers me the most), I haven't had much time do to more experiments, but I was thinking this (which probably also led to my confusion*): there's a chance the functionality is not removed or shut down, at least in the intentions of the maker. After all, in V8.4 (and in the new ROM), when the phone is connected the light stays on, while notifications make it breath. While not a desirable behaviour (at least IMO), I wouldn't call it... a non-behaviour, so to say. So perhaps the functionality itself is intact but something is altering the way it works, for whatever reason. I also did some unpacking and grepping a few days ago, but I couldn't find anything useful.
* At some point I thought the issue was fixed because the light was breathing while connected to my PC, but it was probably because I had a notification to read.
xenonism said:
The config file is attached to the post, it's to big to paste it.
I have tried the new ROM which came out today, then flashed my kernel. I can't use either SIM card anymore. Flashed the boot.img that comes with the ROM - same. I guess I gotta go back to V8.3 for now.
The new ROM doesn't seem to be the same as the OTA: it reports as: Elephone_P6000_02_V8.0_20150206.
Click to expand...
Click to collapse
Lets not speculate too much - but perhaps there was a minor board change between the first and second preorders, notification could be a problem with granting notification access (in settings) - could this be a selinux issue? It would explain why things like Light manager work - as you grant them notification access.
For lost Imei - can you compare the custom partition to the one in the ota?
If anyone needs an easier way to grab the 'ketchup', my GitHub has it. Click on my blog link in my signature.
BachMinuetInG said:
If anyone needs an easier way to grab the 'ketchup', my GitHub has it. Click on my blog link in my signature.
Click to expand...
Click to collapse
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
bigrammy said:
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
Click to expand...
Click to collapse
I'm actually a noob too, and honestly I've only ever successfully built a fakeflash (temporary recovery) that didn't even work.
bigrammy said:
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
Click to expand...
Click to collapse
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
I think you can use the scripts in the root of the source code to build the kernel? make<something>.sh.
Make sure you're on Linux (Ubuntu preferred) and that you have all dependencies installed correctly. To execute the script, simply go to the Terminal, cd to the location, then type . make<something>.sh
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
Have a look at the README.
Does make menuconfig work here?
These few simple instructions from the readme file enable you to build a working kernel (at least in a Linux environment):
Code:
How to Build
kernel
======
1. Get the prebuilt cross compiler from AOSP website:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
2. Add required cross compiler to PATH:
$ export PATH=/YOUR_TOOLCHAIN_PATH/arm-eabi-4.6/bin:$PATH
$ export CROSS_COMPILE=arm-eabi-
3. Then use the following commands to build the kernel:
$ ./makeMtk k01q_e new k
make menuconfig can be made to work, but you need to set some parameters and I can't look into it right now.
You previously asked something about the custom partition, I need some guidance there as I am not familiar with the IMEI issue.
xenonism said:
These few simple instructions from the readme file enable you to build a working kernel (at least in a Linux environment):
Code:
How to Build
kernel
======
1. Get the prebuilt cross compiler from AOSP website:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
2. Add required cross compiler to PATH:
$ export PATH=/YOUR_TOOLCHAIN_PATH/arm-eabi-4.6/bin:$PATH
$ export CROSS_COMPILE=arm-eabi-
3. Then use the following commands to build the kernel:
$ ./makeMtk k01q_e new k
make menuconfig can be made to work, but you need to set some parameters and I can't look into it right now.
You previously asked something about the custom partition, I need some guidance there as I am not familiar with the IMEI issue.
Click to expand...
Click to collapse
Yea wasn't sure about menuconfig as mtk uses projectconfig rather than def_configs.
In the custom partition there are files like /custom/etc/firmware/modem.img etc. When messing with a Flyme port it was these files (and possible conflicts in /system) that caused an IMEI:nul.
FYI I opened the custom partitions on windows using an ext viewer after running the imgs through sgs2toext4.
Kernel building Mediatek
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
Not sure if you guys have seen or read this but it's a pretty comprehensive guide to building the mediatek kernel by @MasterAwesome and should really be compulsary for all kernel related things thread here http://forum.xda-developers.com/showthread.php?t=2754513
@HypoTurtle
Regarding the custom partition this is or could be a problem for us now and in the future and may require further investigation. The cm sprout branch has the modem.img in the (normal place /system/etc/firmware) but as you say ours is in the custom partition which is probably to protect it from bad /system flashes
Thing is I see no normal type link to it in the /system/etc/firmware so it must be linked some other way which may explain why all my port attempts failed as none of them used a custom partition (Asus_X002)
Maybe we will have to repartition the emmc to a standard config and alter the kernel (if the links are set via the kernel that is) for cm and other ports to work smoothly as I am unsure just how everything is linked up.
I have not had much experience with custom partitions so someone one know's of a good info source please link it. :good:
Hopefully Master @Santhosh M can figure out what's going on with the custom partition :fingers-crossed:
bigrammy said:
@HypoTurtle
Regarding the custom partition this is or could be a problem for us now and in the future and may require further investigation. The cm sprout branch has the modem.img in the (normal place /system/etc/firmware) but as you say ours is in the custom partition which is probably to protect it from bad /system flashes
Thing is I see no normal type link to it in the /system/etc/firmware so it must be linked some other way which may explain why all my port attempts failed as none of them used a custom partition (Asus_X002)
Click to expand...
Click to collapse
The partition is symlinked from .../by-name/custom (which is symlinked by the kernel from dev/block/mmcblk0p12) to /dev/customimg which is mouned after an e2fsck to /custom. /custom isn't linked to /system, it's just added to the global environment (init.environ.rc), will need to check on the environ, I'm on flyme and it has /custom/lib added to the library path (which doesn't exist).
HypoTurtle said:
The partition is symlinked from .../by-name/custom (which is symlinked by the kernel from dev/block/mmcblk0p12) to /dev/customimg which is mouned after an e2fsck to /custom. /custom isn't linked to /system, it's just added to the global environment (init.environ.rc), will need to check on the environ, I'm on flyme and it has /custom/lib added to the library path (which doesn't exist).
Click to expand...
Click to collapse
Haha thanks that explains a lot of weird things perfectly. :good:
What's the problem or what is the issue here.
Mediatek compiling guide ( by masterawesome ) that you have linked to is not actually practically this mtk kernel is done and is just way too complicatedly explained.
There is no defconfig stuff or pulling config.gz from phone in mtk. In this new source its just simple. Set up your toolchain path. Execute the makeMtk followed by the project no u want. Get zImage and patch it for mtk header and merge it with stock ramdisk. For this newer mtk chipsets repack has an extra stuff where u have to be careful of kernel command line parameters.
That's it the kernel stuff in mtk

[HELP][KERNEL]WiFi / Bluetooth Not working After Compiling kernel

Hello xda,
I am new into kernel development.Recently I downloaded the kernel sources for my phone Zenfone 2 Laser -ZE550KL
After that I compiled the stock kernel, since It is based on arm64 I got a file named Image instead of zImage.
After searching I found a way to convert that to a boot.img (using the ramdisk from stock kernel).I could get the kernel to boot on the device using
Code:
fastboot boot boot.img
The device booted successfully with the kernel, I could see change in the name of Kernel in About Phone.
But the problem is Wifi/Bluetooth and Soft keys do not work.Wifi turns on But cannot see any AP.
BT works(A BT enabled watch vibrated )but no device can be seen in bletooth settings.
Please help me with this kernel.
here is the link to my source=>
https://github.com/abhishekr700/ZE550KL_KERNEL
I am using ze550kl_defconfig present in /kernel/arch/arm64/configs to make .config file for building kernel.
Thanks.
Hello
Assuming the sources are for your device and are OK...
Do a factory reset, or full wipes first. ( sometimes this fixs issues with modules )
Also I'm assuming your kernel haves in-built modules, and not external modules...
Otherwise it could be a faulty config / old or incompleted source
Cheers
superdragonpt said:
Hello
Assuming the sources are for your device and are OK...
Do a factory reset, or full wipes first. ( sometimes this fixs issues with modules )
Also I'm assuming your kernel haves in-built modules, and not external modules...
Otherwise it could be a faulty config / old or incompleted source
Cheers
Click to expand...
Click to collapse
I'm 100% sure the sources are correct,
Because they are from official asus website.
Now first I tried without putting any modules in ramdisk.
I got error in logcat that failed to load wlan driver.
Then I searched all .ko files in the kernel folder. There were many files. I checked them with the /system/lib/modules and found that most files are there except wlan.ko which is a symlink from another file named pronto_wlan.ko in the modules folder in phone.
Any reason why pronto_wlan.ko is not being made in my working folder?
Sent from my C2305 using Tapatalk
abhishekr700 said:
I'm 100% sure the sources are correct,
Because they are from official asus website.
Now first I tried without putting any modules in ramdisk.
I got error in logcat that failed to load wlan driver.
Then I searched all .ko files in the kernel folder. There were many files. I checked them with the /system/lib/modules and found that most files are there except wlan.ko which is a symlink from another file named pronto_wlan.ko in the modules folder in phone.
Any reason why pronto_wlan.ko is not being made in my working folder?
Sent from my C2305 using Tapatalk
Click to expand...
Click to collapse
Being an official source from their website means absolutely nothing
Asus is one of the OEMs that sometimes release incomplete sources ..
The memo pad 7 sources they published doesn't even belong to have the device ...
In your case, it may be just a symlink issue, I though that nowadays OEMs where already compiling kernel modules inbuilt, makes few to no sense to have external kernel modules on kitkat and newer OS.
Is the wlan module folder present on kernel? They could've ditched it, in case its proprietary...
Also check if there's any wlan config on device build configuration..
Cheers
superdragonpt said:
Being an official source from their website means absolutely nothing
Asus is one of the OEMs that sometimes release incomplete sources ..
The memo pad 7 sources they published doesn't even belong to have the device ...
In your case, it may be just a symlink issue, I though that nowadays OEMs where already compiling kernel modules inbuilt, makes few to no sense to have external kernel modules on kitkat and newer OS.
Is the wlan module folder present on kernel? They could've ditched it, in case its proprietary...
Also check if there's any wlan config on device build configuration..
Cheers
Click to expand...
Click to collapse
In system/lib/modules there is a folder named pronto inside which pronto_wlan.ko exists.this file is symlink in modules folder as wlan.ko.
I could not find config wlan in the defconfig file I use to build kernel .config.
Although it is there in .config file.
I have given link to kernel source.
Also please tell me if you could talk on whatsspp telegram or fb.
I won't bother you I promise but this conversation can happen faster
Thanks.
Sent from my C2305 using Tapatalk
You have a thread for this topic already in the correct section (Q&A):
http://forum.xda-developers.com/android/help/help-wifi-bluetooth-compiling-kernel-t3368463
Please only create one thread per topic, thread closed.

Categories

Resources