From patchwork Sat Mar 3 08:17:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Larsson X-Patchwork-Id: 880990 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; 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="KF/DwjL/"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ztfDx3b03z9sXg for ; Sat, 3 Mar 2018 19:18:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9423B88FD9; Sat, 3 Mar 2018 08:18:04 +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 ECPmTTKQJxtC; Sat, 3 Mar 2018 08:18:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 45E5888F4B; Sat, 3 Mar 2018 08:18:02 +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 308CD1C2121 for ; Sat, 3 Mar 2018 08:18:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2D76387E6A for ; Sat, 3 Mar 2018 08:18:01 +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 MKLLFhpyf8IF for ; Sat, 3 Mar 2018 08:17:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id F327087E19 for ; Sat, 3 Mar 2018 08:17:58 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id t204so16421909lff.9 for ; Sat, 03 Mar 2018 00:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JwtguWQMCnX3sPaZijiGfYYZyiIk2/N/ouPzEDvCkzI=; b=KF/DwjL/LYhweN+F6CCSKTVbp58twMFAAXrbJF3qQHbUh6EAo88bi1p07MLB/nprdr /okRdclZ5NPKzlLh/kZ/3rMe3aBs6xOtGuRAbf7uvJdvVuGF0W72EaWX1dJ0zNUmbpyC v06+3D4W7DgimLu8nkQ869wb5U5k5TViWF5lttlTxz15wGkHjWbiPnK+hw0H6yyUKRf2 3fQf2089GAuee331YaeglCXMHWE4Xccp0vhxu3sv8ZrA409Lsy/VEKqHfhDq4c6qxjqH TfSsKimAF0Rs6ptbiaGDKEoJKHlddqezMlbMDiJ4ZnyDt/L2C1/NwKfWqHk9Gm/4aMNu c/qw== 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=JwtguWQMCnX3sPaZijiGfYYZyiIk2/N/ouPzEDvCkzI=; b=TGqwJf6vshYcBvq1bPiy43DIyKCI0W1kiFK8vm+TbNF+7RDZiPRbkD0DwJDxODEiO4 h6hMWj8wk5lKaWLvNSmvFEeVGh8rM7oo4Z+n3bBGY+D0GZqnLk0gDQU4hHA5zolUHnCn 72BzhNLoNJUryaFyM9epQ4hGu2RywOO4KCho9FZ3kvtyiYyab+BGxmXsPY0jjWPb3D+Y AKIvFtAP6e9dBDw3cxSp2P55fTopdNqBqY8Q6RTrqMHTGfLSqUAWF+m2ABIBum/Re1b4 IqoQQS+uvp9+NLqFv7S5CRV+RuZZaIdh5qG+BoFXgYM4VE0ANK5WijZbpPTxGy+OspDn hgBg== X-Gm-Message-State: APf1xPC1mlaBDG7QT5vae+p9gH2YGVabd+RypcJul+eJIFWnf695x6OI N3Q4UGpE0vFJblM7dXWAGORaNZm5Lp4= X-Google-Smtp-Source: AG47ELsLBywqIk9h1LH26f8fgki8C6aQn5N20XE1Mpsq1ay4VpsoWNquXZwcLoYOLhyHtRhm8qYyhw== X-Received: by 10.46.13.10 with SMTP id 10mr5974850ljn.8.1520065076875; Sat, 03 Mar 2018 00:17:56 -0800 (PST) Received: from erik-cab.lan (90-230-144-91-no25.tbcn.telia.com. [90.230.144.91]) by smtp.gmail.com with ESMTPSA id s143sm1724104lfs.28.2018.03.03.00.17.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Mar 2018 00:17:55 -0800 (PST) From: Erik Larsson To: buildroot@buildroot.org Date: Sat, 3 Mar 2018 09:17:37 +0100 Message-Id: <1520065060-20046-2-git-send-email-karl.erik.larsson@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520065060-20046-1-git-send-email-karl.erik.larsson@gmail.com> References: <1520065060-20046-1-git-send-email-karl.erik.larsson@gmail.com> Subject: [Buildroot] [PATCH v4 1/4] imx-mkimage: new package 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: Marcus Folkesson , Fabio Estevam , Erik Larsson , Christopher Dahlberg , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This package add support for imx-mkimage for iMX8M. Currently the only hardware it's tested for. Signed-off-by: Erik Larsson Signed-off-by: Christopher Dahlberg --- v4: No changes v3: Use BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME in U-Boot so we don't need to copy u-boot.bin to u-boot-nodtb.bin (suggested by Baruch) Update license to GPL-2.0+ (suggested by Marcus F.) v2: Moved package from package/freescale-imx to package (suggested by Thomas P.) Add upstread URL in Config.in (suggested by Thomas P.) Fix install syntax in imx-mkimage.mk (suggested by Thomas P.) Use Makefile in imx-mkimage to build imx-boot-imx8mqevk-sd.bin instead of doing that in the post-script.sh (suggested Baruch) --- package/Config.in.host | 1 + .../imx-mkimage/0001-remove-git-build-info.patch | 29 ++++++++++++++++ package/imx-mkimage/Config.in.host | 11 ++++++ package/imx-mkimage/imx-mkimage.hash | 3 ++ package/imx-mkimage/imx-mkimage.mk | 39 ++++++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 package/imx-mkimage/0001-remove-git-build-info.patch create mode 100644 package/imx-mkimage/Config.in.host create mode 100644 package/imx-mkimage/imx-mkimage.hash create mode 100644 package/imx-mkimage/imx-mkimage.mk diff --git a/package/Config.in.host b/package/Config.in.host index 199a8e9..06ef5cb 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -24,6 +24,7 @@ menu "Host utilities" source "package/go-bootstrap/Config.in.host" source "package/google-breakpad/Config.in.host" source "package/gptfdisk/Config.in.host" + source "package/imx-mkimage/Config.in.host" source "package/imx-usb-loader/Config.in.host" source "package/jq/Config.in.host" source "package/jsmin/Config.in.host" diff --git a/package/imx-mkimage/0001-remove-git-build-info.patch b/package/imx-mkimage/0001-remove-git-build-info.patch new file mode 100644 index 0000000..9f8da02 --- /dev/null +++ b/package/imx-mkimage/0001-remove-git-build-info.patch @@ -0,0 +1,29 @@ +From d1bb893300b1bd80eaac27fcc8eb4347f56f83b4 Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Thu, 22 Feb 2018 09:56:53 +0100 +Subject: [PATCH] Remove buildinformation step. + +Signed-off-by: Erik Larsson +Signed-off-by: Christopher Dahlberg +--- + Makefile | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 4b449ad..4042a39 100644 +--- a/Makefile ++++ b/Makefile +@@ -33,9 +33,7 @@ $(MKIMG): buildinfo $(SRCS) + bin: $(MKIMG) + + buildinfo: +- @echo -n '#define MKIMAGE_COMMIT 0x' > src/build_info.h +- @git rev-parse --short=8 HEAD >> src/build_info.h +- @echo '' >> src/build_info.h ++ @echo "#define MKIMAGE_COMMIT 0x0000" > src/build_info.h + + help: + @echo $(CURR_DIR) +-- +2.7.4 + diff --git a/package/imx-mkimage/Config.in.host b/package/imx-mkimage/Config.in.host new file mode 100644 index 0000000..411f67c --- /dev/null +++ b/package/imx-mkimage/Config.in.host @@ -0,0 +1,11 @@ +config BR2_PACKAGE_HOST_IMX_MKIMAGE + bool "host imx-mkimage" + select BR2_PACKAGE_HOST_UBOOT_TOOLS + select BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT + depends on BR2_LINUX_KERNEL + depends on BR2_TARGET_UBOOT + help + imx-mkimage is used to combine input images and generate + final boot image with appropriate IVT set. + + https://source.codeaurora.org/external/imx/imx-mkimage diff --git a/package/imx-mkimage/imx-mkimage.hash b/package/imx-mkimage/imx-mkimage.hash new file mode 100644 index 0000000..08d31ce --- /dev/null +++ b/package/imx-mkimage/imx-mkimage.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 4ddb144520001c33baa24493f68ef2ea9434ac36bf3ae223f78d7ec581aa484c imx-mkimage-imx_4.9.51_imx8m_beta.tar.gz +sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c iMX8dv/COPYING diff --git a/package/imx-mkimage/imx-mkimage.mk b/package/imx-mkimage/imx-mkimage.mk new file mode 100644 index 0000000..506ae75 --- /dev/null +++ b/package/imx-mkimage/imx-mkimage.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# imx-mkimage +# +################################################################################ + +IMX_MKIMAGE_VERSION = imx_4.9.51_imx8m_beta +IMX_MKIMAGE_SITE = https://source.codeaurora.org/external/imx/imx-mkimage +IMX_MKIMAGE_SITE_METHOD = git +IMX_MKIMAGE_LICENSE = GPL-2.0+ +IMX_MKIMAGE_LICENSE_FILES = iMX8dv/COPYING +HOST_IMX_MKIMAGE_DEPENDENCIES = uboot linux firmware-imx arm-trusted-firmware + +define HOST_IMX_MKIMAGE_BUILD_CMDS + # These files are generated by firmware-imx, uboot and arm-trusted-firmware + # Copy the files into the iMX8M folder to make building of this package simple + # The NXP engineers has constructed to buildprocess with a bunch of hardcoded + # file names and pathes. + + # Currently this only supports iMX8M. When more hardware is available + # this needs to be selectable based on iMX8-version (iMX8M,iMXQ etc). + cp $(BINARIES_DIR)/u-boot-spl.bin $(@D)/iMX8M + cp $(BINARIES_DIR)/lpddr4_pmu_train* $(@D)/iMX8M + cp $(BINARIES_DIR)/fsl-imx8mq-evk.dtb $(@D)/iMX8M + cp $(BINARIES_DIR)/bl31.bin $(@D)/iMX8M + cp ${BINARIES_DIR}/u-boot-nodtb.bin $(@D)/iMX8M + + # In soc.mk it's hardcoded that the mkimage tool is named mkimage_uboot + # and that it's located in the iMX8M folder. + cp $(HOST_DIR)/bin/mkimage $(@D)/iMX8M/mkimage_uboot + + $(MAKE) -C $(@D) SOC=iMX8M flash_spl_uboot +endef + +define HOST_IMX_MKIMAGE_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/iMX8M/flash.bin $(BINARIES_DIR)/imx-boot-imx8mqevk-sd.bin +endef + +$(eval $(host-generic-package))