From patchwork Tue Jul 16 09:31:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1132551 X-Patchwork-Delegate: sbabic@denx.de 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iQzG3ndF"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45nwBp63VJz9sBt for ; Tue, 16 Jul 2019 19:31:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 22ACEC21C4A; Tue, 16 Jul 2019 09:31:22 +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=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID 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 875D5C21C4A; Tue, 16 Jul 2019 09:31:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0C405C21C4A; Tue, 16 Jul 2019 09:31:18 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by lists.denx.de (Postfix) with ESMTPS id C9B15C21C29 for ; Tue, 16 Jul 2019 09:31:17 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id n9so20193013wru.0 for ; Tue, 16 Jul 2019 02:31:17 -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; bh=H9RmUKUs9derLYzFXTXTdVpwGBg+aMH8Lbn3qn9Royc=; b=iQzG3ndF/ReRYi3n9xZQCdtCLKIxX+1uKoOt/ZE1ZsAeXnbLH6uK40eiU1P2VGQq9/ KgQjRFsp1e+WuMfI65I9itS2xQy6zEkbENxd4RgQTZJvkeI/euH6BibOJ1gv7ydBiu15 8+QwQDb9fLTOMRcQNDndUYRqep8Lr+PIfukPw2BVaIxnAOG/lh2a0sKKISxBoAtuoY84 BIlgQpxlYVIFQBnYzlQY3BvxQUE4SlvxrsHqvox9SDuF5MRozBv8/q3UHf343dY+CtSU BdHSdAFbvKMshbF0iIxQlaPUtTVY+IZsdScqXroM/wXA096nolE1dV34ObCQ1HC7yFKD O4dQ== 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; bh=H9RmUKUs9derLYzFXTXTdVpwGBg+aMH8Lbn3qn9Royc=; b=GnsnickyerzxqoJMUKzb2Lh1zcy2espC5mm4sNXxO7EzH+h1OBf2wcJgDf8fBl2qnw tGDiQeDcrNro5C9OW6P6lrsLvLZ0Fpk+7yCHbEH66USOJ/dHp/c1kTJIEDj0HeDPs1OF 2lCCXk8cz4stAlSIPmnVPH/sYx3NHwcZ8fUMRepmZPwLlH6IydGFYTuq4ajJWw7/0MWu yqcrbtr93MnlGBOgyd4KbgRLfhMqiVKR95bTCPZSW0D7ZdRcheWaZpDcTZ3JHbtxWb5I zgYZMrXlVO9juaEPlx0LJwA0R1C/B77YXIEH4EKTf0eiumonSZFkPD3/GSGw5R8HGIHF X85A== X-Gm-Message-State: APjAAAVVw/oIEDsBCNESSi5aH5zsF4bGCkm0HVtGLPlxKaxPy24PtMfj mDKrhtrEN1AUXhDlZDje3lzowrd4 X-Google-Smtp-Source: APXvYqwP0CKCQVit4zV0ehwMnCw2TWVcmo5bL29AEDuXzuj5ZN2/q69DAFMvZwG87iqleWDsMpQ5lQ== X-Received: by 2002:a5d:4f01:: with SMTP id c1mr34750319wru.43.1563269477109; Tue, 16 Jul 2019 02:31:17 -0700 (PDT) Received: from localhost ([194.105.145.90]) by smtp.gmail.com with ESMTPSA id t1sm28474388wra.74.2019.07.16.02.31.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jul 2019 02:31:16 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Tue, 16 Jul 2019 12:31:04 +0300 Message-Id: <20190716093104.11731-1-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 Cc: Igor Opaniuk , Stefan Agner , Marcel Ziswiler , Heinrich Schuchardt , "NXP i.MX U-Boot Team" , liu.ming50@gmail.com, Stefan Roese , Chris Packham , Marek Vasut Subject: [U-Boot] [PATCH v1] imx: add u-boot-nand.imx target 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Igor Opaniuk Add an additional target which prepends the u-boot.imx image with 0x400 padding bytes. On Vybrid and i.MX 7, i.MX6ULL this is required for NAND boot devices. The configuration CONFIG_IMX_NAND enables this image for a board. Signed-off-by: Stefan Agner Signed-off-by: Igor Opaniuk --- Makefile | 3 +++ arch/arm/config.mk | 4 ++++ arch/arm/mach-imx/Makefile | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 73fdf70cdd..287b74dd50 100644 --- a/Makefile +++ b/Makefile @@ -1106,6 +1106,9 @@ endif %.vyb: %.imx $(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@ +u-boot-nand.imx: u-boot.imx + $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ + quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@ diff --git a/arch/arm/config.mk b/arch/arm/config.mk index f25603109e..2003161801 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -157,12 +157,16 @@ ifndef CONFIG_SPL_BUILD ALL-y += SPL endif else +ifeq ($(CONFIG_IMX_NAND),y) +ALL-y += u-boot-nand.imx +else ifeq ($(CONFIG_OF_SEPARATE),y) ALL-y += u-boot-dtb.imx else ALL-y += u-boot.imx endif endif +endif ifneq ($(CONFIG_VF610),) ALL-y += u-boot.vyb endif diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 898478fc4a..03e6fc25b3 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -112,6 +112,13 @@ u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE $(call if_changed,mkimage) +ifeq ($(CONFIG_IMX_NAND),y) +cmd_u-boot-nand_imx = (dd bs=1024 count=1 if=/dev/zero 2>/dev/null) | \ + cat - $< > $@ +u-boot-nand.imx: u-boot.imx FORCE + $(call if_changed,u-boot-nand_imx) +endif + ifeq ($(CONFIG_MULTI_DTB_FIT),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ -T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE)