From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.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 smtp.lore.kernel.org (Postfix) with ESMTPS id CA485C433EF for ; Thu, 13 Jan 2022 21:01:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 463EE84CD2; Thu, 13 Jan 2022 21:01:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9psZXpH1SHLA; Thu, 13 Jan 2022 21:01:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 7F9E884CCF; Thu, 13 Jan 2022 21:01:03 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 0075F1BF3ED for ; Thu, 13 Jan 2022 21:01:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id DA8B56FB7E for ; Thu, 13 Jan 2022 21:01:01 +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 VAIuF5IOc2qj for ; Thu, 13 Jan 2022 21:01:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6C4846FB7D for ; Thu, 13 Jan 2022 21:01:00 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 42C56C0003; Thu, 13 Jan 2022 21:00:58 +0000 (UTC) Date: Thu, 13 Jan 2022 22:00:57 +0100 From: Thomas Petazzoni To: Heiko Thiery Message-ID: <20220113220057.1db30808@windsurf> In-Reply-To: <20220112184821.916646-1-heiko.thiery@gmail.com> References: <20220112184821.916646-1-heiko.thiery@gmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Subject: Re: [Buildroot] [PATCH] configs/kontron_bl_imx8mm_defconfig: new defconfig X-BeenThere: buildroot@buildroot.org 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: Frieder Schrempf , buildroot@buildroot.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Hello, On Wed, 12 Jan 2022 19:48:22 +0100 Heiko Thiery wrote: > diff --git a/board/kontron/bl-imx8mm/boot.cmd b/board/kontron/bl-imx8mm/boot.cmd > new file mode 100644 > index 0000000000..7ce3198dbc > --- /dev/null > +++ b/board/kontron/bl-imx8mm/boot.cmd > @@ -0,0 +1,8 @@ > +echo "Root File Sytem on MMC${devnum}" > +setenv rootfs /dev/mmcblk${devnum}p1 > +setenv bootargs root=${rootfs} rootwait rw ${extrabootargs} > + > +load ${devtype} ${devnum} ${kernel_addr_r} boot/Image > +load ${devtype} ${devnum} ${fdt_addr_r} boot/imx8mm-kontron-n801x-s.dtb > + > +booti ${kernel_addr_r} - ${fdt_addr_r} Have you considered using extlinux.conf ? This is generally much easier than a boot script, and removes the need to generate the boot script. > diff --git a/board/kontron/bl-imx8mm/patches/uboot/0001-imx-imx8mm-imx8mm-kontron-n801x-s-convert-options-to.patch b/board/kontron/bl-imx8mm/patches/uboot/0001-imx-imx8mm-imx8mm-kontron-n801x-s-convert-options-to.patch > new file mode 100644 > index 0000000000..ed088dd0f8 > --- /dev/null > +++ b/board/kontron/bl-imx8mm/patches/uboot/0001-imx-imx8mm-imx8mm-kontron-n801x-s-convert-options-to.patch > @@ -0,0 +1,28 @@ > +From 95a311af81cd47c44d3d6e3f717f06a06d8f3dfd Mon Sep 17 00:00:00 2001 > +From: Heiko Thiery > +Date: Mon, 10 Jan 2022 14:13:02 +0100 > +Subject: [PATCH 1/2] imx: imx8mm: imx8mm-kontron-n801x-s: convert options to Kconfig I suppose the U-Boot patches are on their way upstream? > diff --git a/board/kontron/bl-imx8mm/post-image.sh b/board/kontron/bl-imx8mm/post-image.sh > new file mode 100755 > index 0000000000..564211c829 > --- /dev/null > +++ b/board/kontron/bl-imx8mm/post-image.sh > @@ -0,0 +1,3 @@ > +#!/bin/sh > + > +support/scripts/genimage.sh -c $(dirname $0)/genimage.cfg Could you call support/scripts/genimage.sh directly as the post-image script, using the BR2_ROOTFS_POST_SCRIPT_ARGS to pass the -c ... argument? We already do that in many defconfigs. > +# Kernel > +BR2_LINUX_KERNEL=y > +BR2_LINUX_KERNEL_CUSTOM_VERSION=y > +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.16" > +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y > +BR2_LINUX_KERNEL_DTS_SUPPORT=y > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mm-kontron-n801x-s" > +BR2_LINUX_KERNEL_INSTALL_TARGET=y > +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y > + > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_16=y > + > +BR2_PACKAGE_FREESCALE_IMX=y > +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y > +BR2_PACKAGE_FIRMWARE_IMX=y > + > +# Filesystem / image > +BR2_TARGET_ROOTFS_EXT2=y > +BR2_TARGET_ROOTFS_EXT2_4=y > +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" > + > +# Bootloader > +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6" > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm" > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30880000" > +BR2_TARGET_UBOOT=y > +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y > +BR2_TARGET_UBOOT_CUSTOM_VERSION=y > +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01" > +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="kontron-sl-mx8mm" > +BR2_TARGET_UBOOT_NEEDS_DTC=y > +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y > +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y > +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_BIN=y > +BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE=y > +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y > +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="flash.bin" > +BR2_TARGET_UBOOT_SPL=y > + > +# Required host tools to create the SD/eMMC image > +BR2_PACKAGE_HOST_GENIMAGE=y > +BR2_PACKAGE_HOST_UBOOT_TOOLS=y > +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y You need FIT support ? > +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y > +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/kontron/bl-imx8mm/boot.cmd" These would no longer be needed if switching to extlinux.conf. Thanks a lot! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot