FORUMS
Remove All Ads from XDA

[KERNEL] valexKernel [SM-P600/601 | AOSP 5.1.1 ]

76 posts
Thanks Meter: 147
 
By Andmoreagain, Member on 10th July 2015, 04:12 PM
Post Reply Subscribe to Thread Email Thread
valexKernel
For SM-P600, AOSP/CM-based 5.1.1 ROMs ONLY!

Quote:

This is an experimental build. I will not be held responsible if it bricks or damages your device in any way. Flash at your own risk, etc.


Hey, you may have seen my other thread where I'm researching the possibility of porting the entire upstream kernel to our device. Of course that will take time, especially with no other experienced developers by my side. In the meantime I wanted to give you guys a little treat, so I took RaymanFX's base and did some cherry-picking and backporting of upstream features. Not particularly flashy features like blahblahblah-governor or blehblehbleh-iosched; just lots of updates from upstream, backports, and some patches from CAF and Linaro.

The scheduler has mostly been updated to something between linux 3.10 and 3.16, sched_deadline has been added, updates to topology and SMP have been added-including the generic smpboot code, per-platform SMP operations and exynos support for SMP operations. Rbtree, cpuidle, mutex, futex, blahblablah has been updated, f2fs has been pulled in with its respective 'exynos patch' from oloendithas' tree, rwsem and zsmalloc have been updated to 3.10, arch_timer has been added, power-efficient workqueues, new hashtable implementation, and the list goes on.

I also backported the gic and vic changes from linux 3.9, so if anyone is wondering where they went then they're in the drivers/irqchip directrory. A word of warning: this might be affecting some bL_switcher functionality because the stock kernel relies on a hacky backport of the bL_switcher. I plan on removing that altogether and add an upstream-ish version instead with MCPM support. The gic changes make such backporting easier to implement so thank god I'm done with it lol.

Despite this potential issue it seems to run smoothly so far. If you hit any bugs, please let me know. Enjoy!

INSTALL INSTRUCTIONS:

1) Download
2) Flash in recovery + wipe chache/dalvik
3) ???
4) PROFIT!

Highlighted changes
Code:
v3.1

* Removed the "user namespace" updates to see if that gets rid of the buggy
  behavior of the s-pen.  So far it seems to be working normally now.

v3

* SM-P601 now supported
* ARM: architected timers: now properly backported to Linux 3.4
* ARM: Native support for the ARM Virtualization Extensions
* ARM: Force instructions address alignment
* ARM: enabled ARM errata 766421 and 798181
* cpufreq: exynos 5420 voltage control
* max77803_haptic: user configurable vibrator intensity
* i/o schedulers: added BFQ, Zen, SIO, FIOPS, V(R) and FIFO
* drivers: added Contiguous Memory Allocator
* drivers: random backported from Linux 3.16+ (thanks @arter97)
* fs: f2fs updated (thanks @ShevT)
* memory management: almost completely updated to Linux 3.7
* userns: applied the "Completing the user namespace" patch set
* enabled Namespaces support
* misc changes and fixes

v2.0 - MCPM-testing

- Multi-cluster PM
	* MCPM is now working, at least with the big.LITTLE switcher. Full
	eight core support is still not active because of lacking device
	tree- and CCI support.

- big.LITTLE switcher
	* Replaced the existing implementation with the upstream patches.

- OF: a few updates to fix build breakage when FDT support is enabled.
	* This is still broken since device tree support for ARM is still
	incomplete in 3.4 overall.  I'll see if I can make it work but no
	promises.

- Config options
	* Multi-core scheduler enabled
	* MCPM enabled
	* MobiCore disabled

- Misc changes
	* cpumask: preparatory patches for the CCI driver
	* lib/devres: same as above
	* ARM/PMU: preparatory patches for the big.LITTLE MP patch set.
	* ARM: use built-in byte swap function 
	* mm: remove compressed copy from zram in-memory
	* ARM/nommu: prevent generation of kernel unaligned memory accesses
	* panic: fix incomplete panic log in panic()
	* ARM: SMP: remove redundant instances of __cpuinit
	* GCC optimizations

	See commit history for full changelog.

- Notes
	* At the current stage it could be said that the kernel almost
	supports HMP.  The only thing standing in the way at the moment
	is the ARM CCI-400 driver which relies on device tree support in
	order to work, and the Exynos5420-specific MCPM implementations
	which in turn rely on the CCI driver. The next step would therefore
	be improving device tree support in the kernel.

	WARNING: The MCPM-enabled kernel is still buggy.  There are a few
	instances of kernel panics such as random reboots and sleep of death
	issues.  It still boots and runs fine aside from these.  I've seen worse.

	I can't say for sure what exactly is causing these issues.  It might
	not even be the MCPM or the big.LITTLE switcher.  I'll have to do more
	testing to find out.

	Go ahead and check it out, it's not going to blow up your tablet.
	Just make sure to collect the logs ;)

v2.0 - RC2

- GIC:
	* Synced GIC with upstream.
	* 3.4 compatibility stuff is no longer needed.
- More: see commit history
	* Loads of updates to ARM, especially for PM,
	sleep, suspend, cpuidle, etc.  These are also
	preparatory changes for MCPM integration.
- Reverted commits from v1.5
	* Left out some non-critical commits that were
	introduced in v1.5 and were causing buggy
	behavior and kernel panics.  Otherwise this
	release contains everything found in v1.5.
- Notes on this release:
	* I have tested the kernel and so far I have
	not come across any bugs or kernel panics.
	If you come across anything unusual, please
	let me know, provide a description of the
	issue and preferably accompany your report with
	a dmesg or a logcat if possible.

v2.0 - RC1

- BACKPORT v2: Move GIC and VIC to drivers/irqchip
	* My previous version of this backport turned
	out to be a bit bloated with commits that were
	not part of this particular patch set.  This
	has now been fixed and these additional commits
	have been applied separately.
	* Fixed the placement of the gic_raise_softirq
	function and made sure 3.4 compatibility was
	properly in check.
	* Fixed some missing includes in platform-
	specific code.
- SMP: formalize an IPI for wakeup
	* Reverted the old ping IPI patch in exchange
	for the upstream wakeup IPI.  This is one of
	the minor dependencies for the GIC/VIC changes.
- More: see commit history
	* WM5102 sound control by AndreiLux
	* Whitelisted F2FS in SELinux
	* Cortex-A15 optimizations for memcpy
	* kexec_hardboot support
 	* Disabled some of Samsung's debug bloat
	* Enabled KSM, Cacheflush, Loadable module support, and a few other options.
- Notes on this release:
	* I have tested the kernel and so far I have
	not come across any bugs or kernel panics.
	If you come across anything unusual, please
	let me know, provide a description of the
	issue and preferably accompany your report with
	a dmesg or a logcat if possible.

v1.5 - testing - Build 20151307
* cacheflush: upstream updates * exynos/hotplug: use v7_exit_coherency_flush macro for cache disabling * smp/hotplug: more or less updated to upstream, very little left to add there * arm/opcodes: updated to latest upstream version * kexec: kexec hardboot support * arm: generic timer broadcast support * clockevents: generic timer broadcast receiver * arm/virt: allow the kernel to be entered in HYP mode * drivers: moved some samsung drivers to staging - This does not affect the performance of the kernel, it's more for my own convenience when dealing with the source code. * gic/vic: removed some redundant leftovers in arm/common - We are now using the upstream GIC in drivers/irqchip. No need to keep the old one. * Sound: Wolfson WM5102 sound control by AndreiLux * Enabled NTFS write support * Cortex-A15 optimizations * init.d support in ramdisk * misc tweaks and fixes
v1.0 - stable - Build 20150710
* sched: updated to a more upstream version, introducing SCHED_DEADLINE * smp: updated to a more upstream version * smp: backported per-platform SMP operations with Exynos support * smpboot: added generic-idle patches from upstream * arm: added arch_timer from upstream * arm: NEON in kernel mode * arm/crypto: NEON optimizations * arm/gic: backported the 3.9 version of GIC and moved to drivers/irqchip * workqueue: power-efficient workqueues * fs: upstream updates * fs: pulled in F2FS support * rbtree: upstream updates * mutex: upstream updates * softirq: upstream updates * cpuidle: upstream updates * futex: upstream updates * removed __cpuinit * new hashtable implementation * zsmalloc: updated to 3.10 version * rwsem: updated to 3.10 version * misc optimizations * WIP: iov-iter (the patches from faux123 are not applicable to our tree, gonna do this manually) * WIP: arch_timer (had to revert a bunch of patches due to leaving out the patch for DT-only support) * TODO: big.LITTLE improvements * TODO: dig up my backported patch of kexec_hardboot for universal5420 and add it to the mix * TODO: fix Samsung's max77803 mfd driver
Special thanks to: RaymanFX, SyntheticNightmar3, dorimanx, oloendithas, xluco, AndreiLux, halaszk, faux123, and everyone I might be forgetting.

