FORUMS
Remove All Ads from XDA

[dev][kernel][kexec]

186 posts
Thanks Meter: 235
 
By delewer, Senior Member on 23rd October 2013, 06:40 AM
Post Reply Email Thread
26th October 2013, 04:56 PM |#21  
delewer's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 235
 
More
Quote:
Originally Posted by Shaky156

Did you compile this kexec yourself? Or did you get this from krapabbel? I issued krapabbel to compile a new debug version have gave him the code but never heard back from him :/
Anywayz so cannot find free memory is the issue

Yep i have compil kexec-tool myself (and kexeced kernel too)...
I try to find another way to load kernel in memory, bc i think the kernel is'nt too large for memory ... lol
may be can we use another load function ?
 
 
26th October 2013, 05:49 PM |#22  
Shaky156's Avatar
Senior Member
Thanks Meter: 2,567
 
Donate to Me
More
Quote:
Originally Posted by delewer

Yep i have compil kexec-tool myself (and kexeced kernel too)...
I try to find another way to load kernel in memory, bc i think the kernel is'nt too large for memory ... lol
may be can we use another load function ?

Kexec cannot load if no zImage is being loaded to due not finding free memory, loading isnt the isssue, finding free memory is the issue, as a test to prove this, take off the hardboot option, load the kernel in RAM where there is free space and execute it that way, youll know that kernel load isnt the problem just finding free memory is
26th October 2013, 05:55 PM |#23  
Shaky156's Avatar
Senior Member
Thanks Meter: 2,567
 
Donate to Me
More
There may be a miscalculation somewhere regarding where to put the kernel in memort hence why we cannot load the kernel, 4.1mb is needed, why dont we compile kernel with lzma if its not already done, thatll help alittle
26th October 2013, 06:41 PM |#24  
delewer's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 235
 
More
Quote:
Originally Posted by Shaky156

There may be a miscalculation somewhere regarding where to put the kernel in memort hence why we cannot load the kernel, 4.1mb is needed, why dont we compile kernel with lzma if its not already done, thatll help alittle

I compil kernel with :
CONFIG_HAVE_KERNEL_LZMA=y

and see if kexeked kabapel kernel with this option is ok....
26th October 2013, 06:53 PM |#25  
Shaky156's Avatar
Senior Member
Thanks Meter: 2,567
 
Donate to Me
More
Quote:
Originally Posted by delewer

I compil kernel with :
CONFIG_HAVE_KERNEL_LZMA=y

and see if kexeked kabapel kernel with this option his ok....

Errrr I compile lorddooms kernel, his compiles on XZ compression, which i dont think kexec supports, only gzip and lzma? If anyone can double check and confirm, confighavekernellzma, & configkernellzma should = y
26th October 2013, 07:00 PM |#26  
delewer's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 235
 
More
Wink
just for information...
compressed kernel with lzma his bigger than no lzma lol
4,1 Vs 4,15

so, i thave try :
kexec --load zImage.lzma --mem-min=0x0f00000000 --command-line="$(cat /proc/cmdline)"
debug: Focus 1 - argc '5' ; argv 'bea96754' ; kernel_buf 'b6bdf008' ; kernel_size '3f5414' ; info 'bea96528' ; i '1' ; file_type[i].name 'zImage'
debug: malloc - xmalloc mem_range '4511824'
Could not find a free area of memory of 3fd414 bytes...

lol ... if you could find a way to reduced size ??
26th October 2013, 07:09 PM |#27  
Shaky156's Avatar
Senior Member
Thanks Meter: 2,567
 
Donate to Me
More
Quote:
Originally Posted by delewer

just for information...
compressed kernel with lzma his bigger than no lzma lol
4,1 Vs 4,15

so, i thave try :
kexec --load zImage.lzma --mem-min=0x0f00000000 --command-line="$(cat /proc/cmdline)"
debug: Focus 1 - argc '5' ; argv 'bea96754' ; kernel_buf 'b6bdf008' ; kernel_size '3f5414' ; info 'bea96528' ; i '1' ; file_type[i].name 'zImage'
debug: malloc - xmalloc mem_range '4511824'
Could not find a free area of memory of 3fd414 bytes...

lol ... if you could find a way to reduced size ??

I understand but that is minor as they have compressed with xz, compressing with lzma is the way to go as kexec can read lzma
26th October 2013, 09:23 PM |#28  
Rekoil's Avatar
Senior Member
Flag Göteborg
Thanks Meter: 499
 
More
Quote:
Originally Posted by Knucklessg1

Does doing this require having an Unlocked Boot loader prior to implementation?

Sent from my C6603 using xda app-developers app

The whole point of this is to bypass the chain of trust. Basically, the bootloader will load a signed kernel, and then that kernel will in turn load a CyanogenMod kernel for example. But it is a difficult process.
27th October 2013, 02:06 AM |#29  
DooMLoRD's Avatar
Inactive Recognized Developer
Flag Pune
Thanks Meter: 39,836
 
Donate to Me
More
those working on this contact me via p.m with ur gtalk/hangout ids... it will be faster to discuss...
27th October 2013, 02:20 AM |#30  
delewer's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 235
 
More
I have debug Kexec-tool :

I have found the exact instruction witch cause the segfault

In "kexec-zImage-arm.c" :
(...)
switch (saved_tags->hdr.tag) {
case ATAG_INITRD:
case ATAG_INITRD2:
case ATAG_CMDLINE:
case ATAG_NONE:
(...)

When "saved_tags->hdr.tag" is read => segfault !!

I let you see how to solv this...

good night !
27th October 2013, 04:59 AM |#31  
Shaky156's Avatar
Senior Member
Thanks Meter: 2,567
 
Donate to Me
More
Delete
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