From patchwork Fri Mar 1 13:36:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3028 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 B72DD3F057 for ; Fri, 1 Mar 2024 14:36:45 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-56451e5801dsf1695281a12.3 for ; Fri, 01 Mar 2024 05:36:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709300205; cv=pass; d=google.com; s=arc-20160816; b=FpoORIyxFtXX+Ho/An7WLquMSz5gSUgUU8XV6/QnStxH55xf/Vj32/zGWd3e0eyugk 232wGzh9oM5kKEs2Mko0M9Li6x7Nco5Y4zclDbJHmYqKuCbO+UvTaY7b687fbg4SMEhZ p6P07Ok33M4TDyhBu9GuN+5xYeB+CueYM5fviP01iM1RagNDBKx1FZ95/8ILanqsMcsF lSSUbn6djgQyrJD54+WSeJXK4AZGgyQ0yzj83am6c9Si7HUfqy4YneGE1csfyO8sVgCE SYzNcPLW0IWH0v2fEUBERwJsyGWC+4WSkgoU+mW0JBtyHo6i4p+X4gjCGXuhaXNu4Hxl MMHQ== 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=tm2opbgG0/U/38wv2zhbpr44HMPLFcoOX8ottLZyBzA=; fh=Yua9XRysLz/o7LfYaos/HWsxID7Br0/iD7p7pIgs4jA=; b=ymmxhm0/nqqtvzU5BfcHLUMd1NkkiU35q3gUqgetjCTPj7FEomUFn8n9A9bQGq576S GFVOtDEbrgVsWZazuotvCUt4SyZDnXomwFN/SvnUHBZyrapcMlFFsXeelFnG41DtQHPO uda9mWQih++OgdTeo9KyAzl5xaB4/HXeg9PFt9G2u63Xll6DlBb54iY1vIDSKgxvZZWu +3CLDyeq39zcwZkY4ltsQDooDQUiUVh9MVWOp1O4jSgrdtZ/5L0Ue6MOSgbV2KTNA2MC 831CpyZy194SOyj8tMIIFhrUJFCsEiT2ggmFHoZGx9S3A/E2nPPBfN9gexROpg97uMIB AIcA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=koJVGYtF; 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=1709300205; x=1709905005; 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=tm2opbgG0/U/38wv2zhbpr44HMPLFcoOX8ottLZyBzA=; b=rZn6v0E1yfbp7mIDKJ1fbYm4si/IiCAuNgT5gCoZkXQ82KGzHW2mhxGVu5c69hcTi5 DsXYuRDk3I15FUHlL3l9R2SxNaB7mQlC/Nkq24msUl1YAkBeOABd7rtVh8G/coV78iMO R5ofzD0NdBP2GoG+2I5IVCkjIM3ydVcnNz8ek= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709300205; x=1709905005; 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=tm2opbgG0/U/38wv2zhbpr44HMPLFcoOX8ottLZyBzA=; b=uywq8zc1/5F+H69wktyaPcKWtjEFBgrd9LDCoe85cWq9acyOulGnqdXE+78k2G4OsB MhlmrSg+pJdB5IQyY+cj8mDHt42LxiTLcAc3dTseV9bafHgRzGH/+OUKRCTKMaD9ZWD2 aUhz/iD9zvOQTxML95PgYC9T1Opvakrriz5N40HrqZywa69izOPITHvydn9tYhPcZxM7 re7FbIJ2vYTP2yt1CpUAXzNIcTp4k++oYOhyI/EDdU55NN6Mlx4TZj7oE9xL9NLOCBt5 Z2QNuVDg4zDSbdYFyW6ZiTOSIASYJvghZjqagIjPkJxDb+fkrxyt3MwcLHMLz+PljrcY Htfg== X-Forwarded-Encrypted: i=2; AJvYcCVXZLhYKbqD8c+zFU6DKAyiulXWlZz15/4BOsoZVD/197SSiszV/X84oaFzKOtHtXLq+HZ0nOWOaksqR745jaaDh0UIkTZ1puNoYfgDj08SKCYvMPqwFkNtJulxIA== X-Gm-Message-State: AOJu0YxX4A+vhpi+h13Z5caCc1iTs713cOWGbb9YztiCqJwa8mvcuF7S SsLacvRUsi1xh3xXekJ9qV96/zrKLlgdQirmuE9NdG7mR6zcdkwkgcvkjfSyZPPIUQ== X-Google-Smtp-Source: AGHT+IHBPFy/+zBafcJzPdsXNz0o8kZN0xjXjzdV6qrZ7/Z/NFTCHvd9AbwE4QsKpmbYTinsEKvS9Q== X-Received: by 2002:a50:85c6:0:b0:566:4a85:ceb3 with SMTP id q6-20020a5085c6000000b005664a85ceb3mr1240313edh.9.1709300205508; Fri, 01 Mar 2024 05:36:45 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:458b:b0:566:a8bd:67ac with SMTP id ig11-20020a056402458b00b00566a8bd67acls800482edb.2.-pod-prod-09-eu; Fri, 01 Mar 2024 05:36:44 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXsTX+g9qxxJ9Rn6WW1UOU09G0mpbd3//9SzecAgW6scLQA9uxT/LyhKVTlWMzLwFA32PYjblnXUKtDaQYPDJRD5WwgNQmwYRX/rf/b5/T01k6X X-Received: by 2002:a17:906:6889:b0:a43:f825:ef52 with SMTP id n9-20020a170906688900b00a43f825ef52mr1384572ejr.28.1709300204042; Fri, 01 Mar 2024 05:36:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709300204; cv=none; d=google.com; s=arc-20160816; b=gcrdOflOUehhdeLnNaC5X3H00MmXGfRNWKcvuzfpAfTcSMk9pWbRdv6ZqnInCvf7/V g2LM0rjkC3p90uRvVGF4E9+fB653Qhy6/ysLS8ec8yrDrQJGXmS8sLcZyitovsVdomX2 q7LeHe1cGkrYsiPKwwGeVpkrDbBw1dmdrONVCf5Ve/C45ALQ37T79MlSexDgkRMu84XT E7QOzS0OHjr2xm9W52TgZqUmmSvAFofvrlo3S8D+Z0ifDhzjqlrmkFC85PoGiyHwcSy+ Ct53yP9fByd/a7UuqcxnC654DJEIOZyE4I4d80x9n5sAxCJ60o2OujM/DHMrDlYNWFOA +f/w== 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=kxMAP9hp8fRJHspPpR1bvGkNWZaQWJaGVOWEj4c4FSU=; fh=UFyLCVNCPsJpt2U23bStyACdumo8w8rvk854bZgFmkA=; b=YjpDOv1hvrFkT+H5JDlPDT5c4nzkUz3pDYbJ6LZQrRvou44j6vU6yLLinTAAlJUiGV Q2OI4yDWC+DcGEsHNb/QaxG5HnFngwsTU7Wzu19/m40VUTmGnQBvBW5hw3VHCpW41IJ5 Rh2Le4m+S+iUVcvSGXBUs9YtJzCAc/qC7yXSsW41blCks5uViox0os+B3BPk69m1Q9SJ XyUtwWSvA4tEJfU3pg6lE/qTUallJOMV7WM921ZC+xAO2BP32P1dhMkPg1qJNFd8dOVL X+BtQ3Thn6bpu29D3hDisO+3d2aSlqgLJ/wQnYlfKaUDpoAsvCC3X4U1C7aaD6y8jjM9 UtCA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=koJVGYtF; 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 g3-20020a170906394300b00a430f9dd93csor1587831eje.20.2024.03.01.05.36.44 for (Google Transport Security); Fri, 01 Mar 2024 05:36:44 -0800 (PST) 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; AJvYcCXO2vvE4JMX6h5qOvvOL4fgpmPyMyA6q7aXCR4Cj+6abqHMhSIRLsvIR/t1EORcmVglboMoN454G9Q95n9qoJ2Cgqoq4eXsQSzppvDVLkuws4wI X-Received: by 2002:a50:c90d:0:b0:564:5150:76a2 with SMTP id o13-20020a50c90d000000b00564515076a2mr1345201edh.4.1709300203735; Fri, 01 Mar 2024 05:36:43 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:5260:58bc:42cc:9d46]) by smtp.gmail.com with ESMTPSA id q28-20020a056402033c00b005659ea1caf0sm1566608edw.6.2024.03.01.05.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 05:36:43 -0800 (PST) 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 Subject: [PATCH v8 16/23] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Date: Fri, 1 Mar 2024 14:36:13 +0100 Message-ID: <20240301133620.3547430-17-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301133620.3547430-1-dario.binacchi@amarulasolutions.com> References: <20240301133620.3547430-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=koJVGYtF; 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 ++++- board/ti/am62x-sk/post-build.sh | 54 +++++++++++++++++++++++++++++++++ board/ti/am62x-sk/post-image.sh | 5 +++ configs/ti_am62x_sk_defconfig | 13 ++++---- 4 files changed, 72 insertions(+), 7 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..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 2835404a57df..7d9912024a16 100644 --- a/configs/ti_am62x_sk_defconfig +++ b/configs/ti_am62x_sk_defconfig @@ -1,14 +1,14 @@ BR2_aarch64=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=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 -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 @@ -24,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