Team FAH-Q Presents....
Hey guys the following tutorial is for any thinkerers of Stock Samsung Kernel for Samsung Note 8(n5110/n5100)
*Most kernels work the same way but my guide is using this source
Step One:
Download the samsung kernel source for your device
- www.opensource.samsung.com
- search for your device(in this case I'm using n5110)
- now download source(in this case MI1 source)
- download Beastools as you will need them later.
Step Two:
After source is downloaded you will have a giant zip file
- unzip GT-N5110_SEA_JB_Opensource_Update2.zip
- next you need to unzip the Kernel.tar.gz file(any zip manager should work)
Step Three:
Now you have your source to build your zImage(kernel) so lets get the toolchain!
- get Toolchain from android git server , codesourcery and etc ... arm-eabi-4.4.3
Step Four:
Lets edit the Makefile so it uses the toolchain.
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
Ex) CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
Step Five:
To build the kernel follow these steps.
- Open a terminal
- cd to the location of your kernel source
- exceuted the following two commands:
make kona_01_defconfig
make
- give it some time as it can take up to hours to build depending on your build machine.
Step Six:
Once zImage and modules are built get them together with the ramdisk.
- the following are the locations where to find kernel and modules:
kernel/drivers/scsi/scsi_wait_scan.ko
kernel/drivers/net/wireless/bcmdhd/dhd.ko
kernel/arch/arm/boot/zImage
Step Seven:
Lets extract the ramdisk from a stock boot.img or a recovery.img file.
*use the beastools.zip file attached to this post to complete the following.
- unzip my beastools.zip and place boot.img in the same extracted folder.
- open a terminal and cd to the extracted beastools
- run this command to split ramdisk and zImage:
./split_boot boot.img (if using recovery.img just replace boot.img with recovery.img)
*I have included a script by the name of Unpack_kernel.sh that can save you the last step by just running this command:
./Unpack_kernel.sh (this is if you're lazy lol)
Step Eight:
With your ramdisk extracted make whatever changes you want to it(such as making kernel insecure or whatever)
- grab modules and place them in the ramdisk: ramdisk/lib/modules/ (replace old modules or wifi wont work).
- after modules are placed and ramdisk changes are done continue to step nine.
Step Nine:
Place the ramdisk and zImage in the same beastools unzipped folder
- to repack kernel you can use the script I included called pack_kernel.sh by running( ./pack_kernel.sh)
or
- run the commands on your own:
#Ramdisk Repacking
./mkbootfs ramdisk | gzip > ramdisk-new.gz
cd ramdisk
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
cd ../
#Boot.img repacking
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz -o new_boot.img
Step 10:
You will now have your new kernel named new_boot.img
- rename it to boot.img and flash it through heimdall or make it into a flashable for CWM/TWRP.
My Kernel using these steps and making boot.img insecure/enabling init.d access.
Link: Proton_test_kernel
DISCLAIMER:
As always I am not held responsible for anything that happens with your device by flashing anything I make/guide you through making youself.
I am not responsible if flashing my file makes girls more attracted to you either. lol
Hope you guys found this tutorial useful, if so please hit the thanks/donate buttons
In case some of you notice there's an extra file I didn't use in the beastools, boot_info (this file will be used in another little guide but in short it helps you check the following things:
- page size
- base address
- ramdisk address
- cmdline
for those that didn't notice that was in there, shame on you! lol jk kinda.
Post 2,3 and 4 will be taken by me as i will post other guides such as how to make boot.img insecure and how to properly flash boot.img/recovery.img to our Note 8.0 with heimdall as I've yet to see anyone flash anything with heimdall to this tablet.
** Guides will be leaned toward making your kernel from samsung sources, making a zip file to flash it, how to flash through heimdall, and changes you can make yourself to the ramdisk. I like to keep guides that are about the same aspect of modding in the same thread.
Last edited: