Prafulla Wadaskar | 36e0eb6 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 1 | --------------------------------------------- |
| 2 | Kirkwood Boot Image generation using mkimage |
| 3 | --------------------------------------------- |
| 4 | |
| 5 | This document describes the U-Boot feature as it |
| 6 | is implemented for the Kirkwood family of SoCs. |
| 7 | |
| 8 | The Kirkwood SoC's can boot directly from NAND FLASH, |
| 9 | SPI FLASH, SATA etc. using its internal bootRom support. |
| 10 | |
| 11 | for more details refer section 24.2 of Kirkwood functional specifications. |
| 12 | ref: www.marvell.com/products/embedded.../kirkwood/index.jsp |
| 13 | |
| 14 | Command syntax: |
| 15 | -------------- |
| 16 | ./tools/mkimage -l <kwboot_file> |
| 17 | to list the kwb image file details |
| 18 | |
| 19 | ./tools/mkimage -n <board specific configuration file> \ |
| 20 | -T kwbimage -a <start address> -e <execution address> \ |
| 21 | -d <input_raw_binary> <output_kwboot_file> |
| 22 | |
| 23 | for ex. |
| 24 | ./tools/mkimage -n ./board/Marvell/openrd_base/kwbimage.cfg \ |
| 25 | -T kwbimage -a 0x00600000 -e 0x00600000 \ |
| 26 | -d u-boot.bin u-boot.kwb |
| 27 | |
| 28 | kwimage support available with mkimage utility will generate kirkwood boot |
| 29 | image that can be flashed on the board NAND/SPI flash |
| 30 | |
| 31 | Board specific configuration file specifications: |
| 32 | ------------------------------------------------ |
| 33 | 1. This file must present in the $(BOARDDIR) and the name should be |
| 34 | kwbimage.cfg (since this is used in Makefile) |
| 35 | 2. This file can have empty lines and lines starting with "#" as first |
| 36 | character to put comments |
| 37 | 3. This file can have configuration command lines as mentioned below, |
| 38 | any other information in this file is treated as invalid. |
| 39 | |
| 40 | Configuration command line syntax: |
| 41 | --------------------------------- |
| 42 | 1. Each command line is must have two strings, first one command or address |
| 43 | and second one data string |
| 44 | 2. Following are the valid command strings and associated data strings:- |
| 45 | Command string data string |
| 46 | -------------- ----------- |
| 47 | BOOT_FROM nand/spi/sata |
| 48 | NAND_ECC_MODE default/rs/hamming/disabled |
| 49 | NAND_PAGE_SIZE any uint16_t hex value |
| 50 | SATA_PIO_MODE any uint32_t hex value |
| 51 | DDR_INIT_DELAY any uint32_t hex value |
| 52 | DATA regaddr and regdara hex value |
| 53 | you can have maximum 55 such register programming commands |
| 54 | |
| 55 | 3. All commands are optional to program |
| 56 | |
| 57 | Typical example of kwimage.cfg file: |
| 58 | ----------------------------------- |
| 59 | |
| 60 | # Boot Media configurations |
| 61 | BOOT_FROM nand |
| 62 | NAND_ECC_MODE default |
| 63 | NAND_PAGE_SIZE 0x0800 |
| 64 | |
| 65 | # Configure RGMII-0 interface pad voltage to 1.8V |
| 66 | DATA 0xFFD100e0 0x1b1b1b9b |
| 67 | # DRAM Configuration |
| 68 | DATA 0xFFD01400 0x43000c30 |
| 69 | DATA 0xFFD01404 0x37543000 |
| 70 | DATA 0xFFD01408 0x22125451 |
| 71 | DATA 0xFFD0140C 0x00000a33 |
| 72 | DATA 0xFFD01410 0x000000cc |
| 73 | DATA 0xFFD01414 0x00000000 |
| 74 | DATA 0xFFD01418 0x00000000 |
| 75 | DATA 0xFFD0141C 0x00000C52 |
| 76 | DATA 0xFFD01420 0x00000040 |
| 77 | DATA 0xFFD01424 0x0000F17F |
| 78 | DATA 0xFFD01428 0x00085520 |
| 79 | DATA 0xFFD0147C 0x00008552 |
| 80 | DATA 0xFFD01504 0x0FFFFFF1 |
| 81 | DATA 0xFFD01508 0x10000000 |
| 82 | DATA 0xFFD0150C 0x0FFFFFF5 |
| 83 | DATA 0xFFD01514 0x00000000 |
| 84 | DATA 0xFFD0151C 0x00000000 |
| 85 | DATA 0xFFD01494 0x00030000 |
| 86 | DATA 0xFFD01498 0x00000000 |
| 87 | DATA 0xFFD0149C 0x0000E803 |
| 88 | DATA 0xFFD01480 0x00000001 |
| 89 | # End of Header extension |
| 90 | DATA 0x0 0x0 |
| 91 | |
| 92 | ------------------------------------------------ |
| 93 | Author: Prafulla Wadaskar <prafulla@marvell.com> |