Source & Changelog

DOWNLOADS:
Testing Releases:
v2.0-MCPM-TEST
WARNING: The "MCPM/bL-switcher" build is still buggy and is for testing purposes only. Don't complain if you encounter instances of random reboots, sleep of death, etc. Log or it didn't happen!

Stable Releases:

v3.1 - LATEST
SM-P600: DOWNLOAD
SM-P601: DOWNLOAD

v2.0-RC2
v2.0-RC1
v1.0-Stable

XDA:DevDB Information
valexKernel, Kernel for the Samsung Galaxy Note 10.1 (2014 Edition)

Contributors
Andmoreagain, RaymanFX
Source Code: https://bitbucket.org/sigma-1/valexkernel-lt03wifi/commits/branch/v2.0-proper

Kernel Special Features:

Version Information
Status: Beta
Current Beta Version: 1.0

Created 2015-07-10
Last Updated 2015-07-11
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2015-07-10-18-37-59.png
Views:	2242
Size:	131.9 KB
ID:	3399118  
Last edited by Andmoreagain; 2nd September 2015 at 05:21 AM.
The Following 15 Users Say Thank You to Andmoreagain For This Useful Post: [ View ] Gift Andmoreagain Ad-Free
 
 
11th July 2015, 12:48 AM |#3  
Orion116's Avatar
Senior Member
Thanks Meter: 439
 
More
Mind if I include some of this in my feature rich kernel

Sent from my SM-P600 using Tapatalk
11th July 2015, 04:32 AM |#4  
Andmoreagain's Avatar
OP Member
Thanks Meter: 147
 
More
Quote:
Originally Posted by Orion116

Mind if I include some of this in my feature rich kernel

Sent from my SM-P600 using Tapatalk

Do it!
The Following 5 Users Say Thank You to Andmoreagain For This Useful Post: [ View ] Gift Andmoreagain Ad-Free
11th July 2015, 04:40 AM |#5  
Orion116's Avatar
Senior Member
Thanks Meter: 439
 
More
Quote:
Originally Posted by Andmoreagain

Do it!

Cannot wait to see the result
The Following User Says Thank You to Orion116 For This Useful Post: [ View ] Gift Orion116 Ad-Free
13th July 2015, 06:25 PM |#6  
Andmoreagain's Avatar
OP Member
Thanks Meter: 147
 
More
The latest build has a bug that causes reboots when the screen is off. I'll fix it and upload a new build tonight.

v1.0 is good though, a bit battery-hungry but the performance is well above average.

Edit: fell asleep last night before I could finish this. I decided to start over with the gic backports and update the big.LITTLE switcher accordingly. The difficulties that I'm running into is that the stock bL_switcher code itself is a backport that skips the upstream MCPM dependencies and thus it looks a bit different than the upstream version.
I'm going to try to just add the MCPM patches with the upstream bL_switcher and see how it runs. I already know that it compiles but I don't know if it actually works because the kernel lacks the arm-cci driver. Then again, maybe the cci driver is only required for hmp support. Only one way to find out...

Edit 2:

Just look at this: https://bitbucket.org/sigma-1/linux-...ranch/v2-test2

Multi-Cluster PM compiles now, but the big.LITTLE switcher is causing a different build error due to some missing dependencies. I can't wait to test this out as soon as these missing dependencies have been resolved. If MCPM works then it means that there's not much left to add for true octa core support.

Edit 3:

Bahh... gonna put this on hold for now. I'm getting some nonsensical "undefined reference" errors at the very end of the build. If anyone wishes to try and figure this one out, be my guest, because these are all defined as far as I can tell.

