Skip to content

Commit

Permalink
Added boot_ios command.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neonkoala authored and Neonkoala committed Nov 6, 2010
1 parent 55c8076 commit b12fb89
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions openiboot/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void cmd_rootfs(int argc, char** argv) {
bufferPrintf("set rootfs to %s on partition %d\r\n", fileName, partition);
}

void cmd_boot(int argc, char** argv) {
void cmd_boot_linux(int argc, char** argv) {
char* arguments = "";

if(argc >= 2) {
Expand All @@ -362,6 +362,15 @@ void cmd_boot(int argc, char** argv) {
boot_linux(arguments);
}

void cmd_boot_ios(int argc, char** argv) {
Image* image = images_get(fourcc("ibox"));
if(image == NULL)
image = images_get(fourcc("ibot"));
void* imageData;
images_read(image, &imageData);
chainload((uint32_t)imageData);
}

void cmd_go(int argc, char** argv) {
uint32_t address;

Expand Down Expand Up @@ -1296,7 +1305,8 @@ OPIBCommand CommandList[] =
{"kernel", "load a Linux kernel", cmd_kernel},
{"ramdisk", "load a Linux ramdisk", cmd_ramdisk},
{"rootfs", "specify a file as the Linux rootfs", cmd_rootfs},
{"boot", "boot a Linux kernel", cmd_boot},
{"boot_linux", "boot a Linux kernel", cmd_boot_linux},
{"boot_ios", "boot a iOS via iBoot", cmd_boot_ios},
{"go", "jump to a specified address (interrupts disabled)", cmd_go},
{"jump", "jump to a specified address (interrupts enabled)", cmd_jump},
{"version", "display the version string", cmd_version},
Expand Down

0 comments on commit b12fb89

Please sign in to comment.