From patchwork Mon Jun 3 23:57:17 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: 1109560 X-Patchwork-Delegate: marek.vasut@gmail.com 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 45HsSC50vgz9s5c for ; Tue, 4 Jun 2019 09:57:45 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5DE36C21DA1; Mon, 3 Jun 2019 23:57:36 +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=none 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 B297EC21C29; Mon, 3 Jun 2019 23:57:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 81DB1C21C29; Mon, 3 Jun 2019 23:57:33 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lists.denx.de (Postfix) with ESMTPS id 9FA5CC21BE5 for ; Mon, 3 Jun 2019 23:57:32 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 16:57:30 -0700 Received: from myan2-mobl1.ccr.corp.intel.com (HELO dwesterg-mobl1.amr.corp.intel.com) ([10.254.110.203]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 16:57:29 -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: Mon, 3 Jun 2019 16:57:17 -0700 Message-Id: <20190603235718.28381-1-dalon.westergreen@linux.intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 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 Some architectures, Stratix10, require a hex formatted spl that combines the spl image and dtb. This adds a target to create said hex file with and offset of SPL_TEXT_BASE. Signed-off-by: Dalon Westergreen --- 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 | 9 ++++----- scripts/Makefile.spl | 8 ++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 07106138e9..12e36ebb72 100644 --- a/Makefile +++ b/Makefile @@ -1124,11 +1124,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 | \ @@ -1707,6 +1702,10 @@ u-boot.lds: $(LDSCRIPT) prepare FORCE spl/u-boot-spl.bin: spl/u-boot-spl @: + +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..419bb6e222 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)/u-boot-spl.bin FORCE + $(call if_changed,objcopy) + quiet_cmd_mksunxiboot = MKSUNXI $@ cmd_mksunxiboot = $(objtree)/tools/mksunxiboot \ --default-dt $(CONFIG_DEFAULT_DEVICE_TREE) $< $@ @@ -463,3 +470,4 @@ ifdef CONFIG_ARCH_K3 tispl.bin: $(obj)/u-boot-spl-nodtb.bin $(SHRUNK_ARCH_DTB) $(SPL_ITS) FORCE $(call if_changed,mkfitimage) endif + From patchwork Mon Jun 3 23:57:18 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: 1109561 X-Patchwork-Delegate: marek.vasut@gmail.com 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 45HsSh50P2z9s5c for ; Tue, 4 Jun 2019 09:58:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3AB66C21D65; Mon, 3 Jun 2019 23:57:49 +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=none 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 2B4AEC21BE5; Mon, 3 Jun 2019 23:57:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 734C0C21C29; Mon, 3 Jun 2019 23:57:34 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lists.denx.de (Postfix) with ESMTPS id 98466C21BE5 for ; Mon, 3 Jun 2019 23:57:33 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 16:57:31 -0700 Received: from myan2-mobl1.ccr.corp.intel.com (HELO dwesterg-mobl1.amr.corp.intel.com) ([10.254.110.203]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 16:57:30 -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: Mon, 3 Jun 2019 16:57:18 -0700 Message-Id: <20190603235718.28381-2-dalon.westergreen@linux.intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190603235718.28381-1-dalon.westergreen@linux.intel.com> References: <20190603235718.28381-1-dalon.westergreen@linux.intel.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 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 --- Changes in v2: -> Change CONFIG_SPL_TARGET back to u-boot-spl.hex --- 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 fbab388b43..f27180385d 100644 --- a/configs/socfpga_stratix10_defconfig +++ b/configs/socfpga_stratix10_defconfig @@ -26,7 +26,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 39d757d737..66855ff0d8 100644 --- a/include/configs/socfpga_stratix10_socdk.h +++ b/include/configs/socfpga_stratix10_socdk.h @@ -210,6 +210,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 */