Code:
  LD      vmlinux.o
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/arm/common/built-in.o: In function `bL_switch_to':
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/common/bL_switcher.c:196: undefined reference to `gic_get_sgir_physaddr'
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/common/bL_switcher.c:212: undefined reference to `gic_send_sgi'
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/common/bL_switcher.c:230: undefined reference to `gic_migrate_target'
arch/arm/common/built-in.o: In function `bL_switcher_halve_cpus':
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/common/bL_switcher.c:513: undefined reference to `gic_get_cpu_id'
arch/arm/mach-exynos/built-in.o: In function `exynos4_init_irq':
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/mach-exynos/common.c:875: undefined reference to `gic_init_bases'
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/mach-exynos/common.c:882: undefined reference to `gic_arch_extn'
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/mach-exynos/common.c:882: undefined reference to `gic_arch_extn'
arch/arm/mach-exynos/built-in.o: In function `gic_init':
/home/valex/linux-android-3.4.y-exynos-lt03wifi/include/linux/irqchip/arm-gic.h:76: undefined reference to `gic_init_bases'
arch/arm/mach-exynos/built-in.o: In function `exynos5_init_irq':
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/mach-exynos/common.c:915: undefined reference to `gic_arch_extn'
/home/valex/linux-android-3.4.y-exynos-lt03wifi/arch/arm/mach-exynos/common.c:915: undefined reference to `gic_arch_extn'
Makefile:882: recipe for target '.tmp_vmlinux1' failed
make: *** [.tmp_vmlinux1] Error 1
I'm just gonna get back on track, fix the screen-off-reboot bug and deal with this big.LITTLE stuff when I have the time and patience for it. Something good has come out of this though since now I have a bunch of commits that help preparing the kernel base for MCPM support. That's not to say that it will ever work with this kernel. Maybe it will, maybe it won't. The best chance for this to ever work would be a board file-to-device tree migration with linux 3.10 or higher. That requires some work on the device drivers though since a few of them are not in mainline or anywhere else for that matter, except our stock kernel (why Samsung haven't sent these to be supported upstream is beyond me).
Last edited by Andmoreagain; 15th July 2015 at 05:23 PM.
The Following 2 Users Say Thank You to Andmoreagain For This Useful Post: [ View ] Gift Andmoreagain Ad-Free
24th July 2015, 03:53 PM |#7  
Andmoreagain's Avatar
OP Member
Thanks Meter: 147
 
More
Bump!

v2.0 release candidates have been added. Both tested and running good so far. RC2 is a bit more bleeding-edge since it contains some more preparatory backports for MCPM integration. I uploaded RC1 too in case anyone runs into a bug and wishes to fall back to a more stable version. See changelog for more info on both RCs. Enjoy!
The Following User Says Thank You to Andmoreagain For This Useful Post: [ View ] Gift Andmoreagain Ad-Free
25th July 2015, 11:20 AM |#8  
DirkStorck's Avatar
Senior Member
Thanks Meter: 612
 
More
Hi. Do you plan to add other govenors ?

Thank you!
25th July 2015, 04:29 PM |#9  
buhohitr's Avatar
Senior Member
Thanks Meter: 1,784
 
More
So what is the different between this kernel and stock? better battery life? performance? both? I'm looking for the main shine feature of this kernel.. )
25th July 2015, 05:13 PM |#10  
Andmoreagain's Avatar
OP Member
Thanks Meter: 147
 
More
Quote:
Originally Posted by buhohitr

So what is the different between this kernel and stock? better battery life? performance? both? I'm looking for the main shine feature of this kernel.. )

Performance is significantly better compared to stock as both the scheduler and SMP/hotplug functionality have been updated and improved. At first this came at the cost of power consumption but as of the latest updates this seems to be fixed. A lot of the updates included are also preparatory patches for HMP support.

Quote:
Originally Posted by DirkStorck

Hi. Do you plan to add other govenors ?

It is not my main focus at the moment but I haven't really made a final decision in that regard.
Last edited by Andmoreagain; 25th July 2015 at 05:32 PM.
25th July 2015, 05:40 PM |#11  
DirkStorck's Avatar
Senior Member
Thanks Meter: 612
 
More
Quote:
Originally Posted by Andmoreagain

Performance is significantly better compared to stock as both the scheduler and SMP/hotplug functionality have been updated and improved. At first this came at the cost of power consumption but as of the latest updates this seems to be fixed. A lot of the updates included are also preparatory patches for HMP support.


It is not my main focus at the moment but I haven't really made a final decision in that regard.

Ok, I understand. I am only asking because with another kernel I have used "weathley" and had a good balance between speed and battery!

Read More
Post Reply Subscribe to Thread

Tags
exynos5420, kernel, lt03wifi, sm-p600

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes