The Bootloader is the first piece of code being executed at startup. Its main purpose is to load and start the OS (WinCE, Linux or others). The Bootloader is also the place where various settings can be changed. These settings are stored in the Config Block. There are basically two ways to change settings:
To boot a non-WinCE OS from Eboot, the OS binary needs to be modified before it is downloaded to the target hardware.
See the description of the Windows desktop tool CreateTBin.
The modified OS image OSbinary_TBin.bin can be downloaded to the target hardware by using the Colibri Loader Tool.
If Eboot finds an OS image that was tagged to be "Linux" (using the CreateTBin utility), the following parameters are set up:
Before the bootloader passes control to the operating system, it sets up a list of parameters in the RAM and CPU registers.
CPU Register | Content |
---|---|
r0 | 0x00000000 (constant) |
r1 | Linux machine number 0x000002d9 = PXA270 0x0000053C = PXA320 0x00000000 = other |
r2 | pointer to ATAG list |
The ATAG list is a linked list of parameter blocks.
It contains information about the system, the memory configuration, serial number, as well as a variable command line.
The format of the list is made compatible to common Linux implementations.
Offset | Content | Description |
---|---|---|
0 | size1 | Number of DWORDs, including header |
4 | tag | see ATAG list below |
8 | data | depending on the tag |
(4*size1)+0 | size2 | Number of DWORDs, including header |
(4*size1)+4 | tag | see ATAG list below |
(4*size1)+8 | data | depending on the tag |
... | ||
n+0 | size2 | Number of DWORDs, including header |
n+4 | ATAG_NONE | marks end of the list |
At the time of writing this article, the following ATAG parameter blocks were defined:
Tag Value | Tag Description |
---|---|
0x00000000 | ATAG_NONE |
0x54410001 | ATAG_CORE |
0x54410002 | ATAG_MEM |
0x54410006 | ATAG_SERIAL |
0x54410009 | ATAG_CMDLINE |
Kernel args for Linux are passed in the ATAG list described above. To be more precise, it is stored in the block ATAG_CMDLINE.
The command line passed to the OS can be changed by using the Eboot commandline. See [[Setconfig_Command]].
Go to the command promt of the Eboot and type the following:
set karg.arg="your kernel args"save karg
If Eboot finds an OS image that was tagged to be anything else than "Linux" (using the CreateTBin utility), there is no special behavior.
Eboot just launches the OS as it does with WinCE.