From patchwork Wed Mar 7 18:52:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Larsson X-Patchwork-Id: 882716 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=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="H/RtbGck"; 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 3zxN7K0NC9z9sd3 for ; Thu, 8 Mar 2018 05:52:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C077B8996E; Wed, 7 Mar 2018 18:52:40 +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 o0SizoMIRZ4J; Wed, 7 Mar 2018 18:52:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 24B2089A67; Wed, 7 Mar 2018 18:52:38 +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 ADADA1C00BB for ; Wed, 7 Mar 2018 18:52:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AA2B9889B0 for ; Wed, 7 Mar 2018 18:52:36 +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 7AtbqMUIqOzO for ; Wed, 7 Mar 2018 18:52:35 +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 whitealder.osuosl.org (Postfix) with ESMTPS id 8C610889A9 for ; Wed, 7 Mar 2018 18:52:34 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id q69-v6so4730356lfi.10 for ; Wed, 07 Mar 2018 10:52:34 -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=/gBWNlLTITsJVjlTEqKFOE2n3ff3rOyUAGDvxlGhKGg=; b=H/RtbGckp6asJO7iZBePDvPHyzYNx0V9IluTiVual8L8aniq4IAyV7HtSdXJ/nD6Ah kDMxj+FcrUi94UfA8652YkuuhdYf7eZCa9qDfYprddl6/D2OC5rBj5Sm9iES+ddtxivF uHw57zODT3/l1v72nl2OlqUdanV181sueBwBhVA5TBq9SMJ/fnvjvUHRn0I9WA9/LUDo HanN3bhTXEfSdKuouG3X+Fq9IoZy8I6VVWTpZPFzDBPj00iUP0sFFQLAiY4XB5DXlBUP 0DiRxln7lq0Ku1s+boPa16Vo2xtq75k/F3Kq12Hjut+x7RK8rufKmGUlrNSOjO1d1C6N GPEg== 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=/gBWNlLTITsJVjlTEqKFOE2n3ff3rOyUAGDvxlGhKGg=; b=k9y++IvyezmXuU5/K8eYSE4EuEgoOm+Ivfau8c9GA3Zu+eBlczAHU/zN24N659t3hM q9B5bWjphuYwVw2MtXCaoZ/1IF3wh+aaY6NSoFx3qhB9lJWIxa/9JbxpsvMFhZ8eFBKQ oMsGrDa9xRUbYXF/y4W0B5+tjPdnrXaOWkQuV8L22bU1TIIoWh2YZlaI/Diu/Gbx8Vz6 9uaBgOVz9kdP24rKgk+Az5Yo7I664GdmvYy6uLjJr7UosB0BcPJaIOuxh8IXsbbaQ9f6 AMDUPSI4LsODMj3SHPCKmmI1wXlR9bkJFixUdSrPGPnUADCKKhQaag9wF2wQI8/UTz40 03ig== X-Gm-Message-State: AElRT7E/+UE+c1RwK3XlMxtdtGkPi216P93nLXe4e8fju3TZg9j0f3qL 3CaU8/DYCj7SNIGOe/nuViGVu8Tga0o= X-Google-Smtp-Source: AG47ELvZIq86CDHPgKI84dlsWqsoJzuAcKyjIpkT1mjlZBjj+2ybReBW+NK9YN5PkDHSK9jRgXiE5w== X-Received: by 10.25.170.144 with SMTP id t138mr16100418lfe.71.1520448752266; Wed, 07 Mar 2018 10:52:32 -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 q63sm3754355lje.72.2018.03.07.10.52.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Mar 2018 10:52:31 -0800 (PST) From: Erik Larsson To: buildroot@buildroot.org Date: Wed, 7 Mar 2018 19:52:15 +0100 Message-Id: <1520448738-5794-2-git-send-email-karl.erik.larsson@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> References: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> Subject: [Buildroot] [PATCH v5 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 --- v5: Build with HDMI support Add patch to use host mkimage instead of ./mkimage_uboot in soc.mk Add host dependencies to dtc package Add host configuration options in build Add patch to make use of LDFLAGS in soc.mk (fixes build error with libz) 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 +++++++++++++++++ .../0002-add-ldflags-to-link-step.patch | 26 ++++++++++++++++ .../0003-remove-use-of-mkimage_uboot.patch | 26 ++++++++++++++++ package/imx-mkimage/Config.in.host | 12 ++++++++ package/imx-mkimage/imx-mkimage.hash | 3 ++ package/imx-mkimage/imx-mkimage.mk | 36 ++++++++++++++++++++++ 7 files changed, 133 insertions(+) create mode 100644 package/imx-mkimage/0001-remove-git-build-info.patch create mode 100644 package/imx-mkimage/0002-add-ldflags-to-link-step.patch create mode 100644 package/imx-mkimage/0003-remove-use-of-mkimage_uboot.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/0002-add-ldflags-to-link-step.patch b/package/imx-mkimage/0002-add-ldflags-to-link-step.patch new file mode 100644 index 0000000..22c6a7d --- /dev/null +++ b/package/imx-mkimage/0002-add-ldflags-to-link-step.patch @@ -0,0 +1,26 @@ +From a73f20fbe921c7ecff3efda23bc506fdd935ee4d Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Tue, 6 Mar 2018 12:28:39 +0100 +Subject: [PATCH 1/2] Add LDFLAGS to link step + +Signed-off-by: Erik Larsson +--- + iMX8M/soc.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak +index 8346769..38a14bb 100644 +--- a/iMX8M/soc.mak ++++ b/iMX8M/soc.mak +@@ -15,7 +15,7 @@ FW_DIR = imx-boot/imx-boot-tools/imx8mq + + $(MKIMG): mkimage_imx8.c + @echo "Compiling mkimage_imx8" +- $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz ++ $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(LDFLAGS) -lz + + $(DCD_CFG): $(DCD_CFG_SRC) + @echo "Converting iMX8M DCD file" +-- +2.7.4 + diff --git a/package/imx-mkimage/0003-remove-use-of-mkimage_uboot.patch b/package/imx-mkimage/0003-remove-use-of-mkimage_uboot.patch new file mode 100644 index 0000000..86da7dc --- /dev/null +++ b/package/imx-mkimage/0003-remove-use-of-mkimage_uboot.patch @@ -0,0 +1,26 @@ +From fe1e495ca9766277db9505ff0a1736293569a694 Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Tue, 6 Mar 2018 12:29:15 +0100 +Subject: [PATCH 2/2] Remove use of ./mkimage_uboot and use mkimage instead + +Signed-off-by: Erik Larsson +--- + iMX8M/soc.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak +index 38a14bb..b61dc85 100644 +--- a/iMX8M/soc.mak ++++ b/iMX8M/soc.mak +@@ -46,7 +46,7 @@ clean: + dtbs = fsl-imx8mq-evk.dtb + u-boot.itb: $(dtbs) + ./mkimage_fit_atf.sh $(dtbs) > u-boot.its +- ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb ++ mkimage -E -p 0x3000 -f u-boot.its u-boot.itb + @rm -f u-boot.its + + flash_hdmi_spl_uboot: $(MKIMG) signed_hdmi_imx8m.bin u-boot-spl-ddr.bin u-boot.itb +-- +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..490b514 --- /dev/null +++ b/package/imx-mkimage/Config.in.host @@ -0,0 +1,12 @@ +config BR2_PACKAGE_HOST_IMX_MKIMAGE + bool "host imx-mkimage" + select BR2_PACKAGE_HOST_UBOOT_TOOLS + select BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT + select BR2_PACKAGE_HOST_DTC + 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..7272f7f --- /dev/null +++ b/package/imx-mkimage/imx-mkimage.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# 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 host-dtc + +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)/signed_hdmi_imx8m.bin $(@D)/iMX8M + cp $(BINARIES_DIR)/bl31.bin $(@D)/iMX8M + cp ${BINARIES_DIR}/u-boot-nodtb.bin $(@D)/iMX8M + + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) SOC=iMX8M flash_hdmi_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)) From patchwork Wed Mar 7 18:52:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Larsson X-Patchwork-Id: 882715 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=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="mm92nHyB"; 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 3zxN7G0nnhz9sd3 for ; Thu, 8 Mar 2018 05:52:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9BD8387A20; Wed, 7 Mar 2018 18:52:40 +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 yh-D4sm3GbvX; Wed, 7 Mar 2018 18:52:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1975587A28; Wed, 7 Mar 2018 18:52:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A13061C00BB for ; Wed, 7 Mar 2018 18:52:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9B00189937 for ; Wed, 7 Mar 2018 18:52:37 +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 JnQIYDf0cN8I for ; Wed, 7 Mar 2018 18:52:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 3D6218997B for ; Wed, 7 Mar 2018 18:52:36 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id r80-v6so4724489lfe.13 for ; Wed, 07 Mar 2018 10:52:36 -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=jO5f/4s4UyXAufSnogmdkEnpwLVQrtq70YLs55D9V/w=; b=mm92nHyBHjr/7ITcLlETWqAT6UWZDWXSinDM8PPePId/JRnsy229Vi0+8ibzjr3/lC yIblm8Y26UvI4XWFC+5/gtF5i5jTydWrCQ6FFMmOcfmzogCMhTmqmKUpUWi4ziVYCS1d ilIcDYTswQv/BDuIGi6JKUEIwb+5aI+kcD6QeNwuQkkAoTJFs0VS+5SrZPA3VVe7H+So evPrj/gZbQ4UjtCbQmBvukut6f0ESeJQC34wVGUeyQVv6COLZjr5E2Kv2LpaDUeg3/wT 8T7Fuep7rhcYfBfSBJn5gqqHtH/AwI4mOr+Dqvvzlkp97Cwyp9+KHfAYYZQabss4xOfz wKAQ== 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=jO5f/4s4UyXAufSnogmdkEnpwLVQrtq70YLs55D9V/w=; b=RLmLHdxwgFKBiwPgxmRy9hDH6QSq3N3dbKGjncIKZF1RDdGpzs4AzNYX1in/RBUIaU mr79lzKuDmBUPtlGw/nU/IOXcCmLtmgLvDR461h2aVUORh0vFAc1xDBRLlEQYBbcmKc4 wAQqpSGqGRh/uYYQkPE08/r7KqdgBg2foXkdW6VvzilHhxjHS9YMncNI6obMNX+SrRzD NCIOeKHrDuSccFsL/I6JPuNx0nTOSSaKLdEWcON5slpbXiiHZ/aoFyJh7Oso6m6afslT mJt7I/CkLYrG7qzfB6Nr7FXfAKR+GefSVc2jOn3ahpOZSclOyAsIZ+0pbM27AMr3mRQb fCYA== X-Gm-Message-State: AElRT7FUM72otF0JpJA9concGaibrFhVnBQzqe8rBFBpKkFc5jZhXuT8 nM44vFC9tRjlYRjy7jQZGIik49k7sGg= X-Google-Smtp-Source: AG47ELsHxf9dQaHBkbG27CBycEQeWR9requx4CfIHdoGdvaiXgbcbdg5xvLy+TTbK66j/oHoBpHbxA== X-Received: by 10.25.24.203 with SMTP id 72mr16113132lfy.132.1520448753914; Wed, 07 Mar 2018 10:52:33 -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 q63sm3754355lje.72.2018.03.07.10.52.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Mar 2018 10:52:33 -0800 (PST) From: Erik Larsson To: buildroot@buildroot.org Date: Wed, 7 Mar 2018 19:52:16 +0100 Message-Id: <1520448738-5794-3-git-send-email-karl.erik.larsson@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> References: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> Subject: [Buildroot] [PATCH v5 2/4] freescale-imx: add config option for i.MX8M 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" Signed-off-by: Erik Larsson Signed-off-by: Christopher Dahlberg --- v5: No changes v4: Changed title on commit (suggested by Gary B.) --- package/freescale-imx/Config.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index b5e5ab2..fe993f3 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -1,6 +1,6 @@ menuconfig BR2_PACKAGE_FREESCALE_IMX bool "Freescale i.MX libraries" - depends on BR2_arm + depends on BR2_arm || BR2_aarch64 help Those packages provide hardware acceleration for GPU or VPU, hardware optimization or some hardware tools for Freescale @@ -40,6 +40,8 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 bool "imx7d/imx7ulp" +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M + bool "imx8m" endchoice config BR2_PACKAGE_FREESCALE_IMX_PLATFORM @@ -54,6 +56,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 + default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU bool From patchwork Wed Mar 7 18:52:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Larsson X-Patchwork-Id: 882718 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="tnULkjh5"; 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 3zxN7L4sBcz9sd8 for ; Thu, 8 Mar 2018 05:52:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F0AC9889C3; Wed, 7 Mar 2018 18:52:42 +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 cuNwPMP++HJH; Wed, 7 Mar 2018 18:52:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 040BF889B0; Wed, 7 Mar 2018 18:52:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 18E741C00BB for ; Wed, 7 Mar 2018 18:52:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 10E9789A6C for ; Wed, 7 Mar 2018 18:52:39 +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 w6g6WoILw8jj for ; Wed, 7 Mar 2018 18:52:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id D583289937 for ; Wed, 7 Mar 2018 18:52:37 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id t204-v6so4744358lff.9 for ; Wed, 07 Mar 2018 10:52:37 -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=WfrDvAPxyH+AIQvQcQStLfrMrJII8GkxOMR2npKQMg4=; b=tnULkjh5DzTx+TYqm1slfwR/+lvPCIta5M+/RNWlFciKi4FzDqrBxYTpU5j4vGcOnN B6otPFuflglqVkSFs/RPj00uuVXtBsb6e/aYbQYZH6ZWQaF4fobOxhTtAzYgiKJ4vGJa 3w0tUz4cq5sEhJSylTcAcaNvjHCoS6YPIsxvJk0qedtgbXzlF5CkqyJ43h4QH5TYYViJ 82PKJyk1Lj7tUlqkdCJeWVRhPti6HwBkIndCAy+YK9u7V9ew+1BVWp2fBB9iFcucvG5G QkxT5t5UhODLHvf43RDVEWCVtCkgfGD7qzS7kCBOnXlHZK7vzm47ocFgek3NfsqdyRN4 shgA== 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=WfrDvAPxyH+AIQvQcQStLfrMrJII8GkxOMR2npKQMg4=; b=J90ls1cMX1B/M8sMtXJP8MiGnT0mbZbunrQ0zaB1k3gGww/thLnjqL0Ztp4TmYGnCY ivcSHUNkUMPPEYDk3VUjfX/HWFNnVwP7kJ7Qoq1B5ZFbwZV/exp7/NXIkRp9eyS6rdxz udu1QjZSPvuigtU+l6yPB2LrwIVfaN1PoHlFZHvMjm7hjxvbRyFmGMWjwMJf21k0IpqR x4GwqLD4epzHg2pAriZWJsez2xrzENYKqZXhF/Y3wb1o7tvYOpuD+CjBbmC5hgT3XWDd nIjtHJvU3eDuKtgggYVjCrWoaLjypu9as5374zcLYqXX7voz22dTieP41EneRzQ8bEXu 9RwA== X-Gm-Message-State: AElRT7GfDAyRCJJiV213j7UB5mNc1d1sUZTO6fkaPJYy8aIOa0QxpQSk 3j7FSYglbwVJYMNXBxY93LS4dZASbDc= X-Google-Smtp-Source: AG47ELuCXRZRwiXRL+U5jYs8u1L+YZ2XDd4BeMGcBn762FjNkA0GUVyIv35wsW+vRIS6m39D3Emt+Q== X-Received: by 10.25.89.12 with SMTP id n12mr17428145lfb.10.1520448755660; Wed, 07 Mar 2018 10:52:35 -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 q63sm3754355lje.72.2018.03.07.10.52.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Mar 2018 10:52:34 -0800 (PST) From: Erik Larsson To: buildroot@buildroot.org Date: Wed, 7 Mar 2018 19:52:17 +0100 Message-Id: <1520448738-5794-4-git-send-email-karl.erik.larsson@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> References: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> Subject: [Buildroot] [PATCH v5 3/4] firmware-imx: add support for iMX8M firmware 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" Signed-off-by: Erik Larsson Signed-off-by: Christopher Dahlberg --- v5: No change v4: No change v3: Split v2 commit into two commits (suggested by Garry B.) v2: Split v1 commit into two commits (suggested by Baruch) --- package/freescale-imx/firmware-imx/Config.in | 2 +- package/freescale-imx/firmware-imx/firmware-imx.mk | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in index fca280a..56d5b80 100644 --- a/package/freescale-imx/firmware-imx/Config.in +++ b/package/freescale-imx/firmware-imx/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_FIRMWARE_IMX bool "firmware-imx" - depends on BR2_arm # Only relevant for i.MX + depends on BR2_arm || BR2_aarch64 # Only relevant for i.MX help Firmware blobs for the Freescale i.MX SoCs. diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk index 630afca..f03daf2 100644 --- a/package/freescale-imx/firmware-imx/firmware-imx.mk +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk @@ -18,6 +18,13 @@ define FIRMWARE_IMX_EXTRACT_CMDS $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(FIRMWARE_IMX_SOURCE)) endef +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) +FIRMWARE_IMX_INSTALL_IMAGES = YES +define FIRMWARE_IMX_INSTALL_IMAGES_CMDS + cp $(@D)/firmware/ddr/synopsys/lpddr4_pmu_train_*.bin $(BINARIES_DIR) + cp $(@D)/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(BINARIES_DIR) +endef +else define FIRMWARE_IMX_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/lib/firmware/imx for blobdir in $(FIRMWARE_IMX_BLOBS); do \ @@ -27,5 +34,6 @@ define FIRMWARE_IMX_INSTALL_TARGET_CMDS mv $(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted \ $(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw endef +endif $(eval $(generic-package)) From patchwork Wed Mar 7 18:52:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Larsson X-Patchwork-Id: 882717 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=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="I3+HK1vQ"; 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 3zxN7L4mYRz9sd3 for ; Thu, 8 Mar 2018 05:52:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7F1FC89A8C; Wed, 7 Mar 2018 18:52:44 +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 gqsPVhQg0sID; Wed, 7 Mar 2018 18:52:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1B57489A67; Wed, 7 Mar 2018 18:52:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 871081C00BB for ; Wed, 7 Mar 2018 18:52:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 80AE189A67 for ; Wed, 7 Mar 2018 18:52:41 +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 TwiX3trB3oSW for ; Wed, 7 Mar 2018 18:52:40 +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 hemlock.osuosl.org (Postfix) with ESMTPS id 2479989A7A for ; Wed, 7 Mar 2018 18:52:40 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id m69-v6so4735604lfe.8 for ; Wed, 07 Mar 2018 10:52:40 -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=58Eijb0v1E0bEHKxFoutQfv8VSec94aidluoyJ2aOVQ=; b=I3+HK1vQRTLAQe+KfmgZX6cYqsQsofOYRiXLgt/2TdJ9te5/HaPY9mFiRpJPTQTMwk ibYt7GQ0YbTDO6j06p8D0R65g9sA1Tu0escpAGL/okyNbb29F9GQ55oqFQWLMvMV7OpX DsPCGl/4rRtYrv4ec9BWEEfLKKS6TZ5COOY89bS8lT1OhRcjjyKgzC+9IPxHBUrLA4Xj nl5HpGwoBALgdUWReru34i94PbyC5hWa8QvwgQhVeQ9W0NW1/Le2DmPWmaEvmPqLTImG KpHQaN2KSJwC1HbultlCCG+6eNpmpPv3SRpoNhjoaJjLgSHT2cPTVZT3zxrPZNR/Dt4k aTiQ== 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=58Eijb0v1E0bEHKxFoutQfv8VSec94aidluoyJ2aOVQ=; b=l3XohrWgGKQik+o3RN1gc0GDMOu+/ybLMkNGXvKfRh3mF83wsyq0I2w1Lx2wv9nb0E tXePWTvTY2Kqmicw/pRcy4MP3NI1uQT+No01sI+OYxigBDdIRWHGjiG/YhI0crz5C+o5 FlN49JUE7M87i9qZjPRf0Rlt8+0ByQcZ4jOS34t3FnL+rg0gpzQz1HEr+anM3ZZo2TZe ezI5UxD5WhFeVpoZfFxQ7bpj6PogyA2OdXxMhZZtDBGaYEeVVnc/yIRyG1fTSf27qwiB ru9Wpj75E5IbwPu/J0sgXvkddiBsns1ryArF/bdDDG5E98VP8/E86H1epCwTMsQWhUNB VWCw== X-Gm-Message-State: AElRT7ExX/+lp7pVfPf3v/ptQn2zoiLLwhARnFFTA4PH/L1JR1HJFZJ4 4VzMy74siddTgnzc+atpA8DHbwyHdjI= X-Google-Smtp-Source: AG47ELsu/Hura7lxVJSDdBA2XaahuCu38Rr34+ysn9IidC3kfT0sy0NAmO4/gSJNTafoHbP4t1MBXg== X-Received: by 10.25.105.18 with SMTP id e18mr16064597lfc.52.1520448757579; Wed, 07 Mar 2018 10:52:37 -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 q63sm3754355lje.72.2018.03.07.10.52.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Mar 2018 10:52:36 -0800 (PST) From: Erik Larsson To: buildroot@buildroot.org Date: Wed, 7 Mar 2018 19:52:18 +0100 Message-Id: <1520448738-5794-5-git-send-email-karl.erik.larsson@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> References: <1520448738-5794-1-git-send-email-karl.erik.larsson@gmail.com> Subject: [Buildroot] [PATCH v5 4/4] configs/freescale_imx8mqevk: new defconfig 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" Signed-off-by: Erik Larsson Signed-off-by: Christopher Dahlberg Reviewed-by: Fabio Estevam --- v5: Added readme.txt in board/freescale/imx8mqevk (suggested by Fabio E.) Change version tags to rel_imx_4.9.51_8mq_beta_patch for kernel, u-boot and atf (suggested by Baruch S.) Remove generation of rootfs.tar v4: Change to Buildroot toolchain from external toolchain v3: Change commit message (suggested by Thomas P.) Make sure to use tags instead of branches in kernel,bootloader and ATF repositorires (Arnout V.) Use BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG instead of copy kernel defconfig to board folder (suggested by Arnout V.) Split v2 commit into two commits --- .../common/imx/genimage.cfg.template_imx8 | 40 +++++++++++ board/freescale/common/imx/post-image.sh | 10 ++- board/freescale/imx8mqevk/readme.txt | 83 ++++++++++++++++++++++ configs/freescale_imx8mqevk_defconfig | 39 ++++++++++ 4 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 board/freescale/common/imx/genimage.cfg.template_imx8 create mode 100644 board/freescale/imx8mqevk/readme.txt create mode 100644 configs/freescale_imx8mqevk_defconfig diff --git a/board/freescale/common/imx/genimage.cfg.template_imx8 b/board/freescale/common/imx/genimage.cfg.template_imx8 new file mode 100644 index 0000000..138beff --- /dev/null +++ b/board/freescale/common/imx/genimage.cfg.template_imx8 @@ -0,0 +1,40 @@ +# Minimal SD card image for the Freescale boards Template for SPL Boot +# +# We mimic the .sdcard Freescale's image format: +# * the SD card must have 33 kB free space at the beginning, +# * U-Boot is integrated into imx-boot-imx8mqevk-sd.bin and is dumped as is, +# * a FAT partition at offset 64MB is containing Image and DTB files +# * a single root filesystem partition is required (ext2, ext3 or ext4) +# + +image boot.vfat { + vfat { + files = { + %FILES% + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition imx-boot { + in-partition-table = "no" + image = "imx-boot-imx8mqevk-sd.bin" + offset = 33K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index b239743..264c8a4 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -7,10 +7,10 @@ # dtb_list() { - local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})" + local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([\/a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})" for dt in $DTB_LIST; do - echo -n "\"$dt.dtb\", " + echo -n "\"`basename $dt`.dtb\", " done } @@ -23,6 +23,8 @@ linux_image() { if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then echo "\"uImage\"" + elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" ${BR2_CONFIG}; then + echo "\"Image\"" else echo "\"zImage\"" fi @@ -30,7 +32,9 @@ linux_image() genimage_type() { - if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then + if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then echo "genimage.cfg.template_spl" else echo "genimage.cfg.template" diff --git a/board/freescale/imx8mqevk/readme.txt b/board/freescale/imx8mqevk/readme.txt new file mode 100644 index 0000000..648d102 --- /dev/null +++ b/board/freescale/imx8mqevk/readme.txt @@ -0,0 +1,83 @@ +*************************** +Freescale i.MX8mq EVK board +*************************** + +This file documents the Buildroot support for the Freescale i.MX8mq EVK board. + +Hardware support +================ + +Currently only basic support for hardware is avialable, currently no +support for GPU, VPU and other HW features. + +Build +===== + +First, configure Buildroot for the i.MX51 EVK board: + + make freescale_imx8mqevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - boot.vfat + - fsl-imx8mq-evk.dtb + - Image + - imx-boot-imx8mqevk-sd.bin + - lpddr4_pmu_train_1d_dmem.bin + - lpddr4_pmu_train_1d_imem.bin + - lpddr4_pmu_train_2d_dmem.bin + - lpddr4_pmu_train_2d_imem.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - signed_hdmi_imx8m.bin + - u-boot.bin + - u-boot.imx + - u-boot-nodtb.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template_imx8. + +Boot the i.MX8mq EVK board +========================== + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enable HDMI output +================== + +To enable HDMI output at boot you must provide the video kernel boot argument. +To set the video boot argument from U-Boot run after stoping in U-Boot prompt: + +setenv mmcargs 'setenv bootargs console=${console} root=${mmcroot} video=HDMI-A-1:1920x1080-32@60' +saveenv +reset + +Change screen resolution to suit your connected display. + +Enjoy! diff --git a/configs/freescale_imx8mqevk_defconfig b/configs/freescale_imx8mqevk_defconfig new file mode 100644 index 0000000..68b10ac --- /dev/null +++ b/configs/freescale_imx8mqevk_defconfig @@ -0,0 +1,39 @@ +BR2_aarch64=y +BR2_ARM_FPU_VFPV3=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.9.51_8mq_beta_patch" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_USE_INTREE_DTS=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-imx8mq-evk" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_4.9.51_8mq_beta_patch" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.51_8mq_beta_patch" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mq_evk" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y