NanoPayload

README.txt

198:9ade98c7b6af
2016-05-14 Paul Boddie Added copyright and licensing documentation.
     1 Introduction
     2 ------------
     3 
     4 NanoPayload is a test of bootable payloads for the Ben NanoNote, exploring the
     5 necessary initialisation activities to allow programs to run on the device.
     6 Unlike U-Boot, it does not seek to become a general framework for booting any
     7 kind of device; instead, it merely attempts to provide a minimal collection of
     8 routines for "bare metal" software usage in order to illustrate the
     9 initialisation requirements and to make it possible to deploy other software.
    10 
    11 An attempt has been made to also generate payloads for the jz4730-based
    12 MiniPC/Mipsbook/Minibook device. This device does not appear to support USB
    13 boot mode, and thus any payloads will need to be deployed by other means, such
    14 as through the use of SD/MMC media.
    15 
    16 Building a Payload
    17 ------------------
    18 
    19 To build the payload for the Ben NanoNote, just run make:
    20 
    21 make
    22 
    23 To build the payload for the MiniPC, define MINIPC in the invocation:
    24 
    25 make MINIPC=yes
    26 
    27 Make sure to clean if switching between these targets:
    28 
    29 make clean
    30 
    31 Deployment over USB
    32 -------------------
    33 
    34 The payloads can be deployed on the Ben NanoNote using the USB boot mode as
    35 described on the Qi-Hardware site:
    36 
    37 http://en.qi-hardware.com/wiki/USB_BOOT_mode
    38 
    39 The provided script can be issued on a USB host machine as follows (given
    40 sufficient privileges):
    41 
    42 ./boot_usb
    43 
    44 This employs the xbboot program which is available in the xburst-tools
    45 package:
    46 
    47 http://en.qi-hardware.com/wiki/Xburst-tools
    48 
    49 The different MiniPC products do not appear to support USB boot.
    50 
    51 Deployment using microSD/SD/MMC Media
    52 -------------------------------------
    53 
    54 The stage 2 payload can be written to a suitable media card as a uImage file
    55 which can then be loaded and invoked by a U-Boot bootloader already installed
    56 on the Ben NanoNote or MiniPC product.
    57 
    58 Typically, U-Boot on the Ben NanoNote will look for such a file located at
    59 /boot/uImage within the first partition of a microSD card. On the MiniPC,
    60 U-Boot will look for a file located at /uImage (in other words, a file called
    61 uImage in the top-level directory) within the first partition of an SD card.
    62 
    63 Since U-Boot should have initialised the RAM and clocks, the stage 1 payload
    64 is superfluous, and only the stage 2 payload is needed in this situation.
    65 
    66 Related U-Boot Resources
    67 ------------------------
    68 
    69 For the Ben NanoNote, some resources may only exist in the branch of U-Boot
    70 identified as u-boot-2012.10-rc2 when configuring OpenWrt. Others may exist in
    71 the principal U-Boot development branch, but differ between that branch and
    72 the previous XBurst-supporting branch.
    73 
    74 arch/mips/cpu/xburst/jz4740.c   RAM and clock-related initialisation
    75 arch/mips/lib/board.c           generic board initialisation
    76 arch/mips/include/asm/io.h      things like readl and writel
    77 board/qi/qi_lb60/qi_lb60.c      board-specific initialisation
    78 common/lcd.c                    generic LCD initialisation