From patchwork Sun Aug 11 08:06:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 1145217 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.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=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="opn1mNV+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 465s4b4wc6z9sPG for ; Sun, 11 Aug 2019 18:06:20 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E1EDBC21D74; Sun, 11 Aug 2019 08:06:15 +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, KHOP_BIG_TO_CC, 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 1253FC21C57; Sun, 11 Aug 2019 08:06:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3C0F2C21C57; Sun, 11 Aug 2019 08:06:12 +0000 (UTC) Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by lists.denx.de (Postfix) with ESMTPS id D29D1C21C29 for ; Sun, 11 Aug 2019 08:06:11 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id b29so65085664lfq.1 for ; Sun, 11 Aug 2019 01:06:11 -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=WllqyjHDnC16QPu32wBjg+N3Cvk39pXUssjhiD3KUK0=; b=opn1mNV+yIyFLGdN4rnB0UF31/PNH/oVZNat27UTwpVIGxyNK9J8liKpZ80f8q/V8L hkocqFb3gXTF10EWrvQ/MM5PsOsKdSPIzwSTS6IrqcTyy3ydiijXLXNkO1L8dfPs5ASq 9a3fPeWCun2i7AbcD3nVCz5woXazzQbDmBzk4J+fLikMNC1x1recwY7VHT3bpCDXGyxo Swe6j0jJmYxIuANjssL9ipdCUNti2vI5gBILSLX8aql98JPOckHIOxKalxxq/zIMZxQL w9UuzQ8jgcGP4Eij5AgWzG+1wLl2NywQMIsOl0X+upNuZVEFVC5YxrvQMSZwhlYRvAzi zpKw== 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=WllqyjHDnC16QPu32wBjg+N3Cvk39pXUssjhiD3KUK0=; b=IUihLvWJvfuZjXTgDFXuN8/9QSSiLBCwp0cc8d535sj3V+PzGF8+lxVCpgNsIfNZn2 F+y3TJvtntFbeXtlQvtdZ+fVxECeXko7XD0BcNTDi5MPAD9amnaDqqgtLKS0KdW4VBgf 4BirWp9/vzVGaOS9nU9ufrI8PR2yUwt3mwk5EZ3egE+/RBN6r2n4yiOH1G6UWV5W08nU la7GwdfMf1kEFoc/MPnFS2vje+wWy0CkzOzBtOD7EBZaBaPOhGezZwPfUG2wAUEnmwGG VWTAbvtGAT6ZzRJntYWNLFNr6Yd9BwHjBFMrkP9NVE7/6TD8AFTwa/H0vOMWiUCpGtJK OMhg== X-Gm-Message-State: APjAAAWuX/NOKigAn83aTw2AlBnlNj+/r6jvGIepXn0XhoIz5Kv6b5gq BjBuxa58C7EtyNl5qMp3UEU= X-Google-Smtp-Source: APXvYqwC1xhd+Xuui1GG8Y+SQybHbiQ+ATsu1Ow/DNiymTNF6nBAtcSNyW0TPUpBt3e4BXKp0A1Kig== X-Received: by 2002:ac2:4157:: with SMTP id c23mr16688351lfi.173.1565510771003; Sun, 11 Aug 2019 01:06:11 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id q21sm5676782lfo.18.2019.08.11.01.06.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Aug 2019 01:06:09 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, jagan@amarulasolutions.com, marek.vasut+renesas@gmail.com, sr@denx.de, judge.packham@gmail.com, xypron.glpk@gmx.de, bgolaszewski@baylibre.com, kever.yang@rock-chips.com, philipp.tomsich@theobroma-systems.com Date: Sun, 11 Aug 2019 11:06:02 +0300 Message-Id: <20190811080602.4154-1-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 Cc: u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [U-Boot] [RFC PATCH] rockchip, Makefile: add u-boot-tpl-with-spl.img 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" Many Rockchip platforms require the same u-boot deploy procedure when TPL and SPL both enabled. The following examples are taken from doc/README.rockchip and board/theobroma-systems/lion_rk3368/README: RK3288: ./tools/mkimage -n rk3288 -T rksd -d ./tpl/u-boot-tpl.bin out cat ./spl/u-boot-spl-dtb.bin >> out sudo dd if=out of=/dev/mmcblk0 seek=64 RK3328: ./tools/mkimage -n rk3328 -T rksd -d ./tpl/u-boot-tpl.bin idbloader.img cat ./spl/u-boot-spl.bin >> idbloader.img sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64 RK3368: ./tools/mkimage -n rk3368 -T rksd -d tpl/u-boot-tpl.bin spl-3368.img cat spl/u-boot-spl-dtb.bin >> spl-3368.img dd if=spl-3368.img of=/dev/sdb seek=64 RK3399: ./tools/mkimage -n rk3399 -T rksd -d ./tpl/u-boot-tpl-dtb.bin out cat ./spl/u-boot-spl-dtb.bin >> out sudo dd if=out of=/dev/sdc seek=64 Here, we introduce generic u-boot-tpl-with-spl.img target which is the TPL image followed by the SPL binary. Signed-off-by: Matwey V. Kornilov --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 8513db94e3..4d70b6ac2e 100644 --- a/Makefile +++ b/Makefile @@ -882,6 +882,10 @@ ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy) ALL-y += u-boot-with-dtb.bin endif +ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL)$(CONFIG_TPL),yyy) +ALL-y += u-boot-tpl-with-spl.img +endif + LDFLAGS_u-boot += $(LDFLAGS_FINAL) # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards. @@ -1293,6 +1297,14 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE $(call if_changed,pad_cat) +ifeq ($(CONFIG_ARCH_ROCKCHIP),y) +MKIMAGEFLAGS_u-boot-tpl.img = -n $(CONFIG_SYS_SOC) -T rksd +tpl/u-boot-tpl.img: tpl/u-boot-tpl.bin FORCE + $(call if_changed,mkimage) +u-boot-tpl-with-spl.img: tpl/u-boot-tpl.img spl/u-boot-spl.bin FORCE + $(call if_changed,cat) +endif + ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)