iBoce
Linux Boot Loader for the iPAQ - (c) 2001 Evolane
Evolane
87, avenue de Nice
F-06800 Cagnes-sur-Mer (France)
SYNOPSYS
iBoce is a small program that allows to to boot Linux (or some other O.S.) directly
fron Windows CE tm, without the need for flashing your iPAQ. It does so by
preloading the required data (kernel image, root image, ...) into RAM before preparing the
hardware and jumping to the kernel entry point.
You may find this program particulary useful if :
- you want to try Linux on your iPAQ, but don't feel confident enough to erase your
current flash content, taking the risk to transform your handheld into a brick
- you have a Compact Flash sleeve, and want to enjoy the opportunity to switch from one
Linux distribution to another by just plugging in the adequate Compact Flash card
- you often have to test new Linux configurations, and want to enjoy the possibility to
transfer very fast your new kernel or ramdisk using USB or Ethernet.
iBoce is part of the Evoles project, a new
declinaison of Linux for embedded device, based on highly portable tools (Tcl, JAVA) and
standards (XML, HTML). More information on the Evoles platform can be found at http://www.evoles.com or http://www.evolane.com/evoles.
CONFIGURATION
When iBoce is started, it reads its configuration from a file called 'iboce.txt' in the
same directory than the main executable. Each time a file name is not absolute, it is
considered relative to the directory of the executable.
Global options
timeout=integer
This gives the delay (in seconds) before the default boot session is started. If value=0,
the session will be booted immediatly, without displaying any interface. If value<0,
the countdown will be disabled.
default=sessionname
Name of the default option, i.e. the one that will be booted automatically when a
timeout is defined. If this option is not present, the default session is the first one
defined in the configuration file.
Sessions
A session describe a special boot process. It is declared as :
[session_name]
option=value
option=value
...
where name is the name of the session.
Standard options
image=filename[,addr[,mirror]]
Name of the file containing the kernel image.
ramdisk=filename[,addr[,mirror]]
Name of the file containing the ramdisk image.
loader=filename
Name of the file containing the external bootloader code.
cmdline=arg1 ... argn
Set the command line passed to the Linux kernel.
append=arg1 ... argn
Append additional arguments to the command line passed to the Linux kernel.
serial=baudrate
Define the default configuration for the serial console. Set baudrate to a negative
value to disable the initialization of the console.
include=sessionname
Import all the configuration from the given session name into current session. All
options not explicitely defined into the source session are left unchanged into current
session.
bootable=bool
This decides if the current session is a bootable one (default is true). A non bootable
session is useful when used in conjonction with the include statement, to define a partial
configuration common to several bootable sessions.
Advanced options
Those options allow the user to setup precisely the memory layout that will be used
during the boot process. Each address can be given either as a decimal number or, more
logically, as an hexadecimal one (for example 0xc0008000).
imageaddr=addr
Set the physical address where the kernel data will be copied. This default to
0xc0008000 when using the internal boot loader, or to 0xc0400000 if an external boot
loader as been specified.
tagsaddr=addr
Set the physical address where the Linux tags will be copied. Linux tags are the
translation of the parameters (command line, randisk size, etc...) to pass to the Linux
kernel. This default to 0xc0000100 if no external boot loader is loaded, or to none (i.e.
addr=0) otherwise. This cluster will always be less than 0xf00 bytes large.
ramdiskaddr=addr
Set the physical address where the ramdisk data will be copied. This default to
0xc0800000.
loaderaddr=addr
Set the physical address where the boot loader will be copied. For compatibility with
the OSLoader program, this default to 0xc0022000.
entry=addr
Define the physical address to jump at for booting. If none provided, this default to
the address of the loader if defined, or to the address of the kernel otherwise.
INTERNALS
This section briefly presents the principles used internally by the iBoce boot loader.
iBoce has been designed to keep algorithms as concise and explicit as possible. The bot
process has been divided into 4 stages :
Initial memory layout (from WinCE)
Compute the required number of pages (npages=sum(data)+3) and allocated them. Last three
pages are respectively for Boot code2, Boot code 3 and Boot code 1 (see below).
Compute upper bound for the memory region that will get occupied by data
(upper=max(max(target[i]+size[i], i=0..n-1))).
reserved=max(upper,start of RAM+npages*pagesize)
Boot3_target=reserved
LCD_target=reserved+pagesize
Allocated pages are spread into RAM, so locate them, and order them according to their
physical address.
Call Exec, which is the interface between the Windows CE world and the assembler one. It
will disable MMU and interrupts and jump to boot code 1
Boot stage 1 :
compact all the npages-1 pages as a contiguous block starting at the beginning of RAM.
Jump to new location of boot code 2 (=start of RAM+(npages-3)*pagesize)
Boot stage 2 :
Compute reserved address = max(current adress of Boot stage 3,
Copy code for 'Boot stage 3' to the previously computed Boot3_Target, and jump to this
address.
Boot stage 3 :
Translate each cluster to its final location (for i=n-1 to i=0). This is necessarily a
forward translation, so since we start by translation the last file, no overlap can occur.
Prepare hardware (LCD, Serial, MMU, etc...). This is highly platform specific.
Jump to kernel entry point
SUPPORT
More informations (FAQ, mailing list, documentation,...) and latest revision can be
found at http://www.evolane.com.
LICENSE
iBoce is actually distributed only in binary format. It is free of use for individuals.
If you wish to use it in a commercial project, please contact our commercial team at sales@evolane.com for getting a licence.
TODO
Evolane actually does not have the required (human and material) ressources for
extensive developpement on iBoce, since most of its activities are focused on the Evoles
embedded system, and derived works for customers. However, we plan to use some
functionnalites that may be of general interest :
- test and adapt for booting several operating systems (NetBSD, etc...).
- support for "on the fly" decompression of data. This consist in adding
the free "libz" library into the code.
- support for flashing, and/or better collaboration with the genuine Compaq Research
Laboratory boot loader to propose a fully automatic installation procedure by
preloading all the data in RAM, without the need for XMODEM or TFTP transfers. This appear
to be a relatively straight-forward task. The reason we did not already integrated such a
functionnality into current version is that the very few iPAQ we own are all crucial to
some other actual projects, so we definitaly could not take the risk to transform one of
them into a brick and wait too long for CRL to fix it. However, if someone (CRL ?) accepts
to provide us with some kind of support that could prevent us from this risk (JTAG cable
with related technical ressources to restore FLASH, additional iPAQ handheld for testing,
financial support, etc...), please contact us (evolane@evolane.com)
so that we could go further in this direction.
|