From patchwork Thu Apr 1 18:25:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Gagniuc X-Patchwork-Id: 1461337 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Svk5Oak/; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBBTk67Bnz9sRK for ; Fri, 2 Apr 2021 05:26:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 28DCE80C7D; Thu, 1 Apr 2021 20:25:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Svk5Oak/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A6C380C72; Thu, 1 Apr 2021 20:25:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E5A8780C6F for ; Thu, 1 Apr 2021 20:25:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-oi1-x236.google.com with SMTP id w70so2727983oie.0 for ; Thu, 01 Apr 2021 11:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IdKz6RlSjSaZIu8NC/LseGKxnCH/+xo41p9CU0tx41g=; b=Svk5Oak/3dIJQOLyZrMcyxeJ6aFa7GduEM9+48NGBLCqyani/AF6Ih9leS6BSQ8RS0 sB6+A+OVVvSR/x7czi0D/Y5efnSnoT6KP5iCdJMm2uXItJw8QwnZ4KSAbgVSt8pecVR/ TutVyLQ/YYZY9858DTdI7v49Kmqs87fqbI4xaC/jo/Z9uZNdZEIWJ2yGsc2Ipc+1c4SQ Wk0Q3A76luCBqwKvFNUagOtfuGSoemWiMD2K1i0iF5pUYTz60Wex3khsVHF2JckPHIdg 745g3PkJEibvxsPNtRerJyMhqXkBviyQHojEaPXL62K6ogzK/w+BCJKngv2BBwdlBEhQ 1+cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IdKz6RlSjSaZIu8NC/LseGKxnCH/+xo41p9CU0tx41g=; b=QA5haco2sVeBAqKrOHf3lmFAqwmhnyAP9M3WAZWnzXfh+TkeG9PMBtuY66SqQHKqux qheYwIZ52fZMpElXDj08tU7YcqFxsILIPOpVArUbSfj8WcHmSTe7V+h1QtFUIyXfDsPg X2TNUf40h76RxLGRHazOyMFNtNEPTkNMQGKV8XlzSy/d5RFXNQEYVNrUT7krArUojstZ vUAS+k5mI6o0kA+KcODQDWCjENmoO91GMcqcz1+iS4zPOpRgZHebQPWSHCflHR9ABhW2 S5Zd7tz16WCmi1ni4Zjii4fwn3/rPYMXK8B8NCqM6I2abfps4xyWs1W0g+wXF6d15hS4 dvCg== X-Gm-Message-State: AOAM530OA3/D5PFoW2P97tiZWTP87XWrh1CqpTTBkemhdadnhd6by/W1 hR+hPpoN4wcEcmvLU0+SAsT7OO4efdY= X-Google-Smtp-Source: ABdhPJyZIrDVJaAd2HC/+utUiguLWi9ukWPen1j2rHcbB1dVGEjW6w4XWdvdRtqVmKLHKcWukS3dYA== X-Received: by 2002:a05:6808:14cf:: with SMTP id f15mr6927528oiw.39.1617301539243; Thu, 01 Apr 2021 11:25:39 -0700 (PDT) Received: from nuclearis2-1.gtech (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id s83sm1162378oif.43.2021.04.01.11.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 11:25:38 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de, marex@denx.de Cc: Alexandru Gagniuc , trini@konsulko.com, sjg@chromium.org Subject: [PATCH v3 5/6] image-fit: Accept IH_TYPE_FIRMWARE in fit_image_load() as valid Date: Thu, 1 Apr 2021 13:25:30 -0500 Message-Id: <20210401182531.2147653-6-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210401182531.2147653-1-mr.nuke.me@gmail.com> References: <20210401182531.2147653-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Consider the following FIT: images { whipple {}; }; configurations { conf-1 { firmware = "whipple"; }; }; Getting the 'firmware' image with fit_image_load() is not possible, as it doesn't understand 'firmware =' properties. Although one could pass IH_TYPE_FIRMWARE for 'image_type', this needs to be converted to a "firmware" string for FDT lookup -- exactly what this change does. Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass --- common/image-fit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/image-fit.c b/common/image-fit.c index 94501b1071..970e3f89da 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1955,6 +1955,8 @@ static const char *fit_get_image_type_property(int type) return FIT_FDT_PROP; case IH_TYPE_KERNEL: return FIT_KERNEL_PROP; + case IH_TYPE_FIRMWARE: + return FIT_FIRMWARE_PROP; case IH_TYPE_RAMDISK: return FIT_RAMDISK_PROP; case IH_TYPE_X86_SETUP: