Prafulla Wadaskar | aa0c7a8 | 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> \ |
Wolfgang Denk | 4946775 | 2009-10-28 00:49:47 +0100 | [diff] [blame] | 20 | -T kwbimage -a <start address> -e <execution address> \ |
Prafulla Wadaskar | aa0c7a8 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 21 | -d <input_raw_binary> <output_kwboot_file> |
| 22 | |
| 23 | for ex. |
| 24 | ./tools/mkimage -n ./board/Marvell/openrd_base/kwbimage.cfg \ |
Wolfgang Denk | 4946775 | 2009-10-28 00:49:47 +0100 | [diff] [blame] | 25 | -T kwbimage -a 0x00600000 -e 0x00600000 \ |
Prafulla Wadaskar | aa0c7a8 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 26 | -d u-boot.bin u-boot.kwb |
| 27 | |
Karl O. Pinc | 1ff1f89 | 2012-08-02 16:51:56 +0000 | [diff] [blame] | 28 | |
Karl O. Pinc | 32324b7 | 2012-08-02 16:09:32 +0000 | [diff] [blame] | 29 | kwbimage support available with mkimage utility will generate kirkwood boot |
Karl O. Pinc | 1ff1f89 | 2012-08-02 16:51:56 +0000 | [diff] [blame] | 30 | image that can be flashed on the board NAND/SPI flash. The make target |
| 31 | which uses mkimage to produce such an image is "u-boot.kwb". For example: |
| 32 | |
Timo Ketola | adbba99 | 2014-11-06 14:39:05 +0200 | [diff] [blame] | 33 | export KBUILD_OUTPUT=/tmp/build |
Karl O. Pinc | 1ff1f89 | 2012-08-02 16:51:56 +0000 | [diff] [blame] | 34 | make distclean |
| 35 | make yourboard_config |
Timo Ketola | adbba99 | 2014-11-06 14:39:05 +0200 | [diff] [blame] | 36 | make u-boot.kwb |
Karl O. Pinc | 1ff1f89 | 2012-08-02 16:51:56 +0000 | [diff] [blame] | 37 | |
Prafulla Wadaskar | aa0c7a8 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 38 | |
| 39 | Board specific configuration file specifications: |
| 40 | ------------------------------------------------ |
Karl O. Pinc | 1ff1f89 | 2012-08-02 16:51:56 +0000 | [diff] [blame] | 41 | 1. This file must present in the $(BOARDDIR). The default name is |
| 42 | kwbimage.cfg. The name can be set as part of the full path |
Wolfgang Denk | 93e1459 | 2013-10-04 17:43:24 +0200 | [diff] [blame] | 43 | to the file using CONFIG_SYS_KWD_CONFIG (probably in |
| 44 | include/configs/<yourboard>.h). The path should look like: |
Tom Rini | 207972a | 2022-12-04 10:03:37 -0500 | [diff] [blame^] | 45 | $(CFG_BOARDDIR)/<yourkwbimagename>.cfg |
Prafulla Wadaskar | aa0c7a8 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 46 | 2. This file can have empty lines and lines starting with "#" as first |
| 47 | character to put comments |
| 48 | 3. This file can have configuration command lines as mentioned below, |
| 49 | any other information in this file is treated as invalid. |
| 50 | |
| 51 | Configuration command line syntax: |
| 52 | --------------------------------- |
| 53 | 1. Each command line is must have two strings, first one command or address |
| 54 | and second one data string |
| 55 | 2. Following are the valid command strings and associated data strings:- |
| 56 | Command string data string |
| 57 | -------------- ----------- |
| 58 | BOOT_FROM nand/spi/sata |
| 59 | NAND_ECC_MODE default/rs/hamming/disabled |
| 60 | NAND_PAGE_SIZE any uint16_t hex value |
| 61 | SATA_PIO_MODE any uint32_t hex value |
| 62 | DDR_INIT_DELAY any uint32_t hex value |
| 63 | DATA regaddr and regdara hex value |
| 64 | you can have maximum 55 such register programming commands |
| 65 | |
| 66 | 3. All commands are optional to program |
| 67 | |
| 68 | Typical example of kwimage.cfg file: |
| 69 | ----------------------------------- |
| 70 | |
| 71 | # Boot Media configurations |
| 72 | BOOT_FROM nand |
| 73 | NAND_ECC_MODE default |
| 74 | NAND_PAGE_SIZE 0x0800 |
| 75 | |
| 76 | # Configure RGMII-0 interface pad voltage to 1.8V |
| 77 | DATA 0xFFD100e0 0x1b1b1b9b |
| 78 | # DRAM Configuration |
| 79 | DATA 0xFFD01400 0x43000c30 |
| 80 | DATA 0xFFD01404 0x37543000 |
| 81 | DATA 0xFFD01408 0x22125451 |
| 82 | DATA 0xFFD0140C 0x00000a33 |
| 83 | DATA 0xFFD01410 0x000000cc |
| 84 | DATA 0xFFD01414 0x00000000 |
| 85 | DATA 0xFFD01418 0x00000000 |
| 86 | DATA 0xFFD0141C 0x00000C52 |
| 87 | DATA 0xFFD01420 0x00000040 |
| 88 | DATA 0xFFD01424 0x0000F17F |
| 89 | DATA 0xFFD01428 0x00085520 |
| 90 | DATA 0xFFD0147C 0x00008552 |
| 91 | DATA 0xFFD01504 0x0FFFFFF1 |
| 92 | DATA 0xFFD01508 0x10000000 |
| 93 | DATA 0xFFD0150C 0x0FFFFFF5 |
| 94 | DATA 0xFFD01514 0x00000000 |
| 95 | DATA 0xFFD0151C 0x00000000 |
| 96 | DATA 0xFFD01494 0x00030000 |
| 97 | DATA 0xFFD01498 0x00000000 |
| 98 | DATA 0xFFD0149C 0x0000E803 |
| 99 | DATA 0xFFD01480 0x00000001 |
| 100 | # End of Header extension |
| 101 | DATA 0x0 0x0 |
| 102 | |
| 103 | ------------------------------------------------ |
| 104 | Author: Prafulla Wadaskar <prafulla@marvell.com> |