[Samsung Galaxy SL i9003] XDA_Bam:
BCK - Bam Custom Kernel for i9003 / Galaxy SL

This Kernel is based on the Chinese GB source, released by Samsung on the 18th of November. Last changes to the source were made by Samsung on November 15th. If you still have questions after reading this post, look at the FAQs (including a list of requested features and known issues).

Kernel features:

No SOD :D

Bugfixes:

~ Sync bug fixed. Notifications for new mails and messages should arrive within one minute under all circumstances

~ Bluetooth problems fixed. Your phone now should play nice with bluetooth hosts, i.e. your car audio system

~ Micro stutters nearly completely gone thanks to lowered processor transition latency. It's smooooooooth

~ Home button double presses exterminated

Governors:

~ smartassV2 governor by erasmux (default)

~ interactive governor by Mike Chan

IO scheduler:

~ SIO IO scheduler by Miguel Boton (default)

~ BFQ IO scheduler by Paolo Valente and Fabio Checconi

~ deadline IO scheduler

Extended features:

~ ro.secure=0 (root acces through adb shell - to root the 'clean flavour' of BCK, please follow the instructions)

~ EXT4 support (to convert your file system, use amit.bagaria's ext4 add-on .apk) (Only in CF-Root .tar)

~ Support for init.d scripts (to use scripts, please follow the instructions) (Only in CF-Root .tar)

~ BLN support (to use BLN, please follow the instructions)

~ TUN support for VPN networks built-in (no module needed)

~ Increased SD-card read ahead of 768 kb for improved read speed

~ Available with universal CF-root ramdisk based on amit.bagaria's version, improved by loSconosciuto (Only in CF-Root .tar)

~ Available with universal CWM ramdisk (rooted) based on universal CF-root, but 'tweakless' (Only in CWM .tar)

Overclocking and Voltage:

~ Evolved sysfs interface for variable overclock or underclock (all operating points [OPPs] can be adjusted seperately)

~ Fifth OPP (1.2 GHz) available, device booting up at stock speed (1 GHz)

~ Total frequency control. The device will never run at higher speeds than defined by you, not even on WiFi.

~ sysfs interface for voltages (read only at the moment)

~ Slight undervolt (3%) on all OPPs

Flashing , settings and compatibility:

If you want to use BCK, please flash it on a clean stock ROM. If you want to go back to stock, repartition and reflash the full firmware with ODIN. This kernel will not work on CM or MIUI.

The CF-root and CWM versions (PDA_BCK_CF-root_universal_***.tar / PDA_BCK_CWM_universal_***.tar) can be flashed on any recent Gingerbread firmware. These versions are pre-rooted, which means they include Superuser.

The non-CF-root "clean" version (PDA_BCK_XXKPQ_***.tar / PDA_BCK_XXLE4_***.tar) will only work on XXKPQ / XXLE4. Do not flash this version on anything other ROM than the one indicated in the file name. This will break your WiFi. It's especially risky to flash the clean version of BCK after flashing any CF-root kernel before. Don't do it. This version does not include Superuser, but it is prepared to be rooted. Follow the instructions to do this.

After a kernel update, please wait for the device to boot up and reboot once. There is generally no need for cache cleaning or a full reset. To change the governor and IO scheduler, I use NoFrills CPU Control from the market. It's free and reliable.

I recommend to use the clean XXKPQ version. If you want / need to have root, try the CWM version. If you want the 'full package' with FuGu-Mod and more, use the CF-root. I recommend that you do not apply any further tweaks and use a stock ROM.

>>> Warning: Overclocking may damage your device. <<<​

Overclocking instructions:

For overclocking, you will need a shell on your phone, or adb access. I use Android Terminal Emulator. Overclocking is currently limited to certain frequencies (see below) and all operationg points will be set with the stock voltage of the corresponding stock frequency. The frequencies you set have to be within the following ranges:

OPP1: 100 - 500 MHz, stock 300 MHz
OPP2: 501 - 700 MHz, stock 600 MHz
OPP3: 701 - 900 MHz, stock 800 MHz
OPP4: 901 - 1100 MHz, stock 1000 MHz
OPP5: 1101 - 1500 MHz, stock 1200 MHz, not used by default

Remember that your phone uses all operating points depending on the current load. Anything more than 10% higher than the highest stock frequency is likely to be unstable, but you are free to try it. To change the clocks, open Terminal Emulator (or type 'adb shell') and hack in

su
echo "1100" > /sys/power/overclock_opp4

as an example. The others are opp5, opp3, opp2 and opp1. That's it.

Settings will be lost at reboot, unless you add them to your init.d scripts. I do not recommend this, as this may cause boot loops if the settings are to high! Be advised that NoFrills CPU Control, SetCPU, or whatever app you use that may adjust clock settings interfers with this. You may wanna update their settings after this. I do not recommend using them to set anything at boot if you overclock any OPP, because they might save the wrong frequencies and crash or do worse.

Changelog:

beta 1:

Added cpufreq governors

beta 2:

Changed smartassV2 settings to fit i9003

Added EXT4 support

Smaller zImage due to .config changes

beta 3 (not released):

Experimented with overclocking (not working, yet)

beta 4:

Finetuned smartassV2 settings

Made smartassV2 governor default

Reverted: Smaller zImage due to .config changes

Switched to linaro 4.6.2 toolchain (also used for ICS)

Activated new, aggressive compiler optimizations (-O3)

Added deadline IO scheduler

Added BFQ IO scheduler (10% higher performance than CFQ in Antutu Database IO Benchmark. This does not mean, that the maximum read or write speed increase! It just means that the throughput under heavy load is higher.)

Made BFQ IO scheduler default

Updated all modules

beta 5:

Variable overclock. Loosely based on the modifications of the Nook Color sources by dalingrin and of course with help from amit.bagaria and DooMLoRD.

beta 6:

Variable overclock for all operating points

beta 7:

Switched to universal CF-Root by amit.bagaria (BCK now should run on every recent GB ROM)

Added correct version information in settings menu, credits to DooMLoRD

Fixed cpufreq stats to correctly reflect frequency changes

Increased SD-card read ahead to 768 KBytes. This results in higher SD-card read speeds.

Major simplifications in overclocking code. Works more robust, now.

Added sysfs interface to show voltages. See /sys/power/overclock_vdd_oppX

Changed all voltages to the mainline Linux kernel defaults. This results in a slight 3% undervolt for each OPP, which saves about 5% power and should have no impact on stability whatsoever. Below you will find an overview of the exact voltages.

stock BCK
OPP1: 1.0250 V 1.0000 V
OPP2: 1.2000 V 1.1625 V
OPP3: 1.3300 V 1.3000 V
OPP4: 1.3875 V 1.3500 V
OPP5: not def. 1.3800 V

beta 8:

OPP5 (1.2 GHz) now enabled in _1200 version of kernel. Thanks to knzo for pointing me to the right patch.

Fixed video recording bug when running at 1.2 GHz

Fixed power management issues at 1.2 GHz

Small changes to smartassV2 and interactiveX settings

beta 9:

Added simple IO ('SIO') scheduler

Only one kernel version now, which includes OPP5 (1.2 GHz) but boots up at 1 GHz. Be advised that your device may nevertheless be running at 1.2 GHz for five to ten seconds at boot because of software limitations.

Changes in PM to always respect cpufreq policy limits. From now on, the device will never run at higher speeds than defined by you, not even on WiFi. Based on an omapzoom.org patch.

Changes to OPP switching code. May lead to less 'hickups'. Based on an omapzoom.org patch.

Bugfix for framebuffer code. Based on an omapzoom.org patch.

Reduced IVA / DSP frequency when on OPP5 to be on the safe side.

beta 9fix:

Reverted: Changes to OPP switching code. May lead to less 'hickups'. (Patch caused random freezes using WiFi.)

Reverted: Bugfix for framebuffer code. (Patch showed no noticeable benefits.)

beta 10:

Fix for sync bug applied. If you still have problems, please report.

This version is identical to beta 10rc14. No need to flash again, if you already are on that version.

beta 11:

Updated universal CF-Root by amit.bagaria to version 9 (released 1st of February 2012), but NO touch recovery

Slight increase in OPP5 voltage (1.38 V -> 1.40 V), may prevent some reported reboots on 1.2GHz

stock BCK
OPP5: not def. 1.4000 V

Changes in overclocking code to play nice with your frequency settings. If you overclock OPP5 but have restricted freqs to 300 - 1000 MHz, it won't automatically activate OPP5 anymore. The same is true for the lowest OPP.

If you overclock OPP4 above 1000 MHz and have restricted freqs to 300 - 1000 MHz, it will update the upper boundary to the new frequency of OPP4 so it doesn't get deactivated.

beta 12:

Fixed bluetooth problem with car audio systems (Based on omapzoom patches [1], [2] and [3]). Might resolve other bluetooth issues, too.

Universal CF-Root: Fixed bootanimation. Thanks to loSconosciuto.

Universal CF-Root: Fixed install procedure. It will check the actual kernel version, now. Thanks to loSconosciuto.

Universal CF-Root: Fixed fix_permissions script to work on our device. Thanks to loSconosciuto.

Switched to user_defconfig, to avoid unnecessary debug lines in dmesg.

beta 13:

Updated sources to GT-I9003_SWA_GB_Opensource_Update1 from the 30th of March. This also enables TUN support by default. You do not need any modules for this - it works "out of the box" with any VPN client.

Universal CF-Root: Backup is not failing anymore when started from CWM. Thanks to loSconosciuto.

Universal CF-Root: Some small improvements to multiple scripts.

Home button double press issue fixed. There should be no more unwanted double selections in CWM and you can now reliably long press the home button to bring up the list of previously used apps. Idea and timer function taken from a patch by Tegrak.

Fixed priority class for CONTENT_PROVIDER not being set, which may have caused apps of this class to be ignored by the autokiller, resulting in less free RAM.

Lowered OMAP processor transition latency to the value recommended by TI. Subjectively, this brought huge improvements in terms of reducing micro stutters.

Lowered CFS scheduler latency and granularity to values very close to mainline kernel defaults. This could reduce lags in some critical situations, but it doesn't do wonders.

Switched to SIO as default IO scheduler.

beta 14:

Universal CF-Root: Replaced CWMManager and TweakManager with zipaligned files. Thanks to loSconosciuto.

Universal CF-Root: The TweakManager is not replaced on install if it didn't change to preserve it's settings. Thanks to loSconosciuto.

Universal CF-Root: Corrected problems because of too little free space in /system when converting to ext4 by permanently moving InfoAlarm.apk from /system/app to /data/app. Thanks to loSconosciuto.

Universal CF-Root: Fixed the non-working WiFi on XXLE4 and prevented future problems. Instead of patching the WiFi modules, they are now replaced. Thanks to loSconosciuto.

Universal CF-Root: Fixed some small mistakes in the CF-root install procedure.

Switched the compression of ramdisk and kernel from gzip to lzma. This makes the files much smaller and allows us to include more 'stuff'.

Changed smartassV2 settings to wake up at lower frequencies. Further, it is not locked at 300 MHz anymore when the screen is off. Tests showed that free scaling is more battery friendly.

Removed InteractiveX and OndemandX governors and added the Interactive governor by Mike Chan (Source: CyanogenMod Crespo kernel). Since free scaling proved to be more battery friendly, the screen off profiles in InteractiveX and OndemandX made them superfluous.

The device will not scale above 1 GHz for some seconds when booting anymore. It's now safe to use BCK even if your device can't handle 1.2 GHz. Based on a patch by dalingrin.

Changes in PM to respect cpufreq policy limits when playing or recording video. The device should respect your wishes under all circumstances, now ;)

Fixed the SmartReflex voltage calibration of the OMAP SoC for OPP5. This could lower power consumption as soon as OPP5 (1.2 GHz) is activated for the first time.

Slight increase in the OPP5 nominal voltage (1.40 V -> 1.42 V) to allow for some adjustment by SmartReflex (now that it's working...), if necessary. The actual voltage when the device is running will not change for most users! Based on patches by dalingrin and Sanjeev Premi.

stock BCK
OPP5: not def. 1.4200 V

beta 14 fix:

Universal CF-Root: Fixed the non-ending row of force closes after flashing the Universal flavour of BCK. The clean XXKPQ version did not show these problems and didn't need a 'fix'.

beta 15:

Universal CF-Root: Modified some permissions to bring it closer to the stock ramdisk

Universal CWM: Created a CWM ramdisk based on CF-root, without most tweaks. You now have three BCK flavours to choose from :)

Updated to newest UPDATE2 sources by Samsung

Sync bug fix reworked to use new Samsung method from UPDATE2. This may lead to slightly lower standby battery consumption.

Fixed accidental front camera mirroring

Editing smartassV2 settings with busybox 1.20.x and newer no longer leads to reboots. Thanks to loSconosciuto for pointing me to the patch.

Fixed complete crash of WiFi driver when activating WiFi by adapting smartassv2 thresholds

Reverted to the original Google Android toolchain using gcc 4.4.3

Because of the toolchain-switch, the compiler optimizations are now back to -O2 instead of -O3

Credits:

Credits go to the mentioned developers of the cpufreq governors, ganeshbiyer, skin1980 and amit.bagaria for the CF-Root and skin1980 for his repack script. Many thanks to DooMLoRD, amit.bagaria, knzo and loSconosciuto for their help! BCK sources are available on GitHub.

Files:

Attached files:

ODIN-flashable PDA_BCK_XXKPQ_***.tar with stock Samsung ramdisk ('Clean flavour'). Only for XXKPQ ROMs.

ODIN-flashable PDA_BCK_XXLE4_***.tar with stock Samsung ramdisk ('Clean flavour'). Only for XXLE4 ROMs.

ODIN-flashable PDA_BCK_CF-root_universal_***.tar with CF-root ramdisk ('Universal CF-root flavour'). For all current Gingerbread ROMs.

ODIN-flashable PDA_BCK_CWM_universal_***.tar with CWM (rooted) ramdisk ('Universal CWM flavour'). For all current Gingerbread ROMs.

Other files (not attached):

Old releases and release candidates can be found on Dev-Host. Use these with caution!

MD5 sum:

PDA_BCK_XXKPQ_beta10.tar: 83013b2d54c52dddb72deec46b5471de
PDA_BCK_CF-root_universal_beta10.tar: e1e8bcc28c878095618413141b642ec1
PDA_BCK_XXKPQ_beta11.tar: 9eaa6d080f3409c4822e38602bad8efb
PDA_BCK_CF-root_universal_beta11.tar: 93437cf26699dfe595881941b13a6a83
PDA_BCK_XXKPQ_beta12.tar: d9849ae7d9587402aa6465081b4c65a1
PDA_BCK_CF-root_universal_beta12.tar: 2107dfbf33b2838e66007f4319bee14e
PDA_BCK_XXKPQ_beta13.tar: bff3112d3249e951a569148d79643744
PDA_BCK_CF-root_universal_beta13.tar: 1fab51d641a8914e11a81781683d7d7d
PDA_BCK_XXKPQ_beta14.tar: 08cd77964c3d8b54b4c97e59500a0b96
PDA_BCK_CF-root_universal_beta14fix.tar: 6a2cda17362f5a2e6aac7e78dbe94089
PDA_BCK_XXLE4_beta15.tar: 7159e6cd5f2b71bebffcb4d86201b6cf
PDA_BCK_CF-root_universal_beta15.tar: ecfa46b8aec239f1ac246df61dc63477
PDA_BCK_CWM_universal_beta15.tar: 765a5253b0313d41399ea86822cf5f80