NanoPayload

README.txt

83:74d6abed3b81
2015-12-05 Paul Boddie Attempted to map two 16MB regions, one for the program and one for the screen. stage2-non-pic
     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 Deployment over USB
    17 -------------------
    18 
    19 The payloads can be deployed on the Ben NanoNote using the USB boot mode as
    20 described on the Qi-Hardware site:
    21 
    22 http://en.qi-hardware.com/wiki/USB_BOOT_mode
    23 
    24 The provided script can be issued on a USB host machine as follows (given
    25 sufficient privileges):
    26 
    27 ./boot_usb
    28 
    29 This employs the xbboot program which is available in the xburst-tools
    30 package:
    31 
    32 http://en.qi-hardware.com/wiki/Xburst-tools
    33 
    34 The different MiniPC products do not appear to support USB boot.
    35 
    36 Deployment using microSD/SD/MMC Media
    37 -------------------------------------
    38 
    39 The stage 2 payload can be written to a suitable media card as a uImage file
    40 which can then be loaded and invoked by a U-Boot bootloader already installed
    41 on the Ben NanoNote or MiniPC product.
    42 
    43 Typically, U-Boot on the Ben NanoNote will look for such a file located at
    44 /boot/uImage within the first partition of a microSD card. On the MiniPC,
    45 U-Boot will look for a file located at /uImage (in other words, a file called
    46 uImage in the top-level directory) within the first partition of an SD card.
    47 
    48 Since U-Boot should have initialised the RAM and clocks, the stage 1 payload
    49 is superfluous, and only the stage 2 payload is needed in this situation.
    50 
    51 Related U-Boot Resources
    52 ------------------------
    53 
    54 For the Ben NanoNote, some resources may only exist in the branch of U-Boot
    55 identified as u-boot-2012.10-rc2 when configuring OpenWrt. Others may exist in
    56 the principal U-Boot development branch, but differ between that branch and
    57 the previous XBurst-supporting branch.
    58 
    59 arch/mips/cpu/xburst/jz4740.c   RAM and clock-related initialisation
    60 arch/mips/lib/board.c           generic board initialisation
    61 arch/mips/include/asm/io.h      things like readl and writel
    62 board/qi/qi_lb60/qi_lb60.c      board-specific initialisation
    63 common/lcd.c                    generic LCD initialisation