Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,223 Members 52,194 Now Online
XDA Developers Android and Mobile Development Forum

[KEXEC][WIP] possible to load custom kernels on i537

Tip us?
 
Bleedin_Sarge
Old
(Last edited by KennyG123; 7th July 2014 at 12:58 PM.)
#1  
Bleedin_Sarge's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 23
Join Date: Dec 2013
Default [KEXEC][WIP] possible to load custom kernels on i537

Okay, wanting to get CM on this device, I've been hunting down ways to possibly load a custom kernel on the i537. I have come across this: http://forum.xda-developers.com/show....php?t=1361943

KEXEC, from my understanding, should allow one to hotboot into a custom linux kernel after the stock kernel has booted.

My idea for using this, would be to start booting the original stock kernel, and then after it has booted and passed the bootloader mess, kexec into the i9295s CM kernel and load CM from there.

Thats a real watered down idea, because it will involve a bit more than just that. At we may have to run CM from images, much the way SafeStrap works. This is to avoid touching the stock system.

KEXEC into an image file containing the CM filesystems.

My biggest question: Would I be wasting my time on this, seeing as I have no hands on with loading kernels? I really want CM on this device, but this would be something I have never done.

Also, we will have to solve some issues with the kexec binary. It does execute, but complains about tmp-mkfs.

Sent from my SAMSUNG-SGH-I337 (i537 running HyperDrive) using XDA Free mobile app
Attached Thumbnails
Click image for larger version

Name:	1404662228335.jpg
Views:	152
Size:	45.5 KB
ID:	2836228  
The Following 2 Users Say Thank You to Bleedin_Sarge For This Useful Post: [ Click to Expand ]
 
Bleedin_Sarge
Old
#2  
Bleedin_Sarge's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 23
Join Date: Dec 2013
Okay, so I made a mistake on the terminal, the kexec binary is working as expected. I just was not awake enough to realize I forgot the "./" in the command.

Any idea where we go from here?

Sent from my SAMSUNG-SGH-I337 using XDA Free mobile app
Attached Thumbnails
Click image for larger version

Name:	1404673005288.jpg
Views:	100
Size:	103.8 KB
ID:	2836573  
 
Xanthos58
Old
#3  
Xanthos58's Avatar
Member
Thanks Meter 4
Posts: 72
Join Date: Mar 2014
May I ask how you installed kexec?

Sent from my SAMSUNG-SGH-I537 using XDA Premium 4 mobile app
 
Devo7v
Old
#4  
Senior Member
Thanks Meter 313
Posts: 899
Join Date: Oct 2010
Location: Washington, D.C.
Quote:
Originally Posted by Bleedin_Sarge View Post
Okay, wanting to get CM on this device, I've been hunting down ways to possibly load a custom kernel on the i537. I have come across this: http://forum.xda-developers.com/show....php?t=1361943

KEXEC, from my understanding, should allow one to hotboot into a custom linux kernel after the stock kernel has booted.

My idea for using this, would be to start booting the original stock kernel, and then after it has booted and passed the bootloader mess, kexec into the i9295s CM kernel and load CM from there.

Thats a real watered down idea, because it will involve a bit more than just that. At we may have to run CM from images, much the way SafeStrap works. This is to avoid touching the stock system.

KEXEC into an image file containing the CM filesystems.

My biggest question: Would I be wasting my time on this, seeing as I have no hands on with loading kernels? I really want CM on this device, but this would be something I have never done.

Also, we will have to solve some issues with the kexec binary. It does execute, but complains about tmp-mkfs.

Sent from my SAMSUNG-SGH-I337 (i537 running HyperDrive) using XDA Free mobile app
You need to talk to @Hashcode. He's been trying to get this working on all the S4's for months. He got it working on Motorola devices in the past but just hasn't been able to get it to work on the S4's. You definitely need to talk to him.
 
Bleedin_Sarge
Old
#5  
Bleedin_Sarge's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 23
Join Date: Dec 2013
I found a precompiled version on the forums here and simply copied it to /sbin and ran chmod on it to make it executable. You will need to be rooted, and Im trying to play it safe by doing this all in a rom slot.

And I will give hashcode a PM and see what he says. I am still not sure how all of this works.

Sent from my SAMSUNG-SGH-I337 using XDA Free mobile app
 
Bleedin_Sarge
Old
(Last edited by Bleedin_Sarge; 7th July 2014 at 02:58 AM.)
#6  
Bleedin_Sarge's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 23
Join Date: Dec 2013
Okay, I have spent more time playing around with kexec on i537. Keep in mind, I am doing all of this from a rom slot trying to play it safe.

Because I do not have another kernel to actually load in, I am using the uptime binary as my source.

Code:
Select Code
root@jflteatt:/system/bin # kexec -l /system/bin/uptime     Cannot open /proc/atags: No such file or directory
kexec_load failed: Function not implemented                 entry       = 0x80208000 flags = 280000
nr_segments = 2                                             segment[0].buf   = 0x1eab020
segment[0].bufsz = 10                                       segment[0].mem   = 0x80201000
segment[0].memsz = 1000
segment[1].buf   = 0xb6e79008                               segment[1].bufsz = 22f60
segment[1].mem   = 0x80208000                               segment[1].memsz = 23000
255|root@jflteatt:/system/bin # kexec -e                    kexec failed: Invalid argument
255|root@jflteatt:/system/bin #
I am assuming it loaded it into ram even though it had a few complaints. The strange thing is when I pass the execute argument, it resets the wifi and cellular connections.

I am still blindly going about this, but I hope this sparks some techie out there and we figure out some way to use this.

(: Sent from my sgh-i537 that thinks it is an i337

edit: cleaned up some of the terminal junk that was accidently posted.
 
Bleedin_Sarge
Old
#7  
Bleedin_Sarge's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 23
Join Date: Dec 2013
It may help if someone can locate or compile an arm version of the kexec kernel modules that we need to load with insmod. Seems be just missing functions, which I am guessing could be added using the modules.

(: Sent from my sgh-i537 that thinks it is an i337
The Following User Says Thank You to Bleedin_Sarge For This Useful Post: [ Click to Expand ]
 
Bleedin_Sarge
Old
#8  
Bleedin_Sarge's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 23
Join Date: Dec 2013
Alrighty, I can not get any modules that I have found to load. I assuming that the kexec_load.ko needs to compiled against the phones kernel. I have no idea how to compile things and am requesting some input.

(: Sent from my sgh-i537 that thinks it is an i337
Attached Thumbnails
Click image for larger version

Name:	1404791036063.jpg
Views:	70
Size:	47.4 KB
ID:	2839357  
 
TransformixS4
Old
#9  
TransformixS4's Avatar
Senior Member
Thanks Meter 171
Posts: 415
Join Date: Mar 2013
Location: NY
Quote:
Originally Posted by Bleedin_Sarge View Post
Alrighty, I can not get any modules that I have found to load. I assuming that the kexec_load.ko needs to compiled against the phones kernel. I have no idea how to compile things and am requesting some input.

(: Sent from my sgh-i537 that thinks it is an i337
http://stackoverflow.com/questions/2...the-filesystem
Hope this helps
Galaxy Note 3 and 4.4 KitKat Thread

The Following User Says Thank You to TransformixS4 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...