P4080/PBL: add tool to support pbl image build.
PATCH 2/2 P4080/PBL: add tool to support pbl image build.
The tool can build u-boot image which can be used by PBL, run "make P4080DS_RAMBOOT_PBL" can make all works done, the default output image is u-boot.pbl, for more details please refer to doc/README.pblimage.
--- Makefile | 5 + board/freescale/corenet_ds/config.mk | 26 +++ board/freescale/corenet_ds/pblimage.cfg | 59 ++++++ common/image.c | 1 + doc/README.pblimage | 83 ++++++++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 5 + tools/mkimage.h | 2 + tools/pblimage.c | 329 +++++++++++++++++++++++++++++++ tools/pblimage.h | 36 ++++ 11 files changed, 549 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/pblimage.cfg create mode 100644 doc/README.pblimage create mode 100644 tools/pblimage.c create mode 100644 tools/pblimage.h
Makefile +5 -0
@@ -361,6 +361,10 @@ $(obj)u-boot.kwb: $(obj)u-boot.bin $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ +$(obj)u-boot.pbl: $(obj)u-boot.bin + $(obj)tools/mkimage -n $(PBL_CONFIG) -T pblimage \ + -d $< $@ + $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)tools/ubsha1 $(obj)u-boot.bin
@@ -1156,6 +1160,7 @@ clobber: clean $(obj)cscope.* $(obj)*.*~ @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL) @rm -f $(obj)u-boot.kwb + @rm -f $(obj)u-boot.pbl @rm -f $(obj)u-boot.imx @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
board/freescale/corenet_ds/config.mk new file +26 -0
@@ -0,0 +1,26 @@ +# +# Copyright 2011 Freescale Semiconductor, Inc. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +ifeq ($(CONFIG_RAMBOOT_PBL), y) +PBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/pblimage.cfg +ALL += $(obj)u-boot.pbl +endif
board/freescale/corenet_ds/pblimage.cfg new file +59 -0
59 lines not on this page · raw message
common/image.c +1 -0
@@ -141,6 +141,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_FLATDT, "flat_dt", "Flat Device Tree", }, { IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",}, { IH_TYPE_IMXIMAGE, "imximage", "Freescale i.MX Boot Image",}, + { IH_TYPE_PBLIMAGE, "pblimage", "Freescale PBL Boot Image",}, { -1, "", "", }, };
doc/README.pblimage new file +83 -0
83 lines not on this page · raw message
include/image.h +1 -0
@@ -157,6 +157,7 @@#define IH_TYPE_FLATDT 8/* Binary Flat Device Tree Blob */ #define IH_TYPE_KWBIMAGE 9/* Kirkwood Boot Image */ #define IH_TYPE_IMXIMAGE 10/* Freescale IMXBoot Image */ +#define IH_TYPE_PBLIMAGE 11/* Freescale PBLBoot Image */ /* * Compression Types
tools/Makefile +2 -0
@@ -83,6 +83,7 @@ OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o NOPED_OBJ_FILES-y += kwbimage.o +NOPED_OBJ_FILES-y += pblimage.o NOPED_OBJ_FILES-y += imximage.o NOPED_OBJ_FILES-y += mkimage.o OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
@@ -181,6 +182,7 @@ $(obj)mkimage$(SFX): $(obj)crc32.o \ $(obj)image.o \ $(obj)imximage.o \ $(obj)kwbimage.o \ + $(obj)pblimage.o \ $(obj)md5.o \ $(obj)mkimage.o \ $(obj)os_support.o \
tools/mkimage.c +5 -0
@@ -149,6 +149,8 @@ main (int argc, char **argv)int retval =0 ;struct image_type_params *tparams =NULL ; +/* Init Freescale PBL Boot image generation/list support */ +init_pbl_image_type ();/* Init Kirkwood Boot image generation/list support */ init_kwb_image_type ();/* Init Freescale imx Boot image generation/list support */
@@ -421,6 +423,9 @@ NXTARG: ;break ; } } + }else if (params.type ==IH_TYPE_PBLIMAGE ) { +/* the copy_file need to be re-write for PBL. */ +pbl_load_uboot (ifd, ¶ms); }else {copy_file (ifd, params.datafile,0 ); }
tools/mkimage.h +2 -0
@@ -139,6 +139,8 @@ void mkimage_register (struct image_type_params *tparams);* * Supported image types init functions */ +void pbl_load_uboot (int ,struct mkimage_params *); +void init_pbl_image_type (void );void init_kwb_image_type (void );void init_imx_image_type (void );void init_default_image_type (void );
tools/pblimage.c new file +329 -0
329 lines not on this page · raw message
tools/pblimage.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright 2011 Freescale Semiconductor, Inc. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _PBLIMAGE_H_ +#define _PBLIMAGE_H_ + +#define RCW_BYTES 64 +#define RCW_PREAMBLE 0xaa55aa55 +#define RCW_HEADER 0x010e0100 + +struct pbl_header { +uint32_t preamble; +uint32_t rcwheader; +uint8_t rcw_data[RCW_BYTES ]; +}; + +#endif /* _PBLIMAGE_H_ */
Signature · 1 line
1.6.4
PATCH 2/2 P4080/PBL: add tool to support pbl image build.
Hi,
Quoted 16 lines · On Wed, 16 Mar 2011 10:11:03 +0800 Shaohui Xie <[email protected]> wrote:
The tool can build u-boot image which can be used by PBL, run "make
P4080DS_RAMBOOT_PBL" can make all works done, the default output image is u-boot.pbl, for more details please refer to doc/README.pblimage.Signed-off-by Shaohui Xie <[email protected]>--- Makefile | 5 + board/freescale/corenet_ds/config.mk | 26 +++ board/freescale/corenet_ds/pblimage.cfg | 59 ++++++ common/image.c | 1 + doc/README.pblimage | 83 ++++++++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 5 + tools/mkimage.h | 2 +
Quoted 8 lines
tools/pblimage.c | 329 +++++++++++++++++++++++++++++++ tools/pblimage.h | 36 ++++ 11 files changed, 549 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/pblimage.cfg create mode 100644 doc/README.pblimage create mode 100644 tools/pblimage.c create mode 100644 tools/pblimage.h
This patch doesn't apply on top of current u-boot.git master. Please rebase and resubmit. Thanks.
Anatolij
PATCH 2/2 P4080/PBL: add tool to support pbl image build.
Hello, Anatolij,
Sorry for the late response, I had no chance until recently to work on the rebase of this patch. I've posted a new version and cc-ed to you. Thanks!
Best Regards,
Shaohui Xie
Quoted 41 lines
-----Original Message-----
From: Anatolij Gustschin [mailto:agust at denx.de]
Sent: Wednesday, April 25, 2012 5:35 PM
To: Xie Shaohui-B21989
Cc: u-boot at lists.denx.de; kumar.gala at freescale.com
Subject: Re: [U-Boot] [PATCH 2/2] P4080/PBL: add tool to support pbl image build.Hi,
Quoted 5 lines · On Wed, 16 Mar 2011 10:11:03 +0800 Shaohui Xie <[email protected]> wrote:
The tool can build u-boot image which can be used by PBL, run "make
P4080DS_RAMBOOT_PBL" can make all works done, the default output image is u-boot.pbl, for more details please refer to doc/README.pblimage.Signed-off-by Shaohui Xie <[email protected]>Quoted 11 lines
--- Makefile | 5 + board/freescale/corenet_ds/config.mk | 26 +++ board/freescale/corenet_ds/pblimage.cfg | 59 ++++++ common/image.c | 1 + doc/README.pblimage | 83 ++++++++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 5 + tools/mkimage.h | 2 + tools/pblimage.c | 329+++++++++++++++++++++++++++++++
Quoted 6 lines
tools/pblimage.h | 36 ++++ 11 files changed, 549 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/pblimage.cfg create mode 100644 doc/README.pblimage create mode 100644
tools/pblimage.ccreate mode 100644tools/pblimage.hThis patch doesn't apply on top of current u-boot.git master. Please rebase and resubmit. Thanks.
Anatolij