From patchwork Thu Jul 19 07:32:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 946081 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.137; helo=fraxinus.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="1sLMfFIe"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41WQtb0d8wz9s1R for ; Thu, 19 Jul 2018 17:41:10 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4B01F88F2D; Thu, 19 Jul 2018 07:41:08 +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 qYJmXj6CulsS; Thu, 19 Jul 2018 07:41:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id AD17288F3E; Thu, 19 Jul 2018 07:41:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5C0EE1C0AD2 for ; Thu, 19 Jul 2018 07:41:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5874789DFA for ; Thu, 19 Jul 2018 07:41:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id THQETRftqcB0 for ; Thu, 19 Jul 2018 07:41:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id 881A089060 for ; Thu, 19 Jul 2018 07:41:05 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id g6-v6so7019370wrp.0 for ; Thu, 19 Jul 2018 00:41:05 -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=aN88+Iie6Pvd9JitKz5fQV8wEnk+tO1ze5snacAzPVE=; b=1sLMfFIePgfAFbnVmfbh9VBJzWaly8GVF7R2M1cNh5PUl9+ltZxNq6WwTiALF0akH9 wi647//yKX9F1Nj/4ymS3Ly8srlEGXdT13afIcqTl7cLFkmZpkjDfag4+9ftQY7CGuhs S07oO1Dfha5aARXTq9q7OSIyAkv82Dd75801KrDIj9r/vubw6fNiMuQaaf0lSWKYxhAv mqYv780XogqU8JAoa8LPm0XlNyryjhDg4/KVBJDkta2ex/ZDOcflkRa31B8yHLM9JNjG GzYaLAD80/bTLuoGniRbklRUVGbO3CZtdKGUGNKZT0QggR4eVjTYanExphrhxkg4bk8S grJQ== 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=aN88+Iie6Pvd9JitKz5fQV8wEnk+tO1ze5snacAzPVE=; b=eTJP6RDdbAc8PtjoVUIF351+KwvQAk7G1nGkMQw0nqpLE+6MP/YbXu9DDrumasdZ1Z e34DLPINO+0xcswootzxOSD2nLq2YwnGnmXsLIaQ8uCx2rtULrRrXwfRHn+xhu1kgTxF e9h20eSJ9DpNTuYv8n26EHkQPI2uG+ce3VM7Gd5vTcDV0d+SsDHsg3MjvHgk/r4ZRG2V yw6akDSfRp/JfcAEM61ZtzzKqwWZ9WDOrsG/3cBtBQv0z5TgJicLCgDQ8gJ54Mc7ohzs v8XifIaHkCPusgPnObdI9wTisg97hJk2VupLFl3dYryXuNGk3R9N/buI+12CBMWvyo0L cz8w== X-Gm-Message-State: AOUpUlF+enasMOCjJ5afArWtIjZsKUrthZYcW4YCttr5Zyc5Hh/P+idp /nbYuF1DhqouFMM3XpAJbfuBSzAU X-Google-Smtp-Source: AAOMgpcPh6H6xQLEKO90+A0BLfJtfJ4IF8MrTYMWPhd8JmfMcgfNod1z9aZHoz6pznoB14oqDMabfQ== X-Received: by 2002:adf:ea0a:: with SMTP id q10-v6mr6604931wrm.224.1531985583671; Thu, 19 Jul 2018 00:33:03 -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 131-v6sm6260466wmm.31.2018.07.19.00.33.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 00:33:02 -0700 (PDT) From: Gary Bisson To: buildroot@buildroot.org Date: Thu, 19 Jul 2018 09:32:50 +0200 Message-Id: <20180719073253.22433-3-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180719073253.22433-1-gary.bisson@boundarydevices.com> References: <20180719073253.22433-1-gary.bisson@boundarydevices.com> Subject: [Buildroot] [PATCH 2/5] board/boundarydevices: update post-build.sh for i.MX8MQ platforms 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - Making sure to use proper ARCH for mkimage command - Remove obsolete 6x_bootscript/6x_upgrade references - Copy bootloader as u-boot. Signed-off-by: Gary Bisson --- board/boundarydevices/common/post-build.sh | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/board/boundarydevices/common/post-build.sh b/board/boundarydevices/common/post-build.sh index b8abb26540..161ec0643f 100755 --- a/board/boundarydevices/common/post-build.sh +++ b/board/boundarydevices/common/post-build.sh @@ -6,20 +6,24 @@ # BOARD_DIR="$(dirname $0)" +UBOOT_DEFCONFIG="$(grep BR2_TARGET_UBOOT_BOARD_DEFCONFIG ${BR2_CONFIG} | sed 's/.*\"\(.*\)\"/\1/')" + +if grep -Eq "^BR2_aarch64=y$" ${BR2_CONFIG}; then + MKIMAGE_ARCH=arm64 + UBOOT_BINARY=imx8-boot-sd.bin +else + MKIMAGE_ARCH=arm + UBOOT_BINARY=u-boot.imx +fi # bd u-boot looks for standard bootscript -install -m 0644 -D $BINARIES_DIR/boot.scr $TARGET_DIR/boot/ -# legacy 6x_bootscript script -$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ --n "boot script" -d $BOARD_DIR/6x_bootscript.txt $TARGET_DIR/6x_bootscript +$HOST_DIR/bin/mkimage -A $MKIMAGE_ARCH -O linux -T script -C none -a 0 -e 0 \ + -n "boot script" -d $BOARD_DIR/boot.cmd $TARGET_DIR/boot/boot.scr # u-boot / update script for bd upgradeu command -if [ -e $BINARIES_DIR/u-boot.imx ]; -then - install -D -m 0644 $BINARIES_DIR/u-boot.imx $TARGET_DIR/u-boot.imx - $HOST_DIR/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ - -n "upgrade script" -d $BOARD_DIR/upgrade.cmd $TARGET_DIR/upgrade.scr - # legacy 6x_upgrade script - $HOST_DIR/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ - -n "upgrade script" -d $BOARD_DIR/6x_upgrade.txt $TARGET_DIR/6x_upgrade +if [ -e $BINARIES_DIR/$UBOOT_BINARY ]; then + install -D -m 0644 $BINARIES_DIR/$UBOOT_BINARY \ + $TARGET_DIR/u-boot.$UBOOT_DEFCONFIG + $HOST_DIR/bin/mkimage -A $MKIMAGE_ARCH -O linux -T script -C none -a 0 -e 0 \ + -n "upgrade script" -d $BOARD_DIR/upgrade.cmd $TARGET_DIR/upgrade.scr fi