[U-Boot] [PATCH v3 4/4] tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)

Simon Kagstrom simon.kagstrom at netinsight.net
Thu Sep 3 14:00:02 CEST 2009


On Mon, 24 Aug 2009 23:03:59 +0530
Prafulla Wadaskar <prafulla at marvell.com> wrote:

> This patch adds type kwbimabe support for new mkimage core
> For more details refer docs/README.kwbimage

> +Command syntax:
> +--------------
> +./tools/mkimage -l <kwboot_file>
> +		to list the kwb image file details
> +
> +./tools/mkimage -n <board specific configuration file> \
> +                -T kwbimage -a <start address> -e <execution address> \
> +		-d <input_raw_binary> <output_kwboot_file>
> +
> +for ex.
> +./tools/mkimage -n ./board/Marvell/openrd_base/kwbimage.cfg \
> +                -T kwbimage -a 0x00600000 -e 0x00600000 \
> +		-d u-boot.bin u-boot.kwb

I think it could also be useful to be able to produce just the boot
header without the U-boot image. For example if you want to place
U-boot at some other location on the flash or (as a developer)
frequently re-flash U-boot, but don't want to write to the first block
all the time (you only need to rewrite it when moving U-boot).

Perhaps something like

> +Typical example of kwimage.cfg file:
> +-----------------------------------
> +
> +# Boot Media configurations
> +BOOT_FROM	nand
> +NAND_ECC_MODE	default
> +NAND_PAGE_SIZE	0x0800

SOURCE_OFFSET 0x0   # Relative to the header or NAND start?

> +static void kwbimage_set_header (void *ptr, struct stat *sbuf, int ifd,
> +				struct mkimage_params *params)
> +{
> +	struct kwb_header *hdr = (struct kwb_header *)ptr;
> [...]
> +	mhdr->srcaddr = sizeof(struct kwb_header);

and this could then be changed to have this info.

// Simon


More information about the U-Boot mailing list