Cifs - LG G Flex

Cifs manager, any got out could build a working cifs.ko file?
Sent from my LG-D955 using XDA Premium 4 mobile app

tutreak said:
Cifs manager, any got out could build a working cifs.ko file?
Sent from my LG-D955 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Sorry for knocking a 9 month old Thread , but I am trying to make Cifs Manager work for my Gflex.
i'm running Android 4.4.2 , Kernel 3.4.0 Build KOT49I.D95520a .
I've Downloaded the Kernel Source tar.gz from LG : LGD955_Gflex_Kikat_V20a_Kernel.tar.gz
And I just cannot seem to produce a cifs.ko module that is succesfully loaded with insmod on the device.
I keep getting this in dmesg: no symbol version for module_layout
I was trying to use this thread for instructions: http://forum.xda-developers.com/showthread.php?t=2531407&page=3
and this http://forum.xda-developers.com/showthread.php?t=2531407&page=3
@TheWizardOfROMs Maybe if you have some time you can give some useful advice
@ forrestgump2000 How did you do it for LG G2 ? It should be almost the same for the Gflex, could you perhaps lend a hand? Please?
I am trying to build it on Mac OSX , installed with macports gcc4.9 , using CROSS_COMPILE=/Downloads/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi- , ARCH=arm,SUBARCH=arm
make EXTRA_CFLAGS=-fno-pic M=fs/cifs Tells me about some versioning , then I run make modules before to create that file and then it doesn't complain.
Running out of ideas..... (will try a Ubuntu VM soon if nothing works...)
Thank you!

2nd really need this for off device storage

Work documentation
I've sent an e-mail to LG , let's see what happens....
"
Dear LG OpenSource Team,
I am currently trying very hard to compile a new module for my current kernel:LGD955_Gflex_Kikat_V20a_Kernel.zip
My work environment is the following:
Vmware Ubuntu 14.01 LTS , gcc 4.8
I have unpacked your kernel source and tried the following:
cp arch/arm/configs/z-open-com-perf_defconfig .
make z-open-com-perf_defconfig prepare headers_install scripts ARCH=arm CROSS_COMPILE=arm-linux-androideabi- O=build KERNELRELEASE=3.4.0-perf-g551cabf
make menuconfig ARCH=arm CROSS_COMPILE=arm-linux-androideabi- O=build KERNELRELEASE=3.4.0-perf-g551cabf
Chosen Network File System Support -> CIFS (M) and saved.
make modules ARCH=arm CROSS_COMPILE=arm-linux-androideabi- O=build KERNELRELEASE=3.4.0-perf-g551cabf
adb push fs/cifs/cifs.ko /data/local/modules/
chmod 644 /data/local/modules/cifs.ko
insmod /data/local/modules/cifs.ko gives this Failure Message : … failed (Exec format error)
dmesg has this message inside: no symbol version for module_layout
A little info after building the module:
[email protected]:~/Downloads/kernel$ modinfo build/fs/cifs/cifs.ko
filename: /home/adi/Downloads/kernel/build/fs/cifs/cifs.ko
version: 1.78
description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license: GPL
author: Steve French <sfr[email protected]>
srcversion: 3F86E0A9406EADE34D14793
depends:
intree: Y
vermagic: 3.4.0-perf-g551cabf SMP preempt mod_unload modversions ARMv7
parm: CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)
parm: cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)
parm: cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767. (int)
parm: enable_oplocks:Enable or disable oplocks (bool). Default:y/Y/1 (bool)
[email protected]:/ # uname -r
3.4.0-perf-g551cabf
[email protected]:/ # uname -a
Linux localhost 3.4.0-perf-g551cabf #1 SMP PREEMPT Tue Apr 29 00:20:47 KST 2014 armv7l GNU/Linux
I am running out of ideas , could you please help ? What am I doing wrong? I love this Phone and want to learn more about it’s inner workings but when compiling a module fails , it leaves me a little hopeless…
Thank you in advance,
With kind regards,
Adrian
"

Fingers crossed

Related

DroidX tun.ko help/request

Does anyone have a tun.ko module for the DroidX?
Running update1:
busybox uname -a
Linux localhost 2.6.29 #1 PREEMPT Thu Jul 1 18:18:04 CDT 2010 armv7l GNU/Linux
Running strings and grep on the modules shows:
vermagic=2.6.29 preempt mod_unload ARMv7
I couldn't find Motorola's kernel source for the DX (but the Droid is posted).
Any tips, tricks, or info would be appreciated.
Thanks, Jeb
References:
Droid Source -- opensource.motorola.com/sf/projects/droid
DroidX Souce (should be here, but link doesn't work)
opensource.motorola.com/sf/projects/droidx
(sorry can't post links yet)
Well I have a 2.6.29 kernel tree ready to go, but I can't find a kernel config for the DX.
I can't find /proc/config.gz on the system (thanks Motorola...).
Does anyone know the "ARM system type"? I used a HTC config, but the version came out ARMv6, not ARMv7.

[Guide] How to compile stock LG2X kernel from scratch

For some weeks I've been trying to set up an environment in which I'm able to compile the stock kernel for my LG2X on my own. Following various tips and hints were unsuccessful and several restarts were required until a kernel which was compiled on my own box was running on my phone. Since I had to patch together all the information because there was no complete guide available/findable, I'd like to list here all the steps from the beginning which I had to perform to boot my own compiled kernel. Maybe this is also useful for others. Note: again, this approach is for compiling STOCK kernel sources which are based on the public sources from LG. (The build process for CM is different and cannot be applied to stock kernels)
I began with a freshly installed Ubuntu 11.10 32bit (http://www.ubuntu.com/download/ubuntu/download) running in a VMware virtual machine. In it I entered a shell and switched to root to be able to perform the required actions:
Code:
sudo su -
The next step was to add the package-sources for the cross-compiler toolchain (see next step) and to bring the system up to the latest state.
Code:
add-apt-repository ppa:linaro-maintainers/toolchain
apt-get update
apt-get upgrade
This takes some time but after it's finished I installed the cross-compiler toolchain to be able to compile applications for the LGs ARM platform
Code:
apt-get install gcc-linaro
apt-get install gcc-linaro-arm-linux-gnueabi
After this I've been ready to begin with the source-works. I closed the root-shell and opened up a new one (required to make sure that all paths are correctly set and recognized again). Test it by executing
Code:
arm-linux-gnueabi-gcc --version
When this executed without error I started with downloading the sources for version 20q from http://www.lg.com/global/support/opensource/opensource-detail.jsp?detailCustomerModelCode=LGP990 into a new directory.
When the file 'LGP990_Android_Gingerbread_V20Q.zip' had finished downloading I unzipped the complete package by
Code:
unzip LGP990_Android_Gingerbread_V20Q.zip
resulting in three files. A README, one .tar.gz with the ROM sources and finally one .tar.gz with the kernel sources. To unpack the kernel sources I issued
Code:
tar xvzf P990_Stardop_IFX_GingerBread_V20Q_KERNEL.tar.gz
and the complete LG 20q kernel sources were finally located in a new 'kernel' subdirectory.
The kernel sources themselves are not yet ready to be compiled. This is because LG most probably has a different/special build environment and our standard environment produces errors and unbootable kernels. Some patching is required to succeed to a running kernel.
Firstly the compilation options for the wireless module have to be tweaked as the default settings break compilation at some unused variables in the source. This is set to be just treated as warnings for the wireless-module by applying following patch:
Code:
diff -u -r original/kernel/drivers/net/wireless/bcm4329/Makefile kernel/drivers/net/wireless/bcm4329/Makefile
--- original/kernel/drivers/net/wireless/bcm4329/Makefile 2012-01-31 04:36:22.000000000 -0800
+++ kernel/drivers/net/wireless/bcm4329/Makefile 2012-02-14 11:41:59.972467559 -0800
@@ -53,7 +53,7 @@
-DBCMLXSDMMC \
-DBCMPLATFORM_BUS \
-DSDIO_ISR_THREAD \
- -Wall -Wstrict-prototypes -Werror \
+ -Wall -Wstrict-prototypes -Werror -Wno-unused-but-set-variable -Wno-array-bounds \
-I$(SRCROOT) \
-I$(SRCROOT)/include \
-I$(SRCROOT)/shared \
Also the main Makefile requires tuning to contain the proper compilation options to produce code which correctly runs on the phone (thanks to spica1234 for providing me with the correct options).
Code:
diff -u -r original/kernel/Makefile kernel/Makefile
--- original/kernel/Makefile 2012-01-31 04:36:21.000000000 -0800
+++ kernel/Makefile 2012-02-28 13:21:20.038003539 -0800
@@ -323,12 +323,12 @@
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
-MODFLAGS = -DMODULE
-CFLAGS_MODULE = $(MODFLAGS)
+MODFLAGS = -DMODULE -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a9 -march=armv7-a -fno-common -fsingle-precision-constant -fno-gcse -funsafe-math-optimizations -ffinite-math-only -fgcse-las -fgcse-sm -fivopts -fbtr-bb-exclusive -fvect-cost-model -fmodulo-sched -fmodulo-sched-allow-regmoves
+CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE = $(MODFLAGS)
LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds
-CFLAGS_KERNEL =
-AFLAGS_KERNEL =
+CFLAGS_KERNEL = -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a9 -march=armv7-a -fno-common -fsingle-precision-constant -fno-gcse -funsafe-math-optimizations -ffinite-math-only -fgcse-las -fgcse-sm -fivopts -fbtr-bb-exclusive -fvect-cost-model -fmodulo-sched -fmodulo-sched-allow-regmoves
+AFLAGS_KERNEL = -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a9 -march=armv7-a -fno-common -fsingle-precision-constant -fno-gcse -funsafe-math-optimizations -ffinite-math-only -fgcse-las -fgcse-sm -fivopts -fbtr-bb-exclusive -fvect-cost-model -fmodulo-sched -fmodulo-sched-allow-regmoves
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
# 20100705, [email protected],[LGE_START]
@@ -544,7 +544,8 @@
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
else
-KBUILD_CFLAGS += -O2
+KBUILD_CFLAGS += -Ofast
+KBUILD_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable)
endif
We're not finished yet. We've to create the correct kernel configuration and (again) apply some patches. I'm not so sure about these changes but the kernel refused to boot on my phone without them. It is again provided by spica1234 and contains a number of changes. I did not research which of these changes allowed to boot since most of them are generally useful and I didn't do the work trying them out one-by-one.
Code:
make ARCH=arm star_ifx_defconfig
Code:
--- .config.orig 2012-02-28 13:22:09.322001449 -0800
+++ .config.spica_working 2012-03-02 08:41:21.757696988 -0800
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.9-HP_2X_Xtreme_RC12-RevOTF
-# Tue Feb 28 13:22:09 2012
+# Tue Feb 28 13:24:15 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -56,16 +56,16 @@
CONFIG_LOG_BUF_SHIFT=18
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
-# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_RT_GROUP_SCHED=y
# CONFIG_USER_SCHED is not set
CONFIG_CGROUP_SCHED=y
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_CGROUP_NS is not set
-CONFIG_CGROUP_FREEZER=y
-CONFIG_CGROUP_DEVICE=y
+# CONFIG_CGROUP_FREEZER is not set
+# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CPUSETS is not set
-CONFIG_CGROUP_CPUACCT=y
+# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_RESOURCE_COUNTERS is not set
# CONFIG_SYSFS_DEPRECATED_V2 is not set
CONFIG_RELAY=y
@@ -121,7 +121,8 @@
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
-# CONFIG_SLOW_WORK is not set
+CONFIG_SLOW_WORK=y
+# CONFIG_SLOW_WORK_DEBUG is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
@@ -146,10 +147,10 @@
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_DEFAULT_IOSCHED="deadline"
CONFIG_FREEZER=y
#
@@ -1676,16 +1677,25 @@
# File systems
#
CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT2_FS_XATTR=y
+# CONFIG_EXT2_FS_POSIX_ACL is not set
+# CONFIG_EXT2_FS_SECURITY is not set
+CONFIG_EXT2_FS_XIP=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4_FS is not set
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_XATTR=y
+# CONFIG_EXT4_FS_POSIX_ACL is not set
+# CONFIG_EXT4_FS_SECURITY is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_FS_XIP=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=y
+# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
@@ -1769,7 +1779,22 @@
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
-# CONFIG_NETWORK_FILESYSTEMS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_DFS_UPCALL is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
#
# Partition Types
After these patches, were finally ready to compile the kernel
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- STAR_TMUS_REV=TMUS_10 TARGET_STAR_HWREV=TMUS_E TARGET_MODEM=ifx
Now go grab some coffee. This takes a while. When it's finished, the compressed kernel-image is found in
arch/arm/boot/zImage
For the experienced kernel-hackers this might be enough. It wasn't for me and I wanted to have it easily installable like other kernels from the forum. So I downloaded a kernel zip package, eg. the one from spica1234 at http://forum.xda-developers.com/showpost.php?p=18253696&postcount=1
Any version will do as long as the kernel is contained in a .zip archive and installable via CWM. In my case I downloaded the kernel zip in a new directory 'build' and unpacked it.
Code:
unzip HP_2x_RC12-RevOTF-PRO.zip
This creates the subdirectories 'data', 'kernel', 'META-INF' and 'system'. Here we now have to replace the kernel and the kernel-modules with our self-compiled versions.
Code:
cd ~build/kernel
rm zImage
cp ~kernel/arch/arm/bootzImage ./zImage
cd ../system/lib/modules
rm *.ko
find ~kernel/ -name "*.ko" -exec cp '{}' . \;
cd ../../..
One last step, creating the zip which carries the new kernel:
Code:
zip -r -FS new_kernel.zip data/ kernel/ META-INF/ system/
This new_kernel.zip can now be flashed with CWM and should boot without problems.
For easier usage, I've attached the three patched files in the build_set.zip attachment so you don't have to patch the stock files by hand. Just extract it in the kernel directory and overwrite the existing files.
I hope I did not make any error in the compilation of this information and that it can be helpful for the interested reader.
Thanks goes especially to spica1234 and the material which he provided me to come through to a successful boot.
Very good explanation. I wish such useful info available b4 an year for me while i published 1st kernel at samdroid for my older device
Sent from my LG-P990 using Tapatalk
Bloody hell! I never realised it took so much to simply compile!!!! (I build JEE systems at work, but we scripted most of it, stuff that used to take a day and half now takes a few minutes).
Excellent guide Kosi! I'm a linux and kernel n00b and I understand your instructions pretty well.
Ubuntu 11 is not the best choice though I currently use it myself. v11 can cause problems, especially when not compiling kernels but compiling Android ROMs.
Ubuntu 10 is the better choice.
Also there is a VMware Android Developer Environment available for download, providing nearly all the necessary tools for compilation preinstalled and set-up.
http://forum.xda-developers.com/showthread.php?t=1386918
You can compile your kernel directly in the virtual machine p.ex. on your Windows 7 PC. That's the way I do it for my kernel. VMware Player is available for free, so you can just run the image.
Also install VMware tools, so you can set up a directory for exchanging files between your Windows Host and the virtual Machine Ubuntu. In this directory I usually paste the compiled kernel for further use under Win7 (making the CWM update ZIPs).
Just note that you should have a dual/quadcore CPU strong enough to host the linux and compile the kernel in an acceptable time (usually it takes me 1-2 minutes for complete kernel compilation under virtual machine ubuntu using -j24 option on make).
Can u guys add a bit in this tutorial, example, at which file / folder need to edit for OCUV, add swap function, enable ext4, etc.. seriously like this thread..
Sent from my LG-P990 using XDA
ghadap said:
Can u guys add a bit in this tutorial, example, at which file / folder need to edit for OCUV, add swap function, enable ext4, etc.. seriously like this thread..
Click to expand...
Click to collapse
As the topic of this thread is just how to get the stock kernel compiling I won't step into modifying it. Please open a separate thread for that.
Small hints though, OCUV requires deeper code changes, swap and ext4 can just be enabled in the kernel config.
Hey,
I follow the guide, but ubuntu (11.04 64 bit) doesn't find the pack
Code:
apt-get install gcc-linaro
so I can't install the pack
Code:
apt-get install gcc-linaro-arm-linux-gnueabi
Edit: With Ubuntu 11.10, it works.
Has anyone compiled and booted a kernel successfully with this guide? Can't get mine to boot, so before I look any further I'd thought I'd check if anyone else has gotten a workable kernel out of it.
TrymHansen said:
Has anyone compiled and booted a kernel successfully with this guide? Can't get mine to boot, so before I look any further I'd thought I'd check if anyone else has gotten a workable kernel out of it.
Click to expand...
Click to collapse
Which version it shows "arm-linux-gnueabi-gcc --version"
If its 4.6.2?
Sent from my LG-P990 using Tapatalk
Stefan Gündhör said:
Ubuntu 11 is not the best choice though I currently use it myself. v11 can cause problems, especially when not compiling kernels but compiling Android ROMs.
Ubuntu 10 is the better choice.
Also there is a VMware Android Developer Environment available for download, providing nearly all the necessary tools for compilation preinstalled and set-up.
http://forum.xda-developers.com/showthread.php?t=1386918
You can compile your kernel directly in the virtual machine p.ex. on your Windows 7 PC. That's the way I do it for my kernel. VMware Player is available for free, so you can just run the image.
Also install VMware tools, so you can set up a directory for exchanging files between your Windows Host and the virtual Machine Ubuntu. In this directory I usually paste the compiled kernel for further use under Win7 (making the CWM update ZIPs).
Just note that you should have a dual/quadcore CPU strong enough to host the linux and compile the kernel in an acceptable time (usually it takes me 1-2 minutes for complete kernel compilation under virtual machine ubuntu using -j24 option on make).
Click to expand...
Click to collapse
Ubuntu 11.xx is still a good choise if you want to build ROMs it is very easy to set it up (it is just one step more then on 10.xx)
i also use ubuntu 11.10 and it is working fine for me with building android ROMs
and of course it can take 1-2 minutes but it also can take up to an hour for a kernel to compile
it all depends on how good your computer is
on my home computer i build a kernel in a matter of seconds (clobber builds)
but when i am at my girlfriend my build (also clobber) on her craptop will take up to 20 minutes
nice guide kosi2801!
spica1234 said:
Which version it shows "arm-linux-gnueabi-gcc --version"
If its 4.6.2?
Click to expand...
Click to collapse
Yap. This
Code:
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.2-14ubuntu2~ppa1) 4.6.2
to be specific.
Trymhanson, Try to downgrade with 4.5.3. 4.6.2 is causing this unable to boot issue which was not happening earlier with 4.6.1
try this
apt-get install gcc-4.5-arm-linux-gnueabi
apt-get install g++-4.5-arm-linux-gnueabi
rm /usr/bin/arm-linux-gnueabi-gcc
ln -s /usr/bin/arm-linux-gnueabi-gcc-4.5 /usr/bin/arm-linux-gnueabi-gcc
Thanks, that did it. I also had to change the -Ofast flag back to -O2 as -Ofast wasn't recognized by the 4.5.3 version. So now I'm thinking maybe the -Ofast flag was to blame, so I'll try a fresh 4.6.2 install with -O2. Thanks again.
TrymHansen said:
Thanks, that did it. I also had to change the -Ofast flag back to -O2 as -Ofast wasn't recognized by the 4.5.3 version. So now I'm thinking maybe the -Ofast flag was to blame, so I'll try a fresh 4.6.2 install with -O2. Thanks again.
Click to expand...
Click to collapse
no may be ofast is not to blame but 4.6.2. Ofast was introduced with 4.6.0 and doesnt work with < 4..6. 4.6.2 doesnt even work with o2. And IMHO kernel compiled with 4.5.3 ismore stable
Sent from my LG-P990 using Tapatalk
http://db.tt/jN4fU9Vz
Thisis my recent sr3r2 patch created against original v20Q sourceswith Full OTF V2.0. Anybody interested can use it. It will transform to fully noo oc version of SR3r2
It wont work with CM but only stock v20q
Sent from my LG-P990 using Tapatalk
For anyone interested, currently I'm building with
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.6.1-7ubuntu2) 4.6.1
For my usage patterns the kernel works pretty well, but YMMV.
Thanks spica for the updated patch!
kosi2801 said:
For anyone interested, currently I'm building with
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.6.1-7ubuntu2) 4.6.1
For my usage patterns the kernel works pretty well, but YMMV.
Thanks spica for the updated patch!
Click to expand...
Click to collapse
Use my recent cflags its most stable and used in sr3r2
As you are using gnueabihf relace mfloat-abi=softfp with mfloat-abi=hard
Sent from my LG-P990 using xda premium
spica1234 said:
Use my recent cflags its most stable and used in sr3r2
As you are using gnueabihf relace mfloat-abi=softfp with mfloat-abi=hard
Click to expand...
Click to collapse
Thanks for the tip. I already thought about that some time ago but forgot again. Gained some additional performance points
Can someone upload a compiled stock v20q kernel flashable zip? Thanks!

[KERNEL]Build Galaxy Tab 2 JB kernel from source

Building kernel
1. Download Sourcery G++ Lite 2010q1-202 for ARM GNU/Linux from https://sourcery.mentor.com/GNUToolchain/release1293?lite=arm, direct link https://sourcery.mentor.com/GNUTool...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 and save it in $HOME/android directory, extract it to /opt/toolchains/
Code:
$ sudo mkdir -p /opt/toolchains/
$ cd /opt/toolchains/
$ sudo tar -xjvf $HOME/android/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
2. Add /opt/toolchains/arm-2010q1/bin as your search PATH. Logout and back login to your desktop to activate your new search PATH
Code:
$ echo $'\nPATH=\"/opt/toolchains/arm-2010q1/bin:$PATH\"' >> $HOME/.profile
3. Download 3.0.31 kernel source for JB P3110 from http://opensource.samsung.com/ and save it in $HOME/android/espresso directory and extract it
Code:
$ mkdir -p $HOME/android/espresso/kernel
$ cd $HOME/android/espresso/
$ unzip P3110_JB_Opensource.zip Kernel.tar.gz
$ cd kernel
$ tar -xvzf ../Kernel.tar.gz
$ make mrproper
4. Apply all my patch and then load kernel config file
Code:
$ patch -p1 < ../01-configs.patch
$ patch -p1 < ../02-debug-info.patch
$ patch -p1 < ../03-graphics.patch
$ patch -p1 < ../04-governor.patch
$ patch -p1 < ../05-scheduler.patch
$ patch -p1 < ../06-overclock.patch
$ patch -p1 < ../07-exfat.patch
$ make ARCH=arm android_espresso_omap4430_r04_blackhawk_defconfig
5. If you want to change kernel config, download libncurses5-dev
Code:
$ sudo apt-get install libncurses5-dev
$ make ARCH=arm menuconfig
6. Build the kernel
Code:
$ make -j4 ARCH=arm
7. Save kernel and modules
Code:
$ mkdir ../espresso-kernel
$ cp arch/arm/boot/zImage ../espresso-kernel
$ find . -type f -name *.ko -exec cp {} ../espresso-kernel \;
Building PowerVR SGX 540 kernel modules
1. Download the sources
Code:
$ sudo apt-get install git-core
$ git clone git://git.omapzoom.org/repo/graphics/omaplfb.git -b omaplfb-1.9 --depth 1
$ git clone git://git.omapzoom.org/device/ti/proprietary-open.git -b d-jb-mr1-release --depth 1
2. Build pvrsrvkm kernel module
Code:
$ tar -xvzf proprietary-open/omap4/sgx_src/eurasia_km.tgz
$ rm -rf eurasia_km/eurasiacon/binary*
$ export KERNELDIR=$HOME/android/espresso/kernel
$ cd eurasia_km/eurasiacon/build/linux2/omap4430_android/
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- TARGET_PRODUCT="blaze_tablet" BUILD=release TARGET_SGX=540 PLATFORM_VERSION=4.0
$ cp ../../../binary2_540_120_omap4430_android_release/target/pvrsrvkm_sgx540_120.ko ../../../../../espresso-kernel/
3. Build omaplfb kernel module Not needed, omaplfb now integrated into kernel by 03-graphics.patch
Code:
cd ../../../../../omaplfb/omaplfb_linux
export TARGET=omap4460
export PVRKMDIR=$HOME/android/espresso/
make clean
make
cp omaplfb_sgx540_120.ko ../../espresso-kernel/
cd ../../
4. Strip all kernel modules if needed
Code:
$ arm-none-linux-gnueabi-strip --strip-unneeded espresso-kernel/*.ko
Credits:
Linux, Google, Samsung, omapzoom.org, gokhanmoral, codeworkx, cmenard
{
"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"
}
Leave this 3.0.8 kernel info just for historical purpose:
I try to build Galaxy Tab 2 kernel from source for stock 4.0.4 firmware but no luck so far.
Source from http://opensource.samsung.com/ without modification, using the latest Sourcery G++ Lite: boot failed!
Souce from Samsung without modification, using Sourcery G++ Lite 2010q1-202: kernel boot but no hardware accelerated video, camera and video not working!
Source from codeworkx without modification: kernel boot but incompatible pvr driver, stuck on Samsung logo!
Source from codeworkx without modification, vendor blob updated: kernel boot but unstable graphics, gallery, camera and video not working!
Source from codeworkx, pvr driver revert back to Samsung source: kernel boot but no hardware accelerated video, camera and video not working!
Source from codeworkx, pvr driver revert back to tuna ICS source, using tuna ICS vendor blob: kernel boot but no hardware accelerated video, camera and video not working! Better 3D graphics performance.
UPDATE:
Soft decoding video player (MoboPlayer) work.
UPDATE 2:
Found the problems! libion.so and libtiutils.so not compatible to the old kernel source. Thanks for codeworkx, tracing his work on CM9 point me out to the proprietary libraries.
Click to expand...
Click to collapse
When you compile a kernel, some drivers should have also been compiled and their locations should have been displayed on the console. You should copy those drivers to a proper location, I copied those .ko files to /lib/modules of the ramdisk when compiling a P3110 kernel.
Sent from my GT-P3110
heihei_ivan said:
When you compile a kernel, some drivers should have also been compiled and their locations should have been displayed on the console. You should copy those drivers to a proper location, I copied those .ko files to /lib/modules of the ramdisk when compiling a P3110 kernel.
Sent from my GT-P3110
Click to expand...
Click to collapse
Yes.
Conclusion:
Using Galaxy Nexus PowerVR kernel driver and blob build [email protected], we got better 3D performance on stock 4.0.4 firmware but lost hardware accelerated video (base on Antutu result: 3D = ~1030, fps 40-50). Video failed to play, camera failed to open. So, the best kernel for user experience (slower 3D but smooth 2D) is 3.0.8 from 4.0.4 firmware for now.
Now I'm sure, Samsung has been making changes in the 3.0.8 kernel for ICS 4.0.4 but have not released it to the public. Please help me to write a petition for Samsung since my English not good enough :crying:
Last night I tried to rebuild the kernel from source (again) and this time set the kernel version exactly same as stock 4.0.4 kernel (3.0.8-583493-user). Using kernel source from Samsung, codeworkx's patch applied except tuna pvr driver patch. Keep the stock kernel 3.0.8-583493-user modules in /lib/modules and then rebuild the boot image. Damn Samsung, hardware accelerated video still does not work! 3D performance slower than tuna ICS pvr driver but 2D experience as smooth as stock 4.0.4 firmware.
/system/vendor/firmware/ducati-m3.bin not loaded properly by the kernel. No rpmsg-omx0 and rpmsg-omx1 inside /dev .
Code:
I/OMXCodec( 2293): [OMX.TI.DUCATI1.VIDEO.DECODER] AVC profile = 100 (High), level = 32
E/OMXCodec( 2293): set buffer size variable to : 1572864
I/OMXCodec( 2293): [OMX.TI.DUCATI1.VIDEO.DECODER] video dimensions are 1280 x 720
I/OMXCodec( 2293): [OMX.TI.DUCATI1.VIDEO.DECODER] Crop rect is 1280 x 720 @ (0, 0)
I/OMXCodec( 2293): !! Change the I/P buffer size to 1572864 !!
D/DOMX ( 2293): ERROR: userspace cachable mapping of ION buffers returned error
E/OMXNodeInstance( 2293): OMX_AllocateBuffer failed with error -2147479552 (0x80001000)
E/OMXCodec( 2293): allocate_buffer_with_backup failed
D/DOMX ( 2293): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001011 - Error returned from OMX API in ducati
D/DOMX ( 2293): ERROR: Error From ComponentDeInit..
ketut.kumajaya said:
Now I'm sure, Samsung has been making changes in the 3.0.8 kernel for ICS 4.0.4 but have not released it to the public. Please help me to write a petition for Samsung since my English not good enough :crying:
Click to expand...
Click to collapse
already done yesterday
Samsung response said:
SAMSUNG OSRC COMMENTS DELIVERY NOTIFICATION]
♦ classification : Mobile Phone ♦
♦ model name : GT-P5100 ♦
Dear Customer,
Thank you for your interest in our product.
We are now in the process of reviewing your inquiry.
We will let you know a reply to this issue soon.
Sincerely yours,
----- Original Message -----
Hello Sir/Madam,
You have kindly supplied the kernel/software sources for the P31xx/P51xx series, but with the latest software update to 4.0.4 we cannot use this source to compile kernels for our devices.
Please supply me/us (|reply will, if you give permission therefor, be published on the XDA forums to help other developers with the same issue)| with instructions how to compile for 4.0.4/updated sources.
Thanks in advance for your reply,
John Simons
Samsung Open Source Release Center
http://opensource.samsung.com
Click to expand...
Click to collapse
Solved!
Found the problems! libion.so and libtiutils.so not compatible to the old kernel source. Thanks for codeworkx, tracing his work on CM9 point me out to the proprietary libraries.
ketut.kumajaya said:
Found the problems! libion.so and libtiutils.so not compatible to the old kernel source. Thanks for codeworkx, tracing his work on CM9 point me out to the proprietary libraries.
Click to expand...
Click to collapse
so you gonna release the kernel?
gabriel1997 said:
so you gonna release the kernel?
Click to expand...
Click to collapse
When it's ready. I will share 2 or 3 boot image with different setup.
gabriel1997 said:
so you gonna release the kernel?
Click to expand...
Click to collapse
I've shared my work on http://forum.xda-developers.com/showthread.php?t=1855700 .
4.0.4 sources available at OSRC.
Firts post updated. The sort stories how to build JB 4.1.1 3.0.31 kernel!
Build JB 3.0.31 kernel instructions in the first post updated.
First post updated!
R: [KERNEL]Build Galaxy Tab 2 JB kernel from source
ketut.kumajaya said:
First post updated!
Click to expand...
Click to collapse
You really did an excellent job with TW kernel.
Is it possible for you to compile an updated kernel for CM10.1?
Stock CM10.1 kernel does not support overclock.
cmenard AOKP kernel works well with CM10.1, and it supports both CPU and GPU OC, but it is based on the old source, with 690mb available, compiled for 4.1.2
It would be awesome if you could update one of those 2 kernels.
First page updated, including the patch!
- omaplfb now integrated into kernel
- overclock code updated, lock CPU @ 1.008GHz on boot
Hey guys are there some existing cisf module to mount cifs and nfs partition on the Galaxy Tab 2 3110?
I would like to mount my share (not for copy) but for directly playing movies. I did with some old pads but i don't know if this module are available for the Tab 2
Monfro said:
You really did an excellent job with TW kernel.
Is it possible for you to compile an updated kernel for CM10.1?
Stock CM10.1 kernel does not support overclock.
cmenard AOKP kernel works well with CM10.1, and it supports both CPU and GPU OC, but it is based on the old source, with 690mb available, compiled for 4.1.2
It would be awesome if you could update one of those 2 kernels.
Click to expand...
Click to collapse
May be after my not started yet dual boot system finish
pecana said:
Hey guys are there some existing cisf module to mount cifs and nfs partition on the Galaxy Tab 2 3110?
I would like to mount my share (not for copy) but for directly playing movies. I did with some old pads but i don't know if this module are available for the Tab 2
Click to expand...
Click to collapse
KK-Boot has it.
First page updated, kernel source and patch.

[KERNEL][exp: (3.1.10) #5] Firtecy Kernel - a modified Kowalski Kernel

This is an EXPERIMENTAL Kernel that continues the work of @pengus77, but with some additions i make. That means a huge thank to pengus77! Please check his thread http://forum.xda-developers.com/showthread.php?t=2097788
This kernel is completely based on his latest release.
This kernel only supports newbl and will only work on roms with 3.1 support (these are atm only 4.4 (aka KitKat) Roms and tonyps TheRom that is compatible with the 3.1 kernel
Features:
Features from the kowalski kernel:
3.1.10 Kernel Version
bcmdhd wifi driver
Dynamic FSync
Overclock to 1.5 GHz (Not all phones work well with 1.5 Ghz!)
Undervolting
MultiCore Sched PM
Auto Hotplug
Fast charge
Wifi PM
and many more ...
Features added by me:
PKSM as enhanced KSM module
Built in ZRAM Modul (that makes it possible to use the android default zram solution)
Possibility to use deferred_timer for (P)KSM
0, 16 or 32 MB Ramhack
Support for extra free kbytes tunable (more a ROM dev feature)
Custom vibration force/strength through sysfs
120MHz and 168 MHz frequencies for more battery savings during wakelock
Known bugs:
Camera Bug
Gyro does not work properly
If you want to report a new kernel bug, you must describe your problem in detail, post your kmsg and last_kmsg (if available) (you can found them under /proc/kmsg and /proc/last_kmsg) otherwise the rule is: no log = no issue
Downloads:
This is more a personal kernel build. I have built these kernels for weeks for myself and used them in private. Now i just want to share them with you guys!
You can download the kernels here: https://s.basketbuild.com/devs/firtecy/p990/kernel/3.1/ They are labeled like this: firtecy_kernel_X-N.zip where X is either exp for an experimental kernel release and stable for a stable kernel and where N is the build number (this number is always incremental!)
Sourcecode:
You can find the sourcecode at github: https://github.com/Firtecy/kowalski/ the branch is exp. The config file is: "kowalski_defconfig"
The intention of this thread is to continue the 3.1 kernel development pengus started. Development related questions or discussions are appreciated
Have fun!
And to quote pengus77:
On a side note... i'm not really responsible if you decide to test it and your phone melts... right?
Thanks to:
@hjunii for bringing up 3.1 Kernel
@pengus77 for the kowalski kernel
XDA:DevDB Information
Firtecy Kernel - a modified Kowalski Kernel, Kernel for the LG Optimus 2x
Contributors
Firtecy, pengus77, hjunii, djnoxd
Kernel Special Features:
Version Information
Status: Beta
Current Beta Version: 3.1#5
Beta Release Date: 2014-08-25
Created 2014-10-31
Last Updated 2014-10-31
Changelog:
firtecy_kernel_exp-5 - 25.8.2014
Added intellactive governor (thanks to @faux123) and powersave
Some bug fixes
Added sync framework and exfat support (but not active for the moment)
Added a "kowalski touch driver" and dt2w files (since they are not stable enough for now, they are disabled)
The reason why I disabled those things is that I didn't had the time to test them. If you want to test them you have to build your own version. Especially for other developers that can be interesting.
Click to expand...
Click to collapse
firtecy_kernel_exp-4 - 25.6.2014
minor updates/fixes from other kernels
Added the min screen on freq back
Added a sysfs attribute to change the min screen on freq
when disabling pksm, it will be disabled completely
Screen on min freq
If your screen is on, this frequency is the lowest that will be used. If your screen goes off for whatever reason the cpu will go to the normal min frequency.
Note: It seems like 120MHz and 168MHz are stable even for screen on, but since there was the question if i can add it, here you go:
How to change the value:
Code:
echo [value] > /sys/module/cpu_tegra/parameters/cpu_screen_on_min_cap
You have to use a value that is in the frequency table, but you have to echo the frequency in KHz, so 120MHz -> 120000KHz:
Code:
echo 120000 > /sys/module/cpu_tegra/parameters/cpu_screen_on_min_cap
This option does not stick after a reboot
According to @BS86 this release should be more stable than exp3 and thanks for testing!
Click to expand...
Click to collapse
firtecy_kernel_exp-3 - 13.6.2014
tons of updates to zram/zcache (picked from faux123 tegra kernels)
crypto: added optimized AES and SHA1 routines
added permission checker for binder IPC
tegra video driver updates
Fixed the voltage table -> all values below 770 MHz are not supported by the regulator chip (thanks to all who helped researching! )
Click to expand...
Click to collapse
firtecy_kernel_exp-2 - 8.6.2014
Added the possibility to change the vibration force (or vibration strength)
Added 120MHz and 168MHz as cpu frequencies
Enabled 600 mV as lowest undervolting value (undervolting is very dangerous if you go too low! Better stay at defaults)
Fixed a nvidia or lg cpu derp.
For security reasons it is not possible that the cpu will go underneath 216MHz when screen is on!
Option to use: No ramhack, 16Mb Ramhack or 32 Mb Ramhack!
Vibration force:
to change the vibration force echo a number between 0 and 127 to /sys/module/tspdrv/parameters/vibration_force. Where 127 is the highest and the default. 20 seems to be the last noticeable value.
Code:
echo [force] > /sys/module/tspdrv/parameters/vibration_force
This option does not stick after a reboot. Rom support will be available (hopefully) soon. I'm preparing a patch for tonyps Rom, so that it is possible to change it in the Rom settings.
120 and 168Mhz:
These values are useful for the case where the phone helds a wake lock. This means because of the wake lock it won't enter deepsleep. The phone would run at 216MHz even if it isn't needed. Running at 168Mhz or even 120MHz should result in a better battery life.
If you experience any problems, try to raise the voltage at this frequencies to a higher value and test again. If it is still unstable report it (with a description of the problem) and change the minimum frequency to 216Mhz.
Click to expand...
Click to collapse
firtecy_kernel_exp-1 - 1.6.2014
Initial release
Base source: kowalski kernel
Added built in ZRam (no need to use zram.ko for longer)
Added PKSM as replacement for ksm (http://code.google.com/p/pksm/)
Enabled deferred timers for pksm and ksm
Notice: Since there is no ksm available, but pksm you will not find the options for ksm in any app. All configurations are no longer under: /sys/kernel/mm/ksm/ , but under: /sys/kernel/mm/pksm/
To deativate pksm run this command as root:
Code:
echo 0 > /sys/kernel/mm/pksm/run
This option does not stick after a reboot
Click to expand...
Click to collapse
How to build your own kernel:
You need a Linux PC with either 32 or 64Bit. I'm using Linux Mint Debian Edition 64Bit. And you will need the following packages:
build-essential kernel-package libncurses5-dev bzip2
For example to install them run:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
Hint: If you run into troubles with installing packages, check this post
1. Create a new directory for your kernel building (for example: ~/kernel_p990)
Code:
mkdir ~/kernel_p990
2. cd to your kernel dir
Code:
cd ~/kernel_p990
3. Run this command to download the source code for compiling:
Code:
git clone https://github.com/Firtecy/kowalski
4. Now we need to download the toolchain for compiling: Download it from here: http://www.linaro.org/downloads/ under the Bare-Metal section. It is labeled GCC ARM Embedded. Version: 4.7-2013.q3 ; Release: 13.11
5. Now extract the toolchain to a new dir, for example: ~/kernel_p990/toolchain
6. Now we have to define some values for the build enviroment:
Set the CROSS_COMPILE var to your path where you have downloaded your toolchain. For example:
Code:
export CROSS_COMPILE=~/kernel_p990/toolchain/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-
Notice at the end you find this prefix: arm-none-eabi- this is not a dir, but the prefix for all files inside the bin directory(for example: arm-none-eabi-gcc)
7. Set the architecture (processor architecture) for which the kernel should be build. So in our case arm:
Code:
export ARCH=arm
and
Code:
export SUBARCH=arm
8. The next step defines the configurations for the kernel (in this case the configuration is named kowalski_defconig)
Code:
make kowalski_defconfig
Notice: this takes the configuration from the file located under arch/arm/configs and will write it to .config
9. Now we can finally build the kernel :victory: Run:
Code:
make
You will find the kernel under: arch/arm/boot/zImage. You just have to copy the zImage and replace the one found in the flashable zip (e.g. my downloads) under kernel/zImage with your own.
Troubleshooting:
Before you can build or run any from step 8 or 9 you have to make sure that all three vars are set correctly (so ARCH, CROSS_COMPILE and SUBARCH). You can check it by running:
Code:
echo $ARCH
for ARCH (for CROSS_COMPILE and SUBARCH it is the seem, but you have to change the name)
If they are not set correctly repeat step 6 and 7.
If you get a compile error first try to run:
Code:
make clean
and try to build the kernel again.
How to diff 2 files or directories in linux
If you are running linux and have two files on your computer and you want to find the differences you can run the diff command in the terminal.
Let's say you have a file "hjunii/traps.c" and "kowalski/traps.c", this is how you compare them:
Code:
diff -u hjunii/traps.c kowalski/traps.c
The command will compare both and will print an output to the terminal that will be similar to this:
Code:
@@ -27,6 +27,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/sched.h>
+#include <linux/slab.h>
#include <linux/atomic.h>
#include <asm/cacheflush.h>
@@ -483,25 +484,38 @@
static inline void
do_cache_op(unsigned long start, unsigned long end, int flags)
{
- struct mm_struct *mm = current->active_mm;
- struct vm_area_struct *vma;
-
if (end < start || flags)
return;
+ return flush_cache_user_range(start, end);
+}
+
+static inline int
+do_cache_op_iov(const struct iovec __user *uiov, unsigned long cnt, int flags)
+{
+ int i, ret = 0;
+ unsigned long len = cnt * sizeof(struct iovec);
+ struct iovec *iov = kmalloc(len, GFP_KERNEL);
- down_read(&mm->mmap_sem);
- vma = find_vma(mm, start);
- if (vma && vma->vm_start < end) {
- if (start < vma->vm_start)
- start = vma->vm_start;
- if (end > vma->vm_end)
- end = vma->vm_end;
+ if (iov == NULL) {
+ ret = -ENOMEM;
+ goto out;
+ }
- up_read(&mm->mmap_sem);
- flush_cache_user_range(start, end);
- return;
+ if (copy_from_user(iov, uiov, len)) {
+ ret = -EFAULT;
+ goto out_free;
}
- up_read(&mm->mmap_sem);
+
+ for (i = 0; i < cnt; ++i) {
+ unsigned long start = (unsigned long __force)iov[i].iov_base;
+ unsigned long end = start + iov[i].iov_len;
+ do_cache_op(start, end, flags);
+ }
+
+out_free:
+ kfree(iov);
+out:
+ return ret;
}
/*
@@ -550,6 +564,10 @@
do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2);
return 0;
+ case NR(cacheflush_iov):
+ do_cache_op_iov((const struct iovec __user *)regs->ARM_r0,
+ regs->ARM_r1, regs->ARM_r2);
+
case NR(usr26):
if (!(elf_hwcap & HWCAP_26BIT))
break;
Each line starting with a "+" are lines that were added, for example:
Code:
+#include <linux/slab.h>
On the other side lines starting with a "-" are lines that were deleted, for example:
Code:
- struct mm_struct *mm = current->active_mm;
A line like the following should just show you were you find the changes:
Code:
@@ -550,6 +564,10 @@
with the following syntax:
Code:
@@ -[line number in 1. file],[number of lines that were printed from 1.file] + [line number in 2. file], [number of lines that were printed from 2.file] @@
But the basic syntax is the following:
Code:
diff -u [base file] [file containing the changes you want to display]
You can also compare whole directories!
ProTip: Install the program "colordiff". It will color the console output, that means the output is more readable!
Syntax:
Code:
diff -u [base file] [file containing the changes you want to display] | colordiff
Example:
Code:
[COLOR="Plum"]@@ -1,8 +1,8 @@[/COLOR]
[COLOR="Red"]-VERSION = 2
-PATCHLEVEL = 6
-SUBLEVEL = 39
-EXTRAVERSION = .4
-NAME = Flesh-Eating Bats with Fangs[/COLOR]
[COLOR="RoyalBlue"]+VERSION = 3
+PATCHLEVEL = 1
+SUBLEVEL = 10
+EXTRAVERSION =
+NAME = "Divemaster Edition"[/COLOR]
Nice New kernel!
will try that one as soon as possible.
thanks for the work.we dont let the 2x die!
Will this work on Mokee rom?
If you don't understand the subconscious you will always bump into it calling it fate...
themistoklisv said:
Will this work on Mokee rom?
If you don't understand the subconscious you will always bump into it calling it fate...
Click to expand...
Click to collapse
Which kernel is included by default in the Rom or can you paste a link?
Gesendet von meinem LG-P990 mit Tapatalk
[email protected]#126
If you don't understand the subconscious you will always bump into it calling it fate...
themistoklisv said:
[email protected]#126
If you don't understand the subconscious you will always bump into it calling it fate...
Click to expand...
Click to collapse
Then I am sorry, but it is not compatible.
The 3.1 kernel differs too much to be compatible with ROMs that are build for an 2.6 kernel
Gesendet von meinem LG-P990 mit Tapatalk
Oh my God, amazing! Finally some serious development! Great work Firtecy. Time to bust CM11 back on my device and try this ramhacked wonder
Oh...i see...this why no ksm settings
Btw...i would suggest a higher ramhack like 32mb like m1 ramhack...but this kernel works great so far...just classic low ram problem exist (well...obviously) need to set an aggresive value (i'm using swap without zram)
Do i need to post a logcat?
Sent from my LG-P990
Will this work with cm 10.1?
Wysłane z mojego LG-P990 przy użyciu Tapatalka
No, it has a different wifi driver, sorry for my english
Sent from my ME173X using XDA Free mobile app
Okey
Wysłane z mojego LG-P990 przy użyciu Tapatalka
The first change:
Okay since there was the wish that there should be a 32 MB ramhack version and the poll showed the same i built one. You can find it at my basketbuild https://s.basketbuild.com/devs/firtecy/p990/kernel/3.1/.
So the 32 MB Ramhack version is labeled: firtecy_kernel_exp-1_32MB-RH.zip and the previous one is labeled: firtecy_kernel_exp-1_16MB-RH.zip
I have flashed it and in the settings app, I had 372MB available (Settings > About)
The second change:
Since i have been asked to explain how to build my kernel from source code i wrote a small how to in the third post of the thread. Check it and maybe try to build it for your own.
If you wish i can also write how to change the kernel by your own. (So add new stuff or something similiar)
Great job firtecy...downloading asap
--------------------++-
Very fluid ui with 32rh and with performance control app i can set lmk on boot (dunno..the one come with rom 0527 always reset after reboot)
So far...no bugs for me (except known bugs)
Btw i'm using swap only..no zram but zram works too (i turned it off)
Sent from my LG-P990
Would like to know if random reboot and phone always waking is a kernel related or rom?
Sent from my LG-P990 using Tapatalk 2
mkchan said:
Would like to know if random reboot and phone always waking is a kernel related or rom?
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
I haven't got random reboots or always waking phone in fact on 3.1 kernel there's a bug for waking phone (need press power button twice or thrice)
Maybe your memory full ocupied and still lot queued job to do...that's sometimes happen to me...that's why i need to set lmk a bit aggresive...
Well as dev always said...log or it's not happen
Sent from my LG-P990
Firtecy said:
How to build your own kernel:
You need a Linux PC with either 32 or 64Bit. I'm using Linux Mint Debian Edition 64Bit. And you will need the following packages:
build-essential kernel-package libncurses5-dev bzip2
For example to install them run:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
Click to expand...
Click to collapse
I have even had to install libc6-dev-i386 in my 64bit vbox image, then the make seems to have started working :good:
If you wish i can also write how to change the kernel by your own. (So add new stuff or something similiar)
Click to expand...
Click to collapse
+1 (if you don't mind and have time for it )
Thanks!
Thx for your dev. but can you build this kernel for su660?
나의 LG-P990 의 Tapatalk에서 보냄

[KERNEL] [UNIFIED] Anykernel

ANYKERNEL
espressowifi / espresso3g
Please respect the following 2 points
No feature requests!
Overclocked Kernel can be found here
NOTE:
This product is provided "as is" without any warranty. Use on your own risk.
I am not responsible for burned CPU or GPU.
Any kind of OC is really dangerous on Galaxy Tab2. While OMAP 4460 has a built-in temperature sensor, OMAP 4430 doesn't have one. Nothing stops it from overheating...
If you don't read and respect the OP, you accept to make a donation of 50$ to a charity of your choice!
​ [#WARRANTY]
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 i add them official to our kernel source (most of the time security bugfixes)!
Android 5.1 and Android 6.0
This Kernel works on all Android 5.1 and Android 6.0 Roms for espressowifi and espresso3g.
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.8
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)
espresso3g
lineage-11-20180131-2053-UNOFFICIAL-espresso3g.zip and newer
lineage-13.0_espresso3g-6.0.1-20180130-2211.zip and newer
lineage-14.1_espresso3g-7.1.2-20180131-1859.zip and newer
espressowifi
lineage-11-20180131-2033-UNOFFICIAL-espressowifi.zip and newer
lineage-13.0_espressowifi-6.0.1-20180130-2146.zip and newer
lineage-14.1_espressowifi-7.1.2-20180131-1818.zip and newer
OmniRom (unofficial)
espresso3g
omni_espresso3g-4.4.4-20180127-2337.zip and newer
omni_espresso3g-6.0.1-20180128-0312.zip and newer
omni_espresso3g-7.1.2-20180128-1319.zip and newer
espressowifi
omni_espressowifi-4.4.4-20180127-2310.zip and newer
omni_espressowifi-6.0.1-20180128-0251.zip and newer
omni_espressowifi-7.1.2-20180128-1254.zip and newer
SlimRoms (unofficial)
espresso3g
Slim-espresso3g-4.4.4.build.9.15-UNOFFICIAL-20180128-0125.zip and newer
Slim_espresso3g-6.0.1-20180128-2332.zip and newer
Slim_espresso3g-7.1.2-20180131-1617.zip and newer
espressowifi
Slim-espressowifi-4.4.4.build.9.15-UNOFFICIAL-20180128-0028.zip and newer
Slim_espressowifi-6.0.1-20180128-2308.zip and newer
Slim_espressowifi-7.1.2-20180131-1555.zip and newer
Unlegacy-Android:
All official Unlegacy-Android builds starting on 15th feburary use the default libion
Roms with new DDK
Slim6 , Slim7, OmniROM4, OmniROM 6, OmniROM 7 and LineageOS 11, LineageOS 13 and LineageOS 14.1 compiled after 01.03.2019
[#DONATETOME]
XDA:DevDB Information
(unified) Anykernel, Kernel for the Samsung Galaxy Tab 2
Contributors
Android-Andi, Ziyan
Source Code: https://github.com/Unlegacy-Android/android_kernel_ti_omap4/commits/3.0/common
Kernel Special Features: Testing before applying on our source official, CVE fixes
Version Information
Status: Testing
Created 2016-10-21
Last Updated 2020-05-02
Reserved
As requested, here's my setup to compile espresso kernel.
01.05.2020
Follow https://github.com/andi34/android_build-bot/blob/manifest/README.md and https://github.com/andi34/android_build-bot/blob/kernelcompile/README.md
What do you need
Kernel Source (you can get our latest kernel source on SlimRoms, OmniRoms or CyanogenMods github, "espresso10 kernel")
GCC ( https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8 )
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 (see 1. post, update for your tab2 needed)
build-gcc4.8.env:
Code:
[COLOR="Red"]export CROSS_COMPILE='/android/kernelcompile/arm-eabi-4.8/bin/arm-eabi-'[/COLOR]
export LDFLAGS=''
export CFLAGS=''
export SUBARCH=arm
export ARCH=arm
[COLOR="Red"]export STRIP=/android/kernelcompile/arm-eabi-4.8/bin/arm-eabi-strip[/COLOR]
alias 'stm'='$STRIP --strip-unneeded *.ko'
compile-espresso.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/espresso" 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
if [ "$VARIANTDEFCONFIG" = "*p*" ]; then
info "Import kernel config file: $DEFCONFIGNAME"
info "Import variant config file: $VARIANTDEFCONFIGNAME"
make O=$WORKINGDIR VARIANT_DEFCONFIG=$VARIANTDEFCONFIG $DEFCONFIGNAME
info "Change kernel configuration if needed using:"
info " make O=$WORKINGDIR menuconfig "
VARIANTDEFCONFIG=
else
info "Import kernel config file: $DEFCONFIGNAME"
make O=$WORKINGDIR $DEFCONFIGNAME
info "Change kernel configuration if needed using:"
info " make O=$WORKINGDIR menuconfig "
fi
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/system/lib/modules
cp $WORKINGDIR/arch/arm/boot/zImage $WORKINGOUTDIR/
find $WORKINGDIR/ -type f -name *.ko -exec cp {} $WORKINGOUTDIR/modules/system/lib/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..."
# we now use the default libion, our kernel was updated
make -j8 -C $PVRSAUCE/build/linux2/omap4430_android TARGET_PRODUCT="blaze_tablet" BOARD_USE_TI_LIBION=false 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/system/lib/modules/pvrsrvkm_sgx540_120.ko
mv $PVRSAUCE/binary2_omap4430_android_release/target/pvrsrvkm.ko $WORKINGOUTDIR/modules/system/lib/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/system/lib/modules
stm
info "####################"
info "# Done! #"
info "####################"
else
warn "####################"
warn "# FAILED! #"
warn "####################"
fi
cd $SAUCE
espresso-m.sh
Code:
#!/bin/bash
[COLOR="Red"]SAUCE=~/android2/kernelcompile
PVRSAUCE=~/android2/official/omap4/stable/pvr-source/eurasiacon
KERNELSOURCE=~/android2/official/kernel/android_kernel_ti_omap4[/COLOR]
TOOLCHAIN="gcc4.8"
DEFCONFIGNAME=espresso_defconfig
WORKINGDIR=$SAUCE/out/$DEFCONFIGNAME
WORKINGOUTDIR=$SAUCE/$DEFCONFIGNAME-bin
. `dirname $0`/compile-espresso.sh
espresso-k.sh
Code:
#!/bin/bash
[COLOR="Red"]SAUCE=~/android2/kernelcompile
PVRSAUCE=~/android2/official/omap4/stable/pvr-source/eurasiacon
KERNELSOURCE=~/android2/official/kernel/android_kernel_ti_omap4[/COLOR]
TOOLCHAIN="gcc4.8"
DEFCONFIGNAME=espresso_kitkat_defconfig
WORKINGDIR=$SAUCE/espresso-kitkat
WORKINGOUTDIR=$WORKINGDIR-bin
. `dirname $0`/compile-espresso.sh
Reserved
DEVICE SPECIFIC ANYKERNEL
Edit 02.05.2020
Latest device specific AnyKernel-Zip can be found here:
https://forum.xda-developers.com/showpost.php?p=79259009&postcount=204
Please note: our kernel detects your Tab2 variant at boot and chooses the right driver and config for your device! In some cases (e.g. if the mainboard or the screen got replaced) your device variant isn't detected right and it will use wrong driver!
I am not sure how many user are affected, but in such case we can skip the intelligent board detection and hardcode the variant.
Attached device specific kernel should work on all unified espresso/espressowifi & espresso3g roms from Android 5 up to Android 7, for Android 4 Roms please use the "kitkat" version.
Feel free to buy me a coconut water if it helped you to keep your Tab still, after many years, almost up to date.
UPDATE AnyKernel-2016-10-21
- Update the ext-csd.rev check for eMMC5.1 (fixes emmc detection for some tab2)
- CVE-2016-5195
- CVE-2016-6828
- CVE-2016-7042
thanks andi.
working nice on my own builded aosp-6.0 10/16
Some more CVE fixes applied on top of previous kernel:
CVE-2014-8173
CVE-2014-7970
CVE-2014-5206
CVE-2016-0819
CVE-2015-8830
CVE-2014-9715
I added a CVE overview on 2nd post.
Edit:
Added a KitKat version
Hi Android-Andi.
Has this kernel the OPTION (or plan to enable) to overclock ?
Thanks.
galoneta said:
Hi Android-Andi.
Has this kernel the OPTION (or plan to enable) to overclock ?
Thanks.
Click to expand...
Click to collapse
No as mentioned in first post! Move out of this thread if you are not able to read first post.
~ All my work, news etc. on http://andi34.github.io ~
Guys, if you don't read the OP the thread will be closed and you can take care about a security patched kernel yourself.
Source is available on github, add everything you miss by your own and stop spamming this thread!
Edit: everyone not accepting the forum rules will be reported!
Edit2: Thanks @ Moderator for the post remove / thread clean
~ All my work, news etc. on http://andi34.github.io ~
SORRY!
I know its off topic but you should read this
http://www.xda-developers.com/9-yea...-dirty-cow-can-root-every-version-of-android/
Emo Darkemotion said:
SORRY!
I know its off topic but you should read this
http://www.xda-developers.com/9-yea...-dirty-cow-can-root-every-version-of-android/
Click to expand...
Click to collapse
OP states that its already patched
Android-Andi said:
"CVE-2016-5195" https://github.com/Unlegacy-Android/...b19311a9089b77
Click to expand...
Click to collapse
Emo Darkemotion said:
SORRY!
I know its off topic but you should read this
http://www.xda-developers.com/9-yea...-dirty-cow-can-root-every-version-of-android/
Click to expand...
Click to collapse
It is quite funny making noise about a bug which existed 9 years now.
1. It is fixed on my kernel as mentioned on 2nd post (wonder why i spend time doing it)
2. I don't see an issue on custom roms (can be fixed within 2 minutes), i would worry about android by your Manufacturer (on all devices).
On android we change the wheel: no central updates like on linux or windows - it is up to your manufacturer to update your device and there's a lot of security issues fixed by google on android every month (and sure, some kernel side too). How many stock updates you get? 1, maybe 2 within 1 year and support drops after that.
To be true: i am not sure if my next device is an android device:
On my g4 i am on stock rom and LG cares 0 about it (Security patch level 2016-07-01... I waited 6 or 7 month to get that update and it was already 1 month behind).
If manufacturer don't care about theire flagships, what else can we do? Flashing custom roms? Right works, but on my daylie driver i don't like to be a flashahollic... I am more thinking about using a different OS.
You should think about my words and don't care about a already fixed security issue
~ All my work, news etc. on http://andi34.github.io ~
Hi Andy,
First of all, many thanks for all your work! I´m using your ROMs and kernels since Slimkat and all are great!
I also do my best colaborating with the translating team of CyanogenMod and SlimRoms (Brazilian Portuguese).
But now I would like to compile a kernel bymyself, to patch the CVEs, changes I like, etc.
If you have time, can you post here the steps you do to compile the Anykernel?
Don´t need to waste time explaining the things, just post the step-by-step commands (git clone, makes, ADBs, etc) and I will do my research, ok?
Thanks in advance and greetings from Brazil!
AranhaEscarlate said:
Hi Andy,
First of all, many thanks for all your work! I´m using your ROMs and kernels since Slimkat and all are great!
I also do my best colaborating with the translating team of CyanogenMod and SlimRoms (Brazilian Portuguese).
But now I would like to compile a kernel bymyself, to patch the CVEs, changes I like, etc.
If you have time, can you post here the steps you do to compile the Anykernel?
Don´t need to waste time explaining the things, just post the step-by-step commands (git clone, makes, ADBs, etc) and I will do my research, ok?
Thanks in advance and greetings from Brazil!
Click to expand...
Click to collapse
Sure, i have nothing to hide i can upload my script next days. Busy on other stuff atm maybe send a small reminder if the script isn't added on 3rd post of this thread end of next week.
~ All my work, news etc. on http://andi34.github.io ~
Android-Andi said:
Sure, i have nothing to hide i can upload my script next days. Busy on other stuff atm maybe send a small reminder if the script isn't added on 3rd post of this thread end of next week.
~ All my work, news etc. on http://andi34.github.io ~
Click to expand...
Click to collapse
Oh and @Android-Andi just a small request , change the color of the text for ""CVE-XXXXXYYYY" DOES NOT AFFECT" because This colour is hard to read on the screen .
AranhaEscarlate said:
(...)
If you have time, can you post here the steps you do to compile the Anykernel?
Don´t need to waste time explaining the things, just post the step-by-step commands (git clone, makes, ADBs, etc) and I will do my research, ok?
(...)
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=69241933&postcount=3
Must be enough, everything else you need to read / find out yourself
iamashwin said:
Oh and @Android-Andi just a small request , change the color of the text for ""CVE-XXXXXYYYY" DOES NOT AFFECT" because This colour is hard to read on the screen .
Click to expand...
Click to collapse
Done, should be better now.
Android-Andi said:
http://forum.xda-developers.com/showpost.php?p=69241933&postcount=3
Must be enough, everything else you need to read / find out yourself
Click to expand...
Click to collapse
Thank you very much, Andy!!!
It´s more than enough!
Everything else, I will read documentation at the Internet, but this is a great starting point for me.
What kind ANY KERNEL is important when you can not clocked CPU and graphics
Kutuzov666 said:
What kind ANY KERNEL is important when you can not clocked CPU and graphics
Click to expand...
Click to collapse
Dont use it if you dont want it!
It is for the kind of people who want a secure kernel ... more secure than the one given by samsung (I dont remember the last time they sent us a patched kernel update ...or did they !)
Nearly all the device I own are waaaay too insecure (be it my router (its also a linux system) , phone Landline TV ...) except for my 4 year old tab all thanks to Andi ! Respect it
Besides OP is doing all this as a hobby and not for your or my benefit.
Stop spaming this thread ! Please READ
Please respect the following 2 points
No feature requests!
Overclocking will never be added here!
If you don't read and respect the OP, you accept to make a donation of 50$ to a charity of your choice!
Click to expand...
Click to collapse
PSS If you are satisfied with the answer please delete the message and so will I .Lets keep this thread clean.

Categories

Resources