From patchwork Mon Nov 21 14:40:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1707367 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ID8J6FnM; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NG96X3p6Mz23nX for ; Tue, 22 Nov 2022 01:40:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3098E851CC; Mon, 21 Nov 2022 15:40:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.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=intel.com header.i=@intel.com header.b="ID8J6FnM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 43F60851AA; Mon, 21 Nov 2022 15:40:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 80C3A852C5 for ; Mon, 21 Nov 2022 15:40:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669041626; x=1700577626; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=frY+Y8OAEmiU4NHNXCqIpQE8ZPckIZ75Vp1bs0IZP0w=; b=ID8J6FnMsWyHF9I0PRDqBVa/nKQo1S84iuzllIGS07s0XUwlXJ++j68J Q0vYi2bRBkZ3amVUK6I1MjuRtgdpntCxoXO/Uw/mBBkRYDqmAIqBrusWE d2baHIWjok6qKBRNZCz0y0DQzusMh3WR/Ixx0C/7VbPxsFRgHyIQjYbIk wysV1ydo0U0U5FhPriFWuqPuacJRa5nWWJFcNGKczCoCgGjSX2tqRabG+ rpt88uvnpADVCd3+pwbU1vBIdLbpKzYbNaWZEq8QcKdVSTYJj20Gw1F7e utpjl8LHnd6OYz6nn4saCqrpAvz+gjFhY8EzIuPyvSTML1RTHBEaxC8TD g==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="311200238" X-IronPort-AV: E=Sophos;i="5.96,181,1665471600"; d="scan'208";a="311200238" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 06:40:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="635197951" X-IronPort-AV: E=Sophos;i="5.96,181,1665471600"; d="scan'208";a="635197951" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga007.jf.intel.com with ESMTP; 21 Nov 2022 06:40:19 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id BF5954823; Mon, 21 Nov 2022 22:40:17 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id BA9F9E0095F; Mon, 21 Nov 2022 22:40:17 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang Subject: [PATCH] configs: defconfig: Load OS via FIT image in QSPI ATF boot for Stratix 10 and Agilex Date: Mon, 21 Nov 2022 22:40:16 +0800 Message-Id: <20221121144016.30749-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean From: Siew Chin Lim Update to load OS via FIT image in Stratix 10 and Agilex QSPI ATF boot flow. And, enable FIT signature checking with crc32 algorithm. Signed-off-by: Siew Chin Lim Signed-off-by: Jit Loon Lim --- configs/socfpga_agilex_qspi_atf_defconfig | 6 +++++- configs/socfpga_stratix10_qspi_atf_defconfig | 6 +++++- include/configs/socfpga_soc64_common.h | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configs/socfpga_agilex_qspi_atf_defconfig b/configs/socfpga_agilex_qspi_atf_defconfig index 0e82873bc1..745aac3c5c 100755 --- a/configs/socfpga_agilex_qspi_atf_defconfig +++ b/configs/socfpga_agilex_qspi_atf_defconfig @@ -15,6 +15,10 @@ CONFIG_IDENT_STRING="socfpga_agilex" CONFIG_SPL_FS_FAT=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_agilex_socdk_qspi" CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_CRC32_SUPPORT=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x2000000 # CONFIG_USE_SPL_FIT_GENERATOR is not set @@ -23,7 +27,7 @@ CONFIG_BOOTDELAY=5 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="earlycon panic=-1" CONFIG_USE_BOOTCOMMAND=y -CONFIG_BOOTCOMMAND="sf probe;run qspiload;run linux_qspi_enable;rsu dtb;run qspiboot" +CONFIG_BOOTCOMMAND="sf probe;run qspifitload;run linux_qspi_enable;run rsu_status;run qspifitboot" CONFIG_SPL_CACHE=y CONFIG_SPL_SPI_LOAD=y CONFIG_SPL_ATF=y diff --git a/configs/socfpga_stratix10_qspi_atf_defconfig b/configs/socfpga_stratix10_qspi_atf_defconfig index 16ee4896d0..5f42c17d47 100755 --- a/configs/socfpga_stratix10_qspi_atf_defconfig +++ b/configs/socfpga_stratix10_qspi_atf_defconfig @@ -15,6 +15,10 @@ CONFIG_IDENT_STRING="socfpga_stratix10" CONFIG_SPL_FS_FAT=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_stratix10_socdk_qspi" CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_CRC32_SUPPORT=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x2000000 # CONFIG_USE_SPL_FIT_GENERATOR is not set @@ -23,7 +27,7 @@ CONFIG_BOOTDELAY=5 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="earlycon panic=-1" CONFIG_USE_BOOTCOMMAND=y -CONFIG_BOOTCOMMAND="sf probe;run qspiload;run linux_qspi_enable;rsu dtb;run qspiboot" +CONFIG_BOOTCOMMAND="sf probe;run qspifitload;run linux_qspi_enable;run rsu_status;run qspifitboot" CONFIG_SPL_SPI_LOAD=y CONFIG_SPL_ATF=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h index 2343a315b9..12da770077 100644 --- a/include/configs/socfpga_soc64_common.h +++ b/include/configs/socfpga_soc64_common.h @@ -59,6 +59,9 @@ "sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize}\0" \ "qspiboot=setenv bootargs earlycon root=/dev/mtdblock1 rw " \ "rootfstype=jffs2 rootwait;booti ${loadaddr} - ${fdt_addr}\0" \ + "qspifitload=sf read ${loadaddr} ${qspibootimageaddr} ${bootimagesize}\0" \ + "qspifitboot=setenv bootargs earlycon root=/dev/mtdblock1 rw " \ + "rootfstype=jffs2 rootwait;bootm ${loadaddr}\0" \ "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "bootfile=" CONFIG_BOOTFILE "\0" \ "fdt_addr=8000000\0" \