From patchwork Thu Apr 1 18:25:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Gagniuc X-Patchwork-Id: 1461338 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=85.214.62.61; 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=Li6OHSdR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4FBBTx6Ywkz9s1l for ; Fri, 2 Apr 2021 05:26:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1264E81578; Thu, 1 Apr 2021 20:25:55 +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="Li6OHSdR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1694680C6F; 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-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 843FD80C71 for ; Thu, 1 Apr 2021 20:25:38 +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-ot1-x336.google.com with SMTP id k14-20020a9d7dce0000b02901b866632f29so2963417otn.1 for ; Thu, 01 Apr 2021 11:25:38 -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=9bqWPavPRvl4u6YKF3bDaw5mOm0DL9kLCzUGZXFItYc=; b=Li6OHSdRb3NQpZhrrMqIk+U4qcLr5YUyWrL5Q2JiA1PnD8SAZ/QxjWArUgTZ4mb+Rl HxrOUizZdx/SdNAMas4amL5IgKL4pFXDpOnT0woXEybgUCoO5UZO/ydZnNSLdHYw6rYN 1A+uHf9+E4n7fR/G2YSLbr55TMp4VUv7JYCYIUvSG/Nw8dlXBKaPceZLgV0Es1fj5OHi fFq6vp6QZm5VNRf8xXsT9YA6Gs3HDJ49WpnG1/EjEo4x8BQzJ/Ffz5MlY5PrFoHP/wZj cZ7tz0DtlcSOEDgFqrMCc5OKsXfFXLxmW/QA6h7CKUyMeEwLetTNDPYYmsdsFQwEebdX Agzw== 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=9bqWPavPRvl4u6YKF3bDaw5mOm0DL9kLCzUGZXFItYc=; b=omwn74JVvBin6MHCFmdcb2+s0Uvjb2B2/7YRD6blB6n4Fmt8S21H/8wQR770+dqj5l y+st4Ie2qxj00+9D0kTKSI8k33+O8TCP1ZQ/9/SUZh2ylAAByTh0lNpom+nhm1Rw63E9 uYZBEuGhbnlsUwpSh9thoJEi/ixxMiWROpH8wyKYV4T31lkTAMqEkua6jjleCvWOMSzY oq3yD/XsjbpYWryWyTpYW9mDH0McOVDm15LCiPBunz48fvTLQM8CTpHzMQKwgTnjwLRY Yw5UIIIulmnk4W8ZDIcNzsbsWS3cdniUQTuJUbIlqllMJuDyMVs5kym8TM4GmaN9hIAl tFjg== X-Gm-Message-State: AOAM533bpE6yWGm0tAK70tsdShiGhQNnuvPl1jxV7VXHPHJHpgMH/TPx XLKwifzcvDy1Z6nVoB2ATPCtSvLCc3c= X-Google-Smtp-Source: ABdhPJxC51YRxKb9OIbr9Wch7AEcRgTThYuRJETTPKqMphpxIrGWGAOCaliuaG5iFMlibOaNgGA/OQ== X-Received: by 2002:a9d:4c8f:: with SMTP id m15mr7693802otf.16.1617301537049; Thu, 01 Apr 2021 11:25:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 11:25:36 -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 2/6] spl: LOAD_FIT_FULL: Do not hard-code os to IH_OS_U_BOOT Date: Thu, 1 Apr 2021 13:25:27 -0500 Message-Id: <20210401182531.2147653-3-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 The information on the OS should be contained in the FIT, as the self-explanatory "os" property of a node under /images. Hard-coding this to U_BOOT might send us down the wrong path later in the boot process. Signed-off-by: Alexandru Gagniuc --- common/spl/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 986cfbc6fd..f3b4c3a036 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -220,8 +220,9 @@ static int spl_load_fit_image(struct spl_image_info *spl_image, spl_image->size = fw_len; spl_image->entry_point = fw_data; spl_image->load_addr = fw_data; - spl_image->os = IH_OS_U_BOOT; - spl_image->name = "U-Boot"; + if (fit_image_get_os(header, ret, &spl_image->os)) + spl_image->os = IH_OS_INVALID; + spl_image->name = genimg_get_os_name(spl_image->os); debug(SPL_TPL_PROMPT "payload image: %32s load addr: 0x%lx size: %d\n", spl_image->name, spl_image->load_addr, spl_image->size);