[U-Boot] [PATCH] powerpc/tools/pblimage: use SYS_TEXT_BASE instead of hardcoded value

Shaohui Xie Shaohui.Xie at freescale.com
Wed Mar 27 09:39:17 CET 2013


That the pblimage can be built according to the SYS_TEXT_BASE, then building a
different size of pblimage is available.

Signed-off-by: Shaohui Xie <Shaohui.Xie at freescale.com>
---
 tools/pblimage.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/pblimage.c b/tools/pblimage.c
index 508a747..60277a4 100644
--- a/tools/pblimage.c
+++ b/tools/pblimage.c
@@ -29,10 +29,9 @@
  * The PBL can load up to 64 bytes at a time, so we split the U-Boot
  * image into 64 byte chunks. PBL needs a command for each piece, of
  * the form "81xxxxxx", where "xxxxxx" is the offset. SYS_TEXT_BASE
- * is 0xFFF80000 for PBL boot, and PBL only cares about low 24-bit,
- * so it starts from 0x81F80000.
+ * is the start offset and PBL only cares about low 24-bit.
  */
-static uint32_t next_pbl_cmd = 0x81F80000;
+static uint32_t next_pbl_cmd = 0x81000000 | (CONFIG_SYS_TEXT_BASE & 0xFFFFFF);
 /*
  * need to store all bytes in memory for calculating crc32, then write the
  * bytes to image file for PBL boot.
-- 
1.8.0




More information about the U-Boot mailing list