FORUMS

[DEV ONLY]Xperia ZU kernel building instructions

6,439 posts
Thanks Meter: 16,265
 
By krabappel2548, Inactive Recognized Developer on 4th October 2013, 02:22 PM
Post Reply Email Thread
I think the time has come to share the info about kernel development we've been keeping for ourselves until now. just be sure to ready the complete thread and not just execute everything without thinking. I won't be responsible for any bricks etc.

Warnings!!
- Only start with a kernel if you are a developer with knowledge about kernel developping.
- Always use the specific dt.img build for your kernel!!!!! Very important!
- Don't complain if it doesn't work when you do something wrong!


== Information ==
Let's start with some info first.

MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This bin4ry can be found in the Cyanogen repo's or you can download a prebuild one in this thread.

== Compiling a kernel ==
I'll skip this part for now, every kernel dev should know this part maybe I'll add it later.

== Generating a dt.img ==
Basically you will only need your kernel sources and the dtbTool binary, then you need to generate it using a command like this:
Code:
./dtbTool -o ~/dt_files/dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/
This seems very simple but it's quite important when building a kernel for MSM8974, or other S800 boards.

After this step has been completed you will find your dt.img in a folder callled dt_files, this folder should be in your home of linux now.

== Making the actual boot.img ==
After making the zImage and dt.img you need to have your ramdisk and an mkbootimg adapted for the dt.img to make a booting/working kernel for our rhine board.

be sure the naming of your files is correct:
- zImage
- dt.img
- intrd.img for your ramdisk

You can generate it by using the following command:
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk initrd.img --dt dt.img -o boot.img
Let's get kernel development started for everyone!

== Extra ==
If you like my work consider donating me a beer
Attached Files
File Type: gz MSM8974-kernel-binaries.tar.gz - [Click for QR Code] (26.7 KB, 1459 views)
The Following 15 Users Say Thank You to krabappel2548 For This Useful Post: [ View ] Gift krabappel2548 Ad-Free
4th October 2013, 02:25 PM |#2  
baileyjr's Avatar
Senior Member
Flag Cardiff
Thanks Meter: 284
 
More
I was only thinking yesterday it was about time we had some custom kernels
4th October 2013, 03:56 PM |#3  
krabappel2548's Avatar
OP Inactive Recognized Developer
Flag Lommel
Thanks Meter: 16,265
 
Donate to Me
More
binary files attached
The Following User Says Thank You to krabappel2548 For This Useful Post: [ View ] Gift krabappel2548 Ad-Free
4th October 2013, 10:47 PM |#4  
Account currently disabled
Flag Kepler-34b
Thanks Meter: 5,681
 
More
Don't add the compile guide. The way it is now, we'll weed out the noobs, and if there's one thing we don't want, it's a half baked kernel roaming around the forum

Sent from my Z Ultra, using XDA Premium 4
The Following User Says Thank You to LordManhattan For This Useful Post: [ View ] Gift LordManhattan Ad-Free
5th October 2013, 09:22 AM |#5  
krabappel2548's Avatar
OP Inactive Recognized Developer
Flag Lommel
Thanks Meter: 16,265
 
Donate to Me
More
Quote:
Originally Posted by LordManhattan

Don't add the compile guide. The way it is now, we'll weed out the noobs, and if there's one thing we don't want, it's a half baked kernel roaming around the forum

Sent from my Z Ultra, using XDA Premium 4

I didn't added it for that reason

Sent from my Xperia Z1 using xda app-developers app
The Following 3 Users Say Thank You to krabappel2548 For This Useful Post: [ View ] Gift krabappel2548 Ad-Free
5th October 2013, 06:03 PM |#6  
fastest83's Avatar
Senior Member
Thanks Meter: 88
 
More
Quote:
Originally Posted by LordManhattan

Don't add the compile guide. The way it is now, we'll weed out the noobs, and if there's one thing we don't want, it's a half baked kernel roaming around the forum

Sent from my Z Ultra, using XDA Premium 4

No waaaaaay I wanted to build a kernel on my stuuuupid LG and then upload it as a Z Ultra kernel and then tell:
"What???? Isn't that working? That's impossible, you MUST have done a mistake. My work is perfect. Wait what? Isn't this the stoooopid 2X forum?? Sry guyz I did it for the lulz. "

Ok I lost it. I need my ZU back. I need it baaaad.

Jokes aside, great work krabappel, keep it up, as soon as I get my phone back I'm going to unlock the bootloader right away and try whatever kernel comes up.

Sent from my Nexus 7 using xda app-developers app
5th October 2013, 07:22 PM |#7  
Account currently disabled
Flag Kepler-34b
Thanks Meter: 5,681
 
More
Quote:
Originally Posted by fastest83

No waaaaaay I wanted to build a kernel on my stuuuupid LG and then upload it as a Z Ultra kernel and then tell:
"What???? Isn't that working? That's impossible, you MUST have done a mistake. My work is perfect. Wait what? Isn't this the stoooopid 2X forum?? Sry guyz I did it for the lulz. "

Ok I lost it. I need my ZU back. I need it baaaad.

Jokes aside, great work krabappel, keep it up, as soon as I get my phone back I'm going to unlock the bootloader right away and try whatever kernel comes up.

Sent from my Nexus 7 using xda app-developers app

Ooh, you're using the 2X now? Poor soul! Let's hope you'll get you ZU back ASAP. I finally rooted mine yesterday (my two week rule was over) and I'm loving it. Installed Xposed and change some DPIs around. Still using the stock launcher, so I guess that's kind of weird.

I remember a dude over at the Note section modified a kernel and posted it. Things didn't go well, and several people bricked their device.

BUT let's keep things ON TOPIC guys (me). Btw, we should create a "general ZU chat" thread in the general section so people like me can speak without going off topic all the time.

Edit: I made the thread in the general section.

Sent from my Z Ultra, using XDA Premium 4
The Following User Says Thank You to LordManhattan For This Useful Post: [ View ] Gift LordManhattan Ad-Free
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes