FORUMS
Remove All Ads from XDA

[KERNEL] Anykernel

10,789 posts
Thanks Meter: 29,148
 
Post Reply Email Thread
ANYKERNEL
tuna (maguro / toro / toroplus)

Code:
#include 
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 * If you dont like this rom, Stay away from this thread! 
 */
It is difficult to update all Roms frequently, and it does not always makes sense to compile, download and flash a whole rom, if only some kernel changes are applied.

This kernel will include changes before we add them official to our kernel source on Unlegacy-Android (most of the time security bugfixes)!

Android 5.1, Android 6.0 and Android 7.x
This Kernel should work on all Android 5.1, Android 6.0 and Android 7.xRoms

Android 4.4
On Android 4.4 we need a different kernel, 4.4 Kernel includes "KitKat" tag on zip name.

What else to say
  • Kernel compiled using GCC 4.7
  • Anykernel based on Anykernel2 by @osm0sis ( https://github.com/osm0sis/AnyKernel2 ) - it will dump your boot.img and replace the zImage and add proper kernel modules.

Roms with default libion
LineageOS (unofficial)
lineage-13.0_maguro-6.0.1-20180130-2235.zip and newer
lineage-13.0_toro-6.0.1-20180130-2258.zip and newer
lineage-13.0_toroplus-6.0.1-20180130-2323.zip and newer

OmniRom (unofficial)
OmniRom 4.4: omni_tuna-4.4.4-20180128-0005.zip and newer
OmniRom 6.0: omni_tuna-6.0.1-20180128-0334.zip and newer
OmniRom 7.x: omni_tuna-7.1.2-20180128-1348.zip and newer

SlimRoms (unofficial)
Slim6: Slim_tuna-6.0.1-20180128-2356.zip and newer
Slim7: Slim_tuna-7.1.2-20180131-1640.zip

Unlegacy-Android:
All official Unlegacy-Android builds starting on 15th feburary use the default libion

On older Roms, using TI's libion, you can use attached kernel from here.

Want to support development? You can consider donating, we've spent countless of hours with this (:

XDA:DevDB Information
(tuna) Anykernel, Kernel for the Samsung Galaxy Nexus

Contributors
Android-Andi, Ziyan
Source Code: https://github.com/Unlegacy-Android/...a/tree/staging

Kernel Special Features: Testing before applying on our source official, CVE fixes

Version Information
Status: Testing

Created 2017-06-23
Last Updated 2018-05-09
The Following 18 Users Say Thank You to Android-Andi For This Useful Post: [ View ] Gift Android-Andi Ad-Free
23rd June 2017, 11:49 PM |#2  
Android-Andi's Avatar
OP Recognized Contributor
Thanks Meter: 29,148
 
Donate to Me
More
Reserved
As requested, here's my setup to compile tuna kernel.

What do you need
  • Kernel Source (you can get our latest kernel source on SlimRoms, OmniRoms or CyanogenMods github, "tuna kernel")
  • GCC ( https://android.googlesource.com/pla...m/arm-eabi-4.7 )
  • pvr source, added to omap4-common device repo and hardware_ti_omap4 repo (can be found on SlimRoms, OmniRoms or CyanogenMods github)
  • you can use my scripts put below (update some paths, marked red )
  • AnyKernel2 Source from osm0sis (update for tuna needed)

build-gcc4.7.env
Code:
export CROSS_COMPILE='/home/andi/android2/kernelcompile/arm-eabi-4.7/bin/arm-eabi-'
export LDFLAGS=''
export CFLAGS=''
export SUBARCH=arm
export ARCH=arm
export STRIP=/home/andi/android2/kernelcompile/arm-eabi-4.7/bin/arm-eabi-strip

alias 'stm'='$STRIP --strip-unneeded *.ko'
compile-tuna.sh
Code:
#!/bin/bash

readonly red=$(tput setaf 1) #  red
readonly grn=$(tput setaf 2) #  green
readonly ylw=$(tput setaf 3) #  yellow
readonly blu=$(tput setaf 4) #  blue
readonly cya=$(tput setaf 6) #  cyan
readonly txtbld=$(tput bold) # Bold
readonly bldred=$txtbld$red  #  red
readonly bldgrn=$txtbld$grn  #  green
readonly bldylw=$txtbld$ylw  #  yellow
readonly bldblu=$txtbld$blu  #  blue
readonly bldcya=$txtbld$cya  #  cyan
readonly txtrst=$(tput sgr0) # Reset

err() {
	echo "$txtrst${red}$*$txtrst" >&2
}

warn() {
	echo "$txtrst${ylw}$*$txtrst" >&2
}

info() {
	echo "$txtrst${grn}$*$txtrst"
}

setbuildjobs() {
	# Set build jobs
	JOBS=$(expr 0 + $(grep -c ^processor /proc/cpuinfo))
	info "Set build jobs to $JOBS"
}

info "Kernel source path: $KERNELSOURCE"
info "PVR Source path: $PVRSAUCE"
info "Working directory: $WORKINGDIR"
info "resulting zImage and modules stored at: $WORKINGOUTDIR"

setbuildjobs

info "Moving to kernel source"
cd $KERNELSOURCE

info "Import toolchain environment setup"
info "Toolchain: $TOOLCHAIN"
source  $SAUCE/build-$TOOLCHAIN.env

info "Create a buid directory, known as KERNEL_OUT directory"
# then always use "O=$SAUCE/tuna" in kernel compilation

info "create working directory"
mkdir -p $WORKINGDIR

warn "Make sure the kernel source clean on first compilation"
make O=$WORKINGDIR mrproper

warn "Rebuild the kernel after a change, maybe we want to reset the compilation counter"
echo 0 > $WORKINGDIR/.version

info "Import kernel config file: $DEFCONFIGNAME"
make O=$WORKINGDIR $DEFCONFIGNAME
info "Change kernel configuration if needed using:"
info "  make O=$WORKINGDIR menuconfig "

info "lets build the kernel"
make -j$JOBS O=$WORKINGDIR

if [ -f $WORKINGDIR/arch/arm/boot/zImage ]; then
	info "Copying the resulting zImage and modules to: $WORKINGOUTDIR"
	info "Creating directory..."
	mkdir -p $WORKINGOUTDIR
	mkdir -p $WORKINGOUTDIR/modules
	cp $WORKINGDIR/arch/arm/boot/zImage $WORKINGOUTDIR/
	find $WORKINGDIR/ -type f -name *.ko -exec cp {} $WORKINGOUTDIR/modules/ \;

	info "Files moved!"

	info "Pointing KERNELDIR to KERNEL_OUT directory"
	export KERNELDIR=$WORKINGDIR

	warn "Make sure the PVR source clean."
	warn "Running 'make clean'..."
	make clean -C $PVRSAUCE/build/linux2/omap4430_android

	info "Building the PVR module..."
	make -j8 -C $PVRSAUCE/build/linux2/omap4430_android TARGET_PRODUCT="blaze_tablet" BUILD=release TARGET_SGX=540 PLATFORM_VERSION=4.1

	info "Copying the resulting PVR module to: $WORKINGOUTDIR"
	cp -fr $PVRSAUCE/binary2_omap4430_android_release/target/pvrsrvkm.ko $WORKINGOUTDIR/modules/pvrsrvkm_sgx540_120.ko
	mv $PVRSAUCE/binary2_omap4430_android_release/target/pvrsrvkm.ko $WORKINGOUTDIR/modules/

	warn "Don't leave any module objects in PVR source!"
	warn "Running 'make clean'..."
	make clean -C $PVRSAUCE/build/linux2/omap4430_android

	info "Properly stripping the kernel modules for smaller size (implified as stm command inside build.env)..."
	cd $WORKINGOUTDIR/modules
	stm

	info "####################"
	info "#       Done!      #"
	info "####################"
else
	warn "####################"
	warn "#      FAILED!     #"
	warn "####################"
fi

cd $SAUCE
tuna_k.sh
Code:
#!/bin/bash

SAUCE=~/android2/kernelcompile
PVRSAUCE=~/android2/official/omap4/stable/pvr-source/eurasiacon
KERNELSOURCE=~/android2/official/kernel/android_kernel_ti_omap4
TOOLCHAIN="gcc4.7"
DEFCONFIGNAME=tuna_kitkat_defconfig
WORKINGDIR=$SAUCE/tuna-kitkat
WORKINGOUTDIR=$WORKINGDIR-bin
. `dirname $0`/compile-tuna.sh
tuna_m.sh
Code:
#!/bin/bash

SAUCE=~/android2/kernelcompile
PVRSAUCE=~/android2/official/omap4/stable/pvr-source/eurasiacon
KERNELSOURCE=~/android2/official/kernel/android_kernel_ti_omap4
TOOLCHAIN="gcc4.7"
DEFCONFIGNAME=tuna_defconfig
WORKINGDIR=$SAUCE/tuna-marshmallow
WORKINGOUTDIR=$WORKINGDIR-bin
. `dirname $0`/compile-tuna.sh
The Following 3 Users Say Thank You to Android-Andi For This Useful Post: [ View ] Gift Android-Andi Ad-Free
23rd June 2017, 11:51 PM |#3  
Android-Andi's Avatar
OP Recognized Contributor
Thanks Meter: 29,148
 
Donate to Me
More
Hey together!
We started preparing a common 3.0 omap4 kernel.
I have started applying some small stuff to our current kernel (also reverts some previous commits) which needs testing.

The kernel should work on all L, M and N Roms. Please let me know if you face any new issues.
Attached Files
File Type: zip AnyKernel-2017-06-23-tuna.zip - [Click for QR Code] (5.41 MB, 536 views)
The Following 8 Users Say Thank You to Android-Andi For This Useful Post: [ View ] Gift Android-Andi Ad-Free
24th June 2017, 12:56 AM |#4  
guest4711's Avatar
Senior Member
Flag Београд (Beograd/Belgrade/Griechisch Weißenburg/Alba Graeca; Alba Bulgarica)
Thanks Meter: 2,269
 
More
Quote:
Originally Posted by Android-Andi

Hey together!
We started preparing a common 3.0 omap4 kernel.
I have started applying some small stuff to our current kernel (also reverts some previous commits) which needs testing.

Thanks for your hard work. I flashed your kernel onto DU 11.5 (Android 7.12). It boots fine and I'm writing this post with this configuration. I will test it during the next days. First difference: Nightlight now works...
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20170624-004843.png
Views:	790
Size:	84.8 KB
ID:	4191555  
The Following 5 Users Say Thank You to guest4711 For This Useful Post: [ View ] Gift guest4711 Ad-Free
24th June 2017, 06:28 AM |#5  
Senior Member
Thanks Meter: 540
 
More
Quote:
Originally Posted by Android-Andi

Want to support development? You can consider donating, we've spent countless of hours with this (:

@Android-Andi @Ziyan Thank you for your work! I have donated $10 and I hope others will join me to support our developers
The Following 2 Users Say Thank You to bamtan2 For This Useful Post: [ View ] Gift bamtan2 Ad-Free
24th June 2017, 11:11 AM |#6  
guest4711's Avatar
Senior Member
Flag Београд (Beograd/Belgrade/Griechisch Weißenburg/Alba Graeca; Alba Bulgarica)
Thanks Meter: 2,269
 
More
Quote:
Originally Posted by Android-Andi

Please let me know if you face any new issues.

It's running very well but I'm getting battery drain cause of missing deep-sleep-cycles.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20170624-110124.png
Views:	480
Size:	59.1 KB
ID:	4191872   Click image for larger version

Name:	Screenshot_20170624-110221.png
Views:	490
Size:	89.2 KB
ID:	4191873  
The Following User Says Thank You to guest4711 For This Useful Post: [ View ] Gift guest4711 Ad-Free
24th June 2017, 11:17 AM |#7  
Android-Andi's Avatar
OP Recognized Contributor
Thanks Meter: 29,148
 
Donate to Me
More
@guest4711 maguro?
24th June 2017, 11:20 AM |#8  
Android-Andi's Avatar
OP Recognized Contributor
Thanks Meter: 29,148
 
Donate to Me
More
On toro or toroplus issues i need a dmesg always because i own a maguro only.
The Following User Says Thank You to Android-Andi For This Useful Post: [ View ] Gift Android-Andi Ad-Free
24th June 2017, 11:26 AM |#9  
guest4711's Avatar
Senior Member
Flag Београд (Beograd/Belgrade/Griechisch Weißenburg/Alba Graeca; Alba Bulgarica)
Thanks Meter: 2,269
 
More
Quote:
Originally Posted by Android-Andi

@guest4711 maguro?

Yes, good old maguro (with baseband I9250XXLJ1, see #3).
The Following User Says Thank You to guest4711 For This Useful Post: [ View ] Gift guest4711 Ad-Free
24th June 2017, 11:54 AM |#10  
Android-Andi's Avatar
OP Recognized Contributor
Thanks Meter: 29,148
 
Donate to Me
More
@guest4711 attached kernel reverts "cpufreq: interactive: sync with p-android-omap-3.0-dev", let's see if this fixes your issue.
Attached Files
File Type: zip AnyKernel-2017-06-24-11-52-tuna.zip - [Click for QR Code] (5.41 MB, 78 views)
24th June 2017, 11:56 AM |#11  
Android-Andi's Avatar
OP Recognized Contributor
Thanks Meter: 29,148
 
Donate to Me
More
double, ignore
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes