From patchwork Mon Dec 17 10:02:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1014372 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43JGsm6pVWz9sMr for ; Mon, 17 Dec 2018 21:02:20 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id A7534C21FEA; Mon, 17 Dec 2018 10:02:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4F93DC21DD4; Mon, 17 Dec 2018 10:02:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DE978C21DD4; Mon, 17 Dec 2018 10:02:10 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 79428C21D8A for ; Mon, 17 Dec 2018 10:02:10 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 43JGsZ0mCmz1r4J6; Mon, 17 Dec 2018 11:02:10 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 43JGsZ09qYz1qsZX; Mon, 17 Dec 2018 11:02:10 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id xmUuid7I8u-4; Mon, 17 Dec 2018 11:02:08 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 17 Dec 2018 11:02:08 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 1CFCD45404AE; Mon, 17 Dec 2018 11:02:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g_pzjmAdLxRd; Mon, 17 Dec 2018 11:02:02 +0100 (CET) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id 009F14540374; Mon, 17 Dec 2018 11:02:01 +0100 (CET) From: Stefano Babic To: u-boot@lists.denx.de Date: Mon, 17 Dec 2018 11:02:00 +0100 Message-Id: <20181217100200.12674-1-sbabic@denx.de> X-Mailer: git-send-email 2.17.1 Cc: Tom Rini , Robert Berger Subject: [U-Boot] [PATCH V2] Restore compatibility of image type IDs X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Commit a2b96ece5be146f4995d737f047e5bbb76079b8f breaks the enumeration of the Image Types. New image types can be appended, but they cannot be inserted in the list else backward compatibility is broken. This restores the images types as before 2018.11 and move i.MX8 related images at the end. Signed-off-by: Robert Berger Signed-off-by: Stefano Babic CC: Tom Rini --- V2: - inprove comments in the structure to make clear that just append is allowed. include/image.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/include/image.h b/include/image.h index 7ce9670c20..5989c14273 100644 --- a/include/image.h +++ b/include/image.h @@ -126,7 +126,8 @@ enum ih_category { * Operating System Codes * * The following are exposed to uImage header. - * Do not change values for backward compatibility. + * New IDs *MUST* be appended at the end of the list and *NEVER* + * inserted for backward compatibility. */ enum { IH_OS_INVALID = 0, /* Invalid OS */ @@ -164,7 +165,8 @@ enum { * CPU Architecture Codes (supported by Linux) * * The following are exposed to uImage header. - * Do not change values for backward compatibility. + * New IDs *MUST* be appended at the end of the list and *NEVER* + * inserted for backward compatibility. */ enum { IH_ARCH_INVALID = 0, /* Invalid CPU */ @@ -237,7 +239,8 @@ enum { * as command interpreter (=> Shell Scripts). * * The following are exposed to uImage header. - * Do not change values for backward compatibility. + * New IDs *MUST* be appended at the end of the list and *NEVER* + * inserted for backward compatibility. */ enum { @@ -252,7 +255,6 @@ enum { IH_TYPE_FLATDT, /* Binary Flat Device Tree Blob */ IH_TYPE_KWBIMAGE, /* Kirkwood Boot Image */ IH_TYPE_IMXIMAGE, /* Freescale IMXBoot Image */ - IH_TYPE_IMX8IMAGE, /* Freescale IMX8Boot Image */ IH_TYPE_UBLIMAGE, /* Davinci UBL Image */ IH_TYPE_OMAPIMAGE, /* TI OMAP Config Header Image */ IH_TYPE_AISIMAGE, /* TI Davinci AIS Image */ @@ -280,6 +282,7 @@ enum { IH_TYPE_STM32IMAGE, /* STMicroelectronics STM32 Image */ IH_TYPE_SOCFPGAIMAGE_V1, /* Altera SOCFPGA A10 Preloader */ IH_TYPE_IMX8MIMAGE, /* Freescale IMX8MBoot Image */ + IH_TYPE_IMX8IMAGE, /* Freescale IMX8Boot Image */ IH_TYPE_MTKIMAGE, /* MediaTek BootROM loadable Image */ IH_TYPE_COUNT, /* Number of image types */ @@ -289,7 +292,8 @@ enum { * Compression Types * * The following are exposed to uImage header. - * Do not change values for backward compatibility. + * New IDs *MUST* be appended at the end of the list and *NEVER* + * inserted for backward compatibility. */ enum { IH_COMP_NONE = 0, /* No Compression Used */