[ROM + KERNEL][Linaro][EXT4][F2FS][OC/UC][UV][AndMore] Khaon's kitchen 13/01 - Xiaomi Mi 2

Khaon presents his kitchen for
Xioami MI2(s) devices
I am not responsible for any damage to your phone.
Read before downloading or posting in the thread:
Proceed with caution if you have no experience.
Introduction
You will find in this thread links to my kernel and a custom CM rom compiled with linaro toolchains and with optimized flags. The rom is shipped with my kernel
This kernel is based on cyanogen's. It ingrates various patches, in my opinion, stock kernel misses. It supports both ext4 and f2fs partitions.
This is a xda debDB project, so feel free to fill in bug reports, feature(s) request and review!
This kernel works on cyanogenmod rom and maybe some other AOSP roms!!
It uses, for now, a simple all kernel repack script. Thus, this repack method is not guaranteed to work at 100%for your custom rom!
Roms reported working so far : Omni Rom, Gummy rom, Paranoid rom, Pacman Rom, CM11 also​
The kernel is fully supporting f2fs, if will correctly mount your partition as long as they were formated with f2fs and ext4.
You don't need to edit the rom's script, it will detect itself your partition's filesystem.
For those who don't know what is f2fs
F2FS (Flash-Friendly File System) is a flash file system created by Jaegeuk Kim (Hangul: 김재극) at Samsung for the Linux operating system kernel.[2]
The motive for F2FS was to build a file system that from the start takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.
Click to expand...
Click to collapse
Some benchmarks to point out the performance difference between EXT4 and F2FS
AndroGuide benchmarks : ext4 vs f2fs ( seemes to be using the most recent f2fs)
XDA's benchmark : ext4 vs f2fs
Phoronix's benchs ext4 vs btfrs vs f2fs
Another Phoronix's bench​
Click to expand...
Click to collapse
Features :​
Compiled with lastest stable linaro - 4.9.2-201409
Compiled with appropriated optmizated flags : O3, etc.
Any kernel script
CPU Governors : onDemand,msm-dcvs,interactive, intelliactive,conservative, performance, userspace
GPU Governors: onDemand,performance,interactive
I/O schedulers : noop, cfq, row,deadline, bfq v7r6(tweaked for nand devices)
CPU hotplug drivers : intelli_plug
intelli_thermal
Support and up to date with upstream f2fs revision branch
Mounts dynamically your partition as long as they were formatted with ext4 or f2fs(not working yet with data f2fs with TDB and sys2)
CPU UC/OCing
GPU OCing up to 500 Mhz
FauxSound 3.6
supports kernel neon mode
kernel image compressed with lz4 algorithm for faster boot
arm optimized crypto algorithms
frandom: A fast random number generator for replacement to urandom
uksm in replacement for ksm
Westwood+ TCP congestion control algorithm
And many more patches(see my github!).
​Instructions :
Code:
[B]Kernel:[/B]
1. Reboot to your recovery
2. Install the zip
3. Wipe your caches( /cache & dalvik-cache)
4. reboot & enjoy!
[B]Rom: [COLOR="Red"][FONT="Arial Black"][SIZE="2"]THE ROM IS SHIPPED WITH ORIGINAL CM11 KERNEL[/SIZE][/FONT][/COLOR][/B]
1. Just install the zip! (if you have some partition ith f2fs it will detect itself)
[B]Format cache and data partitions to f2fs:[/B]
You can use @XperianPro 's [URL="http://forum.xda-developers.com/mi-2/development/rom-cyanogenmod-11-modified-edition-t2873261"]philz's recovery[/URL] he built for his modified rom
or use my custom twrp recovery, [B]need to use 2.8.1.0 and onwards[/B]
[SIZE=1].[/SIZE]
Download Link​Credits :
Cyanogenmod and particulary @@m11kkaa for their work on this device
Samsung for f2fs filesystem
@faux123for his work ( intelli_plug, intelli thermal, fauxsound, intelliactive)
@franciscofranco for his gpu governor
@osm0sis for his any kernel script 2.0
Linaro team for their work on the toolchain
XDA:DevDB Information
Khaon's kitchen for the Xiaomi mi2(s), ROM for the Xiaomi Mi 2
Contributors
Khaon, @faux123,@m11kkaa,@franciscofranco
Source Code: https://github.com/Khaon/mi2_kernel/tree/khaon
ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.4.x
Based On: Cyanogenmod
Version Information
Status: Snapshot
Stable Release Date: 2014-10-27
Created 2014-09-27
Last Updated 2015-01-05
XDA:DevDB Information
Khaon's kitchen for the Xiaomi mi2(s), ROM for the Xiaomi Mi 2
Contributors
Khaon, @faux123,@m11kkaa,@franciscofranco
Source Code: https://github.com/Khaon/mi2_kernel/tree/khaon
ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.4.x
Based On: Cyanogenmod
Version Information
Status: Snapshot
Stable Release Date: 2015-01-13
Created 2014-09-27
Last Updated 2015-01-13

