Commit d085ecd61b9956cda0d37b89b5c538f54440fe58

Authored by Masahiro Yamada
1 parent cbbc2d80fc

ARM: uniphier: switch to raw U-Boot image

Now everything is done to load a raw U-Boot proper image instead of
an mkimage-processed one (as far as I tested on NAND, eMMC, NOR).

The SPL already knows the load address of the U-Boot proper without
parsing its uImage header because the load address is defined by
CONFIG_SYS_TEXT_BASE, assuming that the two images are generated from
the same build.

My main motivation of this switch is to use u-boot-with-spl.bin, a
concatenation of u-boot-spl.bin and u-boot.bin.  (I wish there were
a concatenation of u-boot-spl.bin and u-boot.img...)  Anyway, this
commit would be useful for one-shot image burn.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Showing 2 changed files with 22 additions and 9 deletions Side-by-side Diff

... ... @@ -75,12 +75,17 @@
75 75 Burn U-Boot images to NAND
76 76 --------------------------
77 77  
78   -Write two files to the NAND device as follows:
  78 +Write the following to the NAND device:
  79 +
79 80 - spl/u-boot-spl.bin at the offset address 0x00000000
80   - - u-boot.img at the offset address 0x00010000
  81 + - u-boot.bin at the offset address 0x00010000
81 82  
  83 +or
  84 +
  85 + - u-boot-with-spl.bin at the offset address 0x00000000
  86 +
82 87 If a TFTP server is available, the images can be easily updated.
83   -Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory,
  88 +Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory,
84 89 and then run the following command at the U-Boot command line:
85 90  
86 91 => run nandupdate
87 92  
88 93  
89 94  
... ... @@ -89,12 +94,17 @@
89 94 Burn U-Boot images to eMMC
90 95 --------------------------
91 96  
92   -Write two files to the Boot partition 1 of the eMMC device as follows:
  97 +Write the following to the Boot partition 1 of the eMMC device:
  98 +
93 99 - spl/u-boot-spl.bin at the offset address 0x00000000
94   - - u-boot.img at the offset address 0x00010000
  100 + - u-boot.bin at the offset address 0x00010000
95 101  
  102 +or
  103 +
  104 + - u-boot-with-spl.bin at the offset address 0x00000000
  105 +
96 106 If a TFTP server is available, the images can be easily updated.
97   -Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory,
  107 +Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory,
98 108 and then run the following command at the U-Boot command line:
99 109  
100 110 => run emmcupdate
include/configs/uniphier.h
... ... @@ -61,6 +61,7 @@
61 61  
62 62 #define CONFIG_SYS_MAX_FLASH_SECT 256
63 63 #define CONFIG_SYS_MONITOR_BASE 0
  64 +#define CONFIG_SYS_MONITOR_LEN 0x00080000 /* 512KB */
64 65 #define CONFIG_SYS_FLASH_BASE 0
65 66  
66 67 /*
67 68  
... ... @@ -233,12 +234,12 @@
233 234 "mmc erase 0 800 &&" \
234 235 "tftpboot u-boot-spl.bin &&" \
235 236 "mmc write $loadaddr 0 80 &&" \
236   - "tftpboot u-boot.img &&" \
  237 + "tftpboot u-boot.bin &&" \
237 238 "mmc write $loadaddr 80 780\0" \
238 239 "nandupdate=nand erase 0 0x00100000 &&" \
239 240 "tftpboot u-boot-spl.bin &&" \
240 241 "nand write $loadaddr 0 0x00010000 &&" \
241   - "tftpboot u-boot.img &&" \
  242 + "tftpboot u-boot.bin &&" \
242 243 "nand write $loadaddr 0x00010000 0x000f0000\0" \
243 244 LINUXBOOT_ENV_SETTINGS
244 245  
245 246  
... ... @@ -272,9 +273,11 @@
272 273  
273 274 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x10000
274 275  
275   -#define CONFIG_SYS_UBOOT_BASE 0x60000
  276 +/* subtract sizeof(struct image_header) */
  277 +#define CONFIG_SYS_UBOOT_BASE (0x60000 - 0x40)
276 278 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80
277 279  
  280 +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
278 281 #define CONFIG_SPL_MAX_FOOTPRINT 0x10000
279 282  
280 283 #endif /* __CONFIG_UNIPHIER_COMMON_H__ */