OpeniBoot

From iDroidWiki

Revision as of 10:50, 3 December 2021 by Neonkoala (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

About

OpeniBoot is an open source implementation of iBoot for Apple iPhone and iPod Touch devices. It allows booting of unsigned code such as linux kernels on the device. There is also and OpeniBoot console (oibc) which can be connected to from a libusb enabled computer.

OpeniBoot is critical for the booting and usage of linux on the iPhone as it sets up and initializes many devices ready for the linux kernel to take over. Many iBoot functions are replicated here, however when booting iOS iBoot is chainloaded from the NOR to guarantee iOS will boot without problems even with OpeniBoot installed.

Latest Version: 0.2

Supported Devices

Currently the following devices are supported by OpeniBoot:

Installation

For installation see the main page Installing OpeniBoot

Usage

Once loaded on the device you will be presented with the following screen:

Openiboot-iphone-linux.jpg

Controls

Menu Options

OpeniBoot Console

See OpeniBoot Console for documentation on oibc.

Configuring

OpeniBoot can be configured using NVRAM flags to allow automatic booting after a timer of any of the three options. OpeniBoot also supports quickbooting; when an NVRAM flag is set the selected OS will be booted for one time only before reverting to default option on subsequent boots.

These NVRAM flags can be configured manually from openiboot and iOS or graphically with the iOS application Bootlace.

NVRAM Flags

Manually Setting Flags

Under iOS:

nvram <varible>=<value>

Example, set timeout to 5 seconds:

nvram opib-menu-timeout=5000

Under openiboot console:

setenv <variable> <value>
saveenv

Example, set timeout to 5 seconds:

setenv opib-menu-timeout 5000
saveenv

Scripting

Scripting is now supported in openiboot and allows automatic booting for example. Scripts can be launched before OpeniBoot launches the shell or kernel.

To use scripting four environment variables (NVRAM values) must be set and a file in the NAND present.

NVRAM values:

How to write the script file

Scripts are standard text files which are separated by new lines (avoid extra newlines). Should handle Windows and Linux formatting as \r is ignored and only \n interpretted.

All internal openiboot commands work. Communication with computer doesn't work (so don't try to send or receive a file). oibc need changes to receive instructions from USB.

Example of script for updating openiboot automatically.

3 files stored in /private/var:

The contents of these text files:

update-openiboot-part1 :

uninstall
setenv file-script /update-openiboot-part2
setenv opib-hide-menu true
saveenv
fs_extract 1 /openiboot.bin 0x09000000
go

update-openiboot-part2 :

install
setenv opib-hide-menu false
setenv scripting-openiboot false
setenv scripting-linux false
saveenv
reboot


Note: You can install your script/kernel/images (if not too big) with OpeniBoot. The command to use is fs_add:

Usage: fs_add <partition> <file> <location> <size>

First step upload the file to OpeniBoot : !myFile OpeniBoot will tell you the size of the file. The address is by default 0x09000000 unless you specifed something different. You now have the location (address) and the size of the file. The file is the path to the on the device from the root of the partition. Partition is which partition to use.

Building

You can find further instructions on building OpeniBoot under both Linux and OS X on Building OpeniBoot

Personal tools
Namespaces
Variants
Actions
Wiki
Community
Toolbox