From patchwork Mon Apr 27 21:34:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Roumegue X-Patchwork-Id: 1277969 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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.a=rsa-sha256 header.s=20161025 header.b=bq2omv6a; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499yjH6xWbz9sSK for ; Tue, 28 Apr 2020 07:34:43 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D804D85B95; Mon, 27 Apr 2020 21:34:38 +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 FHhTfg+lioy2; Mon, 27 Apr 2020 21:34:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8251986388; Mon, 27 Apr 2020 21:34:36 +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 9534D1BF3C6 for ; Mon, 27 Apr 2020 21:34:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8774B87B6A for ; Mon, 27 Apr 2020 21:34:34 +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 gKsJ5lhgHQCI for ; Mon, 27 Apr 2020 21:34:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id A3CDC87B65 for ; Mon, 27 Apr 2020 21:34:33 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id k12so511766wmj.3 for ; Mon, 27 Apr 2020 14:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4QL6auRr6xZ75OowKSxzvuXCwFSOkCYBTJVwz8oEMMI=; b=bq2omv6aw9lHnh2x7UEHUOAuu1MqRym3vOexQqbpbiUy/yEgY9WesTYLMcAuZfjJ+W YbnGzBypZ9iUVUFV/sbaUO9AQCo0CC6rXqqyZQaXJGR1h+xG78KLEqhSOC57fzbhbgut bPJFQKA5mRh4Daf8waUUacFKwuu5QvIuWbcfHonbIcof/UlOoqMd26oRnmyIWCyu5p0u IlZ5/2DBkSeMFGIyt4GrUeBsESoTBTFChjwuE4REvufGGoQmam2NakzXi+0EyKjkif+E iJaS5AGEZpxF9FmIirmu5Xoy4TUfgQqlNfkXVkYAO5aR/JzPlS+uZvDuaz7nCIqBG6PG B3Aw== 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:mime-version :content-transfer-encoding; bh=4QL6auRr6xZ75OowKSxzvuXCwFSOkCYBTJVwz8oEMMI=; b=U0Ear7fzy+8wdFxKaCsjJlh0G/5uKDHXDFZnMlJ9Bxo/rAVTmzPZgQlaK7M/slm9W0 VwT6aFG5uQ2pLb7FVrJiryYmwRqJpBGr9fjE4P733G5sOzqHRxSIADAfXrYX4XQTczel 8tt92DTjrW/tW4xlYaWGD4EypWZOi45hsoeeSC/zmhGTX47dTIl58zocSU1dvnnFxaSp x+CqwATYyNzw34HEJDYEPESckv/vb++ML3pUxQ23Rn6GpGJ9R0MG59nTdU+RVdeMku3R PMYpe3ys6ow4eK0HgRcinyBBSEEA9c0w6FSXnTrZsYN1coPMIl3jQNqlYXx/0TNlVrhd Gs4A== X-Gm-Message-State: AGi0PuZ+cW1MB50/sCbUcnWStlvRUWjmgho+McFbBIgvUaOpkinjlxib SvgcQ59kAh83pdjkkRwDs+nnwC9oxujNTg== X-Google-Smtp-Source: APiQypKWLUUT6UTmvzsLLPcE/9dMDIzItSh9wJ1VQmEu58FHlsOeyTE0ahOuRM4OSMGO6eING/fEFg== X-Received: by 2002:a7b:cf1a:: with SMTP id l26mr846554wmg.114.1588023271796; Mon, 27 Apr 2020 14:34:31 -0700 (PDT) Received: from frodon.home ([2a01:cb1d:3f5:3900:2e4d:54ff:fe9c:6f7a]) by smtp.gmail.com with ESMTPSA id n6sm24502340wrs.81.2020.04.27.14.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 14:34:31 -0700 (PDT) From: Xavier Roumegue To: buildroot@buildroot.org Date: Mon, 27 Apr 2020 23:34:00 +0200 Message-Id: <20200427213402.6148-1-xroumegue@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/3] board/freescale/imx: Add helper to generate fw binary X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Gilles Talis , Xavier Roumegue , Fabio Estevam Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This script aims to create an imx compatible boot image embedding mainline components, using only upstream uboot mkimage tool, avoiding dependencies on proprietary imx mkimage. Mainline u-boot can generate a bootable image, but SPL soc proprietary firmware dependencies have to be copied on uboot root dir. This script prevents additional buildroot uboot recipe hacking to handle custom SoC uboot build process. The script actions summary is: - Append DDR4 firmware to uboot spl binary - Generate imx mkimage configuration file, extracting entry points from relevant elf files on the fly. - Generate imx boot image using uboot upstream mkimage tool Signed-off-by: Xavier Roumegue --- .../common/imx/imx8-generate-fw-image.sh | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 board/freescale/common/imx/imx8-generate-fw-image.sh diff --git a/board/freescale/common/imx/imx8-generate-fw-image.sh b/board/freescale/common/imx/imx8-generate-fw-image.sh new file mode 100755 index 0000000000..eb9e96265b --- /dev/null +++ b/board/freescale/common/imx/imx8-generate-fw-image.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +get_entry() +{ + local elf_file=$1 + readelf -h "$elf_file" | sed -e '/Entry/!d;s/.*:.*\(0x[0-9a-fA-F]\)/\1/g' +} + +gen_cfg_file() +{ +cat < "$CFG_OUTFILE" +#define __ASSEMBLY__ + +FIT +BOOT_FROM sd +LOADER ${SPL_DDR_BIN} ${SPL_ENTRY} +SECOND_LOADER ${UBOOT_BIN} ${UBOOT_ENTRY} 0x60000 + +EOF +} + +gen_1stloader_bin() +{ + SPL_BIN_PAD="$(mktemp --suffix spl_pad.bin)" + dd if="${SPL_BIN}" of="${SPL_BIN_PAD}" bs=4 conv=sync + cat "${SPL_BIN_PAD}" "${DDR_FW_BIN}" > "${SPL_DDR_BIN}" +} + +gen_fw_image() +{ + "${HOST_DIR}"/bin/mkimage -n "${CFG_OUTFILE}" -T imx8mimage -e "${SPL_ENTRY}" -d "${UBOOT_BIN}" "${FLASH_BIN}" + +} +main() +{ + UBOOT_BIN="${BINARIES_DIR}/u-boot.itb" + UBOOT_ELF="${BINARIES_DIR}/u-boot" + SPL_DDR_BIN="${BINARIES_DIR}/u-boot-spl-ddr.bin" + SPL_BIN="${BINARIES_DIR}/u-boot-spl.bin" + SPL_ELF="${BINARIES_DIR}/u-boot-spl" + CFG_OUTFILE="${BINARIES_DIR}/bootimage.cfg" + FLASH_BIN="${BINARIES_DIR}/imx8-boot-sd.bin" + UBOOT_ENTRY="$(get_entry "${UBOOT_ELF}")" + SPL_ENTRY="$(get_entry "${SPL_ELF}")" + DDR_FW_BIN="${BINARIES_DIR}/lpddr4_pmu_train_fw.bin" + + gen_1stloader_bin + gen_cfg_file + gen_fw_image +} + +main "$@" From patchwork Mon Apr 27 21:34:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xavier Roumegue X-Patchwork-Id: 1277971 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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.a=rsa-sha256 header.s=20161025 header.b=doHaw8If; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499yjL51w7z9sSK for ; Tue, 28 Apr 2020 07:34:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 55F7987C14; Mon, 27 Apr 2020 21:34:42 +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 eQeZP+wgIy1C; Mon, 27 Apr 2020 21:34:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4CEA887B6A; Mon, 27 Apr 2020 21:34:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 361C71BF3C6 for ; Mon, 27 Apr 2020 21:34:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 30CE12157D for ; Mon, 27 Apr 2020 21:34:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DhxY4h8XhnW9 for ; Mon, 27 Apr 2020 21:34:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by silver.osuosl.org (Postfix) with ESMTPS id B7316204A0 for ; Mon, 27 Apr 2020 21:34:34 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id k1so22325487wrx.4 for ; Mon, 27 Apr 2020 14:34:34 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=dzeG+8hSWo7t8cdf73d5BnfKPDimgUOOhGXROqHgf0s=; b=doHaw8Ifv8485wx0gVsA7LYtNy5cxPm0vnjeqhMuCkcbblUc0rS5+bn7Ya/gAoEyEl wEWLwDhwMzvsw1gbTm6d6vEzaN5KGB2qLiZZnp3dB4LD4LACYsUKnzX7gVc6IO7AmBQU TSK31d1J8S5ohn64u9EWB5UGqlgl9NJ+bQ0VJuGoIR7hQ8nXHAKIlOKCRBvhYxqYdBij 1QK5P8rl788w42+P4AC/ghyYPXrmNpHnFrNIfy+GmVbSckM4MdobKZD/vydHiGmalUkU tvZJnMLqZbPaJvk96ppU3O4gybj1+sxSlxEJl19Z1leEdX1pxSQeEJuzez4O+ssYufIK ceGA== 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:mime-version:content-transfer-encoding; bh=dzeG+8hSWo7t8cdf73d5BnfKPDimgUOOhGXROqHgf0s=; b=iW3t+npY/sbc0owOAikdxF9NWN2C2YhpAF7Ks80PJqoWsTu29gWj+e9g1r8zKQkDwC JV8qb9hpFe8rJO97JKNs5ZQKsRu/jgh1nUeMpjQMbGLgrzHFJJj8lFkFdMfCjounStC1 JAc4yD0018uOcgQrQXKD2fR8P0gfkxk5dfHRsvyan8xGEWCjM0TolERwgP9ei/yCjgpM pHK4JSRpjSRmxK1mzC/kMa9BebIh/VEJdxTsYFbKww37KfiwOm+YjfWi1W92nfye3zNm jInQiZ6D/SGtWyTAucxnX0QodJTKR2HtWMubRlHE1I4xE/h6M1XM+nPJQmSPXCnpTO5m 30JQ== X-Gm-Message-State: AGi0PuZ8+U5JJKDcXJfTJhJVQj/uapOG87nFdsPtqV0+7Qp+VOP/JlYB FvYdZdzFcN3Q1ECHMw90S85L26HI+hiJig== X-Google-Smtp-Source: APiQypJ7x6BXmkY8Ngr5mQ/Uo6t14vWkBeAGy5pFz904JIv0oyuxvlCZu0ICS560il1bQlOtg6+Y4g== X-Received: by 2002:adf:ea44:: with SMTP id j4mr31773329wrn.38.1588023272859; Mon, 27 Apr 2020 14:34:32 -0700 (PDT) Received: from frodon.home ([2a01:cb1d:3f5:3900:2e4d:54ff:fe9c:6f7a]) by smtp.gmail.com with ESMTPSA id n6sm24502340wrs.81.2020.04.27.14.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 14:34:32 -0700 (PDT) From: Xavier Roumegue To: buildroot@buildroot.org Date: Mon, 27 Apr 2020 23:34:01 +0200 Message-Id: <20200427213402.6148-2-xroumegue@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200427213402.6148-1-xroumegue@gmail.com> References: <20200427213402.6148-1-xroumegue@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/3] configs/imx8mmevk: new defconfig X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Gilles Talis , Xavier Roumegue , Fabio Estevam Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Introduce NXP imx8mm evk board configuration that uses mainline atf, uboot and kernel. Mainline uboot mkimage tool generates the boot image. Signed-off-by: Xavier Roumegue Tested-by: Julien Olivain --- .gitlab-ci.yml | 1 + DEVELOPERS | 3 +++ board/freescale/imx8mmevk/readme.txt | 35 ++++++++++++++++++++++-- configs/imx8mmevk_defconfig | 40 ++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 configs/imx8mmevk_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa8e077a07..0a348d35ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,6 +210,7 @@ imx6ulevk_defconfig: { extends: .defconfig } imx6ulpico_defconfig: { extends: .defconfig } imx7d-sdb_defconfig: { extends: .defconfig } imx7dpico_defconfig: { extends: .defconfig } +imx8mmevk_defconfig: { extends: .defconfig } imx8mmpico_defconfig: { extends: .defconfig } imx8mpico_defconfig: { extends: .defconfig } lafrite_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 34e19b451e..aa9504d25f 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2637,6 +2637,9 @@ F: package/python-pyusb/ N: Wojciech NiziƄski F: package/fwup/ +N: Xavier Roumegue +F: configs/imx8mmevk_defconfig + N: Yann E. MORIN F: board/friendlyarm/nanopi-neo/ F: configs/nanopi_neo_defconfig diff --git a/board/freescale/imx8mmevk/readme.txt b/board/freescale/imx8mmevk/readme.txt index 7b69405d30..e695dbe779 100644 --- a/board/freescale/imx8mmevk/readme.txt +++ b/board/freescale/imx8mmevk/readme.txt @@ -5,8 +5,8 @@ Freescale i.MX8MM EVK board This file documents the Buildroot support for the Freescale i.MX8MM EVK board. -Build -===== +Building with NXP ATF, U-Boot and kernel +======================================== First, configure Buildroot for the i.MX8MM EVK board: @@ -32,6 +32,37 @@ You will find in output/images/ the following files: - u-boot-nodtb.bin - u-boot-spl-ddr.bin +Building with mainline ATF, U-Boot and kernel +============================================= +First, configure Buildroot for the i.MX8MM EVK board: + + make imx8mmevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - bootimage.cfg + - boot.vfat + - Image + - imx8-boot-sd.bin + - imx8mm-evk.dtb + - lpddr4_pmu_train_fw.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - signed_hdmi_imx8m.bin + - u-boot + - u-boot.bin + - u-boot.itb + - u-boot-nodtb.bin + - u-boot-spl + - u-boot-spl.bin + - u-boot-spl-ddr.bin + Create a bootable SD card ========================= diff --git a/configs/imx8mmevk_defconfig b/configs/imx8mmevk_defconfig new file mode 100644 index 0000000000..5b2b11b1c6 --- /dev/null +++ b/configs/imx8mmevk_defconfig @@ -0,0 +1,40 @@ +BR2_aarch64=y +BR2_ARM_FPU_VFPV3=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-generate-fw-image.sh board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.7" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mm-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=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_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.3" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mm_evk" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_ITB=y +BR2_TARGET_UBOOT_FORMAT_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin spl/u-boot-spl" +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="ATF_LOAD_ADDR=0x920000" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y From patchwork Mon Apr 27 21:34:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Roumegue X-Patchwork-Id: 1277970 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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.a=rsa-sha256 header.s=20161025 header.b=mper8KHJ; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499yjK2bGJz9sSM for ; Tue, 28 Apr 2020 07:34:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BDCC686A3C; Mon, 27 Apr 2020 21:34:43 +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 3AgjgYUhJbaA; Mon, 27 Apr 2020 21:34:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 3E6F186447; Mon, 27 Apr 2020 21:34:42 +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 BCBBE1BF3C6 for ; Mon, 27 Apr 2020 21:34:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B9FEC868FF for ; Mon, 27 Apr 2020 21:34:37 +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 fgEv9WPY0wJ6 for ; Mon, 27 Apr 2020 21:34:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1726F85B95 for ; Mon, 27 Apr 2020 21:34:36 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id x4so525895wmj.1 for ; Mon, 27 Apr 2020 14:34:36 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=AsdN2I5W+o3R2EOtecJ3OLB72DbEHX8C9cSu4QlaO58=; b=mper8KHJSquaUuL78B3p/yvh4NtYhWG3b/V608ZDJ3uyxOTF32t605tSkZl0sOI1Gg uGKPIkDAgeAfwmHNUk6zlr08kW2Fud0j636DjPEm0qRQjZlTwFUMFR/wE7EKwWLQNt0P RKVoo+tTVLY47xxgDK4kPSUkjWqxMicoGZqmdHCRy5EUoIOTB9vmWWimaRNnaADfSEiO oGPOTo8A7bG8TYoS/TP9C5QnNVXbXk9I7gIEUaBdenBZgTIMmCCj0R6qPPPkWVrjg2ZS vzQRUN7mjQ/1cSVk12ty4EQGWx/JcvcTDr12GmGeK6LX6wkjVSVGRhlu0Lm5uXYKEONt 3MSA== 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:mime-version:content-transfer-encoding; bh=AsdN2I5W+o3R2EOtecJ3OLB72DbEHX8C9cSu4QlaO58=; b=WyV8sypvjxbvUS1XhaeLqbjzxr69W/SyrY6cYz1XwvObngfJ7zTyOfMmUYI1MF2s24 VXoYkmoKTXZOVgvnS0Gms1DKuy8E42XtBli4x5CdO3smcUQ4wZulh0YJRNbpBxMoBwYs c9N95qSYMff2jSXNWAJnyk3llikBRzWxrQE0v809QlEb8wVOovefAY3Lu2hGVVNKXJFq 2P4ZRZ+aph0E1CoAzYcwSgtCd3ShaMBz+cAP0xYBH1HoLZ5j0ei/FMU8neD6SLPf300d 3nE+VUIBfDMCb05sF8mXG1oPQPS6N8U9GFXkkQ9k9HZZwJw7hzCSG0h8uBI8tu34U12+ 7Vrw== X-Gm-Message-State: AGi0PuZqnkkSCAmOXWESRyDbBvx1tCul2WrTdCwe62iY6xdG7pq9E8wQ O5Ka97uKoT/NIwyE8lGc2E4fn9lVbefxQA== X-Google-Smtp-Source: APiQypKaJ25fWbHDYfW6jkA7q+aOqt/X0kP5QKP2sHVle9SoUIG2S9R/H0wK4uvb62YefR4PX8igNQ== X-Received: by 2002:a05:600c:20f:: with SMTP id 15mr792266wmi.71.1588023273922; Mon, 27 Apr 2020 14:34:33 -0700 (PDT) Received: from frodon.home ([2a01:cb1d:3f5:3900:2e4d:54ff:fe9c:6f7a]) by smtp.gmail.com with ESMTPSA id n6sm24502340wrs.81.2020.04.27.14.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 14:34:33 -0700 (PDT) From: Xavier Roumegue To: buildroot@buildroot.org Date: Mon, 27 Apr 2020 23:34:02 +0200 Message-Id: <20200427213402.6148-3-xroumegue@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200427213402.6148-1-xroumegue@gmail.com> References: <20200427213402.6148-1-xroumegue@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/3] configs/imx8mqevk: new defconfig X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Gilles Talis , Xavier Roumegue , Fabio Estevam Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Introduce NXP imx8mq evk board configuration that uses mainline atf, uboot and kernel. Mainline uboot mkimage tool generates the boot image. Signed-off-by: Xavier Roumegue Tested-by: Xavier Roumegue --- .gitlab-ci.yml | 1 + DEVELOPERS | 1 + board/freescale/imx8mqevk/readme.txt | 35 ++++++++++++++++++++++-- configs/imx8mqevk_defconfig | 40 ++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 configs/imx8mqevk_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a348d35ac..32ec5d0de1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -213,6 +213,7 @@ imx7dpico_defconfig: { extends: .defconfig } imx8mmevk_defconfig: { extends: .defconfig } imx8mmpico_defconfig: { extends: .defconfig } imx8mpico_defconfig: { extends: .defconfig } +imx8mqevk_defconfig: { extends: .defconfig } lafrite_defconfig: { extends: .defconfig } lego_ev3_defconfig: { extends: .defconfig } licheepi_zero_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index aa9504d25f..fe11f43624 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2639,6 +2639,7 @@ F: package/fwup/ N: Xavier Roumegue F: configs/imx8mmevk_defconfig +F: configs/imx8mqevk_defconfig N: Yann E. MORIN F: board/friendlyarm/nanopi-neo/ diff --git a/board/freescale/imx8mqevk/readme.txt b/board/freescale/imx8mqevk/readme.txt index e60eba4cb6..43573868e0 100644 --- a/board/freescale/imx8mqevk/readme.txt +++ b/board/freescale/imx8mqevk/readme.txt @@ -5,8 +5,8 @@ Freescale i.MX8MQ EVK board This file documents the Buildroot support for the Freescale i.MX8MQ EVK board. -Build -===== +Building with NXP ATF, U-Boot and kernel +======================================== First, configure Buildroot for the i.MX8MQ EVK board: @@ -33,6 +33,37 @@ You will find in output/images/ the following files: - u-boot-nodtb.bin - u-boot-spl-ddr.bin +Building with mainline ATF, U-Boot and kernel +============================================= +First, configure Buildroot for the i.MX8MQ EVK board: + + make imx8mqevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - bootimage.cfg + - boot.vfat + - Image + - imx8-boot-sd.bin + - imx8mq-evk.dtb + - lpddr4_pmu_train_fw.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - signed_hdmi_imx8m.bin + - u-boot + - u-boot.bin + - u-boot.itb + - u-boot-nodtb.bin + - u-boot-spl + - u-boot-spl.bin + - u-boot-spl-ddr.bin + Create a bootable SD card ========================= diff --git a/configs/imx8mqevk_defconfig b/configs/imx8mqevk_defconfig new file mode 100644 index 0000000000..365efdd668 --- /dev/null +++ b/configs/imx8mqevk_defconfig @@ -0,0 +1,40 @@ +BR2_aarch64=y +BR2_ARM_FPU_VFPV3=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-generate-fw-image.sh board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.7" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mq-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=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_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.3" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mq_evk" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_ITB=y +BR2_TARGET_UBOOT_FORMAT_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin spl/u-boot-spl" +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="ATF_LOAD_ADDR=0x910000" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y