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 smtp2.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 smtp.lore.kernel.org (Postfix) with ESMTPS id EF7CAC46CA2 for ; Mon, 18 Dec 2023 08:22:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9F8334094F; Mon, 18 Dec 2023 08:22:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9F8334094F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zX1BeMdWua8C; Mon, 18 Dec 2023 08:22:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 802E2409C8; Mon, 18 Dec 2023 08:22:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 802E2409C8 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id DC8221BF3BC for ; Mon, 18 Dec 2023 08:20:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C31B541805 for ; Mon, 18 Dec 2023 08:20:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C31B541805 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CbQazas4-by8 for ; Mon, 18 Dec 2023 08:20:27 +0000 (UTC) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by smtp4.osuosl.org (Postfix) with ESMTPS id 9B7EE417F8 for ; Mon, 18 Dec 2023 08:20:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9B7EE417F8 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50e34a72660so934560e87.1 for ; Mon, 18 Dec 2023 00:20:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702887624; x=1703492424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OJMqOqTNMLPAMWA2S9Qz89+lvQ25Pa4YVObjUq9uB80=; b=qof/eJS+uffi6J9dt7xHkm07MKgn2wUI1e2pMfQjiaAjvCEvAYetUPXtGdpc6NP5V+ v3F4M2OzH3Jr02NTaKtnXTXVZh+7I6kqRRsDgV8sl+Q6hPRzHaFTgSch8YUpbCxIjPux iBiq7WlXlRaUCi1d3AIG/0L5hIcFV8K57hgh/cgqL2VoV81LzV0uHtiD+UhY7CI0bfuT jeKRtdulA0N7smdLgJid8R8QOhkAVgIcMx4ML3ki9oYfSI1bieFF4RrRclYcKDYq94iF tLyeLKk1VkDNKKhyLJ9FlKyMCSz70UlWqXfUYDjvJsWGVA0HWfmGEdgbEXUkAgJlVGnw Y4nw== X-Gm-Message-State: AOJu0YxSWxrLBuvmfxb0jtRNvr6qxHWR+nnJm+/rz0e0GGX5G11w4Xkb UAKlXBoiy2IXBkjjOn+O2WLo45khgsEwqMEVVMoEdA== X-Google-Smtp-Source: AGHT+IHxS0l+2xR+o/pVzFNQoynp8+zsVR1vI48PAsZPDubvqUmN409KP7szJdZMZxlEK57J08+/9w== X-Received: by 2002:a05:6512:3e1a:b0:50b:c08d:69ba with SMTP id i26-20020a0565123e1a00b0050bc08d69bamr9057495lfv.57.1702887624135; Mon, 18 Dec 2023 00:20:24 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-80-182-13-188.retail.telecomitalia.it. [80.182.13.188]) by smtp.gmail.com with ESMTPSA id lm11-20020a17090718cb00b00a1cf3fce937sm13807835ejc.162.2023.12.18.00.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 00:20:23 -0800 (PST) From: Dario Binacchi To: buildroot@buildroot.org Date: Mon, 18 Dec 2023 09:19:57 +0100 Message-ID: <20231218081958.506691-11-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231218081958.506691-1-dario.binacchi@amarulasolutions.com> References: <20231218081958.506691-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1702887624; x=1703492424; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OJMqOqTNMLPAMWA2S9Qz89+lvQ25Pa4YVObjUq9uB80=; b=NucEIJ+OKPR4ItBf38PNWwBGuSlcLVO3my2ttJl+v1RYw0a/JM4jBUwZtcJgT5PxuV rNnwxR3etT3WNpQznR9Zohd8juylfelnELjAXOhIBp3e9gIq9tymoQYSxCWyxe+IW448 VKc0i+tYFOFjReXGM8WUQ3SP16c9kyY/NQ3f0= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=NucEIJ+O Subject: [Buildroot] [PATCH v3 10/11] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2023.10 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: michael@amarulasolutions.com, Asaf Kahlon , Xuanhao Shi , James Hilliard , Thomas Petazzoni , Dario Binacchi , linux-amarula@amarulasolutions.com, bryce@redpinelabs.com, Anand Gadiyar Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The 2023.10 version of U-Boot for the am62x-sk board has introduced two major changes: - The device tree k3-am625-sk.dtb is no longer searched in /boot, but in /boot/dtb/ti. Hence, the disabling of BR2_LINUX_KERNEL_INSTALL_TARGET and the use of extlinux.conf for the proper loading of the device tree. Furthermore, the parameter BR2_ROOTFS_POST_SCRIPT_ARGS was used to auto-generate the extlinux.conf file so that developers can change the kernel loading options by modifying the .config. - The use of binman for building images. Tested on SK-AM62B-P1. Signed-off-by: Dario Binacchi --- Changes in v2: - Update the commit message - Drop Python options required by binman. - Enable BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN. This option automatically selects the Python modules required by binman. board/ti/am62x-sk/genimage.cfg | 7 ++++- board/ti/am62x-sk/post-build.sh | 49 +++++++++++++++++++++++++++++++++ board/ti/am62x-sk/post-image.sh | 5 ++++ configs/ti_am62x_sk_defconfig | 11 +++++--- 4 files changed, 67 insertions(+), 5 deletions(-) create mode 100755 board/ti/am62x-sk/post-build.sh create mode 100755 board/ti/am62x-sk/post-image.sh diff --git a/board/ti/am62x-sk/genimage.cfg b/board/ti/am62x-sk/genimage.cfg index 26304fe98f99..398209f4d831 100644 --- a/board/ti/am62x-sk/genimage.cfg +++ b/board/ti/am62x-sk/genimage.cfg @@ -4,10 +4,15 @@ image boot.vfat { "tiboot3.bin", "tispl.bin", "u-boot.img", + "k3-am625-sk.dtb", + "Image" + } + file extlinux/extlinux.conf { + image = extlinux.conf } } - size = 16M + size = 64M } image sdcard.img { diff --git a/board/ti/am62x-sk/post-build.sh b/board/ti/am62x-sk/post-build.sh new file mode 100755 index 000000000000..0f1f98ef217a --- /dev/null +++ b/board/ti/am62x-sk/post-build.sh @@ -0,0 +1,49 @@ +#!/bin/sh -x + +# genimage will need to find the extlinux.conf +# in the binaries directory + +die() { + cat <&2 +Error: $@ + +Usage: ${0} -c -r [-x ] +EOF + exit 1 +} + +o='c:r:x:' +O='console:,root:,extra-args:' +opts="$(getopt -n "${0##*/}" -o "${o}" -l "${O}" -- "${@}")" +eval set -- "${opts}" +while [ ${#} -gt 0 ]; do + case "${1}" in + (-c|--console) + CONSOLE="${2}"; shift 2 + ;; + (-r|--root) + ROOT="${2}"; shift 2 + ;; + (-x|--extra-args) + EXTRA_ARGS="${2}"; shift 2 + ;; + (--) + shift 1; break + ;; + esac +done + +[ -n "${CONSOLE}" ] || die "Missing argument" +[ -n "${ROOT}" ] || die "Missing argument" +append="console=${CONSOLE} root=${ROOT} rw rootfstype=ext4 rootwait" +if [ -n "${EXTRA_ARGS}" ]; then + append="${append} ${EXTRA_ARGS}" +fi + +mkdir -p "${BINARIES_DIR}" +cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf" + label am62x-sk-buildroot + kernel /Image + fdtdir / + append ${append} + __HEADER_EOF diff --git a/board/ti/am62x-sk/post-image.sh b/board/ti/am62x-sk/post-image.sh new file mode 100755 index 000000000000..34f732c091ad --- /dev/null +++ b/board/ti/am62x-sk/post-image.sh @@ -0,0 +1,5 @@ +#!/bin/sh -x + +BOARD_DIR="$(dirname "$0")" + +support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg" diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig index b98a68ff153f..0fb9a2f0246c 100644 --- a/configs/ti_am62x_sk_defconfig +++ b/configs/ti_am62x_sk_defconfig @@ -1,11 +1,11 @@ BR2_aarch64=y -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r PARTUUID=00000000-02 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk" -BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y BR2_TARGET_ROOTFS_EXT2=y @@ -23,11 +23,14 @@ BR2_TARGET_TI_K3_IMAGE_GEN=y BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y BR2_TARGET_TI_K3_R5_LOADER=y +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2023.10" BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5" +BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.10" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_evm_a53" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_NEEDS_OPENSSL=y -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot