From patchwork Thu Jun 10 10:57:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hanspeter Portner X-Patchwork-Id: 1490385 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.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=open-music-kontrollers.ch header.i=@open-music-kontrollers.ch header.a=rsa-sha256 header.s=fm3 header.b=fpwTv6Ja; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=Pl4+L0o0; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G11Cg3Hv7z9sRN for ; Thu, 10 Jun 2021 20:57:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8B3C26067B; Thu, 10 Jun 2021 10:57:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hgNmHSACpwgq; Thu, 10 Jun 2021 10:57:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id AC2E260850; Thu, 10 Jun 2021 10:57:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3E3D51BF3E6 for ; Thu, 10 Jun 2021 10:57:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2D57C60850 for ; Thu, 10 Jun 2021 10:57:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IudAQzBJUBrG for ; Thu, 10 Jun 2021 10:57:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by smtp3.osuosl.org (Postfix) with ESMTPS id 33B926067B for ; Thu, 10 Jun 2021 10:57:43 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 4EA771991 for ; Thu, 10 Jun 2021 06:57:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 10 Jun 2021 06:57:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= open-music-kontrollers.ch; h=from:to:subject:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm3; bh= QfJ4bacvrohIIj6um3nRvxPCUODQZ9IHbPl0cK/KEgw=; b=fpwTv6JaCMENzPKW ijnYSgwVhn9MMx9sEZ1Tfu4CpyGyFc7Z8ZD3B/2d/3/tbJ/jIQkl2tJNMACFxVAU x+J3crhia97SFZCRu5ErEGkebwstAlibBfEJAzO+rR9sDJMsIE+j7kLkiUOJwHxj DYtnNVEldb/Xy860X+zNP05VDddxRuVhA7C8ZyBo2XGTGjwAP0ao5JC9oZXE/F/G /WxgLR0lgHuWcrVIMJb05ICiqZvqiGix4qnwTfmnM+oVKQ7yBXF2bLM2+o9NKSG2 QLL46kHqxBYP0JhHM3c5G0tvo1/FoO7IDm81oqvvUju1HRRroUDsAd5mrKW+R9/N RSxBxg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=QfJ4ba cvrohIIj6um3nRvxPCUODQZ9IHbPl0cK/KEgw=; b=Pl4+L0o0UEVHrCbeZns5yr 2usTTX786N9BUUd4zzEdtXhtrOS5Mx1g/f5JX1/Wo/2sTv7qr06N2+uhDa8ZIyiv Z6t4fwZBnIYn173vF/4bzdNJXlhKW0uGT9ba0pnQ5U96B7Kl8ngIFrGpV8OZSbPu dRU8itxpPdQC7RV4mnUkaloG1GhN253EZTM14hqNyYX9JoBpjrSGrV0o283Guttw GaVz4reDXvZ1pG3fJIhg1b7N06Dfb3zl67YujiaPVj4C59veuHjVH+x++4aEH8Wq +NQ97cBzy/OM6zy+yfchr4DUDpYhiQXS0Px/Rah15zOyu9vGcrLhBMFyZSu++/nQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedufedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofggtgfgsehtkeertd ertdejnecuhfhrohhmpefjrghnshhpvghtvghrucfrohhrthhnvghruceouggvvhesohhp vghnqdhmuhhsihgtqdhkohhnthhrohhllhgvrhhsrdgthheqnecuggftrfgrthhtvghrnh ephedtleegueeiudeukedttedvheeuudeuveetgfeuledufedtfefhudelfeeltdehnecu ffhomhgrihhnpehtohhrrgguvgigrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepuggvvhesohhpvghnqdhmuhhsihgtqdhkohhnthhr ohhllhgvrhhsrdgthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 10 Jun 2021 06:57:41 -0400 (EDT) From: Hanspeter Portner To: buildroot@buildroot.org Date: Thu, 10 Jun 2021 12:57:39 +0200 Message-Id: <20210610105739.488491-1-dev@open-music-kontrollers.ch> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] configs/toradex_colibri_imx6: initial commit 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Based on configs/toradex_apalis_imx6 with Toradex' mainline linux/uboot branches. Tested on: Module: 'Toradex Col IMX6DL 512MB V1.0A' Evalboard: 'Toradex Col Evaluation V3.2A' Signed-off-by: Hanspeter Portner --- board/toradex/colibri-imx6/genimage.cfg | 15 +++++++ board/toradex/colibri-imx6/post-image.sh | 20 +++++++++ board/toradex/colibri-imx6/readme.txt | 53 ++++++++++++++++++++++++ board/toradex/colibri-imx6/uEnv.txt | 7 ++++ configs/toradex_colibri_imx6_defconfig | 25 +++++++++++ 5 files changed, 120 insertions(+) create mode 100644 board/toradex/colibri-imx6/genimage.cfg create mode 100755 board/toradex/colibri-imx6/post-image.sh create mode 100644 board/toradex/colibri-imx6/readme.txt create mode 100644 board/toradex/colibri-imx6/uEnv.txt create mode 100644 configs/toradex_colibri_imx6_defconfig diff --git a/board/toradex/colibri-imx6/genimage.cfg b/board/toradex/colibri-imx6/genimage.cfg new file mode 100644 index 0000000000..91c927c723 --- /dev/null +++ b/board/toradex/colibri-imx6/genimage.cfg @@ -0,0 +1,15 @@ +# Minimal SD card image for the Toradex Colibri i.MX6 COM +# +# It does not need a boot section for a bootloader since it is booted +# from its internal flash memory (eMMC). + +image sdcard.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + size = 512M + } +} diff --git a/board/toradex/colibri-imx6/post-image.sh b/board/toradex/colibri-imx6/post-image.sh new file mode 100755 index 0000000000..b95e175a29 --- /dev/null +++ b/board/toradex/colibri-imx6/post-image.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +GENIMAGE_CFG="$(dirname $0)/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +# copy the uEnv.txt to the output/images directory +cp board/toradex/colibri-imx6/uEnv.txt $BINARIES_DIR/uEnv.txt + +rm -rf "${GENIMAGE_TMP}" + +# generate rootfs.img +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +RET=${?} +exit ${RET} diff --git a/board/toradex/colibri-imx6/readme.txt b/board/toradex/colibri-imx6/readme.txt new file mode 100644 index 0000000000..50078db173 --- /dev/null +++ b/board/toradex/colibri-imx6/readme.txt @@ -0,0 +1,53 @@ +Toradex Colibri i.MX6 Computer on Module + +Intro +===== + +The Colibri iMX6 is a SODIMM sized computer module based on NXP®/Freescale +i.MX 6 SoC. The module targets a wide range of applications, including: +Medical Devices, Navigation, Industrial Automation, HMIs, Avionics, +Entertainment system, POS, Data Acquisition, Thin Clients, Robotics, Gaming +and much more. It offers a wide range of interfaces from simple GPIOs, industry +standard I2C, SPI, CAN, and UART buses through to high speed USB 2.0 interfaces +and a 16/32bit external memory bus (parallel bus). The HDMI interface makes it +very easy to connect large, full HD resolution displays + +https://www.toradex.com/computer-on-modules/colibri-arm-family/nxp-freescale-imx6 + +It supports one carrier boards: + +Colibri Evaluation Board +https://www.toradex.com/products/carrier-board/colibri-evaluation-board + +How to build it +=============== + +Configure Buildroot: + + $ make toradex_colibri_imx6_defconfig + +Compile everything and build the rootfs image: + + $ make + +How to boot the image +===================== + +The board only boots from its internal flash memory eMMC, so the +bootloader image should be copied to it, following the procedures +described in Toradex website. + +http://developer.toradex.com/knowledge-base/flashing-linux-on-imx6-modules + +Buildroot prepares a "sdcard.img" in output/images/ with the kernel +image, device tree and a root filesystem, ready to be dumped on an SD +card. + + $ dd if=output/images/sdcard.img of=/dev/sdX bs=1M + +To boot from the SD card, you should change the U-Boot +environment. Since U-Boot is running from internal eMMC, you will need +to access its command line prompt and manually set the necessary +variables to boot from the external SD card. For convenience, you can +use uEnv.txt provided in output/images/ as a reference to create the +necessary U-Boot variables to boot from the SD card. diff --git a/board/toradex/colibri-imx6/uEnv.txt b/board/toradex/colibri-imx6/uEnv.txt new file mode 100644 index 0000000000..e8fec787aa --- /dev/null +++ b/board/toradex/colibri-imx6/uEnv.txt @@ -0,0 +1,7 @@ +setenv boot_file 'zImage' +setenv fdt_file 'imx6dl-colibri-eval-v3.dtb' +setenv sdargs 'ip=off root=/dev/mmcblk0p1 rw,noatime rootfstype=ext4 rootwait' +setenv sddtbload 'ext2load mmc 1:1 ${fdt_addr_r} boot/${fdt_file}' +setenv sdkernelload 'ext2load mmc 1:1 ${kernel_addr_r} boot/${boot_file}' +setenv bootcmd 'run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs}; echo Booting from SD card...; run sddtbload; run sdkernelload; bootz ${kernel_addr_r} - ${fdt_addr_r}' +run bootcmd diff --git a/configs/toradex_colibri_imx6_defconfig b/configs/toradex_colibri_imx6_defconfig new file mode 100644 index 0000000000..0e50381579 --- /dev/null +++ b/configs/toradex_colibri_imx6_defconfig @@ -0,0 +1,25 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/toradex/colibri-imx6/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.toradex.com/linux-toradex.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="toradex_5.4.y" +BR2_LINUX_KERNEL_DEFCONFIG="toradex-imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-colibri-eval-v3" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.toradex.com/u-boot-toradex.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="toradex_2020.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="colibri_imx6" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_PACKAGE_HOST_GENIMAGE=y