From patchwork Thu Jul 19 10:31:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 946181 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="d9cLt2kW"; 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 41WVgH1LbTz9s4Z for ; Thu, 19 Jul 2018 20:31:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9680489D23; Thu, 19 Jul 2018 10:31:36 +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 X76kFHNrhGPW; Thu, 19 Jul 2018 10:31:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 00AEA89D2F; Thu, 19 Jul 2018 10:31:36 +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 0AD051CF2F3 for ; Thu, 19 Jul 2018 10:31:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DEDE988FC1 for ; Thu, 19 Jul 2018 10:31:30 +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 vGAPmqoEFIbM for ; Thu, 19 Jul 2018 10:31:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by fraxinus.osuosl.org (Postfix) with ESMTPS id EA26188FBF for ; Thu, 19 Jul 2018 10:31:26 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id v25-v6so5694350wmc.0 for ; Thu, 19 Jul 2018 03:31:26 -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=ZggBOsLNkG+sB66rHyOb5WD+5x4mqIvln/fbboh8p5Y=; b=d9cLt2kWgblLPtYavWF2Z+f5c+GCyZzr6w4m5RuvtfNVCi42afxIx23se/GcHqfu9Y ILtOSxN/Hyy9xZYmdAffRmtbSWGEZ2g+0pJKsr05rHkky4l2QeBkV0wrq/3Z/xHtfJXG nxvo3CReIF7aOT6NM511bkFzadRPYhKJUcNVkgfOaT5Pq+ml+odJbz3aVE+2pZcQX3uF mbk7XT2sogvHh17iG+KEHUA5uvWXhk9HKnmZAT45KrtGm6YVtFVKjwpq8ILYasFBrBZ1 mXkBVAQ5V1c0hsbByJihF7vDbvr/oNAodJL87aQrMFgrUvWKng1qYD0OSvjaeVw+yeD+ Y4Ag== 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=ZggBOsLNkG+sB66rHyOb5WD+5x4mqIvln/fbboh8p5Y=; b=eSJQNaXB/UtRwPHhAsybrZDHbXE2idXMQlpAvlJAkYmLnBiKZqplibskY9xKTn3wUS xrxBg3j8kh47mUOdEavaB5ovhOmgsaH/V59EgmT/pa4B1PuN3LL8LgTloSg/VM3mwHG6 5ZeDchTk89uKYZErfvG3GiTfbwDHTGhLIEHmG66nWynRO3ZPGvBW9bQq/7KQuyqzgoRU pDHXzb3P3jAYxHUVPi0eRfvTcilVL/9uY5JzEmIk4dkx/ezf+TbiYjLtCtCsmmGtAyHf oQ9TRPd9G+CQy5J7sEnMVF8OOmODtnJ+cbn3uH1kD4lza9y8oV6mwwgbfzYI/q4jfVcl v7wA== X-Gm-Message-State: AOUpUlHONOkmHxFpLAXwo13t3lkxDV9xk0wAW5ZC/81V/SwFNz/8/dgg mFpysU6U0ecYej+7U9YnQt6FhT8cgsw= X-Google-Smtp-Source: AAOMgpdjJwnscs6rsqZ+ri22YCIbz1WhV6k0CdcUKU5RuCd38UnACYOrLIyzpnXd3OY+bzq0R6ICzg== X-Received: by 2002:a1c:c60a:: with SMTP id w10-v6mr3808031wmf.26.1531996285385; Thu, 19 Jul 2018 03:31:25 -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.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 03:31:24 -0700 (PDT) From: Gary Bisson To: buildroot@buildroot.org Date: Thu, 19 Jul 2018 12:31:07 +0200 Message-Id: <20180719103109.19887-6-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 5/7] board/boundarydevices: add i.MX8MQ support to post-build.sh 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: thomas.petazzoni@bootlin.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - Use proper ARCH for mkimage command - Use differente U-Boot binary name depending on ARCH Signed-off-by: Gary Bisson --- board/boundarydevices/common/post-build.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/board/boundarydevices/common/post-build.sh b/board/boundarydevices/common/post-build.sh index e30efe8b88..161ec0643f 100755 --- a/board/boundarydevices/common/post-build.sh +++ b/board/boundarydevices/common/post-build.sh @@ -8,13 +8,22 @@ 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/ +$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 \ +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 arm -O linux -T script -C none -a 0 -e 0 \ - -n "upgrade script" -d $BOARD_DIR/upgrade.cmd $TARGET_DIR/upgrade.scr + $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