All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Bisson <gary.bisson@boundarydevices.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/7] board/freescale/common/imx: make imx8-bootloader-prepare more generic
Date: Thu, 19 Jul 2018 12:31:04 +0200	[thread overview]
Message-ID: <20180719103109.19887-3-gary.bisson@boundarydevices.com> (raw)
In-Reply-To: <20180719103109.19887-1-gary.bisson@boundarydevices.com>

Allow user to override the hardcoded dtb name by using
BR2_ROOTFS_POST_SCRIPT_ARGS.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
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
 
-- 
2.18.0

  parent reply	other threads:[~2018-07-19 10:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 10:31 [Buildroot] [PATCH v2 0/7] Add Boundary Devices Nitrogen8M support Gary Bisson
2018-07-19 10:31 ` [Buildroot] [PATCH v2 1/7] configs/freescale_imx8mqevk: add script arg to specify U-Boot dtb Gary Bisson
2018-07-19 10:31 ` Gary Bisson [this message]
2018-07-19 10:31 ` [Buildroot] [PATCH v2 3/7] board/boundarydevices/common/post-build.sh: fix U-Boot naming Gary Bisson
2018-07-19 10:31 ` [Buildroot] [PATCH v2 4/7] board/boundarydevices: remove obsolete u-boot scripts Gary Bisson
2018-07-19 10:31 ` [Buildroot] [PATCH v2 5/7] board/boundarydevices: add i.MX8MQ support to post-build.sh Gary Bisson
2018-07-19 10:31 ` [Buildroot] [PATCH v2 6/7] board/boundarydevices: add i.MX8MQ support to u-boot scripts Gary Bisson
2018-07-19 10:31 ` [Buildroot] [PATCH v2 7/7] configs/nitrogen8m: Add new defconfig Gary Bisson
2018-07-19 14:58 ` [Buildroot] [PATCH v2 0/7] Add Boundary Devices Nitrogen8M support Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180719103109.19887-3-gary.bisson@boundarydevices.com \
    --to=gary.bisson@boundarydevices.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.