Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0867BC4708F for ; Wed, 2 Jun 2021 05:48:31 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2A1561361 for ; Wed, 2 Jun 2021 05:48:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2A1561361 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBB1182CB2; Wed, 2 Jun 2021 07:48:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 1833582CB2; Wed, 2 Jun 2021 07:48:26 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7633382E8D for ; Wed, 2 Jun 2021 07:48:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=yau.wai.gan@intel.com IronPort-SDR: dl9jB1b8Z1C+U8zp/yrcx8SO2VTOPBOpmjqBJO696oDOHcfHFJ4EEEA9wbpVIDfSTje/jl5LUG VuyXon97p+tQ== X-IronPort-AV: E=McAfee;i="6200,9189,10002"; a="203739064" X-IronPort-AV: E=Sophos;i="5.83,241,1616482800"; d="scan'208";a="203739064" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2021 22:48:18 -0700 IronPort-SDR: 4tUNhefFdEx7TLn6/FG8wYGSfRRHbrEWs+267j7B0QZWBoi1oblAK4IuL9NH11IIgtQ90Zhwys k16HoHlDT3LA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,241,1616482800"; d="scan'208";a="635744622" Received: from pg-iccf0298.altera.com ([10.104.1.32]) by fmsmga005.fm.intel.com with ESMTP; 01 Jun 2021 22:48:16 -0700 From: Yau Wai Gan To: u-boot@lists.denx.de Cc: Marek Vasut , Ley Foon Tan , Siew Chin Lim , Dalon Westergreen , Yau Wai Gan Subject: [PATCH] config_distro_bootcmd: Ability to boot u-boot script from FIT image Date: Wed, 2 Jun 2021 13:48:15 +0800 Message-Id: <20210602054815.13858-1-yau.wai.gan@intel.com> X-Mailer: git-send-email 2.13.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 When source u-boot script from an FIT image, it is required to provide the script subimage name. Add an additional environment variable "scriptuname" when sourcing u-boot script in FIT image during run distro_bootcmd. Signed-off-by: Yau Wai Gan --- include/config_distro_bootcmd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 2627c2a6a5..7d7ee99a07 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -451,7 +451,9 @@ "boot_a_script=" \ "load ${devtype} ${devnum}:${distro_bootpart} " \ "${scriptaddr} ${prefix}${script}; " \ - "source ${scriptaddr}\0" \ + "if test ${script} = \"boot.scr.uimg\"; then " \ + "source ${scriptaddr}:${scriptuname};" \ + "else source ${scriptaddr}; fi; \0" \ \ "scan_dev_for_scripts=" \ "for script in ${boot_scripts}; do " \ -- 2.13.0