FORUMS
Remove All Ads from XDA

TALU's custom kernel for LineageOS 16.0 with various features

105 posts
Thanks Meter: 125
 
By TALUAtXDA, Senior Member on 2nd November 2019, 03:32 PM
Post Reply Email Thread
Hello everyone,
I have been building my own kernels for myself for a while now. Recently, I have been implementing features in my kernel that many people will find useful. Since there is interest in my kernel, I have decided to release it for everyone to use.

I am not in any way responsible for any damage you happen to cause to your phone trying to use my kernels features (for example, overvolting). Be careful!
Downloads:
I have made 3 boot images, a boot image for no Magisk, one for Magisk Stable and one for Magisk Canary:
Latest version:
No Magisk: TALUs_Custom_Kernel_i9100_LOS_16_20191130_No_Magis k.imgg
Magisk Stable: TALUs_Custom_Kernel_i9100_LOS_16_20191130_Magisk_S table_v20.1_ramdisk.img Magisk version: 20.1
Magisk Canary: TALUs_Custom_Kernel_i9100_LOS_16_20191130_Magisk_C anary_v20.2-11b7076a_ramdisk.img Magisk version: 20.2-11b7076a

Changelog:

Release 20191130:
  • Fix build warnings and remove unnecessary function argument for additional IO schedulers. Maybe improves stability of these schedulers. (Commit: 9679a484951a031be188bdd91575e17a42f562fa)
  • mach-u1: actually allow minimum voltage to be set to 0.7V and maximum to 1.6V - CPU voltage control implementation has always supposed to allow undervolts to 0.7V and overvolts to 1.6V, but mach-u1 never allowed these voltages. Overvolt at your own risk! (Commit: 183f0f328e148bb396c024d1c6ffa19555463462)
  • lineageos_i9100_defconfig: use generic Bluetooth stack instead of mgmt stack. Please test this Bluetooth stack to make sure it is fully working. I have currently tested file transfer and Bluetooth audio. (Commit: 9889d567274957471bf2343d2c0186fea27a701f)
  • [Prebuilt images] Change LOCALVERSION to 3.0.101-lineage-g8800d0c.
  • Add some commits relating to tmpfs, mm and kconfig.h. These commits were accidentally committed by @rINanDO to the lineage-16.0 branch, and then removed as they were intended for the lineage-17.0 branch. I have reverted the commits that don't work and kept the commits that do work as they fix or add things and nothing else breaks.
Old releases:

Release 20191117:
  • Implement Intellidemand, HYPER, ZZMOOVE, NeoX, darkness and nightmare CPU governors from DorimanX from Saber/gsstudios for Nougat (https://github.com/gsstudios/Dorimanx-SG2-I9100-Kernel). All pre-existing CPU governors will work exactly the same as before. (Commit: 2a892719e0e124e2aae15c7b000b4ae10df37293)
  • Implement BFQ version v7r8, SIOplus, zen and tripndroid IO schedulers. BFQ scheduler is straight from original source code in patch files with minimal modifications, zen and SIOplus schedulers come from the DorimanX kernel for Jellybean that are slightly modified to run on our kernel and tripndroid scheduler comes from the DorimanX kernel from Saber/gsstudios for Nougat also with modifications to run on our kernel. All pre-existing IO schedulers will work exactly the same as before. (Commit: 9bccb9589d353b8994c50f24de708a1d2bb99dd7)
  • Remove unnecessary earlysuspend.h. Our kernel doesn't have earlysuspend, earlysuspend.h is unnecessary. (Commit: 25b2dd54676724b46aa27edab7e5e7254051ffc6)
Release 20191102:Release 20191030 from https://forum.xda-developers.com/sho...postcount=849:
Please don't use this release if you want to use exFAT! This release has an exFAT bug relating to truncating which causes kernel panics that were fixed in release 20191102.
  • Initial release.

Kernel features:
All commands mentioned here must be run as root.
exFAT support:
UPDATE: @rINanDO has now applied my commits for native exFAT support in the
standard kernel for LineageOS 16.0. ExFAT can now be used with the kernel in the ROM installation zip or Magisk images made by @rINanDO. You no longer have to use my kernel if you were only using it for native exFAT support.

exFAT support is available via a slightly modified implementation of this in-kernel, native driver: https://github.com/arter97/exfat-linux The modifications are required as the kernel we are using has many backports from newer kernels and this driver selects what code is used based on kernel version. The result is features that the kernel no longer has are selected and there are build errors. With a SD card formatted as exFAT, you can now have files that are bigger than 4GB in size and with better performance than FAT32. exFAT support was already available via a fuse implementation which is not favorable due to bad performance. Implementing the exFAT driver in-kernel means that it is used instead of the fuse implementation. NTFS support is also enabled with CONFIG_NTFS_FS=y but that may be a fuse driver.

Overclocking to 1.4GHz:
By default, this kernel is overclocks the CPU to 1.4GHz. 1.4GHz should be stable on all Exynos 4210 CPUs and was the stock frequency on the very first Note phone which also used an Exynos 4210 CPU. However, if you don't want to use the overclock for slightly lower temperatues, you can set the clock speed back to 1.2GHz using a kernel manager like Kernel Adiutor or by using this echo command in a terminal:
Code:
echo "1200000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Even if you want to set the clock speed back to 1.2GHz, I would suggest you undervolt the CPU to get lower temperatures. Try undervolting by -5mV at a time every few hours and see what's stable. I can do -65mV on both of my S2s, however, how far you can undervolt varies depending on how well your CPU was manufactured.

CPU voltage control:
WARNING: Overvolting can damage your CPU and I would not suggest you do it. It shouldn't be necessary. Whatever you do, I am not in any way responsible for whatever you happen to do and what damage you cause to your phone. You should only use this feature for undervolting.
CPU voltage control is implemented in this kernel via a typical SysFS interface. You can use either a kernel manager to control CPU voltage or use an echo command in a terminal:
Code:
echo "<1.4GHz voltage> <1.3GHz voltage> <and so on....>" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
An example for this command is:
Code:
echo "1215 1190 1165 1115 1065 1015 965 915 915 890 890 890 865 865" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
There is also another interface for another unit for measuring voltage. That command is for millivolts. Replace "UV_mV_table" with "UV_uV_table" to control voltage using microvolts.

Charging current control and slightly higher charging current by default:
WARNING: if you decide to set a very high current and something gets damaged, such as something on the motherboard or your battery, you are responsible for the damage, not me.
Charging current control is implemented and is controllable using another typical SysFS interface. The interface can be controlled with milliamps (mA) using yet another typical SysFS interface:
Code:
echo "<AC current> <Miscellaneous current> <USB current>" > /sys/devices/virtual/misc/charge_control/charge_current
Kernel managers don't detect this feature, so the only way to control this is with that command. Also, the charging current for all AC, misc and USB is slightly higher than default. This means that we have better charging times and the battery temperature increase is very small. We are closer to USB specifications when charging on a USB port, too!

GPU clock speed and voltage control:
WARNING: You risk damaging your graphics chip if you set a clock speed or voltage that is too high. I am not responsible for any damage caused using this feature. I have only tested up to 330MHz, nothing more.
GPU clock speed and voltage control is implemented. This is controllable using yet another SysFS interface and is only controllable using an echo command once again.
Code:
echo "<Step0> <Step1> <Step2> <Step3" > /sys/devices/virtual/misc/gpu_<clock/voltage>_control/gpu_control
Replace "<clock/voltage>" with what you'd like to control. The clock speed is in MHz and the voltage is in uV (microvolts). The frequencies that are available for clock speed control are 54MHz, 66MHz, 108MHz, 160MHz, 200MHz, 267MHz, 330MHz, 400MHz, 440MHz and 520MHz. 267MHz is default for step 3 and 330MHz and anything above is overclocking.

A few additional CPU governors:
I have implemented a few additional CPU governors from DorimanX from Saber/gsstudios for Nougat (https://github.com/gsstudios/Dorimanx-SG2-I9100-Kernel) with some modifications for them to run on our kernel and also to remove anything related to earlysuspend as our kernel doesn't have earlysuspend. I couldn't implement the sleepy governor as it relies on earlysuspend. The governors added are Intellidemand, HYPER, NeoX, ZZMOOVE, nightmare and darkness. All governors that have already existed will work exactly the same as before. To change the CPU governor, you can either use a kernel manager or use a terminal and some echo commands (yet again...):
To check what governors are available, run:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
neox nightmare HYPER darkness zzmoove intellidemand conservative ondemand userspace powersave pegasusq performance
To set your desired governor, run this command replacing <governor> with a governor from the output of the first command :
Code:
echo "<governor>" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
To check what governor is set, run:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

A few additional IO schedulers:
I have implemented a few additional IO schedulers. The added schedulers are BFQ, zen, SIOplus and tripndroid. The implementation of BFQ is straight from original source code in patch files with minimal modifications that are available from https://algo.ing.unimo.it/people/pao...ns/3.0.0-v7r8/ or some mirrors that can be found by searching with your favorite search engine. Zen and SIOplus schedulers come from the DorimanX kernel for Jellybean (https://github.com/dorimanx/Dorimanx-SG2-I9100-Kernel/) that are slightly modified to run on our kernel. The tripndroid scheduler comes from the DorimanX kernel from Saber/gsstudios for Nougat (https://github.com/gsstudios/Dorimanx-SG2-I9100-Kernel) also with modifications to run on our kernel. I have attempted to implement the FIOPS IO scheduler but that appears to be difficult. I also didn't think implementing the FIFO IO scheduler would be any good as when I tried FIFO on DorimanX on LineageOS 14.1, apps would keep crashing with it, and it is a very uncommon scheduler. Changing the IO scheduler can be done using a kernel manager or more echo commands in a terminal:
To check available IO schedulers, run:
Code:
cat /sys/block/mmcblk0/queue/scheduler
noop deadline [cfq] row sio sioplus zen bfq tripndroid
To set your desired scheduler, run this command replacing <scheduler> with a scheduler from the output of the first command:
Code:
echo "<scheduler>" > /sys/block/mmcblk0/queue/scheduler
To check if a scheduler is set, you can run the first command and check to see if your desired governor has square brackets around it. To set a scheduler for the external MicroSD card, replace instances of "mmcblk0" with "mmcblk1".


Building the kernel:
Building this kernel requires an installation of a Linux distribution. If you have an installation with all dependencies installed (you can search for them yourself, the LineageOS build guides have what you need to install. Use a build guide for any device.), you can continue. The source code for what is used to build this kernel is here:
Kernel source code: https://github.com/TALUAtGitHub/andr...msung_smdk4412
galaxys2-common: https://github.com/TALUAtGitHub/andr...alaxys2-common
To get full sources, you can use @linusdan's manifests: https://github.com/linusdan/lineage_manifests The instructions for getting sources are all there. However, before you run repo sync, you must edit <sources_root>/.repo/local_manifests/roomservice.xml from this:
Code:
<project name="rINanDO/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="lineage-16.0" />
<project name="rINanDO/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="lineage-16.0" />
to this:
Code:
<project name="TALUAtGitHub/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="lineage-16.0" />
<project name="TALUAtGitHub/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="lineage-16.0" />
After you have all of the sources downloaded, change directories to the directory with all the source code and then run:
Code:
. build/envsetup.sh
lunch lineage_i9100-userdebug
Instead of running brunch, run:
Code:
mka adbd
mka bootimage
The boot image with my kernel will start building. After building the boot image, running "cout" will change directories to <sources_root>/out/product/i9100/. The file "boot.img" is the boot image with the kernel. You have successfully built my kernel! However, this boot image will have a ramdisk without Magisk and the kernel localversion string will not match the modules in /system/lib/modules and /system/vendor/lib/modules which is important for FM radio users using SpiritF (Si4709_driver.ko driver) or users of any of the other modules. Inserting these modules will error out.

Solve kernel localversion issues:
First method:
First of all, install the latest Magisk boot image from @rINanDO or install the boot.img from the ROM installation zip (this will be installed anyway when installing the whole ROM in TWRP). Boot your phone up and go to Settings -> About Phone -> Android version and keep the string under "Kernel version" saved somewhere or written down for later. The string looks like "3.0.101-lineage-xxxxxxx".
In the kernel source code <sources_root>/kernel/samsung/smdk4412, run:
Code:
touch .scmversion
Now, change directories to <kernel_sources_root>/arch/arm/configs. Using your favorite text editor, open lineageos_i9100_defconfig. You can use "nano lineageos_i9100_defconfig" if you're not sure. Find the lines:
Code:
CONFIG_LOCALVERSION="-lineage"
CONFIG_LOCALVERSION_AUTO=y
Set CONFIG_LOCALVERSION_AUTO to "n". Now, add everything after the string "3.0.101-lineage" from earlier to the end of -lineage at CONFIG_LOCALVERSION. For example, if the kernel version string from earlier was "3.0.101-lineage-gd9313e5", then it should now be:
Code:
CONFIG_LOCALVERSION="-lineage-gd9313e5"
You may now run "mka bootimage" again or "mka adbd" before that if you haven't already built once before.

Second method:
During a kernel build, the modules are built and stored in <sources_root>/out/target/product/i9100/system/vendor/lib/modules/. You can use "adb push" to push all of the files here to /system/lib/modules/ and /system/vendor/lib/modules/ or copy them to your devices storage or SD card and copy them to those 2 locations.


Building the kernel with magisk:
In the sources root directory, run:
Code:
touch buildspec.mk
Then, change directories using "cd" to <sources_root>/device/samsung/galaxys2-common/magisk. In this directory, there is a bash script that is there to make boot images with a ramdisk with Magisk. Run it:
Code:
bash build-magisk-kernel.sh
This script will do everything automatically and tell you what to do.
If the Magisk build script fails, you must run:
Code:
rm <sources_root>/buildspec.mk*
touch <sources_root>/buildspec.mk
After a repo sync or modifying anything to do with the ramdisk, it is recommended to force a rebuild of ramdisk.cpio with new files. To do this, run:
Code:
rm buildspec.mk*
rm -rf <sources_root>/out/target/product/i9100/*ramdisk*
mka bootimage
touch buildspec.mk
before running the Magisk build script again.



Source code:
https://github.com/TALUAtGitHub/andr...msung_smdk4412
https://github.com/TALUAtGitHub/andr...alaxys2-common

Thanks to:
@rINanDO for LineageOS 16.0 on our phone and all of his work.
@arter97 for the exfat-linux driver.
@linusdan for LineageOS manifests.
All of the people who have worked on other custom kernels which I could use parts of for some features.
...and of course, anyone who has worked on the Linux kernel.
The Following 12 Users Say Thank You to TALUAtXDA For This Useful Post: [ View ] Gift TALUAtXDA Ad-Free
2nd November 2019, 05:27 PM |#2  
Senior Member
Thanks Meter: 14
 
More
Hello.
I'm sorry. Please make a reliable kernel to Samsung's official firmware with Android 4.1.2 for remove 4GB file size limitation on an external microSD card formatted in exFAT for Samsung Galaxy S2.
12th November 2019, 04:17 AM |#3  
Xtreme.Ornob's Avatar
Senior Member
Flag Chittagong
Thanks Meter: 442
 
More
Quote:
Originally Posted by TALUAtXDA

Hello everyone,
I have been building my own kernels for myself for a while now. Recently, I have been implementing features in my kernel that many people will find useful, most notably exFAT support. Since there is interest in my kernel, I have decided to release it for everyone to use.

I am not in any way responsible for any damage you happen to cause to your phone trying to use my kernels features (for example, overvolting). Be careful!
Downloads:

I have made 3 boot images, a boot image for no Magisk, one for Magisk Stable and one for Magisk Canary:
Latest version:
No Magisk: TALUs_Custom_Kernel_i9100_LOS_16_20191102_No_Magis k.img
Magisk Stable: TALUs_Custom_Kernel_i9100_LOS_16_20191102_Magisk_S table_v20.1_ramdisk.img Magisk version: 20.1
Magisk Canary: TALUs_Custom_Kernel_i9100_LOS_16_20191102_Magisk_C anary_v20.2-a6e62e07_ramdisk.img Magisk version: 20.2-a6e62e07

Changelog:
Release 20191102:Old releases:

Release 20191030 from https://forum.xda-developers.com/sho...postcount=849:
Please don't use this release if you want to use exFAT! This release has an exFAT bug relating to truncating which causes kernel panics that were fixed in release 20191102.
  • Initial release.

Kernel features:
exFAT support:
exFAT support is available via a slightly modified implementation of this in-kernel, native driver: https://github.com/arter97/exfat-linux The modifications are required as the kernel we are using has many backports from newer kernels and this driver selects what code is used based on kernel version. The result is features that the kernel no longer has are selected and there are build errors. With a SD card formatted as exFAT, you can now have files that are bigger than 4GB in size and with better performance than FAT32. exFAT support was already available via a fuse implementation which is not favorable due to bad performance. Implementing the exFAT driver in-kernel means that it is used instead of the fuse implementation. NTFS support is also enabled with CONFIG_NTFS_FS=y but that may be a fuse driver.

Overclocking to 1.4GHz:
By default, this kernel is overclocks the CPU to 1.4GHz. 1.4GHz should be stable on all Exynos 4210 CPUs and was the stock frequency on the very first Note phone which also used an Exynos 4210 CPU. However, if you don't want to use the overclock for slightly lower temperatues, you can set the clock speed back to 1.2GHz using a kernel manager like Kernel Adiutor or by using this echo command in a terminal:
Code:
echo "1200000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Even if you want to set the clock speed back to 1.2GHz, I would suggest you undervolt the CPU to get lower temperatures. Try undervolting by -5mV at a time every few hours and see what's stable. I can do -65mV on both of my S2s, however, how far you can undervolt varies depending on how well your CPU was manufactured.

CPU voltage control:
WARNING: Overvolting can damage your CPU and I would not suggest you do it. It shouldn't be necessary. Whatever you do, I am not in any way responsible for whatever you happen to do and what damage you cause to your phone. You should only use this feature for undervolting.
CPU voltage control is implemented in this kernel via a typical SysFS interface. You can use either a kernel manager to control CPU voltage or use an echo command in a terminal:
Code:
echo "<1.4GHz voltage> <1.3GHz voltage> <and so on....>" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
An example for this command is:
Code:
echo "1215 1190 1165 1115 1065 1015 965 915 915 890 890 890 865 865" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
There is also another interface for another unit for measuring voltage. That command is for millivolts. Replace "UV_mV_table" with "UV_uV_table" to control voltage using microvolts.

Charging current control and slightly higher charging current by default:
WARNING: if you decide to set a very high current and something gets damaged, such as something on the motherboard or your battery, you are responsible for the damage, not me.
Charging current control is implemented and is controllable using another typical SysFS interface. The interface can be controlled with milliamps (mA) using yet another typical SysFS interface:
Code:
echo "<AC current> <Miscellaneous current> <USB current>" > /sys/devices/virtual/misc/charge_control/charge_current
Kernel managers don't detect this feature, so the only way to control this is with that command. Also, the charging current for all AC, misc and USB is slightly higher than default. This means that we have better charging times and the battery temperature increase is very small. We are closer to USB specifications when charging on a USB port, too!

GPU clock speed and voltage control:
WARNING: You risk damaging your graphics chip if you set a clock speed or voltage that is too high. I am not responsible for any damage caused using this feature. I have only tested up to 330MHz, nothing more.
GPU clock speed and voltage control is implemented. This is controllable using yet another SysFS interface and is only controllable using an echo command once again.
Code:
echo "<Step0> <Step1> <Step2> <Step3" > /sys/devices/virtual/misc/gpu_<clock/voltage>_control/gpu_control
Replace "<clock/voltage>" with what you'd like to control. The clock speed is in MHz and the voltage is in uV (microvolts). The frequencies that are available for clock speed control are 54MHz, 66MHz, 108MHz, 160MHz, 200MHz, 267MHz, 330MHz, 400MHz, 440MHz and 520MHz. 267MHz is default for step 3 and 330MHz and anything above is overclocking.


Building the kernel:
Building this kernel requires an installation of a Linux distribution. If you have an installation with all dependencies installed (you can search for them yourself, the LineageOS build guides have what you need to install. Use a build guide for any device.), you can continue. The source code for what is used to build this kernel is here:
Kernel source code: https://github.com/TALUAtGitHub/andr...msung_smdk4412
galaxys2-common: https://github.com/TALUAtGitHub/andr...alaxys2-common
To get full sources, you can use @linusdan's manifests: https://github.com/linusdan/lineage_manifests The instructions for getting sources are all there. However, before you run repo sync, you must edit <sources_root>/.repo/local_manifests/roomservice.xml from this:
Code:
<project name="rINanDO/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="lineage-16.0" />
<project name="rINanDO/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="lineage-16.0" />
to this:
Code:
<project name="TALUAtGitHub/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="lineage-16.0" />
<project name="TALUAtGitHub/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="lineage-16.0" />
After you have all of the sources downloaded, change directories to the directory with all the source code and then run:
Code:
. build/envsetup.sh
lunch lineage_i9100-userdebug
Instead of running brunch, run:
Code:
mka adbd
mka bootimage
The boot image with my kernel will start building. After building the boot image, running "cout" will change directories to <sources_root>/out/product/i9100/. The file "boot.img" is the boot image with the kernel. You have successfully built my kernel! However, this boot image will have a ramdisk without Magisk and the kernel localversion string will not match the modules in /system/lib/modules and /system/vendor/lib/modules which is important for FM radio users using SpiritF (Si4709_driver.ko driver) or users of any of the other modules. Inserting these modules will error out.

Solve kernel localversion issues:
First method:
First of all, install the latest Magisk boot image from @rINanDO or install the boot.img from the ROM installation zip (this will be installed anyway when installing the whole ROM in TWRP). Boot your phone up and go to Settings -> About Phone -> Android version and keep the string under "Kernel version" saved somewhere or written down for later. The string looks like "3.0.101-lineage-xxxxxxx".
In the kernel source code <sources_root>/kernel/samsung/smdk4412, run:
Code:
touch .scmversion
Now, change directories to <kernel_sources_root>/arch/arm/configs. Using your favorite text editor, open lineageos_i9100_defconfig. You can use "nano lineageos_i9100_defconfig" if you're not sure. Find the lines:
Code:
CONFIG_LOCALVERSION="-lineage"
CONFIG_LOCALVERSION_AUTO=y
Set CONFIG_LOCALVERSION_AUTO to "n". Now, add everything after the string "3.0.101-lineage" from earlier to the end of -lineage at CONFIG_LOCALVERSION. For example, if the kernel version string from earlier was "3.0.101-lineage-gd9313e5", then it should now be:
Code:
CONFIG_LOCALVERSION="-lineage-gd9313e5"
You may now run "mka bootimage" again or "mka adbd" before that if you haven't already built once before.

Second method:
During a kernel build, the modules are built and stored in <sources_root>/out/target/product/i9100/system/vendor/lib/modules/. You can use "adb push" to push all of the files here to /system/lib/modules/ and /system/vendor/lib/modules/ or copy them to your devices storage or SD card and copy them to those 2 locations.


Building the kernel with magisk:
In the sources root directory, run:
Code:
touch buildspec.mk
Then, change directories using "cd" to <sources_root>/device/samsung/galaxys2-common/magisk. In this directory, there is a bash script that is there to make boot images with a ramdisk with Magisk. Run it:
Code:
bash build-magisk-kernel.sh
This script will do everything automatically and tell you what to do.
If the Magisk build script fails, you must run:
Code:
rm <sources_root>/buildspec.mk*
touch <sources_root>/buildspec.mk
After a repo sync or modifying anything to do with the ramdisk, it is recommended to force a rebuild of ramdisk.cpio with new files. To do this, run:
Code:
rm buildspec.mk*
rm -rf <sources_root>/out/target/product/i9100/*ramdisk*
mka bootimage
touch buildspec.mk
before running the Magisk build script again.



Source code:
https://github.com/TALUAtGitHub/andr...msung_smdk4412
https://github.com/TALUAtGitHub/andr...alaxys2-common

Thanks to:
@rINanDO for LineageOS 16.0 on our phone and all of his work.
@arter97 for the exfat-linux driver.
@linusdan for LineageOS manifests.
All of the people who have worked on other custom kernels which I could use parts of for some features.
...and of course, anyone who has worked on the Linux kernel.




Great work on the Kernel. Using it at the moment, minor crashes only. It's very stable. Downloaded your sources. Planning to do a feature build as soon as i get the time. BTW, have you considered adding few governors and schedulers?
12th November 2019, 02:33 PM |#4  
Junior Member
Thanks Meter: 3
 
More
Thanks for create this kernel, I don´t see a mod kernel since android MM
12th November 2019, 09:37 PM |#5  
OP Senior Member
Thanks Meter: 125
 
More
Quote:
Originally Posted by JaLoou

Hello.
I'm sorry. Please make a reliable kernel to Samsung's official firmware with Android 4.1.2 for remove 4GB file size limitation on an external microSD card formatted in exFAT for Samsung Galaxy S2.

Hi,
I don't really know anyone but the fewest of people who still run the stock ROM here on XDA, so I don't feel motivated to do this and you have insulted developers here before on your "bugs" thread so I feel like you will not be grateful for anything. However, this could be a nice learning experience for you. It should actually be easier to implement exFAT in the stock kernel, and I see there are already exFAT sources which may work with some additions, though I would only consider that to be a starting point and you should update the exFAT sources.

Quote:
Originally Posted by Xtreme.Ornob

Great work on the Kernel. Using it at the moment, minor crashes only. It's very stable. Downloaded your sources. Planning to do a feature build as soon as i get the time. BTW, have you considered adding few governors and schedulers?

Thanks. I have experienced few random reboots myself but those are rare and also happen in the kernel from the ROM. I have considered adding all of the additional CPU governors and IO schedulers from the DorimanX kernel, I will probably add them in the next release. EDIT: looks like adding the CPU governors requires lots of extensive modifications to the kernel to get it to at least build. The DorimanX kernel has things our kernel doesn't have, it may not be possible to implement the CPU governors from there. I may need to get another older kernel with these governors, hoping that updates to these governors are included. Hopefully it's possible.

Quote:
Originally Posted by Nauzet v.h

Thanks for create this kernel, I don´t see a mod kernel since android MM

You're welcome. I've also found it most notable that there hasn't been any custom kernel in a long while. There was DorimanX for LineageOS 14.1, but that corrupted data and was unusable without regular restores of nandroid backups.

Also for everyone, I don't consider Magisk updates to be updates to the kernel, so I will simply update the boot images with a new Magisk version in the ramdisk when I notice an update. Check back within 1-2 days at maximum if there is a new Magisk update available.
The Following User Says Thank You to TALUAtXDA For This Useful Post: [ View ] Gift TALUAtXDA Ad-Free
13th November 2019, 02:08 AM |#6  
Senior Member
Thanks Meter: 14
 
More
Quote:
Originally Posted by TALUAtXDA

Hi,
I don't really know anyone but the fewest of people who still run the stock ROM here on XDA, so I don't feel motivated to do this and you have insulted developers here before on your "bugs" thread so I feel like you will not be grateful for anything. However, this could be a nice learning experience for you. It should actually be easier to implement exFAT in the stock kernel, and I see there are already exFAT sources which may work with some additions, though I would only consider that to be a starting point and you should update the exFAT sources.

I'm not an IT specialist. I'm just a regular smartphone user.

I offer 5USD for a RELIABLE kernel without an obsolete file size limitation in video recording to Samsung's official ROM with Android 4.1.2.

And yet actually I'm really interesting in the camera improvement. So...
I'm offering 50USD to anyone who will make Galaxy S2 become able to record FHD+ video with 21:9 aspect ratio (2520x1080) without any other disadvantages.

I can offer other bounties for any reliable improvements to the camera (include the stereo sound recording) without disadvantages.

Any payments will be proceed only after successful firmware testing by me.
17th November 2019, 05:17 PM |#7  
OP Senior Member
Thanks Meter: 125
 
More
Release 20191117:
  • Implement Intellidemand, HYPER, ZZMOOVE, NeoX, darkness and nightmare CPU governors from DorimanX from Saber/gsstudios for Nougat (https://github.com/gsstudios/Dorimanx-SG2-I9100-Kernel). All pre-existing CPU governors will work exactly the same as before. (Commit: 2a892719e0e124e2aae15c7b000b4ae10df37293)
  • Implement BFQ version v7r8, SIOplus, zen and tripndroid IO schedulers. BFQ scheduler is straight from original source code in patch files with minimal modifications, zen and SIOplus schedulers come from the DorimanX kernel for Jellybean that are slightly modified to run on our kernel and tripndroid scheduler comes from the DorimanX kernel from Saber/gsstudios for Nougat also with modifications to run on our kernel. All pre-existing IO schedulers will work exactly the same as before. (Commit: 9bccb9589d353b8994c50f24de708a1d2bb99dd7)
  • Remove unnecessary earlysuspend.h. Our kernel doesn't have earlysuspend, earlysuspend.h is unnecessary. (Commit: 25b2dd54676724b46aa27edab7e5e7254051ffc6)
Downloads available in the original post.

Ignore what I've said in my previous post about adding CPU governors and IO schedulers, it wasn't as hard as I thought it would be and it didn't need extensive modifications to the kernel. The DorimanX kernel simply made certain functions common for all governors, and all of the pre-existing governors in our kernel had these functions in them while the additional governors without any modifications did not. Also, there were things in the governors and schedulers that the DorimanX kernel supports but our kernel does not, and replacing them with things that our kernel supports or just removing them fixed the issue and everything works as expected.

Also, a reminder for those that didn't read my previous reply that I don't consider Magisk updates to be updates to the kernel, so I will simply update the boot images with a new Magisk version in the ramdisk when I notice an update. Check back within 1-2 days at maximum if there is a new Magisk update available.
The Following 5 Users Say Thank You to TALUAtXDA For This Useful Post: [ View ] Gift TALUAtXDA Ad-Free
18th November 2019, 10:50 AM |#8  
Junior Member
Thanks Meter: 3
 
More
mate i have one issue, i flashed the magisk version but when i install kernel auditor don´t ask me if a gant o deny the root in this app, and magisk app don´t download the modules
18th November 2019, 07:02 PM |#9  
OP Senior Member
Thanks Meter: 125
 
More
Quote:
Originally Posted by Nauzet v.h

mate i have one issue, i flashed the magisk version but when i install kernel auditor don´t ask me if a gant o deny the root in this app, and magisk app don´t download the modules

Hi,
Have you previously used the Magisk Canary version and decided to use stable again? Magisk root doesn't work for me when I downgrade from canary to stable, however, my modules appear to load, I just can't manage them or get root access. If you have, you must use Canary until a new Stable update is released. When testing the new boot image with the ramdisk with Magisk Stable, I got "Magisk is not installed". I usually use Canary on both of my S2's, so due to this, I assumed that the stable image would work fine for everyone else. I've just tested the old image with kernel release 20191102 and I got the same, when I remember the Magisk in the ramdisk of this older image fully working, and I got no complains from anyone for that image. I have attached a boot image with a ramdisk that has Magisk Stable version 20.0, which you can try, but this also doesn't work for me. I have also extracted the ramdisk from both the older image and new image using "binwalk", and they both appear to have Magisk in them as evident by the human-readable text in the Magisk commands in the "init" binary when opened with just a text editor. When booting with either the new image and the old image, the logcat also has information about Magisk and it appears to mount modules correctly, root access is just not working. Running "mka clean" or "make clean" in sources and building again doesn't work, either. Meanwhile, in all this, my usual canary version works just fine.

TL;DR your fix for now is to run Magisk Canary and wait until a new stable update is released, most certainly if you had previously used Magisk Canary. I would still like to know if you had previously used the Magisk Canary version and decided to use stable again. If you did not, I don't know what's wrong.

Does the new Magisk Stable image work for anyone else? Did the old one work for everyone? If the old one didn't even work, why didn't anyone tell me? :(
The Following User Says Thank You to TALUAtXDA For This Useful Post: [ View ] Gift TALUAtXDA Ad-Free
19th November 2019, 07:33 PM |#10  
Senior Member
Flag Hannover
Thanks Meter: 139
 
More
Does the new Magisk Stable image work for anyone else? Did the old one work for everyone? If the old one didn't even work, why didn't anyone tell me? [/QUOTE]
The old and the new Magisk Stable image work both for me. Until now I didn't have the Canary image installed. And I don't think I 'm gonna go for the Canary version.
The Following User Says Thank You to DevisG79 For This Useful Post: [ View ] Gift DevisG79 Ad-Free
19th November 2019, 08:11 PM |#11  
OP Senior Member
Thanks Meter: 125
 
More
Quote:
Originally Posted by DevisG79

The old and the new Magisk Stable image work both for me. Until now I didn't have the Canary image installed. And I don't think I 'm gonna go for the Canary version.

Thank you for letting me know, I'm glad it works for you. No, you don't need the Canary version if everything is working fine for you, you can continue running stable.
The Following User Says Thank You to TALUAtXDA For This Useful Post: [ View ] Gift TALUAtXDA Ad-Free
Post Reply Subscribe to Thread

Tags
custom kernel, galaxy s2, i9100, lineageos

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

Advanced Search
Display Modes