|
|
A bootable SD card or eMMC for the Pyra consists of 3 components:
|
|
|
- Bootloader
|
|
|
- ext4 boot partition containing kernel, initramfs, device tree, and boot configuration scripts
|
|
|
- f2fs rootfs partition containing PyraOS
|
|
|
|
|
|
When booting, the OMAP5 bootROM looks for a bootloader first in the left SD card slot, and then on the eMMC. It will look for a valid SPL (Secondary Program Loader, MLO on TI platforms) at a 128k offset from the beginning of the first block of the SD/MMC. The SPL does initial setup of the device, most importantly RAM configuration, before loading the third-stage bootloader (U-Boot) at a 384k offset from the beginning of the first block of the SD/MMC. These offsets are important, since they are hardcoded.
|
|
|
|
|
|
Once PyraOS U-Boot has loaded and fully configured the hardware, it first looks into the root directory of the first partition on the SD/MMC for configuration file `uEnv.txt`. This file is used for overriding the default environment variables. If no file is found, the system automatically detects the hardware configuration and kicks off `extlinux`, the default boot method. `extlinux` provides a boot menu allowing the user to select the desired kernel to boot.
|
|
|
|
|
|
If you would like to manually provide a kernel and device tree, provide a `uEnv.txt` which defines the `bootfile`, `fdtfile`, and redefines `bootos` like the following
|
|
|
```
|
|
|
bootfile=<kernel_filename>
|
|
|
fdtfile=<dtb_filename>
|
|
|
bootos=run loados; bootz ${loadaddr} - ${fdtaddr}
|
|
|
```
|
|
|
|
|
|
### SD card (left slot)
|
|
|
#### The scripted method
|
|
|
Luckily for everyone, aTc has created a script which handles flashing an SD card to be booted from the left slot. The following instructions you have a recent version of PyraOS and U-Boot generated.
|
|
|
|
|
|
First clone the `pyra-install` repository
|
|
|
```
|
|
|
git clone git@dev.pyra-handheld.com:atc/pyra-install.git
|
|
|
cd pyra-install
|
|
|
```
|
|
|
Next, insert your SD card and ensure that it has enumerated. BE CAREFUL! It's very important that you know the path for your SD card. If you continue without being absolutely sure, you may accidentally cause data corruption of your computer. `dmesg` helps here. From this point forward, the SD card enumerated will be referred to as `sdX`.
|
|
|
```
|
|
|
dmesg -w
|
|
|
# Insert SD card
|
|
|
# Take note of character device assigned, likely sdX
|
|
|
# <Ctl+C>
|
|
|
```
|
|
|
|
|
|
Now you're ready to run `pyra-install`. Note that `/dev/sdX` is the character device for your SD card discovered earlier. Also note that you should direct `pyra-install` to a recent build of U-Boot for newest features.
|
|
|
```
|
|
|
./pyra-install path/to/pyraos-rootfs.tar.gz path/to/uboot/dir /dev/sdX
|
|
|
```
|
|
|
|
|
|
### eMMC/microSD (internal)
|
|
|
Coming soon! |
|
|
\ No newline at end of file |