From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Fri, 11 Jan 2019 12:46:36 +0530 Subject: [U-Boot] [linux-sunxi] [PATCH 2/3] tools: mkimage: Add Allwinner eGON support In-Reply-To: <20181222013422.16967-3-andre.przywara@arm.com> References: <20181222013422.16967-1-andre.przywara@arm.com> <20181222013422.16967-3-andre.przywara@arm.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Dec 22, 2018 at 7:06 AM Andre Przywara wrote: > > So far we used the separate mksunxiboot tool for generating a bootable > image for Allwinner SPLs, probably just for historical reasons. > > Use the mkimage framework to generate a so called eGON image the > Allwinner BROM expects. > The new image type is called "sunxi_egon", to differentiate it > from the (still to be implemented) secure boot TOC0 image. > > Signed-off-by: Andre Przywara > --- > common/image.c | 1 + > include/image.h | 1 + > tools/Makefile | 1 + > tools/sunxi_egon.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 139 insertions(+) > create mode 100644 tools/sunxi_egon.c > > diff --git a/common/image.c b/common/image.c > index 3ff713a521..17150093d6 100644 > --- a/common/image.c > +++ b/common/image.c > @@ -169,6 +169,7 @@ static const table_entry_t uimage_type[] = { > { IH_TYPE_PMMC, "pmmc", "TI Power Management Micro-Controller Firmware",}, > { IH_TYPE_STM32IMAGE, "stm32image", "STMicroelectronics STM32 Image" }, > { IH_TYPE_MTKIMAGE, "mtk_image", "MediaTek BootROM loadable Image" }, > + { IH_TYPE_SUNXI_EGON, "sunxi_egon", "Allwinner eGON Boot Image" }, > { -1, "", "", }, > }; > > diff --git a/include/image.h b/include/image.h > index 765ffecee0..35f43b3074 100644 > --- a/include/image.h > +++ b/include/image.h > @@ -284,6 +284,7 @@ enum { > IH_TYPE_MTKIMAGE, /* MediaTek BootROM loadable Image */ > IH_TYPE_IMX8MIMAGE, /* Freescale IMX8MBoot Image */ > IH_TYPE_IMX8IMAGE, /* Freescale IMX8Boot Image */ > + IH_TYPE_SUNXI_EGON, /* Allwinner eGON Boot Image */ > > IH_TYPE_COUNT, /* Number of image types */ > }; > diff --git a/tools/Makefile b/tools/Makefile > index 2c4d91f199..9f2533f048 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -106,6 +106,7 @@ dumpimage-mkimage-objs := aisimage.o \ > stm32image.o \ > $(ROCKCHIP_OBS) \ > socfpgaimage.o \ > + sunxi_egon.o \ > lib/crc16.o \ > lib/sha1.o \ > lib/sha256.o \ > diff --git a/tools/sunxi_egon.c b/tools/sunxi_egon.c > new file mode 100644 > index 0000000000..9b38149280 > --- /dev/null > +++ b/tools/sunxi_egon.c > @@ -0,0 +1,136 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * (C) Copyright 2018 Arm Ltd. > + */ > + > +#include "imagetool.h" > +#include > + > +#include "../arch/arm/include/asm/arch-sunxi/spl.h" This can be done as #include Reviewed-by: Jagan Teki Tested-by: Jagan Teki # BPI-M64