From patchwork Tue Nov 14 01:55:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 837659 X-Patchwork-Delegate: sjg@chromium.org 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="cXLfioD7"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3ybW2s4DXVz9s7G for ; Tue, 14 Nov 2017 13:01:41 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 49CDDC21EE7; Tue, 14 Nov 2017 01:59:50 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 D4649C21E52; Tue, 14 Nov 2017 01:56:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1CC4EC21EF3; Tue, 14 Nov 2017 01:55:32 +0000 (UTC) Received: from mail-ot0-f196.google.com (mail-ot0-f196.google.com [74.125.82.196]) by lists.denx.de (Postfix) with ESMTPS id 17066C21EE4 for ; Tue, 14 Nov 2017 01:55:27 +0000 (UTC) Received: by mail-ot0-f196.google.com with SMTP id j29so11957560oth.13 for ; Mon, 13 Nov 2017 17:55:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=U8GdE/cfEjh/ST9JbQeNibk/zvRhSDElJL664DsXmew=; b=cXLfioD7vJuBBbOpyugsa8VvoJuEJA7rFF0Cc+9rf3KP4arT7IcJ7EP0o4ElxWCJ0j d57cK6BqA5l5GLq2gR1fawjXRw53MUBi141Yc8xTWYqnUWQXGVVzAeYQvsbcW+zg74SU Ts9klt7wyt3ECml9ZdNr0JJ8rHRhzAg2bBa1BPyXx3Xr6wXbFmus6T3grflfIsPJON8p kup8tHYqDBfo/f6qZiBbuvfVLZC4UsdYHw2YyicoaBH0q8m7TTaL4pREpuY35GClMQg+ 6/wYvZnWfW7jAvV9FGVH/ModUxeQq50tUS0FW1w3b89FBqIZ7voX9JadxO8lWOZ6j9t/ myPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=U8GdE/cfEjh/ST9JbQeNibk/zvRhSDElJL664DsXmew=; b=MNXzM7lImwadrnlTqZ2AYaK+/EbJtEUe08wflnsMOmzW+1ppFxyUmJ6pvNSq+sltZh FdWwj6permh6Leh4Sj4nf76RRbstzza0KTa5c0zhGvYprY7GuZNNJMYK8AbuTa0TQgeR H9UOA1scGk/Y7tffXydf3rQ4nQlgdR5IIa4qjrtTvHbFWdcCLICRki3wlT/VKKtrV/qL SAlZ87vrWAykBcnz8ECLU3o6qtFAqv3eYm9DhEgekpCiJ/UieiTNlxMTJIiB8P+9ZOBa rgy4IHSMGgmxu2ky2IRTHYN8JIpmoNWUd5hFW8wOfVoptVzP8PTm740Y+EcS9QfyCoon k5EQ== X-Gm-Message-State: AJaThX6MdO2k9eRTMsPdup3pWZ1Yhhe4E6RP8LifZZl+Wl3oblQS5yBT EwPb8RlC1H8BpbcJazVzrBu0CA== X-Google-Smtp-Source: AGs4zMZO/pOgVnsiLAEYUisJv3C9sVhF0NLcvyAMe+ub03gFM02oFsh79NqdDIUhVeSDVRobfbEU+A== X-Received: by 10.157.1.238 with SMTP id e101mr2850651ote.51.1510624525478; Mon, 13 Nov 2017 17:55:25 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:0:10f2:0:a538:8f87:e149:5b6]) by smtp.gmail.com with ESMTPSA id m91sm8342184otc.23.2017.11.13.17.55.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 17:55:24 -0800 (PST) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id 4A97F140B42; Mon, 13 Nov 2017 18:55:24 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 13 Nov 2017 18:55:06 -0700 Message-Id: <20171114015506.25673-14-sjg@chromium.org> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171114015506.25673-1-sjg@chromium.org> References: <20171114015506.25673-1-sjg@chromium.org> Cc: Tom Rini , Stephen Warren , Tom Warren Subject: [U-Boot] [PATCH 13/13] binman: tegra: Convert to use binman 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" Update tegra to use binman for image creation. This still includes the current Makefile logic, but a later patch will remove this. Three output files are created, all of which combine SPL and U-Boot: u-boot-tegra.bin - standard image u-boot-dtb-tegra.bin - same as u-boot-tegra.bin u-boot-nodtb - includes U-Boot without the appended device tree The latter is useful for build systems where the device is appended later, perhaps after being modified. Signed-off-by: Simon Glass --- Makefile | 6 +++++ arch/arm/dts/tegra-u-boot.dtsi | 40 ++++++++++++++++++++++++++++++ arch/arm/dts/tegra114-u-boot.dtsi | 3 +++ arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 2 ++ arch/arm/dts/tegra124-u-boot.dtsi | 3 +++ arch/arm/dts/tegra20-u-boot.dtsi | 11 +++----- arch/arm/dts/tegra210-u-boot.dtsi | 3 +++ arch/arm/dts/tegra30-u-boot.dtsi | 3 +++ arch/arm/mach-tegra/Kconfig | 1 + 9 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 arch/arm/dts/tegra-u-boot.dtsi create mode 100644 arch/arm/dts/tegra114-u-boot.dtsi create mode 100644 arch/arm/dts/tegra124-u-boot.dtsi create mode 100644 arch/arm/dts/tegra210-u-boot.dtsi create mode 100644 arch/arm/dts/tegra30-u-boot.dtsi diff --git a/Makefile b/Makefile index 999d10e4403..6e32391954f 100644 --- a/Makefile +++ b/Makefile @@ -1149,6 +1149,11 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE endif ifneq ($(CONFIG_TEGRA),) +ifneq ($(CONFIG_BINMAN),) +u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin: \ + spl/u-boot-spl u-boot.bin FORCE + $(call if_changed,binman) +else OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE) u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot-nodtb.bin FORCE $(call if_changed,pad_cat) @@ -1159,6 +1164,7 @@ u-boot-tegra.bin: spl/u-boot-spl u-boot.bin FORCE u-boot-dtb-tegra.bin: u-boot-tegra.bin FORCE $(call if_changed,copy) +endif # binman endif OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI) diff --git a/arch/arm/dts/tegra-u-boot.dtsi b/arch/arm/dts/tegra-u-boot.dtsi new file mode 100644 index 00000000000..cde591c5fca --- /dev/null +++ b/arch/arm/dts/tegra-u-boot.dtsi @@ -0,0 +1,40 @@ +#include + +/ { + binman { + multiple-images; + image1 { + filename = "u-boot-tegra.bin"; + pad-byte = <0xff>; + u-boot-spl { + }; + u-boot { + pos = <(CONFIG_SYS_TEXT_BASE - + CONFIG_SPL_TEXT_BASE)>; + }; + }; + + /* Same as image1 - some tools still expect the -dtb suffix */ + image2 { + filename = "u-boot-dtb-tegra.bin"; + pad-byte = <0xff>; + u-boot-spl { + }; + u-boot { + pos = <(CONFIG_SYS_TEXT_BASE - + CONFIG_SPL_TEXT_BASE)>; + }; + }; + + image3 { + filename = "u-boot-nodtb-tegra.bin"; + pad-byte = <0xff>; + u-boot-spl { + }; + u-boot-nodtb { + pos = <(CONFIG_SYS_TEXT_BASE - + CONFIG_SPL_TEXT_BASE)>; + }; + }; + }; +}; diff --git a/arch/arm/dts/tegra114-u-boot.dtsi b/arch/arm/dts/tegra114-u-boot.dtsi new file mode 100644 index 00000000000..7c119725528 --- /dev/null +++ b/arch/arm/dts/tegra114-u-boot.dtsi @@ -0,0 +1,3 @@ +#include + +#include "tegra-u-boot.dtsi" diff --git a/arch/arm/dts/tegra124-nyan-big-u-boot.dtsi b/arch/arm/dts/tegra124-nyan-big-u-boot.dtsi index 65c3851affa..44e64998c5f 100644 --- a/arch/arm/dts/tegra124-nyan-big-u-boot.dtsi +++ b/arch/arm/dts/tegra124-nyan-big-u-boot.dtsi @@ -5,6 +5,8 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include "tegra-u-boot.dtsi" + / { host1x@50000000 { u-boot,dm-pre-reloc; diff --git a/arch/arm/dts/tegra124-u-boot.dtsi b/arch/arm/dts/tegra124-u-boot.dtsi new file mode 100644 index 00000000000..7c119725528 --- /dev/null +++ b/arch/arm/dts/tegra124-u-boot.dtsi @@ -0,0 +1,3 @@ +#include + +#include "tegra-u-boot.dtsi" diff --git a/arch/arm/dts/tegra20-u-boot.dtsi b/arch/arm/dts/tegra20-u-boot.dtsi index 9b9835da7e9..7c119725528 100644 --- a/arch/arm/dts/tegra20-u-boot.dtsi +++ b/arch/arm/dts/tegra20-u-boot.dtsi @@ -1,8 +1,3 @@ -/ { - host1x@50000000 { - u-boot,dm-pre-reloc; - dc@54200000 { - u-boot,dm-pre-reloc; - }; - }; -}; +#include + +#include "tegra-u-boot.dtsi" diff --git a/arch/arm/dts/tegra210-u-boot.dtsi b/arch/arm/dts/tegra210-u-boot.dtsi new file mode 100644 index 00000000000..7c119725528 --- /dev/null +++ b/arch/arm/dts/tegra210-u-boot.dtsi @@ -0,0 +1,3 @@ +#include + +#include "tegra-u-boot.dtsi" diff --git a/arch/arm/dts/tegra30-u-boot.dtsi b/arch/arm/dts/tegra30-u-boot.dtsi new file mode 100644 index 00000000000..7c119725528 --- /dev/null +++ b/arch/arm/dts/tegra30-u-boot.dtsi @@ -0,0 +1,3 @@ +#include + +#include "tegra-u-boot.dtsi" diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 51e50907d27..51d143687b0 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -38,6 +38,7 @@ config TEGRA_COMMON select OF_CONTROL select VIDCONSOLE_AS_LCD if DM_VIDEO select BOARD_EARLY_INIT_F + select BINMAN imply CRC32_VERIFY config TEGRA_NO_BPMP