Reserved
Changelog :
13/01
khaon said:
apq8064:final voltage for new L2 cache speed frequencies
merged with google's androidd 3.4 branch: squashed the following commits:
Merge remote-tracking branch 'common/android-3.4' into lollipop
ARM: pull in <asm/simd.h> from asm-generic
ARM: be strict about FP exceptions in kernel mode
ARM: move VFP init to an earlier boot stage
crypto: create generic version of ablk_helper
ARM: add support for kernel mode NEON
crypto: sha - Handle unaligned input data in generic sha256 and sha512.
crypto: sha512_generic - set cra_driver_name
crypto: sha512 - Expose generic sha512 routine to be callable from other modules
crypto: create generic version of ablk_helper
defconfig updated:enabled arm crypto
KEYS: Provide signature verification with an asymmetric key
KEYS: Asymmetric public-key algorithm crypto key subtype
KEYS: Implement asymmetric key type
crypto: add crypto_[un]register_shashes for [un]registering multiple shash entries at once
ARM: 8120/1: crypto: sha512: add ARM NEON implementation
ARM: 8119/1: crypto: sha1: add ARM NEON implementation
ARM: 8118/1: crypto: sha1/make use of common SHA-1 structures
crypto: arm-aes - fix encryption of unaligned data
CRYPTO: Fix more AES build errors
ARM: add .gitignore entry for aesbs-core.S
ARM: add support for bit sliced AES using NEON instructions
ARM: move AES typedefs and function prototypes to separate header
ARM: 7837/3: fix Thumb-2 bug in AES assembler code
ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling
ARM: 7626/1: arm/crypto: Make asm SHA-1 and AES code Thumb-2 compatible
arm/crypto: Add optimized AES and SHA1 routines
sync with f2fs upstream branch
squashed few commits from CAF:
mm: vmscan: lock page on swap error in pageout
Staging: android: binder: More offset validation
Input: Send events one packet at a time
binder: NULL pointer reference
staging: binder: add vm_fault handler
staging: binder: Change binder mutex to rtmutex.
Click to expand...
Click to collapse
08/11
@khaon said:
rom
compiled with ftree-vectorize extra flags
kernel
cpufreq: create a helper function to get CPU utilization. Picked from @stratosk
aries_defconfig updated
block: zen: fix a bug in add_request, should use rq_is_sync
Adjust zen comments
Some cleanups to zen I/O scheduler
block:zen:I/O scheduler adjustments, reduce fifo_batch to 1
Add Zen I/O scheduler. Similar to SIO, primarily based on no-op and deadline. Intended to be mostly FCFS. Simpler than SIO in many ways, one of them being write requests/read requests have mostly the same priority.
f2fs: updated to upstream branch
added the new mount option fastboot for f2fs partition
This commit add a new mount option : fastboot
If a system wants to reduce the booting time as a top priority, now we can use a mount option, -o fastboot. With this option, f2fs conducts a little bit slow write_checkpoint, but it can avoid the node page reads during the next mount time.
Click to expand...
Click to collapse
As usual the rom is shipped with regular kernel, tdb users will have to flash tdb kernel
Click to expand...
Click to collapse
[/HIDE
[/QUOTE]
24/10
f2fs: remove pointless bit testing in f2fs_delete_entry()
f2fs: revisit inline_data to avoid data races and potential bugs
f2fs: fix possible data corruption in f2fs_write_begin()
f2fs: use current_sit_addr to replace the open code
f2fs: rename f2fs_set/clear_bit to f2fs_test_and_set/clear_bit
f2fs: set raw_super default to NULL to avoid compile warning
f2fs: introduce f2fs_change_bit to simplify the change bit logic
f2fs: remove the redundant function cond_clear_inode_flag
f2fs: remove the seems unneeded argument 'type' from __get_victim
f2fs: avoid returning uninitialized value to userspace from f2fs_trim_fs()
f2fs: declare f2fs_convert_inline_dir as a static function
f2fs: use kmap_atomic instead of kmap
f2fs: reuse make_empty_dir code for inline_dentry
f2fs: introduce f2fs_dentry_ptr structure for code clean-up
f2fs: should not truncate any inline_dentry
f2fs: reuse core function in f2fs_readdir for inline_dentry
f2fs: fix counting inline_data inode numbers
f2fs: add stat info for inline_dentry inodes
f2fs: avoid deadlock on init_inode_metadata
f2fs: fix to wait correct block type
f2fs: reuse find_in_block code for find_in_inline_dir
f2fs: reuse room_for_filename for inline dentry operation
f2fs: update f2fs documentation for inline dir support
f2fs: enable inline dir handling
f2fs: add key function to handle inline dir
f2fs: export dir operations for inline dir
f2fs: add a new mount option for inline dir
f2fs: add infra struct and helper for inline dir
f2fs: avoid infinite loop at cp_error
f2fs: avoid build warning
f2fs: fix to call f2fs_unlock_op
f2fs: avoid to allocate when inline_data was written
f2fs: use highmem for directory pages
f2fs: fix race conditon on truncation with inline_data
f2fs: should truncate any allocated block for inline_data write
f2fs: invalidate inmemory page
f2fs: do not make dirty any inmemory pages
[*]cpufreq:intelliactive:tweaked tunnables
[/LIST]
20/10
Kernel:
mm: Added filesystem dynamic read-ahead (Credits to Chad Gooldman)
block, bfq: add Early Queue Merge (EQM) to BFQ-v7r6 for 3.4.0
block: introduce the BFQ-v7r6 I/O sched for 3.4
12/10:
fixed occasional errors that were preventing to mount correct partitions at boot
09/10
f2fs: updated to revision branch
aries: corrected the default max freq bouncing
intelli thermal : introducting, patched to upstream revision
aries : corrected voltage regulator !!! Voltage < 700 mV weren't correctly applied because of it.
28/09
GPU :
GPU overclocking : initial support
Sound:
Imported fauxSound 3.6[/
27/09:
GPU:KGSL : interactive governor: initial support​
Kernel:add support for LZ4-compressed kernel
arm: add support for LZ4-compressed kernel
lib: add support for LZ4-compressed kernel
decompressor: add LZ4 decompressor module
ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above
frandom: A fast random number generator as a kernel module for Linux.
SELinux: Fix memory leak upon loading policy​
FS:f2fs: initial suport with sources from upstream revision
writeback: fix race that cause writeback hung​MM:mm: Increase VM_MAX_READAHEAD to 512
mm: ukms : initial support ukms is an improvement upon KSM. Some basic data structures and routines are borrowed from ksm.c
CHROMIUM: mm: Fix calculation of dirtyable memory​
Block:block: cgroups, kconfig, build bits for BFQ-v7r5-3.4
block: introduce the BFQ-v7r5 I/O sched for 3.4
Async I/O latency to a ssd greatly increased, 34% gain (Creds: kleikamp)
block: Reserve only one queue tag for sync IO if only 3 tags are available
ext4: speed up truncate/unlink by not using bforget() unless needed
deadline: Allow 0ms deadline latency, increase the read speed
mmc: disable CRC check​
crypto:arm/crypto: Add optimized AES and SHA1 routines
crypto: sha1: add ARM NEON implementation
crypto: arm-aes - fix encryption of unaligned data
ARM: add .gitignore entry for aesbs-core.S
ARM: add support for bit sliced AES using NEON instructions
ARM: 7837/3: fix Thumb-2 bug in AES assembler code
ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling
ARM: 7626/1: arm/crypto: Make asm SHA-1 and AES code Thumb-2 compatible
ARM: 8118/1: crypto: sha1/make use of common SHA-1 structures​
arm : kernel neon mode:ARM: be strict about FP exceptions in kernel modee
ARM: move VFP init to an earlier boot stage
ARM: add support for kernel mode NEON​
ARM:intelli_plug : initial import
Intelli_plug: kernel sched/core: add per cpu nr_running stats
intelli_plug: refactor stats calculation code to be less intrusive
Voltage Control: initial voltage control for MSM S4-Pro SOC
ARM : vfp : using hard float now
Intelliactive : iniatial introduction from faux123's mako repo​

Reserved

Great news! Will test definitely.Did i miss the download button or isn't released yet?

T3sla said:
Great news! Will test definitely.Did i miss the download button or is isn't released yet?
Click to expand...
Click to collapse
Ahah, my bad, by misstake it seems I deleted the link. It is fixed!

http://forum.xda-developers.com/devdb/project/dl/?id=8790
Look on top of the trhead

Only aosp or cm too?

wifi and bluethoot dont work in Moonlight Nexus 5 experience rom.
http://forum.xda-developers.com/mi-2/orig-development/rom-nexus-5-experience-rom-m2-2s-t2881568
I have also screen tearing. Any plans on anykernel version?

paul89rulez said:
wifi and bluethoot dont work in Moonlight Nexus 5 experience rom.
http://forum.xda-developers.com/mi-2/orig-development/rom-nexus-5-experience-rom-m2-2s-t2881568
I have also screen tearing. Any plans on anykernel version?
Click to expand...
Click to collapse
kekkojoker90 said:
Only aosp or cm too?
Click to expand...
Click to collapse
At the moment I am running cyanogenmod rom and everything is working. All other issues on other roms are related most likely to the ramdisk. A first try is to repack. Otherwhise I can port the kernel for any rom.

i think that its better to do an universal version (anykernel metod) for you (porting your kernel to all roms is difficult). Btw do as you wish, i m ready for test any Moonlight\Mokee version

paul89rulez said:
i think that its better to do an universal version (anykernel metod) for you (porting your kernel to all roms is difficult). Btw do as you wish, i m ready for test any Moonlight\Mokee version
Click to expand...
Click to collapse
Well, I don't know what exactly is any kernel, I just wanted at first to share my own kernel for cyanogenmod since that's what I am running. However, it is with pleasure I would do an universal kernel just I need to look into any kernel :silly:. any ressources are welcome!

Op was updated with features to come and warn users that it is fully working only on cyanogen

here you go
AnyKernel
http://forum.xda-developers.com/showthread.php?t=1906391
Koush sources:
https://github.com/koush/AnyKernel

paul89rulez said:
here you go
AnyKernel
http://forum.xda-developers.com/showthread.php?t=1906391
Koush sources:
https://github.com/koush/AnyKernel
Click to expand...
Click to collapse
Yeah I was just beeing busy to implement that. In fact it is just a repack of the the current rom ramdisk. However, like I said above, it is the first try, but it ain't 100% of the time working. Stay tunned then about to release a new updater-script zip

updater-script uptated to use khoush's any kernel repack
Seg fault on unpackbootimg

Khaon said:
Yeah I was just beeing busy to implement that. In fact it is just a repack of the the current rom ramdisk. However, like I said above, it is the first try, but it ain't 100% of the time working. Stay tunned then about to release a new updater-script zip
Click to expand...
Click to collapse
Problem with AOSB too.Screen tearing, wifi, bluetooth don't work, i guess all AOSP based roms will have the same problem.Waiting for the new one.Just a friendly request, it would be nice if you could add charge limiter, if it's possible of course.

T3sla said:
Problem with AOSB too.Screen tearing, wifi, bluetooth don't work, i guess all AOSP based roms will have the same problem.Waiting for the new one.Just a friendly request, it would be nice if you could add charge limiter, if it's possible of course.
Click to expand...
Click to collapse
What do you mean exactly? A sysfs interface to sec the max amperage?

Testing it with project lungo. Very good khaon!

paul89rulez said:
Testing it with project lungo. Very good khaon!
Click to expand...
Click to collapse
Everything working on lungo?
Btw, this is my result after a fresh restart and no ART neither f2fs.
Is this any good? Honestly doesn't really know.

Khaon said:
What do you mean exactly? A sysfs interface to sec the max amperage?
Click to expand...
Click to collapse
I don't know how exactly is implemented but i mean limit the charge level, e.g. stop charging when it hits 90%.The point behind this feature is that batteries last longer if you don't charge them to full capacity.It's better to charge them at lower level and more frequently instead of less full charges.A lot of laptops have this feature, also a relevant link i found.There is a very analytical post at batteryuniversity.com about the subject, i can search if you wanna read.

Related

[kernel]Unhelpful Kernel v1.7 2010-10-04-0018

WARNING
Overclocking/undervolting could cause crashes with loss of data, or even damage hardware including the CPU or GPU.
Voodoo support included since 1.5, remove all non-Voodoo lagfixes before installing.
This works for me, but you are ultimately responsible for what happens to your device and your data - have backups, preferably on an external SD that you remove for initial testing.
These are unsigned and will not flash via stock recovery. Use ROM Manager to flash, with ROM Manager you also don't need to rename them as it can select any zip file from internal storage.
Features:
Voodoo lagfix support - should work correctly flashed over other Voodoo beta4 kernels, remove non-Voodoo lagfixes before installing.
BLN support to allow use of touch-button lights to indicate pending notifications when screen is off. The lights will light for all statusbar notifications, unless disabled in the app producing the notification (not all apps will have an option to do this, I don't think any stock Samsung apps do).
Stock voltages/clocks at boot, runtime configuration of clocks and voltages via sysfs, nilfs2 and ext2/3/4 filesystem support, two-stage user init - early scripts for mounting filesystems, late ones for running services. Default I/O scheduler is BFQ, BFQ/CFQ/anticipatory all perform roughly the same in benchmarks with multiple threads competing for I/O. Typical wakeup between instant and about one second, built with the binutils 2.19.1 / gcc 4.3.4 toolchain.
User clock/voltage configuration can be read from/written to /sys/devices/system/cpu/cpu0/cpufreq/freq_volt_table. Copy this file to get the defaults, edit your copy and write back over the original to update, or save your new file in /sdcard/sd/config, /sdcard/config, or /system/etc/config to have it applied on boot. The first column is CPU clock, the second GPU clock, the third CPU voltage, the fourth internal voltage. Changing values besides CPU clock/voltage is not recommended. You must keep 100MHz as the lowest speed. Clocks are in KHz, voltages in mV. Modify at your own risk, I find that my phone runs 1.2GHz @ 1.3V just fine, but yours may vary.
Be aware that your phone might appear to run fine with overclock/undervolt at first but crash later due to some error in calculation or data transfer - i recommend a good number of runs on something like Quadrant, and at least five minutes or so of SetCPU stress test for each frequency you add or change.
User inits must be placed in /system/etc/init.d, and properly named - names starting with "E" will run before /data and /dbdata are mounted, names starting with "S" will run right before startup is completed and normal Android services start. Inits are sorted by name, so you can follow the initial E or S with a number to change the order in which they will run. Scripts need not be executable, and will be run with the shell provided in initramfs for Voodoo support (busybox ash). If either /data or /dbdata is not a mount point after E scripts are completed, /user_early_init.sh will attempt to mount an rfs filesystem there from the usual location. If you want to mount a filesystem that is some other type, you will need to do so in a user script. If you want to format /data with another filesystem, you must edit the partition table to change the partition number - I have disabled the code in /sbin/init that rewrites the partition table, but if it finds something on standard /data partition that does not look like a valid RFS filesystem, it will reformat it.
If you want to build yourself, see the toolchains thread for known-working tools. Run
Code:
make ARCH=arm i897_defconfig
make ARCH=arm menuconfig [COLOR="blue"]optional[/COLOR]
make CROSS_COMPILE=/path/to/toolchain/arm-none-eabi- zImage [COLOR="blue"]change if using a different toolchain[/COLOR]
tar c -C arch/arm/boot/zImage >captivate_zimage.tar
Flash captivate_zimage.tar as PDA in Odin - see other threads for how to use Odin and where to get it. Use menuconfig to select a different initramfs source if you wish, by default an included one at usr/initrd_files will be used.
Starting with v1.4, create a .build_config file to change any variables and run build_kernel.sh to build tar flashable with Odin or update.zip. As of v1.5.2 you can also use .build_config to inject commands and files into update.zip builds.
CREDITS
raspdeep - the original OC code
curio - Voodoo lagfix original concept and script
neldar - BLN support
atinm - BLN port for Captivate
BusyBox, buildroot, crosstool-ng, nilfs2 - see respective projects for original contributors and source
v1.7ClockworkMod Recovery
flashable binary: mediafire mirror | github mirror
github source
BETA ClockworkMod Recovery replaces stock recovery
BETA support for backup/restore with Voodoo enabled
v1.6BLN Support
flashable binary: View attachment i897-unhelpful-v1.6.zip | mediafire mirror | github mirror
github source
BLN support - use the touch-button lights to alert of pending notification when screen is off.
Disable check for SGH-I897 device, since this can fail on Captivate hardware if an alternate ROM is flashed.
v1.5.3Bugfix release
flashable binary: View attachment i897-unhelpful-v1.5.3.zip | mediafire mirror | github mirror
github source
Revert from the config based on kepler_rev02_defconfig, suggested by the 9/6 code drop, to aries_rev02_defconfig. The config change appears to have been responsible for the power drain problems seen in v1.5.1 and v1.5.2.
v1.5.2Bugfixes and Voodoo lagfix support
flashable binary: View attachment i897-unhelpful-v1.5.2.zip | View attachment i897-unhelpful-v1.5.2.tar.7z | mediafire mirror | github mirror
github source
Odin-flashable tar file (inside 7z to allow upload to XDA), please use only to recover from bad flash of v1.5.1, the update.zip contains scripts that are important if you're running SRE.
Voodoo lagfix support
Restore correct stock voltage (1.275V) for 1GHz
Update sources and config from Captivate 9/6 source drop
Update modules from JH7 OTA
LZMA initramfs compression to reduce compressed kernel size / allow larger initramfs
Enhanced update.zip support allows developers to easily inject their own commands and files into update.zip on build, and allows run_programs scripts to produce screen output and can flash kernel/modem partitions directly.
v1.4.1BUGFIX for SRE users
flashable binary: View attachment i897-unhelpful-v1.4.1.zip | View attachment i897-unhelpful-v1.4.1.tar.7z | mediafire mirror | github mirror
github source
Bug with SRE + 1.4 causing storage to become unavailable should be fixed by this kernel, fix works on my phone but some have reported problem spontaneously ifxing itself.
v1.4Load OC/UV config from file, system early init (for developers).
downloads removed due to bugs
github source
Built with gcc-4.4.3
build_kernel.sh reads variables from .build_config, or from config file specified by $BUILD_CONFIG, so you can keep the script file clean.
Early system init - E* scripts in /sbin/init.d run before user early init, for developers to include startup scripts.
System init loading of OC/UV table - searches for config/freq_volt_table on external SD, then internal SD, then in /system/etc.
ADB checks uses the first shell found from the list bash, ash, /system/xbin/sh, /system/bin/sh, sh.
Correctly set cpufreq policy on table change - should fix resets of maximum clock to 1GHz after new tables are loaded.
v1.3.1OC/UV configuration
flashable binary: View attachment i897-unhelpful-v1.3.1.zip | mediafire mirror | github mirror
github source
Stock clocks/voltages at boot, user can add new clocks and change voltages at runtime - see above for details.
Modify stock init to avoid rewriting partition table at boot - change the partition table for internal SD, resize partitions or remake /data with a different partition number so it can be safely formatted with another filesystem.
v1.2Bugfix / update.zip / dev features
flashable binary: View attachment 389189 | mediafire mirror | github mirror
github source
Fix scaling bug, performance level was set past end of table on sleep
Scaling enhancement, selectable clock source for GPU
GPU clocked at 222MHz for all speeds except 100MHz, where it matches CPU clock
Basic build_kernel.sh script, edit to change configuration - builds unsigned update.zip with default kernel config by default
Add interactive CPU governor - enabled in build but conservative is still configured as the default
v1.1Bugfix release
flashable binary: mediafire mirror | github mirror
github source
Rework of user init, resolves lost-settings-on-boot issue for me.​
v1.0Initial release for Captivate I897
flashable binary: mediafire mirror | github mirror
github source
nilfs2, ext2/3/4 filesystems
separate early and late user init
600MHz and 1.2GHz speeds, use SetCPU to enable 1.2GHz
fast scaling from low speed, skipping from 100MHz to 800MHz​Other Downloads
User Init Scripts
mediafire, github - enable 1.2GHz overclock on startup
mediafire, github - start Mobile AP background service
Does this include the ability to clock at 1000 mhz?
Sent from my Nexus One using XDA App
You're my hero.
*edit*
_Opiate_ said:
Does this include the ability to clock at 1000 mhz?
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Yea it is, I have it set at 1200 in setcpu and I saw it hit 1000mhz a few times just watching it.
Yes, the scaling steps are 100MHz, 200MHz, 400MHz, 600MHz, 800MHz, 1GHz, and 1.2GHz. 1.2GHz is disabled at startup until the user enables it, so that the kernel can be used without overclocking.
Sent from my SAMSUNG-SGH-I897 using XDA App
So will this undo the MobileAP that was just put out. I know we had to flash a custom kernel to enable that. Will this undo it?
Clienterror said:
You're my hero.
*edit*
Yea it is, I have it set at 1200 in setcpu and I saw it hit 1000mhz a few times just watching it.
Click to expand...
Click to collapse
Never mind I just flashed it. No On demand?
Unhelpful said:
Yes, the scaling steps are 100MHz, 200MHz, 400MHz, 600MHz, 800MHz, 1GHz, and 1.2GHz. 1.2GHz is disabled at startup until the user enables it, so that the kernel can be used without overclocking.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Thats great. Hell just running it at 1000mhz is a slight improvement in Quadrant. Before when I was running the stock kernel I never saw it clock above 800mhz.
Also no wake up lag at all!!!!!!!!! Great fraking job man!!!!!
jhernand1102 said:
So will this undo the MobileAP that was just put out. I know we had to flash a custom kernal to enable that. Will this undo it?
Click to expand...
Click to collapse
This does not run wlp2pservice in the init.rc, but a user script can easily be written to do that - I already have one on my phone, I'm going to add a section for init scripts in the OP when I get the chance.
Can you toss up a donation link plz :-D
Unhelpful said:
This does not run wlp2pservice in the init.rc, but a user script can easily be written to do that - I already have one on my phone, I'm going to add a section for init scripts in the OP when I get the chance.
Click to expand...
Click to collapse
Thanks for the info...looking forward to trying this out once there is a script so MobileAP still works...
jhernand1102 said:
Thanks for the info...looking forward to trying this out once there is a script so MobileAP still works...
Click to expand...
Click to collapse
Yeah that's one reason I still use my Nexus One mainly. The ability to tether is built right in to Froyo. But I can wait for tethering till we have a kernel that will do both. I prefer to play with this kernel now. Lol
Sent from my Nexus One using XDA App
_Opiate_ said:
Yeah that's one reason I still use my Nexus One mainly. The ability to tether is built right in to Froyo. But I can wait for tethering till we have a kernel that will do both. I prefer to play with this kernel now. Lol
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Yeah hopeful it can be put in the same kernel then we can have the best of both worlds...
I just found something strange. When I reboot and enter set cpu the phone say I have to chose my device again so I have to choose autodetect again.
Sent from my SAMSUNG-SGH-I897 using XDA App
do we just flash this with odin ? in the op there are many intrsuctions on putting stuff here and there i got lost
_Opiate_ said:
I just found something strange. When I reboot and enter set cpu the phone say I have to chose my device again so I have to choose autodetect again.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Every time I reboot it's all in Russian again like the first boot with JM5 lol.
Crizthakidd said:
do we just flash this with odin ? in the op there are many intrsuctions on putting stuff here and there i got lost
Click to expand...
Click to collapse
Yep, just use 7zip and extract the .tar then flash with odin3 as PDA.
Wow, unhelpful you are the MAN. Put up a donate link, I'll send a few beers your way.
Works!!
Unhelpful, you're probably one of the MOST helpful people on this forum. haha
minor bug, usb debugging doesn't seem to stay on between reboots.
and i can't seem to send emails using the gmail client anymore
IStern said:
minor bug, usb debugging doesn't seem to stay on between reboots.
and i can't seem to send emails using the gmail client anymore
Click to expand...
Click to collapse
ditto on the usb debugging, wont stay on between reboots

[SUGGESTION] JFS optimizations

Hi all,
I was just reading in the Arch Linux Wiki and found a nice article about JFS. Since it is used in more and more kernels that are floating around for our Galaxies (using nikademus' version atm, works nicely!) I thought I'd share this; maybe you guys can get some extra inspiration for constructing your JFS-enabled kernels. A small snippet:
There are several concepts that can be implemented with a JFS filesystem to boost its performance:
periodic defragmentation of the file system
using the deadline I/O scheduler
utilizing an external journal
attaching the noatime attribute the the file system in /etc/fstab
Click to expand...
Click to collapse
Read instructions and more here.

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

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

[KERNEL][GPL] ezterry A500 kernel (ezT20) 2.6.39.4-ezT20-v1.0.1~ [Aug 12th, 2012]

~~~~~ Latest release
A500 - V1.0.1 (first stable release)[Size=+1]
ezT20-v1.0.1-a500_S.zip
MD5: 73e25f9970dc5f34d863a2c7155968d2
[/SIZE]​
**Please remove all undervolting and overclocking before installing, as different kernels will use the CPU differently, This may require you thus to change the OC/UV levels to be stable with this kernel.
While plenty of work has gone into ensuring this kernel was fit for use: I take no responsibility for any problem the use of this kernel may cause, and/or loss of data if you fail to backup your data before installing it. Proceed at your own risk
Notice: This kernel will only operate on an unlocked ICS bootloader, for the a500 this is the patched bootloader
A500 Installation: : simply flash the zip from recovery, this will extract and replace the zImage (linux kernel) from your current rom; and leave your existing ramdisk unchanged.
A501 Installation: :Your ICS rom requires to load the new simdetect_switch.ko module on boot, if your rom dose not have support for this, but has support for init.d scripts please first install the patchkit ezT20_a501_patchkit_S.zip MD5: 617f558555c13d215103cd3669d3c009, (This kit only includes the init.d script to load the simdetect_switch module if it exists, and doesn’t include the actual kernel or modules)
After the patch kit is installed (or if it has been previously installed/is part of your rom) you can flash the a500 zip above to install the kernel + related modules.
CM (9 and 10) installation Install per your device above, then install the audio patch init.d scripif you have audio problems: ezT20cmaudio_patch_S.zip MD5: 26251900115b0ca433f26f4d95e7f269 (see this post for more information)
Are you an A100 user? you are in the wrong place see here
~~~~~ ICS Kernel Features
- BFQ IO scheduler (details here)
(BFQ is now the default scheduler, previously was noop)
- Lulzactive CPU governor (by tegrak with a500 modifications by myself)
(Interactive will be the default governor for most roms, as defined on the ramdisk, however lulzactive is recommended)
- Max OC speed: 1504MHz (default 1000MHz)
- Min OC speed: 216MHz (default 216MHz)
- Fixed voltage tables to allow OC on devices previously unable to on A500-OCTestV3 and A100-OCTestV1
- initial 3g support thanks to patches from Vash (v1.0.0 - a501) .. switched to acer's code in v1.0.1 (a501/a101)
- ability to disable acer audio settings (v1.0.1)
~~~~~ Kernel Notes/Warnings
** A specialized lulzactive configuration program can be found at: https://play.google.com/store/apps/...1bGwsMSwxLDMsImNvbS50ZWdyYWsubHVsemFjdGl2ZSJd
(note setCPU will also let you change the values, I only mention tegrak's app as it may make it easier to understand what is being changed)
** The kernel ought to work in place of the stock ICS kernel, roms requiring special kernels may not function with this kernel
** de-odexed roms may have graphical artifacts that are made more serious by this kernel, civato and I have been working on a build.prop tweak to re-generate odex like dex files on de-odexed roms to solve this
** Voltage display may not be accurate (a rework of the UV logic is planned) note UV offsets are accurate.
The following is using the following:
* My Near stock rom
* My disk-io tweak for the rom
* lulzactive Min: 216 Max 1504
* BFQ scheduler
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
~~~~~ Kernel History
This kernel is the continuation of the Overclocked Test kernel, originally posted for the A500 here and subsequently for the A100 here
~~~~~ Credits
Thanks to:
* richardtrip - original OC and MIN/MAX code
* tegrak - for lulzactive
* civato - for being a willing advanced tester
* Bobg1231, Metallkasten, pio_masaki, Moscow Desire - additional testers
* Vash - A501 3g modem patch set
* Acer/NVidia for providing the source to our devices
* The countless number of people that have created the linux kernel in the form it is today
~~~~~ Release Build list w/ source links
v1.0.1 ezT20-v1.0.1-a500_S.zip
MD5: 73e25f9970dc5f34d863a2c7155968d2
Github: https://github.com/ezterry/AcerTabKernel
Tag: ezT20_kernel_v1.0.1
Tarball: https://github.com/ezterry/AcerTabKernel/tarball/ezT20_kernel_v1.0.1
v1.0.0 ezT20-v1.0.0-a500_S.zip
MD5: 007f00e576bf82f9439f9567685dd255
Github: https://github.com/ezterry/AcerTabKernel
Tag: ezT20_kernel_v1.0.0
Tarball: https://github.com/ezterry/AcerTabKernel/tarball/ezT20_kernel_v1.0.0
NET-USB modules [Experimental] for this version: http://forum.xda-developers.com/showpost.php?p=27887611&postcount=52
v0.9.9 ezT20-v0.9.9-a500_S.zip
MD5: c43844babbd96ab43399a100d74d60de
Github: https://github.com/ezterry/AcerTabKernel
Tag: ezT20_kernel_v0.9.9
Tarball: https://github.com/ezterry/AcerTabKernel/tarball/ezT20_kernel_v0.9.9
~~~~~ Change Log
v1.0.1
*) Import of acer's 3g code [A101 and A501]
*) audio updates to better work with CM roms when cm audio patch is applied ezT20cmaudio_patch_S.zip MD5: 26251900115b0ca433f26f4d95e7f269
*) Allow lower min-voltage
v1.0.0
*) cleanup graphics logic with more patches from the nvidia tegra test kernel (and other patches to prevent the graphic under-runs causing screen flashes on some roms) [applies to all devices]
*) modify lulzactive (yet again) to attempt to stem a rare deadlock .. frequently resulting in a SoD overnight on my tab (probably not most peoples constant SoD problem) [applies to all devices]
*) Add Acer A501 patches for 3g modem [applies to A501]
*) fix some touch events on the A50X caused by the a100 patch set rolling back the a500 touch driver, the touch drivers are separate so this ought not impact the a100 [a50x only]
v0.9.9
Initial release, providing some bugfixes and new features to the previous OCTestV3
**build instructions in second post
Developers Corner
~~~~~ Background
As you may know the linux kernel is considered Free Software under the GPL.
To the creators of the GPL licence this means:
The Free Software Definition said:
“Free software” means software that respects users' freedom and community. Roughly, the users have the freedom to run, copy, distribute, study, change and improve the software. With these freedoms, the users (both individually and collectively) control the program and what it does for them.
Click to expand...
Click to collapse
Full text here
This means when Linus Torvalds changed the licensing from "Non-Comercial" use to the GPLv2 he was no longer preventing the kernel from being used in commercial products (as is obvious by its use on all android devices) However requested that anyone who received a copy of the software, get or be offered a copy of the source as well, and to be allowed to modify that source and distribute those changes to someone else, with the only restriction being they must also provide the source so the next person can also make changes.
Mind you this dosn't mean free software is actually free. Countless hours of hard work by countless people make the kernel what it is today.
While we all must provide the source, if something isn't already in the kernel that you want you have only the following options:
1) find someone willing to make the change
2) pay someone to make the change
3) roll up your sleeves and make the change yourself.
Also note one makes you give away changes you write to the linux kernel, you only must give the source to those who already have the binary.
~~~~~ This Guide
This guide will help you build the kernel yourself on your computer from source, this is in hopes that you may take an interest in how both the build system, and kernel its self works.
Instructions will be primarily focused on both linux, and cygwin users; however osx users may also be able to follow this guide with only minor modifications.
If you do make changes you think the public is interested in I will also be happy to review and potentially include it in my future builds, remember however while its polite to credit me for the codebase provided, you may always distribute you modified versions of the kernel as long as you adhere to providing the source per the GPLv2 to those you distribute it to.
~~~~~ Getting Started - Downloading The Toolchain
The toolchain is the compiler used to convert the 'C' code of the kernel into the arm instructions red by your device.
To build this kernel I use a custom android toolchain based on gcc4.6.3;
Pre-built binaries are available for x86 linux, cygwin, and osx:
1) Download the one for your platform
x86 Linux: toolchain-4.6.3.tar.bz2 (Sha1: c8c57aba6ad92e9acddf29ba
Cygwin: toolchain-4.6.3.cygwin.tar.bz2 (Sha1: 6947e1c1ba95195019f542eb8ba0708667b63eca)
OSX: toolchain-4.6.3.darwin.tar.bz2 (Sha1: 9a977f0672863fdd9501383a6ad1e30723281f
Additional details about these files are on my Android Software post:
http://forum.xda-developers.com/showthread.php?t=1686310
All users may wish to look over the cygwin building requirements there to ensure there system has the required packages.
Other information on the post will include information about retrieving the source to the tool chain its self and another overview of building android kernels in general, and not just this specific Acer kernel.
2) Now that you have the toolchain you want to extract it; this can be done anywere but I recommend for the sake of this guide in your posix home directory
this is done by running at your posix prompt (cygwin terminal in windows normal terminal in linux/osx)
Code:
mkdir -p ~/android
cd ~/android
tar -xjvf </path/to/>toolchain-4.6.3.cygwin.tar.bz2
substitution '</path/to/>toolchain-4.6.3.cygwin.tar.bz2' with the file you downloaded above
all versions will extract then to '~/android/toolchain-4.6.3/' all the files required to build arm binaries
~~~~~ Getting the source code
This can be done many ways, if you want to build a specific version the tarball may be easiest, however it is recommended that you use the git revision control software if you wish to make changes, as this helps keep track of the changes, and publish them on services such as github. (in addition its easier for other people to take the changes into there own work without you loosing credit)
3) To get the AcerTabKernel source change directory into the ~/android directory used to make the toolchain
Code:
cd ~/android
4) run the command to fetch a copy of my git repository
Code:
git clone git://github.com/ezterry/AcerTabKernel.git
5) change into that directory
Code:
cd AcerTabKernel
~~~~~ GIT only, switching code views
Once you have the source code you can always refresh it with git fetch origin, however more work is required to update the local files
Option A: following a branch (recommended if you want the latest source)
6.A.1) run 'git branch -a'
you will likely see the following:
master - you local version of the master branch
remotes/origin/HEAD -> origin/master -- indication master is the default branch
remotes/origin/master -- the remote version of master (as of the last 'git fetch origin' or 'git pull' command)
remotes/origin/tegra_overclock -- the remote version of tegra_overclock (as of the last 'git fetch origin' or 'git pull' command)
the two branchs of interest are as follows:
master - the acer A100/A500 source including my enhancements w/o overclocking support
tegra_overclock - the full enhancement list with overclocking
6.A.2) Create a local version of tegra_overclock
run:
Code:
git branch tegra_overclock origin/tegra_overclock
6.A.3) Switching branches
you can switch between the branches by calling
Code:
git checkout <branch name>
so if you want to build this kernel you will call:
git checkout tegra_overclock
Option B: retrieving a specific tag
6.B.1) If you want the code to a specific kernel you can force the checkout of a tag
Code:
git chekout -f [color=gray]<tagname>[/color]
so for the v0.9.9 you can run
Code:
git checkout -f ezT20_kernel_v0.9.9
This will fetch the code, however you local branches will not be updated if you make changes, see on screen note for details
~~~~~ Building the kernel
Once you have the code you can build the kernel (or make other changes first)
7) Set up your build enviroment
Most steps above need not be done any time you make a change; however every time you want to build from a new terminal you must set up that terminals environment as follows
A) add the toolchan to your path:
Code:
export PATH=$HOME/android/export PATH=$HOME/android/toolchain-4.6.3/bin:$PATH
B) run the following commands to prepare the cross compiler from within the directory with the code (ie 'cd ~/android/AcerTabKernel')
Code:
export ARCH=arm;export CROSS_COMPILE=arm-linux-androideabi-;export KERNEL_DIR=`pwd`
*note I make this one line to make it easier to copy and paste all at once
8) Now that the enviroment is set up we can configure the kernel by running
For A500 Kernels:
Code:
make picasso_defconfig
For A100 Kernels:
Code:
make vangogh_defconfig
This will grab the default configuration for the device (same as /proc/config.gz on the running kernel) in the source tree this is arch/arm/config/picasso_defconfig or arch/arm/config/vangogh_defconfig
9) if you want to change the config (add/remove modules and components or change the kernels name):
Code:
make menuconfig
this will provide the kernel configuraiton gui that allows you to update the many kernel options including adding modules.
10) build the binary kernel
Code:
make -j5
you should replace the 5 in -j5 with the number of CPU cores in your computer + 1. 5 is ideal for a quadcore CPU.
If the number is lower/higher the kernel will take longer to build. (slightly higher however will have minimal impact)
11) prepare the modules (makes sure the modules are ready for use, they are built in the previous step)
Code:
make modules
~~~~~ Packaging the kernel
At this point you can find the kernel in arch/arm/boot/zImage and if you search for files ending in *.ko you will find all the built modules
However here I will describe creating the update.zip installer
Note this may look difficult as the process is mostly manual not automated
12) Download the template (I will assume you are in the directory with the kernel source still)
Code:
wget [url]http://android-git.devnull.name/gh/tepl/acer_kernel_tmpl.tar.bz2[/url]
This template contains the update_binary, unpackbootimg and mkbootimg binaries
In addition it has the ufsd.ko acer stok module (a closed source kernel module used for mounting ntfs disks) the updater-script you will use, and a nfo.prop template
koush is to thank for the unpackbootimg source (unpackbootimg/mkbootimg I built using the A500 Public Recovery source tree, updater_binary is from the stock ICS installer)
13) for future use move the template outside your source directory in case you delete/refresh it
Code:
mv acer_kernel_tmpl.tar.bz2 ~/android/
14) make the update.zip work directory
Code:
tar -xjvf ~/acer_kernel_tmpl.tar.bz2
15) copy over the zImage
Code:
cp arch/arm/boot/zImage acer_kernel_tmpl/[color=gray]<kernel_name.zImage>[/color]
the kernel_name can be any name you wish to call the kernel
16) copy in the modules
Code:
cp `find | grep ko$ | grep -v ufsd` zImage acer_kernel_tmpl/system/lib/modules/
17) copy in modules.order
cp modules.order acer_kernel_tmpl/system/lib/modules/
18) edit the nfo.prop
update the values as per the comments, this will control the displayed output during install
as well as allow you to specify any name for the zImage to be installed without
touching the edify script
19) generate the installer zip
Code:
cd acer_kernel_tmpl
zip -r ../kernel_install.zip .
cd ..
now kernel_install.zip can be flashed from clockworkmod (as an unsigned zip) or you may optionally sign the zip now to publish
~~~~~ What next
What next is up to you, there are many source files to look at some never used for our devices.. and many that I've never looked at.
One important thing however is learning the basics of git revision control, and how to maintain your local mirror and keep it in sync with the version I have on github.
Other interesting git features include remotes allowing you to compare source from other kernel repositories and even cherry-pick individual commits from other users.
If you know how to code, learning this isn't difficult so off to 'git help' and google you go
Hi there Terry - looking forward to giving this a try. Also, thanks for going above-and-beyond on the GPL thing and giving really detailed instructions - I've never compiled for Android in my life so it made interesting reading.
Hey
Can wé flash it with cwm or wé néed es nvflash
Thank s
rayman95 said:
Hey
Can wé flash it with cwm or wé néed es nvflash
Thank s
Click to expand...
Click to collapse
Look what I found in the OP
Installation: simply flash the zip from recovery, this will extract and replace the zImage (linux kernel) from your current rom; and leave your existing ramdisk unchanged.
Click to expand...
Click to collapse
But if you are using it on the flexreaper rom , please use the patch from that thread .
It has got this kernel in it but also the tweaked build.prop.
Read OP of this thread regarding de-odexed roms.
civato said:
Look what I found in the OP
Click to expand...
Click to collapse
To be fair I added that line after reading the question and bashing my head..
(anyway nvflash really has no idea what to do with raw zImage files.. as that is all that is in the zip; the boot.img that needs to be flashed to your device also requires a ramdisk.. as indicated now in the op the update script extracts the one currently installed on your tab to generate a full boot.img with the new kernel)
ezterry said:
To be fair I added that line after reading the question and bashing my head..
Click to expand...
Click to collapse
ssssssssst nobody needs to know
I'll try to make a clean patch for A501 support. For now it's a mess =)
vache said:
I'll try to make a clean patch for A501 support. For now it's a mess =)
Click to expand...
Click to collapse
well if you followed my commits this last week or two.. things didn't quite go as cleanly with any of these other patches as I'd hope either.. (what 5+ commits trying to iron out issues in lulzactive.. it really didn't want to play well with interactive in the same kernel build.. and these are all ones I thought worked.. pushed to github..then needed to edit.. if it didn't work before I pushed to gh I'd have modified the commit)
Anyway looking forward to it as I know some people are interested.
I am curious about the lulzactive governor ... it isn't something pulled out of little finger like smartass governor, right (and full of crap, such as "sleep frequency")?
Skrilax_CZ said:
I am curious about the lulzactive governor ... it isn't something pulled out of little finger like smartass governor, right (and full of crap, such as "sleep frequency")?
Click to expand...
Click to collapse
Smarass and lulzactive are based on googles interactive, and really don't have much more overhead just more tuneing.
Sleep frequency is screen off frequency.. (useful if music is running or a background task to not OC, default is the 800mhz level.. lower is prob not wise since it will only be this high if something needs the cpu..) if your tablet is actually asleep its in suspend to ram mode and the cpu is off.. (at least until a wake lock fires or you push the power button) .. prob the most useful state of this is when I have my computer attached by usb preventing the full sleep.. but the power wire is not.
otherwise its a more tuned version of interactive. Allowing tunable quicker ramp ups or slower ramp downs.. I'm just using my own pre-tuned defaults ... edit: it ought to be noted I've also added a super ramp up if the inc_cpu_load is <91% (default value is 75%) and the current cpu utilization is > (100 -((100-inc_cpu_load)/4)) .. (94% with inc_cpu_load=75%) to ramp to max speed and not the ramp up interval of 2 speed steps (as will still happen if the cpu is between 75% and 93%)
Times in state shows a good balance of speeds as needed, and the device is responsive unlike say on demand.
The biggest problem with all the interactive based governors is how they intercept kernel idle .. pm_idle global hook.. replace the function and call the original.. until you start having more modules being enabled and disabled until the pointer is pointing somewhere random and your system crashes.. switch all of that to a register/unregister system based off the one in x86_64
I see, so just some tune.
ezterry said:
if your tablet is actually asleep its in suspend to ram mode and the cpu is off..
Click to expand...
Click to collapse
Yeah exactly ... that's why I said "full of crap, such as sleep frequency".
SoD issues
EZTerry -
I have gotten SoD with nearly all ICS kernels that have been released, both from Acer OTA and with Flexreaper and yours. The only one that I do NOT get any SoD from is the .022 pre-release one that Civato put up on one of the FR builds a while back. Since you seem to be one of the resident experts on kernels for the A500, do you have any idea what differences exist between the .022 build and the current ones, including your OC ones, that could possibly be contributing to the SoD?
For instance, I loaded the latest FlexReaper Extreme Rev 4 (which uses your latest OC kernel) and got peristent SoDs. I flashed back to the non-OC kernel (to get the normal modules back) and then loaded .022 from a flashable copy I had kept. I haven't had any SoD since. No OC, of course, but at least it's stable...
I saw your post about sending you the logs. Still plan to try that, but for now I'm happy with a working tablet.
BakaNeko59 said:
EZTerry -
I have gotten SoD with nearly all ICS kernels that have been released, both from Acer OTA and with Flexreaper and yours. The only one that I do NOT get any SoD from is the .022 pre-release one that Civato put up on one of the FR builds a while back. Since you seem to be one of the resident experts on kernels for the A500, do you have any idea what differences exist between the .022 build and the current ones, including your OC ones, that could possibly be contributing to the SoD?
For instance, I loaded the latest FlexReaper Extreme Rev 4 (which uses your latest OC kernel) and got peristent SoDs. I flashed back to the non-OC kernel (to get the normal modules back) and then loaded .022 from a flashable copy I had kept. I haven't had any SoD since. No OC, of course, but at least it's stable...
I saw your post about sending you the logs. Still plan to try that, but for now I'm happy with a working tablet.
Click to expand...
Click to collapse
But how is ezterry going to know what is differents or how can he help if he doesn't have a logcat.
If ezterry needs to test every rom situation we need to start paying him for giving us better support then we will ever get from acer.
So please provide logcat.
PS:
f is looking real good m8.
will report to you tomorrow .......
civato said:
But how is ezterry going to know what is differents or how can he help if he doesn't have a logcat.
If ezterry needs to test every rom situation we need to start paying him for giving us better support then we will ever get from acer.
So please provide logcat.
PS:
f is looking real good m8.
will report to you tomorrow .......
Click to expand...
Click to collapse
Well, now that I have a stable working build, I can do a backup and then play with the new kernels to get the logcat. I was just so happy to get a working build that I hadn't considered my next step.
I'll play some more when I get home from work since I can't have my tablet in my office.
You wouldn't care to provide a step by step guide of how to get the logcat info would you? I know it requires adb, but not much else. Also, in another post you mentioned getting the last_kmsg (or last_kmesg - I forget). How do we get that?
Thanks. I appreciate the help.
BakaNeko59 said:
EZTerry -
I have gotten SoD with nearly all ICS kernels that have been released
Click to expand...
Click to collapse
SoD is simple to understand in these terms:
Think of your computer or laptop, you request it to suspend to ram or sleep depending on your OS
It does so, turns into the low power state but is otherwise off, and waits for your return.
When you try to turn the computer on it attempts to wake up but then instead crashes.
This is exactly what is happening, android noted nothing was running and suspended the tablet to ram, either was woken up by you pushing power or a timer the operating system set when it went to sleep.
However before fully starting again the system crashed.
In development of the kernel sometimes I run into such problems with bugs in the oc code, or undervolting too far.. but once I call a kernel stable-ish it can usually last the day with many sleep/wake cycles.. can't say there is never an odd sod but its not common.
The question for you the is: what when wrong.. the easiest way to see is the kernel log of the now crashed kernel.. this requires looking at the /proc/last_kmsg file but this is a little tricky if you needed to force power off the tab (the log is stored in ram thus is completely wiped after 8-10 seconds of the tab being powered off.
When it does exits adb pull can grab the file as soon as the android animation begins.
Sent from my Galaxy Nexus using Tapatalk 2
Does this kernel have cifs module built-in? I can't try by myself right now, my a500 is in vacation at acer's repair facility.
ezterry said:
.
The question for you the is: what when wrong.. the easiest way to see is the kernel log of the now crashed kernel.. this requires looking at the /proc/last_kmsg file but this is a little tricky if you needed to force power off the tab (the log is stored in ram thus is completely wiped after 8-10 seconds of the tab being powered off
Click to expand...
Click to collapse
Does the last_kmsg ONLY exist if there's a fault registered or does it get updated regularly during operation? In other words could I create a continuously running script (for debugging only of course) that copies the last_kmsg file to another location before the system actually crashes? Then when it enters sleep the last file copied would have the information you need? Or is there a way to execute a script early enough in the boot process to copy the file during that first 8-10 seconds of power up so that it is easier to acquire?
Or how about a batch file that simply loops the command "adb pull /proc/last_kmsg last_kmsg" continuously on my PC? If the file doesn't exist it doesn't get copied - if it does exist it gets copied, and if the system crashes and doesn't respond, the last file copied should exist either before or after I manually power off and on the tablet. Hmmmm - guess I'll give it a try...
Sorry - just thinking out loud now
Thanks.
Sent from my A500 using Tapatalk 2
so is it as easy as flashing in CWM over any ics rom?
can i flash this with AOKP??
thank you =]
BakaNeko59 said:
Or is there a way to execute a script early enough in the boot process to copy the file during that first 8-10 seconds of power up so that it is easier to acquire?
Click to expand...
Click to collapse
What do you mean the file is there until reboot if the log data is found, so there is no hurry to pull it off the device.
The logdata is only stored in ram.. so if you power off overnight or while microwaving a frozen dinner.. when you turn the tab back on no data will remain.
Ram however will hold its values for a short time without power however, if you needed to force the tablet off by holding power for 5 seconds you have under 10 seconds to power back on the device if you wish to see any of the log. (and you need to leave it off 3 seconds or it will ignore your pressing power.)

Samsung Galaxy Grand Duos Oreo Kernel Source

Samsung Galaxy Grand Duos Oreo Kernel Source​
download link-> bottom of the thread.
Linux kernel release 3.x <http://kernel.org/>
These are the release notes for Linux version 3. Read them carefully,
as they tell you what this is all about, explain how to install the
kernel, and what to do if something goes wrong!!
WHAT IS LINUX?
Linux is a clone of the operating system Unix, written from scratch by
Linus Torvalds with assistance from a loosely-knit team of hackers across
the Net. It aims towards POSIX and Single UNIX Specification compliance.
It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management,
and multistack networking including IPv4 and IPv6.
It is distributed under the GNU General Public License - see the
accompanying COPYING file for more details.
ON WHAT HARDWARE DOES IT RUN?
Although originally developed first for 32-bit x86-based PCs (386 or higher),
today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
Xtensa, Tilera TILE, AVR32 and Renesas M32R architectures.
Linux is easily portable to most general-purpose 32- or 64-bit architectures
as long as they have a paged memory management unit (PMMU) and a port of the
GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has
also been ported to a number of architectures without a PMMU, although
functionality is then obviously somewhat limited.
Linux has also been ported to itself. You can now run the kernel as a
userspace application - this is called UserMode Linux (UML).
DOCUMENTATION:
- There is a lot of documentation available both in electronic form on
the Internet and in books, both Linux-specific and pertaining to
general UNIX questions. I'd recommend looking into the documentation
subdirectories on any Linux FTP site for the LDP (Linux Documentation
Project) books. This README is not meant to be documentation on the
system: there are much better sources available.
- There are various README files in the Documentation/ subdirectory:
these typically contain kernel-specific installation notes for some
drivers for example. See Documentation/00-INDEX for a list of what
is contained in each file. Please read the Changes file, as it
contains information about the problems, which may result by upgrading
your kernel.
- The Documentation/DocBook/ subdirectory contains several guides for
kernel developers and users. These guides can be rendered in a
number of formats: PostScript (.ps), PDF, HTML, & man-pages, among others.
After installation, "make psdocs", "make pdfdocs", "make htmldocs",
or "make mandocs" will render the documentation in the requested format.
INSTALLING the kernel source:
- If you install the full sources, put the kernel tarball in a
directory where you have permissions (eg. your home directory) and
unpack it:
gzip -cd linux-3.X.tar.gz | tar xvf -
or
bzip2 -dc linux-3.X.tar.bz2 | tar xvf -
Replace "XX" with the version number of the latest kernel.
Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be.
- You can also upgrade between 3.x releases by patching. Patches are
distributed in the traditional gzip and the newer bzip2 format. To
install by patching, get all the newer patch files, enter the
top level directory of the kernel source (linux-3.x) and execute:
gzip -cd ../patch-3.x.gz | patch -p1
or
bzip2 -dc ../patch-3.x.bz2 | patch -p1
(repeat xx for all versions bigger than the version of your current
source tree, _in_order_) and you should be ok. You may want to remove
the backup files (xxx~ or xxx.orig), and make sure that there are no
failed patches (xxx# or xxx.rej). If there are, either you or me has
made a mistake.
Unlike patches for the 3.x kernels, patches for the 3.x.y kernels
(also known as the -stable kernels) are not incremental but instead apply
directly to the base 3.x kernel. Please read
Documentation/applying-patches.txt for more information.
Alternatively, the script patch-kernel can be used to automate this
process. It determines the current kernel version and applies any
patches found.
linux/scripts/patch-kernel linux
The first argument in the command above is the location of the
kernel source. Patches are applied from the current directory, but
an alternative directory can be specified as the second argument.
- If you are upgrading between releases using the stable series patches
(for example, patch-3.x.y), note that these "dot-releases" are
not incremental and must be applied to the 3.x base tree. For
example, if your base kernel is 3.0 and you want to apply the
3.0.3 patch, you do not and indeed must not first apply the
3.0.1 and 3.0.2 patches. Similarly, if you are running kernel
version 3.0.2 and want to jump to 3.0.3, you must first
reverse the 3.0.2 patch (that is, patch -R) _before_ applying
the 3.0.3 patch.
You can read more on this in Documentation/applying-patches.txt
- Make sure you have no stale .o files and dependencies lying around:
cd linux
make mrproper
You should now have the sources correctly installed.
SOFTWARE REQUIREMENTS
Compiling and running the 3.x kernels requires up-to-date
versions of various software packages. Consult
Documentation/Changes for the minimum version numbers required
and how to get updates for these packages. Beware that using
excessively old versions of these packages can cause indirect
errors that are very difficult to track down, so don't assume that
you can just update packages when obvious problems arise during
build or operation.
BUILD directory for the kernel:
When compiling the kernel all output files will per default be
stored together with the kernel source code.
Using the option "make O=output/dir" allow you to specify an alternate
place for the output files (including .config).
Example:
kernel source code: /usr/src/linux-3.N
build directory: /home/name/build/kernel
To configure and build the kernel use:
cd /usr/src/linux-3.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install
Please note: If the 'O=output/dir' option is used then it must be
used for all invocations of make.
CONFIGURING the kernel:
Do not skip this step even if you are only upgrading one minor
version. New configuration options are added in each release, and
odd problems will turn up if the configuration files are not set up
as expected. If you want to carry your existing configuration to a
new version with minimal work, use "make oldconfig", which will
only ask you for the answers to new questions.
- Alternate configuration commands are:
"make config" Plain text interface.
"make menuconfig" Text based color menus, radiolists & dialogs.
"make nconfig" Enhanced text based color menus.
"make xconfig" X windows (Qt) based configuration tool.
"make gconfig" X windows (Gtk) based configuration tool.
"make oldconfig" Default all questions based on the contents of
your existing ./.config file and asking about
new config symbols.
"make silentoldconfig"
Like above, but avoids cluttering the screen
with questions already answered.
Additionally updates the dependencies.
"make defconfig" Create a ./.config file by using the default
symbol values from either arch/$ARCH/defconfig
or arch/$ARCH/configs/${PLATFORM}_defconfig,
depending on the architecture.
"make ${PLATFORM}_defconfig"
Create a ./.config file by using the default
symbol values from
arch/$ARCH/configs/${PLATFORM}_defconfig.
Use "make help" to get a list of all available
platforms of your architecture.
"make allyesconfig"
Create a ./.config file by setting symbol
values to 'y' as much as possible.
"make allmodconfig"
Create a ./.config file by setting symbol
values to 'm' as much as possible.
"make allnoconfig" Create a ./.config file by setting symbol
values to 'n' as much as possible.
"make randconfig" Create a ./.config file by setting symbol
values to random values.
You can find more information on using the Linux kernel config tools
in Documentation/kbuild/kconfig.txt.
NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
under some circumstances lead to problems: probing for a
nonexistent controller card may confuse your other controllers
- compiling the kernel with "Processor type" set higher than 386
will result in a kernel that does NOT work on a 386. The
kernel will detect this on bootup, and give up.
- A kernel with math-emulation compiled in will still use the
coprocessor if one is present: the math emulation will just
never get used in that case. The kernel will be slightly larger,
but will work on different machines regardless of whether they
have a math coprocessor or not.
- the "kernel hacking" configuration details usually result in a
bigger or slower kernel (or both), and can even make the kernel
less stable by configuring some routines to actively try to
break bad code to find kernel problems (kmalloc()). Thus you
should probably answer 'n' to the questions for
"development", "experimental", or "debugging" features.
COMPILING the kernel:
- Make sure you have at least gcc 3.2 available.
For more information, refer to Documentation/Changes.
Please note that you can still run a.out user programs with this kernel.
- Do a "make" to create a compressed kernel image. It is also
possible to do "make install" if you have lilo installed to suit the
kernel makefiles, but you may want to check your particular lilo setup first.
To do the actual install you have to be root, but none of the normal
build should require that. Don't take the name of root in vain.
- If you configured any of the parts of the kernel as `modules', you
will also have to do "make modules_install".
- Verbose kernel compile/build output:
Normally the kernel build system runs in a fairly quiet mode (but not
totally silent). However, sometimes you or other kernel developers need
to see compile, link, or other commands exactly as they are executed.
For this, use "verbose" build mode. This is done by inserting
"V=1" in the "make" command. E.g.:
make V=1 all
To have the build system also tell the reason for the rebuild of each
target, use "V=2". The default is "V=0".
- Keep a backup kernel handy in case something goes wrong. This is
especially true for the development releases, since each new release
contains new code which has not been debugged. Make sure you keep a
backup of the modules corresponding to that kernel, as well. If you
are installing a new kernel with the same version number as your
working kernel, make a backup of your modules directory before you
do a "make modules_install".
Alternatively, before compiling, use the kernel config option
"LOCALVERSION" to append a unique suffix to the regular kernel version.
LOCALVERSION can be set in the "General Setup" menu.
- In order to boot your new kernel, you'll need to copy the kernel
image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
to the place where your regular bootable kernel is found.
- Booting a kernel directly from a floppy without the assistance of a
bootloader such as LILO, is no longer supported.
If you boot Linux from the hard drive, chances are you use LILO which
uses the kernel image as specified in the file /etc/lilo.conf. The
kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
/boot/bzImage. To use the new kernel, save a copy of the old image
and copy the new image over the old one. Then, you MUST RERUN LILO
to update the loading map!! If you don't, you won't be able to boot
the new kernel image.
Reinstalling LILO is usually a matter of running /sbin/lilo.
You may wish to edit /etc/lilo.conf to specify an entry for your
old kernel image (say, /vmlinux.old) in case the new one does not
work. See the LILO docs for more information.
After reinstalling LILO, you should be all set. Shutdown the system,
reboot, and enjoy!
If you ever need to change the default root device, video mode,
ramdisk size, etc. in the kernel image, use the 'rdev' program (or
alternatively the LILO boot options when appropriate). No need to
recompile the kernel to change these parameters.
- Reboot with the new kernel and enjoy.
IF SOMETHING GOES WRONG:
- If you have problems that seem to be due to kernel bugs, please check
the file MAINTAINERS to see if there is a particular person associated
with the part of the kernel that you are having trouble with. If there
isn't anyone listed there, then the second best thing is to mail
them to me ([email protected]), and possibly to any other
relevant mailing-list or to the newsgroup.
- In all bug-reports, *please* tell what kernel you are talking about,
how to duplicate the problem, and what your setup is (use your common
sense). If the problem is new, tell me so, and if the problem is
old, please try to tell me when you first noticed it.
- If the bug results in a message like
unable to handle kernel paging request at address C0000010
Oops: 0002
EIP: 0010:XXXXXXXX
eax: xxxxxxxx ebx: xxxxxxxx ecx: xxxxxxxx edx: xxxxxxxx
esi: xxxxxxxx edi: xxxxxxxx ebp: xxxxxxxx
ds: xxxx es: xxxx fs: xxxx gs: xxxx
Pid: xx, process nr: xx
xx xx xx xx xx xx xx xx xx xx
or similar kernel debugging information on your screen or in your
system log, please duplicate it *exactly*. The dump may look
incomprehensible to you, but it does contain information that may
help debugging the problem. The text above the dump is also
important: it tells something about why the kernel dumped code (in
the above example it's due to a bad kernel pointer). More information
on making sense of the dump is in Documentation/oops-tracing.txt
- If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
as is, otherwise you will have to use the "ksymoops" program to make
sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
This utility can be downloaded from
ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ .
Alternately you can do the dump lookup by hand:
- In debugging dumps like the above, it helps enormously if you can
look up what the EIP value means. The hex value as such doesn't help
me or anybody else very much: it will depend on your particular
kernel setup. What you should do is take the hex value from the EIP
line (ignore the "0010:"), and look it up in the kernel namelist to
see which kernel function contains the offending address.
To find out the kernel function name, you'll need to find the system
binary associated with the kernel that exhibited the symptom. This is
the file 'linux/vmlinux'. To extract the namelist and match it against
the EIP from the kernel crash, do:
nm vmlinux | sort | less
This will give you a list of kernel addresses sorted in ascending
order, from which it is simple to find the function that contains the
offending address. Note that the address given by the kernel
debugging messages will not necessarily match exactly with the
function addresses (in fact, that is very unlikely), so you can't
just 'grep' the list: the list will, however, give you the starting
point of each kernel function, so by looking for the function that
has a starting address lower than the one you are searching for but
is followed by a function with a higher address you will find the one
you want. In fact, it may be a good idea to include a bit of
"context" in your problem report, giving a few lines around the
interesting one.
If you for some reason cannot do the above (you have a pre-compiled
kernel image or similar), telling me as much about your setup as
possible will help. Please read the REPORTING-BUGS document for details.
- Alternately, you can use gdb on a running kernel. (read-only; i.e. you
cannot change values or set break points.) To do this, first compile the
kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
You can now use all the usual gdb commands. The command to look up the
point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
with the EIP value.)
gdb'ing a non-running kernel currently fails because gdb (wrongly)
disregards the starting offset for which the kernel is compiled.
Download.​
OREO KERNEL SOURCE 3.x
credits:-
@osas514
@GHsR
vasanth36 said:
Samsung Galaxy Grand Duos Oreo Kernel Source​
download link-> bottom of the thread.
Linux kernel release 3.x <http://kernel.org/>
These are the release notes for Linux version 3. Read them carefully,
as they tell you what this is all about, explain how to install the
kernel, and what to do if something goes wrong!!
WHAT IS LINUX?
Linux is a clone of the operating system Unix, written from scratch by
Linus Torvalds with assistance from a loosely-knit team of hackers across
the Net. It aims towards POSIX and Single UNIX Specification compliance.
It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management,
and multistack networking including IPv4 and IPv6.
It is distributed under the GNU General Public License - see the
accompanying COPYING file for more details.
ON WHAT HARDWARE DOES IT RUN?
Although originally developed first for 32-bit x86-based PCs (386 or higher),
today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
Xtensa, Tilera TILE, AVR32 and Renesas M32R architectures.
Linux is easily portable to most general-purpose 32- or 64-bit architectures
as long as they have a paged memory management unit (PMMU) and a port of the
GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has
also been ported to a number of architectures without a PMMU, although
functionality is then obviously somewhat limited.
Linux has also been ported to itself. You can now run the kernel as a
userspace application - this is called UserMode Linux (UML).
DOCUMENTATION:
- There is a lot of documentation available both in electronic form on
the Internet and in books, both Linux-specific and pertaining to
general UNIX questions. I'd recommend looking into the documentation
subdirectories on any Linux FTP site for the LDP (Linux Documentation
Project) books. This README is not meant to be documentation on the
system: there are much better sources available.
- There are various README files in the Documentation/ subdirectory:
these typically contain kernel-specific installation notes for some
drivers for example. See Documentation/00-INDEX for a list of what
is contained in each file. Please read the Changes file, as it
contains information about the problems, which may result by upgrading
your kernel.
- The Documentation/DocBook/ subdirectory contains several guides for
kernel developers and users. These guides can be rendered in a
number of formats: PostScript (.ps), PDF, HTML, & man-pages, among others.
After installation, "make psdocs", "make pdfdocs", "make htmldocs",
or "make mandocs" will render the documentation in the requested format.
INSTALLING the kernel source:
- If you install the full sources, put the kernel tarball in a
directory where you have permissions (eg. your home directory) and
unpack it:
gzip -cd linux-3.X.tar.gz | tar xvf -
or
bzip2 -dc linux-3.X.tar.bz2 | tar xvf -
Replace "XX" with the version number of the latest kernel.
Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be.
- You can also upgrade between 3.x releases by patching. Patches are
distributed in the traditional gzip and the newer bzip2 format. To
install by patching, get all the newer patch files, enter the
top level directory of the kernel source (linux-3.x) and execute:
gzip -cd ../patch-3.x.gz | patch -p1
or
bzip2 -dc ../patch-3.x.bz2 | patch -p1
(repeat xx for all versions bigger than the version of your current
source tree, _in_order_) and you should be ok. You may want to remove
the backup files (xxx~ or xxx.orig), and make sure that there are no
failed patches (xxx# or xxx.rej). If there are, either you or me has
made a mistake.
Unlike patches for the 3.x kernels, patches for the 3.x.y kernels
(also known as the -stable kernels) are not incremental but instead apply
directly to the base 3.x kernel. Please read
Documentation/applying-patches.txt for more information.
Alternatively, the script patch-kernel can be used to automate this
process. It determines the current kernel version and applies any
patches found.
linux/scripts/patch-kernel linux
The first argument in the command above is the location of the
kernel source. Patches are applied from the current directory, but
an alternative directory can be specified as the second argument.
- If you are upgrading between releases using the stable series patches
(for example, patch-3.x.y), note that these "dot-releases" are
not incremental and must be applied to the 3.x base tree. For
example, if your base kernel is 3.0 and you want to apply the
3.0.3 patch, you do not and indeed must not first apply the
3.0.1 and 3.0.2 patches. Similarly, if you are running kernel
version 3.0.2 and want to jump to 3.0.3, you must first
reverse the 3.0.2 patch (that is, patch -R) _before_ applying
the 3.0.3 patch.
You can read more on this in Documentation/applying-patches.txt
- Make sure you have no stale .o files and dependencies lying around:
cd linux
make mrproper
You should now have the sources correctly installed.
SOFTWARE REQUIREMENTS
Compiling and running the 3.x kernels requires up-to-date
versions of various software packages. Consult
Documentation/Changes for the minimum version numbers required
and how to get updates for these packages. Beware that using
excessively old versions of these packages can cause indirect
errors that are very difficult to track down, so don't assume that
you can just update packages when obvious problems arise during
build or operation.
BUILD directory for the kernel:
When compiling the kernel all output files will per default be
stored together with the kernel source code.
Using the option "make O=output/dir" allow you to specify an alternate
place for the output files (including .config).
Example:
kernel source code: /usr/src/linux-3.N
build directory: /home/name/build/kernel
To configure and build the kernel use:
cd /usr/src/linux-3.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install
Please note: If the 'O=output/dir' option is used then it must be
used for all invocations of make.
CONFIGURING the kernel:
Do not skip this step even if you are only upgrading one minor
version. New configuration options are added in each release, and
odd problems will turn up if the configuration files are not set up
as expected. If you want to carry your existing configuration to a
new version with minimal work, use "make oldconfig", which will
only ask you for the answers to new questions.
- Alternate configuration commands are:
"make config" Plain text interface.
"make menuconfig" Text based color menus, radiolists & dialogs.
"make nconfig" Enhanced text based color menus.
"make xconfig" X windows (Qt) based configuration tool.
"make gconfig" X windows (Gtk) based configuration tool.
"make oldconfig" Default all questions based on the contents of
your existing ./.config file and asking about
new config symbols.
"make silentoldconfig"
Like above, but avoids cluttering the screen
with questions already answered.
Additionally updates the dependencies.
"make defconfig" Create a ./.config file by using the default
symbol values from either arch/$ARCH/defconfig
or arch/$ARCH/configs/${PLATFORM}_defconfig,
depending on the architecture.
"make ${PLATFORM}_defconfig"
Create a ./.config file by using the default
symbol values from
arch/$ARCH/configs/${PLATFORM}_defconfig.
Use "make help" to get a list of all available
platforms of your architecture.
"make allyesconfig"
Create a ./.config file by setting symbol
values to 'y' as much as possible.
"make allmodconfig"
Create a ./.config file by setting symbol
values to 'm' as much as possible.
"make allnoconfig" Create a ./.config file by setting symbol
values to 'n' as much as possible.
"make randconfig" Create a ./.config file by setting symbol
values to random values.
You can find more information on using the Linux kernel config tools
in Documentation/kbuild/kconfig.txt.
NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
under some circumstances lead to problems: probing for a
nonexistent controller card may confuse your other controllers
- compiling the kernel with "Processor type" set higher than 386
will result in a kernel that does NOT work on a 386. The
kernel will detect this on bootup, and give up.
- A kernel with math-emulation compiled in will still use the
coprocessor if one is present: the math emulation will just
never get used in that case. The kernel will be slightly larger,
but will work on different machines regardless of whether they
have a math coprocessor or not.
- the "kernel hacking" configuration details usually result in a
bigger or slower kernel (or both), and can even make the kernel
less stable by configuring some routines to actively try to
break bad code to find kernel problems (kmalloc()). Thus you
should probably answer 'n' to the questions for
"development", "experimental", or "debugging" features.
COMPILING the kernel:
- Make sure you have at least gcc 3.2 available.
For more information, refer to Documentation/Changes.
Please note that you can still run a.out user programs with this kernel.
- Do a "make" to create a compressed kernel image. It is also
possible to do "make install" if you have lilo installed to suit the
kernel makefiles, but you may want to check your particular lilo setup first.
To do the actual install you have to be root, but none of the normal
build should require that. Don't take the name of root in vain.
- If you configured any of the parts of the kernel as `modules', you
will also have to do "make modules_install".
- Verbose kernel compile/build output:
Normally the kernel build system runs in a fairly quiet mode (but not
totally silent). However, sometimes you or other kernel developers need
to see compile, link, or other commands exactly as they are executed.
For this, use "verbose" build mode. This is done by inserting
"V=1" in the "make" command. E.g.:
make V=1 all
To have the build system also tell the reason for the rebuild of each
target, use "V=2". The default is "V=0".
- Keep a backup kernel handy in case something goes wrong. This is
especially true for the development releases, since each new release
contains new code which has not been debugged. Make sure you keep a
backup of the modules corresponding to that kernel, as well. If you
are installing a new kernel with the same version number as your
working kernel, make a backup of your modules directory before you
do a "make modules_install".
Alternatively, before compiling, use the kernel config option
"LOCALVERSION" to append a unique suffix to the regular kernel version.
LOCALVERSION can be set in the "General Setup" menu.
- In order to boot your new kernel, you'll need to copy the kernel
image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
to the place where your regular bootable kernel is found.
- Booting a kernel directly from a floppy without the assistance of a
bootloader such as LILO, is no longer supported.
If you boot Linux from the hard drive, chances are you use LILO which
uses the kernel image as specified in the file /etc/lilo.conf. The
kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
/boot/bzImage. To use the new kernel, save a copy of the old image
and copy the new image over the old one. Then, you MUST RERUN LILO
to update the loading map!! If you don't, you won't be able to boot
the new kernel image.
Reinstalling LILO is usually a matter of running /sbin/lilo.
You may wish to edit /etc/lilo.conf to specify an entry for your
old kernel image (say, /vmlinux.old) in case the new one does not
work. See the LILO docs for more information.
After reinstalling LILO, you should be all set. Shutdown the system,
reboot, and enjoy!
If you ever need to change the default root device, video mode,
ramdisk size, etc. in the kernel image, use the 'rdev' program (or
alternatively the LILO boot options when appropriate). No need to
recompile the kernel to change these parameters.
- Reboot with the new kernel and enjoy.
IF SOMETHING GOES WRONG:
- If you have problems that seem to be due to kernel bugs, please check
the file MAINTAINERS to see if there is a particular person associated
with the part of the kernel that you are having trouble with. If there
isn't anyone listed there, then the second best thing is to mail
them to me ([email protected]), and possibly to any other
relevant mailing-list or to the newsgroup.
- In all bug-reports, *please* tell what kernel you are talking about,
how to duplicate the problem, and what your setup is (use your common
sense). If the problem is new, tell me so, and if the problem is
old, please try to tell me when you first noticed it.
- If the bug results in a message like
unable to handle kernel paging request at address C0000010
Oops: 0002
EIP: 0010:XXXXXXXX
eax: xxxxxxxx ebx: xxxxxxxx ecx: xxxxxxxx edx: xxxxxxxx
esi: xxxxxxxx edi: xxxxxxxx ebp: xxxxxxxx
ds: xxxx es: xxxx fs: xxxx gs: xxxx
Pid: xx, process nr: xx
xx xx xx xx xx xx xx xx xx xx
or similar kernel debugging information on your screen or in your
system log, please duplicate it *exactly*. The dump may look
incomprehensible to you, but it does contain information that may
help debugging the problem. The text above the dump is also
important: it tells something about why the kernel dumped code (in
the above example it's due to a bad kernel pointer). More information
on making sense of the dump is in Documentation/oops-tracing.txt
- If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
as is, otherwise you will have to use the "ksymoops" program to make
sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
This utility can be downloaded from
ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ .
Alternately you can do the dump lookup by hand:
- In debugging dumps like the above, it helps enormously if you can
look up what the EIP value means. The hex value as such doesn't help
me or anybody else very much: it will depend on your particular
kernel setup. What you should do is take the hex value from the EIP
line (ignore the "0010:"), and look it up in the kernel namelist to
see which kernel function contains the offending address.
To find out the kernel function name, you'll need to find the system
binary associated with the kernel that exhibited the symptom. This is
the file 'linux/vmlinux'. To extract the namelist and match it against
the EIP from the kernel crash, do:
nm vmlinux | sort | less
This will give you a list of kernel addresses sorted in ascending
order, from which it is simple to find the function that contains the
offending address. Note that the address given by the kernel
debugging messages will not necessarily match exactly with the
function addresses (in fact, that is very unlikely), so you can't
just 'grep' the list: the list will, however, give you the starting
point of each kernel function, so by looking for the function that
has a starting address lower than the one you are searching for but
is followed by a function with a higher address you will find the one
you want. In fact, it may be a good idea to include a bit of
"context" in your problem report, giving a few lines around the
interesting one.
If you for some reason cannot do the above (you have a pre-compiled
kernel image or similar), telling me as much about your setup as
possible will help. Please read the REPORTING-BUGS document for details.
- Alternately, you can use gdb on a running kernel. (read-only; i.e. you
cannot change values or set break points.) To do this, first compile the
kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
You can now use all the usual gdb commands. The command to look up the
point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
with the EIP value.)
gdb'ing a non-running kernel currently fails because gdb (wrongly)
disregards the starting offset for which the kernel is compiled.
Download.​
OREO KERNEL SOURCE 3.x
credits:-
@osas514
@GHsR
Click to expand...
Click to collapse
How is it going to help us?
Repo deleted

Categories

Resources