From patchwork Fri Sep 27 18:27:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dalon L Westergreen X-Patchwork-Id: 1168683 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=linux.intel.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46g0fX0sdJz9sNx for ; Sat, 28 Sep 2019 04:28:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 65DBBC21D65; Fri, 27 Sep 2019 18:28:08 +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=SPF_HELO_PASS 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 A0B9EC21E02; Fri, 27 Sep 2019 18:28:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3A45DC21D65; Fri, 27 Sep 2019 18:28:06 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lists.denx.de (Postfix) with ESMTPS id 5CEC5C21C8B for ; Fri, 27 Sep 2019 18:28:05 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 11:28:03 -0700 X-IronPort-AV: E=Sophos;i="5.64,556,1559545200"; d="scan'208";a="341878745" Received: from dwesterg-mobl.amr.corp.intel.com (HELO dwesterg-mobl1.amr.corp.intel.com) ([10.251.149.50]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 11:28:02 -0700 From: Dalon Westergreen To: u-boot@lists.denx.de, marex@denx.de, chin.liang.see@intel.com, trini@konsulko.com, simon.k.r.goldschmidt@gmail.com, ley.foon.tan@intel.com, chee.hong.ang@intel.com Date: Fri, 27 Sep 2019 11:27:56 -0700 Message-Id: <20190927182757.24084-1-dalon.westergreen@linux.intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [U-Boot] [RESEND PATCH v3 1/2] Makefile: Add target to generate hex output for combined spl and dtb 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Dalon Westergreen Stratix10 requires a hex image of the spl plus spl devicetree offset to the Stratix10 onchip memory located at SPL_TEXT_BASE. This patch adds a target to generate a hex file from the u-boot-spl binary including the dtb offset at SPL_TEST_BASE. Objcopy is used to convert the $(SPL_BIN).bin, which includes the spl dtb, to a hex file. the --change-address option is used to offset the hex to SPL_TEXT_BASE as objcopy on the spl binary will not result in a hex file appropriately offset at SPL_TEXT_BASE. Signed-off-by: Dalon Westergreen Reviewed-by: Simon Goldschmidt --- Changes in v3: -> Cleanup commit message and better describe the problem being resolved -> Remove extraneous hunk -> use SPL_BIN instead of u-boot-spl Changes in v2: -> Move spl hex file generation to SPL Makefile -> Create hexfile from $(SPL_BIN).bin which will include the dtb ifneq(build_dtb,) --- Makefile | 8 +++----- scripts/Makefile.spl | 7 +++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1d9ade948b..0bc9d1589f 100644 --- a/Makefile +++ b/Makefile @@ -1152,11 +1152,6 @@ OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \ $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec) -OBJCOPYFLAGS_u-boot-spl.hex = $(OBJCOPYFLAGS_u-boot.hex) - -spl/u-boot-spl.hex: spl/u-boot-spl FORCE - $(call if_changed,objcopy) - binary_size_check: u-boot-nodtb.bin FORCE @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ map_size=$(shell cat u-boot.map | \ @@ -1756,6 +1751,9 @@ spl/u-boot-spl.bin: spl/u-boot-spl @: $(SPL_SIZE_CHECK) +spl/u-boot-spl.hex: spl/u-boot-spl + @: + spl/u-boot-spl: tools prepare \ $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATDATA),dts/dt.dtb) \ $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATDATA),dts/dt.dtb) diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 7af6b120b6..551002194e 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -216,6 +216,8 @@ ifneq ($(CONFIG_TARGET_SOCFPGA_GEN5)$(CONFIG_TARGET_SOCFPGA_ARRIA10),) ALL-y += $(obj)/$(SPL_BIN).sfp endif +ALL-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += $(obj)/$(SPL_BIN).hex + ifdef CONFIG_ARCH_SUNXI ALL-y += $(obj)/sunxi-spl.bin @@ -363,6 +365,11 @@ endif $(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE $(call if_changed,mkimage) +OBJCOPYFLAGS_$(SPL_BIN).hex := -I binary -O ihex --change-address=$(CONFIG_SPL_TEXT_BASE) + +$(obj)/$(SPL_BIN).hex: $(obj)/$(SPL_BIN).bin FORCE + $(call if_changed,objcopy) + quiet_cmd_mksunxiboot = MKSUNXI $@ cmd_mksunxiboot = $(objtree)/tools/mksunxiboot \ --default-dt $(CONFIG_DEFAULT_DEVICE_TREE) $< $@ From patchwork Fri Sep 27 18:27:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dalon L Westergreen X-Patchwork-Id: 1168684 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=linux.intel.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46g0fm06QKz9sNx for ; Sat, 28 Sep 2019 04:28:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B29DAC21F51; Fri, 27 Sep 2019 18:28:20 +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=SPF_HELO_PASS 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 17E1CC21F34; Fri, 27 Sep 2019 18:28:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id ED6EBC21F2B; Fri, 27 Sep 2019 18:28:09 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lists.denx.de (Postfix) with ESMTPS id 536A0C21C8B for ; Fri, 27 Sep 2019 18:28:06 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 11:28:03 -0700 X-IronPort-AV: E=Sophos;i="5.64,556,1559545200"; d="scan'208";a="341878754" Received: from dwesterg-mobl.amr.corp.intel.com (HELO dwesterg-mobl1.amr.corp.intel.com) ([10.251.149.50]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 11:28:02 -0700 From: Dalon Westergreen To: u-boot@lists.denx.de, marex@denx.de, chin.liang.see@intel.com, trini@konsulko.com, simon.k.r.goldschmidt@gmail.com, ley.foon.tan@intel.com, chee.hong.ang@intel.com Date: Fri, 27 Sep 2019 11:27:57 -0700 Message-Id: <20190927182757.24084-2-dalon.westergreen@linux.intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190927182757.24084-1-dalon.westergreen@linux.intel.com> References: <20190927182757.24084-1-dalon.westergreen@linux.intel.com> MIME-Version: 1.0 Subject: [U-Boot] [RESEND PATCH v3 2/2] ARM: socfpga: stratix10: Remove CONFIG_OF_EMBED 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Dalon Westergreen CONFIG_OF_EMBED was primarily enabled to support the stratix10 spl hex file requirements. Since this option now produces a warning during build, and the spl hex can be created using alternate methods, CONFIG_OF_EMBED is no longer needed. Signed-off-by: Dalon Westergreen --- configs/socfpga_stratix10_defconfig | 1 - include/configs/socfpga_stratix10_socdk.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig index 5ae53a4db9..ae1b9bead1 100644 --- a/configs/socfpga_stratix10_defconfig +++ b/configs/socfpga_stratix10_defconfig @@ -27,7 +27,6 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y -CONFIG_OF_EMBED=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_stratix10_socdk" CONFIG_ENV_IS_IN_MMC=y CONFIG_NET_RANDOM_ETHADDR=y diff --git a/include/configs/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h index 7b55dd14da..f9ecf9d2df 100644 --- a/include/configs/socfpga_stratix10_socdk.h +++ b/include/configs/socfpga_stratix10_socdk.h @@ -204,6 +204,6 @@ unsigned int cm_get_l4_sys_free_clk_hz(void); /* SPL SDMMC boot support */ #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 -#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" +#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" #endif /* __CONFIG_H */