Difference between revisions of "Bootx (iBoot command)"

From The iPhone Wiki
Jump to: navigation, search
(Undo revision 7021 by DebraBromwick (Talk))
m (Updating)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
A command found in iBoot, iBSS, and iBEC that verifies and boots a kernelcache image which has been uploaded.
+
A command found in [[iBEC]], [[iBoot]], and [[iBSS]] that verifies and boots a [[kernelcache]] image which has been uploaded.
   
 
==Decompliation==
 
==Decompliation==
iPhone 3GS 8920x from iBoot-636.66
+
===[[N88AP|iPhone 3GS]] S5L8920x from [[iBoot-636.66]]===
 
#define kLoadAddress 0x41000000
 
#define kLoadAddress 0x41000000
 
#define kKernelMaxSize 0xF00000
 
#define kKernelMaxSize 0xF00000

Latest revision as of 08:37, 13 October 2015

Description

A command found in iBEC, iBoot, and iBSS that verifies and boots a kernelcache image which has been uploaded.

Decompliation

iPhone 3GS S5L8920x from iBoot-636.66

#define kLoadAddress 0x41000000
#define kKernelMaxSize 0xF00000

char** gBootArgs;

int cmd_bootx(int argc, CmdArg* argv) {
   void* address = NULL;
   if(argc > 1 && !strcmp("help", argv[1].string)) {
       printf("usage:\n\t%s [<address>]\n", argv[0].string);
       return -1;
   }
   
   if(range_check(kLoadAddress, kKernelMaxSize) < 0) {
       printf("Permission Denied\n");
       return -1;
   }
   
   printf("Attempting to validate kernelcache @ 0x%08x\n", kLoadAddress);
   int err = load_macho_image(kLoadAddress, kKernelMaxSize, &address)
   if(err >= 0) {
       printf("kernelcache prepped at address 0x%08x\n", address);
       jump_to(3, address, gBootArgs);
       
   } else {
       printf("error loading kernelcache\n");
   }
   
   return err;
}