From patchwork Sat Mar 30 16:02:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3068 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id F16213F333 for ; Sat, 30 Mar 2024 17:02:59 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5681b29771fsf2599562a12.1 for ; Sat, 30 Mar 2024 09:02:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711814579; cv=pass; d=google.com; s=arc-20160816; b=QZMtEq5Pd3TvcIeZyzeJD9+jG1BSKNxF297LufAd1xqvxJijezNzXjznaspZkxXYIW OhvCLtbzFlTgwh+t4qorCyXjBmEpGtHbXLdsWlNP+2N+PFsdz9pkfIdAxx9RaMYlu3yu UJ42Qvb2G+Kl4+XpD255qB91ELUiC6EXU+P5ot3qYpTY0ar3Msu2QfRgJIionchGmXfU Y2efaczegQnYdfBaeUjDi6SBDgqwB+CpShjlGrvVD41nlblDToUoUwdE/g/dIvP1wdL+ nMLiRIDlXMt4gwsUjoKQkl2b9mSB1AZreAqJJNmxCu/7N7/aZV/yPUG7+YWHMlS1FG/x xyag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jUHbM8rzmFQaa6VQ6xR5Dzz26Lrtk9Rc3JQUE2UYCzc=; fh=kZ/LBtLbiPfvPxt4WIB1HX9FBS0zaATGlmsEp+hPse8=; b=ialjFfqSs5c6CXr3eG8Xjw1MXsOslzcLdC4KH5BKK8gHwdtF50FtnVIiq6j+ADjdxy 9koueMDlP73qtBaBgVMfE/9cgOKLJs0s7K6rI45nWO7vUuPeycc769bSxCkW9WXKqi0v xB8GGaU9GaV9PUuzS8idIebROAybSK7MfVvB02wEOG+Ex5NQm9QYu2X5baSGY2RwxSW7 3SXTZXxP1tB/4+WwY961n+H+TVuUF6y8T2DYzqjKuLtP2ch5bPIFc5shpdc69EMTVs2j JcF3Ss8/ObLB09vr9iAjm+xrIURg+Vn45k1pkHkRLj7gXN9aJs8oJZryYVw9yOtmhnUT h2rQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oGPFLnt0; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1711814579; x=1712419379; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=jUHbM8rzmFQaa6VQ6xR5Dzz26Lrtk9Rc3JQUE2UYCzc=; b=gsAdFDK0NmH7M1CVuE8OuWihLhx5L53/PG8ozIHTP+/TnB34PSj4NQ0o7DikXrN8OM spgKK+pf1fuuGUn7x/semeK50Cs7NxLoXFYPb/WHu288HWxf+voQGbtwaZD2Ndx1vFqF h1bxeNn3rTTXPq0XcnUxSOagLAVeA2GJoHkfo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711814579; x=1712419379; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jUHbM8rzmFQaa6VQ6xR5Dzz26Lrtk9Rc3JQUE2UYCzc=; b=fEqvcrNA7KDLwu6ofPcabcndwfrknwzcUwJIFMeP6jPWlU5hhnG9rASrJBbnm0p1nA zZ/YVWiN/u3CF9nwLmUX3c/TlPSWhbRy9UQ8/ye1TiKIcTKJ/dV+xWuCZYLvj1iU9yHk evBULzPcamaJgcXiHMZp9RDyK7h5XZonW9yj6z42yP1ChxkMOfFHnSLVzHz70pV/Gd2B lo0IZdfqQUeXCKkO1/Gf4HObFt462FgIklWxs435o8YN2cOR3pTfFssyYG4XJRAEoALj VXvZ/E2goJj1pZZnDte3rTXj5ivBUSy9qyNgyKoiXtrc8t21vmS65228hQ/dNv47R4CS kkvA== X-Forwarded-Encrypted: i=2; AJvYcCXEqPry1N8r3FqTLnREBjxwkfaARbG6izXvLRz7fZqQBugnzPB6XGCijreEOUnU9PudWetEvFWwrCJzVqa8zkPpg/NAe8RGRBzpw2Janm0MSxtCKHeanTvS+D54gw== X-Gm-Message-State: AOJu0Yxt20Sra182vZtodwaAxKkGPK29wiw9NfyDqGvd77u2HFIrt1eE qnPJmGsA+UTYqOf2qZpfAtHhwRukVvNeU2eaVS26SNaEjbzn1hwJiXgXkD4Q20in/g== X-Google-Smtp-Source: AGHT+IGVFzr/MtWT2PUzhVdJOREQLtlP6ZY2lhif2H69e+xOjG4yYuKHhA/ZUsKzeYG2YLtp6prCLg== X-Received: by 2002:a50:a455:0:b0:56b:863c:2c92 with SMTP id v21-20020a50a455000000b0056b863c2c92mr3506939edb.34.1711814579641; Sat, 30 Mar 2024 09:02:59 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:1907:b0:56c:4c79:16b8 with SMTP id e7-20020a056402190700b0056c4c7916b8ls989588edz.1.-pod-prod-08-eu; Sat, 30 Mar 2024 09:02:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXRA4IUngXY27yJdBlwj/KxEmsOoWj3R5TkUfYM/REO8LoO4yoMppkxU5k6Oq+RCWAVot9jewzLEMhvLDzgZ+B/Fjb2e+LWVtx9j7kzwScckZdV X-Received: by 2002:a05:6402:34d4:b0:56b:9b11:9594 with SMTP id w20-20020a05640234d400b0056b9b119594mr5134887edc.2.1711814578042; Sat, 30 Mar 2024 09:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711814578; cv=none; d=google.com; s=arc-20160816; b=iNknTCI1ZskXI/6DKX4VdNbjCllUQSmwydOYzVN+G6GEJod/L3S2QrQWTGuwJxJZT1 /lzRAHWyxGAenyM0DPrKWqB2sQCasTXXyDTanCI58uiH3/LIHiG56KBtv8XM9RK/UroF vh2cwcQF5BsaaEPofSQi3E/EwazRRynYKGiVhMF/jz4v8dU7wK8OywvXgWHe768bJHuz I2+ZN0NyyrnIVIAtBeyBc3D6R0ruLSlpsJt5Br5GX979SANNtvabeuhmcPU22PJWjwuM iOSHWOH5pIiRtKzmMSAAL5BeY17o0kt/DCQecbWTAACqUHmH9lqg/ODYrzo+XINNQEgl 2iLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=7GMIv/FjA2xaHLfdH38b7W4guNhgmU1W9KtfoNKMuiM=; fh=fNhcTz60rgAnw7+J6Gujct6yV6zeiiQolEHxKu5aPsU=; b=JDga1FS/qBf0DELH0BmX3GONcblDlh40VURhdA/FmRnookgUo/4mRYH0d11dTJHDu7 6GoHaQSuwsWPCjvN2BUHQQC0bP89bHPX9AJemOYx3r54gWANSmLR9XLzM5M2zH0vYcYj pONEMjlvsA/V8kGOTTNjitsdemdUtl0CdIL5/aqPJxNMUzLX/Pp9pBWl5b/RECsRFxi0 wBpid5QO/OJ7UI44eVT7832yNmSI/g495NhBgDkTLb/dqNDEVh2RObERD7bF0eqZF3Bf x5XliQer3Fd5tEyVMSPCv4KiCQy3oog03MbS8qU9HSyrJY+0sQOnL+kOlHNSqVpYh0MV j8zg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oGPFLnt0; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i6-20020a50d746000000b0056836c2c1b4sor1339999edj.12.2024.03.30.09.02.57 for (Google Transport Security); Sat, 30 Mar 2024 09:02:58 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCVMPpFjxBJXgZt4ZUEmVgkACRNL7mu4lp0MyA7Vl1QncM8SaSoyRACDoDw77+B3mH8XkfPGDM0MaPAOep6UXhaXCaXqqnZYDLyeYyu/NVYWPr3P X-Received: by 2002:a50:bb44:0:b0:567:23a2:5b1e with SMTP id y62-20020a50bb44000000b0056723a25b1emr3823946ede.23.1711814577779; Sat, 30 Mar 2024 09:02:57 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-8-99-67.retail.telecomitalia.it. [87.8.99.67]) by smtp.gmail.com with ESMTPSA id f13-20020a056402004d00b0056c633354c6sm2127107edu.45.2024.03.30.09.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 09:02:57 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Romain Naour , Alexander Sverdlin , Andreas Dannenberg , Yegor Yefremov , Xuanhao Shi , Anand Gadiyar , James Hilliard , Thomas Petazzoni , Dario Binacchi , michael@amarulasolutions.com, Asaf Kahlon , francois.perrad@gadz.org, linux-amarula@amarulasolutions.com, bryce@redpinelabs.com, "Yann E . Morin" Subject: [PATCH v10 07/12] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Date: Sat, 30 Mar 2024 17:02:39 +0100 Message-ID: <20240330160244.3214733-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240330160244.3214733-1-dario.binacchi@amarulasolutions.com> References: <20240330160244.3214733-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oGPFLnt0; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The 2024.01 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. - U-Boot is capable of building tiboot3.bin using Binman. So it's no longer necessary to use custom tools like ti-k3-image-gen. Tested on SK-AM62B-P1. Signed-off-by: Dario Binacchi --- Changes in v7: - Add devicetree k3-am625-sk.dtb to extlinux.conf - Improve error messages in post-build.sh script Changes in v6: - Enable BR2_TARGET_UBOOT_USE_BINMAN option Changes in v5: - Update commit message. Changes in v4: - bump to 204.01 instead of 2023.10 - Update the commit message - Replace 'PARTUUID=00000000-02' with '/dev/mmcblk1p2' where to get rootfs in the BR2_ROOTFS_POST_SCRIPT_ARGS insided the ti_am62x_sk_defconfig. 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. Signed-off-by: Dario Binacchi --- board/ti/am62x-sk/genimage.cfg | 7 ++- .../ti-k3-r5-loader/ti-k3-r5-loader.hash | 2 - board/ti/am62x-sk/post-build.sh | 54 +++++++++++++++++++ board/ti/am62x-sk/post-image.sh | 5 ++ configs/ti_am62x_sk_defconfig | 14 ++--- 5 files changed, 72 insertions(+), 10 deletions(-) delete mode 100644 board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash 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/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash b/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash deleted file mode 100644 index 2a5c99c459f2..000000000000 --- a/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash +++ /dev/null @@ -1,2 +0,0 @@ -# Locally computed: -sha256 50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8 u-boot-2022.10.tar.bz2 diff --git a/board/ti/am62x-sk/post-build.sh b/board/ti/am62x-sk/post-build.sh new file mode 100755 index 000000000000..4f19f4d6cf91 --- /dev/null +++ b/board/ti/am62x-sk/post-build.sh @@ -0,0 +1,54 @@ +#!/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:d:r:x:' +O='console:,devicetree:,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 + ;; + (-d|--devicetree) + DEVICETREE="${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 \`console' argument" +[ -n "${DEVICETREE}" ] || die "Missing \`devicetree' argument" +[ -n "${ROOT}" ] || die "Missing \`root' 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 / + devicetree /${DEVICETREE} + 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 19f7a7bd771a..7d9912024a16 100644 --- a/configs/ti_am62x_sk_defconfig +++ b/configs/ti_am62x_sk_defconfig @@ -1,15 +1,14 @@ BR2_aarch64=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y -BR2_GLOBAL_PATCH_DIR="board/ti/am62x-sk/patches" -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 -d k3-am625-sk.dtb -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" 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_PACKAGE_TI_K3=y @@ -25,20 +24,21 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" -BR2_TARGET_TI_K3_IMAGE_GEN=y +BR2_TARGET_TI_K3_BOOT_FIRMWARE=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="2022.10" +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01" BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5" 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="2024.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_evm_a53" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_NEEDS_OPENSSL=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_NEEDS_TI_K3_DM=y +BR2_TARGET_UBOOT_USE_BINMAN=y # BR2_TARGET_UBOOT_FORMAT_BIN is not set BR2_TARGET_UBOOT_FORMAT_IMG=y BR2_TARGET_UBOOT_SPL=y