From patchwork Sat Oct 10 06:30:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 1379914 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=silver.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=lFMv7Hig; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C7Zfq1H8jz9sTL for ; Sat, 10 Oct 2020 17:24:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0C8B62042B; Sat, 10 Oct 2020 06:24:47 +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 HVWHeAdcfFVw; Sat, 10 Oct 2020 06:24:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9260E20442; Sat, 10 Oct 2020 06:24:43 +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 450831BF84C for ; Sat, 10 Oct 2020 06:24:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3ECAE8777E for ; Sat, 10 Oct 2020 06:24:41 +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 RnrxiesSnMwi for ; Sat, 10 Oct 2020 06:24:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 490C18776A for ; Sat, 10 Oct 2020 06:24:39 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id b1so9587632lfp.11 for ; Fri, 09 Oct 2020 23:24:39 -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=HC/MTnwTV1RiUP8rSdb+pMH2wW6lNZepcBCkD5FeTcs=; b=lFMv7HigJJpvxSRxkfVvvxxtmLATBMgHfuZYc/ZWB/kr7Wk45bjU2azEK7fv8HTs4I 2TrK8FmcuLuED+LG3AmkLoUDW90eL0Piq5p4NnaV46GnWKbpGqaYYlUFwAKWTnwo9b4m ZfMfvehpogajSNg9JMf4MRS0Uc7m4t4sdg4g7SzbkJa84MIOb6u9Xklp3/Yleg/e4D7W m8isaf0WQPhuVybfjBHS0lxt4/U+uGHzyt2+lb2CU4nrLj5ET2cgBOZuOPd72X/U1wHp jt1YDlhU6HlLqJ6q1b3vVjL7e7a4j0I1cCPJmXZpERu5q+wZYJD0JaXq6waczZCe+wdM B3eg== 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=HC/MTnwTV1RiUP8rSdb+pMH2wW6lNZepcBCkD5FeTcs=; b=FrZkSkus0wflC6M6EgdPEpP3Sn4DImC14Rso1FXbGtgRncEzMN8qgZsmwdUPS4KIiD BZAgrINbDKIXWBZ0uZztrgfO4rJXQsgaI8A+Wd5tQ26FkbiC8SVOoWWfW01Is5gurTzr HJUrpx67juutAmQUbpwhNRU5x/pm+qxbZWVzp7sakAD+UUq0UEKfQYLZegK2DIUBpRMo d3ydHek08OeTWj5wc4M0a91iyEmF63GoEaQWqVIByrkTvYIOkpNovey7cxGVYExrj2tc 81vqkRbRoDMLwSePSfbi15pixM3tXof0AKG4VwyCyXMiWH9Ie2oy0FIyLSk2tAC4Dq9B fQjQ== X-Gm-Message-State: AOAM530vNxINGR/65/XW9dceXHUe4bHfIBvi729pc/HNSE0Uv7MXmZSb UPQu1GZGZKSKMFATrjTaDLQNLmzYxJg= X-Google-Smtp-Source: ABdhPJyeSsick9iZEF8a9r6BHqVhx5WPRqcwajhUxZeutDc9uBuYqE/jmKk0UjGLeph2+QA0m2AqdA== X-Received: by 2002:ac2:505a:: with SMTP id a26mr4808945lfm.300.1602311076740; Fri, 09 Oct 2020 23:24:36 -0700 (PDT) Received: from localhost.localdomain ([5.188.167.245]) by smtp.googlemail.com with ESMTPSA id z21sm1943870lfb.20.2020.10.09.23.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 23:24:36 -0700 (PDT) From: Sergey Matyukevich To: buildroot@buildroot.org Date: Sat, 10 Oct 2020 09:30:19 +0300 Message-Id: <20201010063022.448414-3-geomatsi@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201010063022.448414-1-geomatsi@gmail.com> References: <20201010063022.448414-1-geomatsi@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image 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: Fabio Estevam , Sergey Matyukevich Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Bump U-Boot to 2020.10 and kernel to 5.8.13 version. Updated U-Boot no longer provides specific boot command in default environment for this board. So boot script needs to be added to the image. For this purpose switch from Freescale common scripts to custom image generation similar to what Udoo Neo board does. Create a single rootfs partition with all the required boot files including boot.scr, kernel, and dtb. Signed-off-by: Sergey Matyukevich --- board/udoo/mx6qdl/boot.scr.txt | 7 +++++++ board/udoo/mx6qdl/genimage.cfg | 32 ++++++++++++++++++++++++++++++++ board/udoo/mx6qdl/post-build.sh | 7 +++++++ board/udoo/mx6qdl/post-image.sh | 15 +++++++++++++++ configs/mx6udoo_defconfig | 13 ++++++++----- 5 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 board/udoo/mx6qdl/boot.scr.txt create mode 100644 board/udoo/mx6qdl/genimage.cfg create mode 100755 board/udoo/mx6qdl/post-build.sh create mode 100755 board/udoo/mx6qdl/post-image.sh diff --git a/board/udoo/mx6qdl/boot.scr.txt b/board/udoo/mx6qdl/boot.scr.txt new file mode 100644 index 0000000000..7acceed0fb --- /dev/null +++ b/board/udoo/mx6qdl/boot.scr.txt @@ -0,0 +1,7 @@ +setenv finduuid "part uuid mmc 0:1 uuid" +run finduuid +run findfdt +setenv bootargs "console=${console} root=PARTUUID=${uuid} rootwait rootfstype=ext4" +load mmc 0:1 ${fdt_addr} boot/${fdtfile} +load mmc 0:1 ${loadaddr} boot/zImage +bootz ${loadaddr} - ${fdt_addr} diff --git a/board/udoo/mx6qdl/genimage.cfg b/board/udoo/mx6qdl/genimage.cfg new file mode 100644 index 0000000000..46209120f0 --- /dev/null +++ b/board/udoo/mx6qdl/genimage.cfg @@ -0,0 +1,32 @@ +# Minimal SD card image for the MX6SX Udoo Neo board +# +# The SD card must have at least 1 MB free at the beginning. +# U-Boot and its environment are dumped as is. +# A single root filesystem partition is required (Ext4 in this case). +# +# For details about the layout, see: +# http://wiki.wandboard.org/index.php/Boot-process + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "SPL" + offset = 1K + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.img" + offset = 69K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + offset = 1M + size = 512M + } +} diff --git a/board/udoo/mx6qdl/post-build.sh b/board/udoo/mx6qdl/post-build.sh new file mode 100755 index 0000000000..6ccd87fafd --- /dev/null +++ b/board/udoo/mx6qdl/post-build.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -d -m 755 $TARGET_DIR/boot +$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \ + -n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr diff --git a/board/udoo/mx6qdl/post-image.sh b/board/udoo/mx6qdl/post-image.sh new file mode 100755 index 0000000000..18e76aa40d --- /dev/null +++ b/board/udoo/mx6qdl/post-image.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + diff --git a/configs/mx6udoo_defconfig b/configs/mx6udoo_defconfig index 86ad13bbf3..2cf13ae559 100644 --- a/configs/mx6udoo_defconfig +++ b/configs/mx6udoo_defconfig @@ -3,27 +3,30 @@ BR2_cortex_a9=y BR2_ARM_ENABLE_NEON=y BR2_ARM_ENABLE_VFP=y BR2_ARM_FPU_VFPV3=y -# Linux headers same as kernel, a 4.14 series -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +# Linux headers same as kernel, a 5.8 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/mx6qdl/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/mx6qdl/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="udoo" BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.01" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10" BR2_TARGET_UBOOT_FORMAT_IMG=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="SPL" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.13" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/udoo/mx6qdl/linux.fragment" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-udoo imx6dl-udoo" +BR2_LINUX_KERNEL_INSTALL_TARGET=y # required tools to create the SD card image BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y