2012-03-03

Slitaz -- raspi - boot

start.elf: The GPU binary firmware image, provided by the foundation.

0. download util-linux-ng-mount
http://dl.dropbox.com/u/1024195/util-linux-ng-mount-2.19.1.tazpkg
# mount -V
mount from util-linux 2.19.1 (with libblkid support)


1.
root@slitaz:/media/DATA/raspi/debian6-17-02-2012# file debian6-17-02-2012.img
debian6-17-02-2012.img: x86 boot sector; partition 1: ID=0xc, starthead 0, startsector 2048, 153600 sectors; partition 2: ID=0x83, starthead 3, startsector 157696, 3256320 sectors; partition 3: ID=0x82, starthead 3, startsector 3416064, 391168 sectors, code offset 0xb8


2.
root@slitaz:/media/DATA/raspi/debian6-17-02-2012# parted debian6-17-02-2012.img
GNU Parted 2.4
Using /media/DATA/raspi/debian6-17-02-2012/debian6-17-02-2012.img
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s                                                         
unit s
(parted) print                                                          
print
Model:  (file)
Disk /media/DATA/raspi/debian6-17-02-2012/debian6-17-02-2012.img: 3862528s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start     End       Size      Type     File system     Flags
 1      2048s     155647s   153600s   primary  fat32           lba
 2      157696s   3414015s  3256320s  primary  ext4
 3      3416064s  3807231s  391168s   primary  linux-swap(v1)

(parted) unit b                                                         
unit b
(parted) print                                                          
print
Model:  (file)
Disk /media/DATA/raspi/debian6-17-02-2012/debian6-17-02-2012.img: 1977614336B
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start        End          Size         Type     File system     Flags
 1      1048576B     79691775B    78643200B    primary  fat32           lba
 2      80740352B    1747976191B  1667235840B  primary  ext4
 3      1749024768B  1949302783B  200278016B   primary  linux-swap(v1)

(parted) quit                                                           
quit
root@slitaz:/media/DATA/raspi/debian6-17-02-2012#


3.
root@slitaz:/media/DATA/raspi/debian6-17-02-2012# mount -o loop,offset=1048576 -t vfat debian6-17-02-2012.img /mnt/raspi-fat
root@slitaz:/media/DATA/raspi/debian6-17-02-2012# ls -l /mnt/raspi-fat
total 28072
-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 arm128_start.elf
-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 arm192_start.elf
-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 arm224_start.elf
-rwxr-xr-x    1 root     root         16528 Feb 13 18:53 bootcode.bin
-rwxr-xr-x    1 root     root           141 Feb 14 18:38 cmdline_testmode.txt
-rwxr-xr-x    1 root     root           127 Feb 14 18:52 cmdline.txt
-rwxr-xr-x    1 root     root      16412020 Feb 14 18:47 kernel_emergency.img
-rwxr-xr-x    1 root     root       3990020 Feb 13 18:53 kernel.img
-rwxr-xr-x    1 root     root        314691 Feb 13 18:53 loader.bin
-rwxr-xr-x    1 root     root       2001244 Feb 17 12:02 start.elf
root@slitaz:/media/DATA/raspi/debian6-17-02-2012#



4.
https://github.com/raspberrypi/firmware/tree/master/boot
firmware / boot
    name     age history message
    ..        
file     arm128_start.elf     6 days ago    
file     arm192_start.elf     6 days ago    
file     arm224_start.elf     6 days ago    
file     bootcode.bin     6 days ago    
file     cmdline.txt     6 days ago    
file     kernel.img     6 days ago    
file     kernel_emergency.img     6 days ago    
file     loader.bin     6 days ago    
file     start.elf     6 days ago     


5.
http://elinux.org/RPi_Advanced_Setup
[..]
Setting up the boot partition
The boot partition must contain:

    bootcode.bin : 2nd stage bootloader, starts with SDRAM disabled
    loader.bin : 3rd stage bootloader, starts with SDRAM enabled
    start.elf: The GPU binary firmware image, provided by the foundation.
    kernel.img: The OS kernel to load on the ARM processor. Normally this is Linux - see instructions for compiling a kernel.
    cmdline.txt: Parameters passed to the kernel on boot.


Optional files:

    config.txt: A configuration file read by the GPU. Use this to override set the video mode, alter system clock speeds, voltages, etc.
    vlls directory: Additional GPU code, e.g. extra codecs. Not present in the initial release.

Additional files supplied by the foundation

These files are also present on the SD cards supplied by the foundation.

Additional kernels. Rename over kernel.img to use them (ensure you have a backup of the original kernel.img first!):

    kernel_emergency.img : kernel with busybox rootfs. You can use this to repair the main linux partition using e2fsck if the linux partition gets corrupted.


Additional GPU firmware images, rename over start.elf to use them:

    arm128_start.elf : 128M ARM, 128M GPU split (use this for heavy 3D work, possibly also required for some video decoding)
    arm192_start.elf : 192M ARM, 64M GPU split (this is the default)
    arm224_start.elf : 224M ARM, 32M GPU split (use this for Linux only with no 3D or video processing. Its enough for the 1080p framebuffer, but not much else)
.