blob: 762b2e3acb71e08f9335baa72a67759a1f5bbd1d [file] [log] [blame]
Prafulla Wadaskar07329412009-09-07 15:05:02 +05301---------------------------------------------
2Kirkwood Boot Image generation using mkimage
3---------------------------------------------
4
5This document describes the U-Boot feature as it
6is implemented for the Kirkwood family of SoCs.
7
8The Kirkwood SoC's can boot directly from NAND FLASH,
9SPI FLASH, SATA etc. using its internal bootRom support.
10
11for more details refer section 24.2 of Kirkwood functional specifications.
12ref: www.marvell.com/products/embedded.../kirkwood/index.jsp
13
14Command 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 Denkd61fbcc2009-10-28 00:49:47 +010020 -T kwbimage -a <start address> -e <execution address> \
Prafulla Wadaskar07329412009-09-07 15:05:02 +053021 -d <input_raw_binary> <output_kwboot_file>
22
23for ex.
24./tools/mkimage -n ./board/Marvell/openrd_base/kwbimage.cfg \
Wolfgang Denkd61fbcc2009-10-28 00:49:47 +010025 -T kwbimage -a 0x00600000 -e 0x00600000 \
Prafulla Wadaskar07329412009-09-07 15:05:02 +053026 -d u-boot.bin u-boot.kwb
27
Karl O. Pinc4ac207d2012-08-02 16:51:56 +000028
Karl O. Pincaceeaa32012-08-02 16:09:32 +000029kwbimage support available with mkimage utility will generate kirkwood boot
Karl O. Pinc4ac207d2012-08-02 16:51:56 +000030image that can be flashed on the board NAND/SPI flash. The make target
31which uses mkimage to produce such an image is "u-boot.kwb". For example:
32
Timo Ketolac8c67602014-11-06 14:39:05 +020033 export KBUILD_OUTPUT=/tmp/build
Karl O. Pinc4ac207d2012-08-02 16:51:56 +000034 make distclean
35 make yourboard_config
Timo Ketolac8c67602014-11-06 14:39:05 +020036 make u-boot.kwb
Karl O. Pinc4ac207d2012-08-02 16:51:56 +000037
Prafulla Wadaskar07329412009-09-07 15:05:02 +053038
39Board specific configuration file specifications:
40------------------------------------------------
Karl O. Pinc4ac207d2012-08-02 16:51:56 +0000411. 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 Denkec7fbf52013-10-04 17:43:24 +020043 to the file using CONFIG_SYS_KWD_CONFIG (probably in
44 include/configs/<yourboard>.h). The path should look like:
Masahiro Yamadad6acdf22014-03-11 11:05:17 +090045 $(CONFIG_BOARDDIR)/<yourkwbimagename>.cfg
Prafulla Wadaskar07329412009-09-07 15:05:02 +0530462. This file can have empty lines and lines starting with "#" as first
47 character to put comments
483. This file can have configuration command lines as mentioned below,
49 any other information in this file is treated as invalid.
50
51Configuration command line syntax:
52---------------------------------
531. Each command line is must have two strings, first one command or address
54 and second one data string
552. 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
663. All commands are optional to program
67
68Typical example of kwimage.cfg file:
69-----------------------------------
70
71# Boot Media configurations
72BOOT_FROM nand
73NAND_ECC_MODE default
74NAND_PAGE_SIZE 0x0800
75
76# Configure RGMII-0 interface pad voltage to 1.8V
77DATA 0xFFD100e0 0x1b1b1b9b
78# DRAM Configuration
79DATA 0xFFD01400 0x43000c30
80DATA 0xFFD01404 0x37543000
81DATA 0xFFD01408 0x22125451
82DATA 0xFFD0140C 0x00000a33
83DATA 0xFFD01410 0x000000cc
84DATA 0xFFD01414 0x00000000
85DATA 0xFFD01418 0x00000000
86DATA 0xFFD0141C 0x00000C52
87DATA 0xFFD01420 0x00000040
88DATA 0xFFD01424 0x0000F17F
89DATA 0xFFD01428 0x00085520
90DATA 0xFFD0147C 0x00008552
91DATA 0xFFD01504 0x0FFFFFF1
92DATA 0xFFD01508 0x10000000
93DATA 0xFFD0150C 0x0FFFFFF5
94DATA 0xFFD01514 0x00000000
95DATA 0xFFD0151C 0x00000000
96DATA 0xFFD01494 0x00030000
97DATA 0xFFD01498 0x00000000
98DATA 0xFFD0149C 0x0000E803
99DATA 0xFFD01480 0x00000001
100# End of Header extension
101DATA 0x0 0x0
102
103------------------------------------------------
104Author: Prafulla Wadaskar <prafulla@marvell.com>