From patchwork Thu Jul 19 10:31:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 946179 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=boundarydevices.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b="eVSPnCdN"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41WVgC75KRz9s21 for ; Thu, 19 Jul 2018 20:31:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9FD7489D37; Thu, 19 Jul 2018 10:31:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7pD7rJM4-2Qo; Thu, 19 Jul 2018 10:31:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E232E89D23; Thu, 19 Jul 2018 10:31:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5E09D1CF047 for ; Thu, 19 Jul 2018 10:31:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 331DC88FC6 for ; Thu, 19 Jul 2018 10:31:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kt0rzgjwf0wr for ; Thu, 19 Jul 2018 10:31:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 5B52B88FB9 for ; Thu, 19 Jul 2018 10:31:24 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id h3-v6so5239350wmb.1 for ; Thu, 19 Jul 2018 03:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2hwfMAQYX6dx4wcRRcrGATs8toLIV+brjCYH6Jp6H4Y=; b=eVSPnCdNYTZtV2rSYHZq0W7wG2xGZj2wgI546ZYyhixfLbTYDoTUkLFwAXPLBWFMkF z/lj85ldso+C3Cnyb+qen+AYxwaItCiZnwbzHLm8FPvQw1TVyyyVvdqumrJoSyu4zfwi BbA81rti3aQ8pWdLkhOc/N89kto95+AbbXZpfP53TnYbmT2GgflGl/oFqzkKeVgmnOJI GqdjVIKJIQrrTQ4c2Qzx9zPe9NekXCbCYsBMpwQTv6zmPLCTrkIRHdqBF2izt488cP5o 19zC7WwI61o6MGvun5I60J5p+NTBCi/6ODt4vdrUlJXdiH0/hc9lXXqMp3BUFC2AYQSm rH2Q== 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:in-reply-to :references; bh=2hwfMAQYX6dx4wcRRcrGATs8toLIV+brjCYH6Jp6H4Y=; b=MGIqxyypX/ubb/4R4/E6Qj7fBFiMW77GY3r5gCJnC4mLFbzA8KXAA1fk2kOnPeBMRa OomlvjXiKnZnCy2eyxTYZkH17Z1R+LXUcCDlX5BiGbMuN9XnZmJ9gnGviQGpFYpBcaLw Y5wkk0DSCmI1SAiAxzj7T5awpe0fuPm3RB35+TbxZKMWVKgjBu/FG59JyO5kLbVJQ6S/ wc2ezJzffIif8OSwMx/Sgm2MPwR8aMUcubpUD1UKGUUSZ0DFJhUew8/TEpKm9bck6akW ykkaGBH51CrFvfkVmCmryos7OZRaIR/IGCzxm2fwdtDWpvimo9yDWXCMRRRR8Frxlh/E 39jg== X-Gm-Message-State: AOUpUlGYFH1aIwq7NHUVmPQn5KK/hrdg3wU07HW/qGRgHUx+EFP+1vUh yIkOgdvoD2BHE4smudvKH/VT11RRr9Q= X-Google-Smtp-Source: AAOMgpeORkLHXRUROx85EZZfvHq2dSrYLyGXPA63IthF6RUOOILMA55WNXzNvY2e22MAqYheWdwkKg== X-Received: by 2002:a1c:1c52:: with SMTP id c79-v6mr3669937wmc.147.1531996282661; Thu, 19 Jul 2018 03:31:22 -0700 (PDT) Received: from g751.home (2a01cb040a78e30028cbd66b90cf39f4.ipv6.abo.wanadoo.fr. [2a01:cb04:a78:e300:28cb:d66b:90cf:39f4]) by smtp.googlemail.com with ESMTPSA id u4-v6sm11003723wrt.31.2018.07.19.03.31.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 03:31:21 -0700 (PDT) From: Gary Bisson To: buildroot@buildroot.org Date: Thu, 19 Jul 2018 12:31:04 +0200 Message-Id: <20180719103109.19887-3-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180719103109.19887-1-gary.bisson@boundarydevices.com> References: <20180719103109.19887-1-gary.bisson@boundarydevices.com> Subject: [Buildroot] [PATCH v2 2/7] board/freescale/common/imx: make imx8-bootloader-prepare more generic X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , thomas.petazzoni@bootlin.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Allow user to override the hardcoded dtb name by using BR2_ROOTFS_POST_SCRIPT_ARGS. Cc: Fabio Estevam Signed-off-by: Gary Bisson --- Changes in v2: - remove fallback to evk dtb --- board/freescale/common/imx/imx8-bootloader-prepare.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/board/freescale/common/imx/imx8-bootloader-prepare.sh b/board/freescale/common/imx/imx8-bootloader-prepare.sh index 2648147ab0..cc12666ae6 100755 --- a/board/freescale/common/imx/imx8-bootloader-prepare.sh +++ b/board/freescale/common/imx/imx8-bootloader-prepare.sh @@ -2,9 +2,13 @@ main () { - # Currently we support imx8mqevk. + UBOOT_DTB=$2 + if [ ! -e "$UBOOT_DTB" ]; then + echo "ERROR: couldn't find dtb: $UBOOT_DTB" + exit 1 + fi cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin - BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${BINARIES_DIR}/fsl-imx8mq-evk.dtb > ${BINARIES_DIR}/u-boot.its + BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its ${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb rm -f ${BINARIES_DIR}/u-boot.its