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