From a131c1f44231e3546b1cca8480400c98d1dd7ac8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Aug 2015 16:55:24 -0600 Subject: rockchip: Add the rkimage format to mkimage Rockchip SoCs require certain formats for code that they execute, The simplest format is a 4-byte header at the start of a binary file. Add support for this so that we can create images that the boot ROM understands. Signed-off-by: Simon Glass --- common/image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/image.c') diff --git a/common/image.c b/common/image.c index 678588d..cf2806f 100644 --- a/common/image.c +++ b/common/image.c @@ -155,6 +155,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_ATMELIMAGE, "atmelimage", "ATMEL ROM-Boot Image",}, { IH_TYPE_X86_SETUP, "x86_setup", "x86 setup.bin", }, { IH_TYPE_LPC32XXIMAGE, "lpc32xximage", "LPC32XX Boot Image", }, + { IH_TYPE_RKIMAGE, "rkimage", "Rockchip Boot Image" }, { -1, "", "", }, }; -- cgit v1.1 From f9a3c278b98a17eddbf0ad903689cce47e3e6f47 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Aug 2015 16:55:25 -0600 Subject: rockchip: Add support for the SD image The Rockchip boot ROM requires a particular file format. It consists of 64KB of zeroes, a 512-byte header encoded with RC4, and then some executable code. Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be converted to this format. Signed-off-by: Simon Glass --- common/image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/image.c') diff --git a/common/image.c b/common/image.c index cf2806f..2cdc728 100644 --- a/common/image.c +++ b/common/image.c @@ -156,6 +156,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_X86_SETUP, "x86_setup", "x86 setup.bin", }, { IH_TYPE_LPC32XXIMAGE, "lpc32xximage", "LPC32XX Boot Image", }, { IH_TYPE_RKIMAGE, "rkimage", "Rockchip Boot Image" }, + { IH_TYPE_RKSD, "rksd", "Rockchip SD Boot Image" }, { -1, "", "", }, }; -- cgit v1.1 From 10b84fe1b59b4f8b485057b911f2d5bdd9b1c9a4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Aug 2015 16:55:26 -0600 Subject: rockchip: Add support for the SPI image The Rockchip boot ROM requires a particular file format for booting from SPI. It consists of a 512-byte header encoded with RC4, some padding and then up to 32KB of executable code in 2KB blocks, separated by 2KB empty blocks. Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be converted to this format. This allows booting from SPI flash on supported machines. Signed-off-by: Simon Glass --- common/image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/image.c') diff --git a/common/image.c b/common/image.c index 2cdc728..1325e07 100644 --- a/common/image.c +++ b/common/image.c @@ -157,6 +157,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_LPC32XXIMAGE, "lpc32xximage", "LPC32XX Boot Image", }, { IH_TYPE_RKIMAGE, "rkimage", "Rockchip Boot Image" }, { IH_TYPE_RKSD, "rksd", "Rockchip SD Boot Image" }, + { IH_TYPE_RKSPI, "rkspi", "Rockchip SPI Boot Image" }, { -1, "", "", }, }; -- cgit v1.1