From patchwork Wed Apr 3 19:53:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1919411 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V8wSh6FhGz1yYP for ; Thu, 4 Apr 2024 06:54:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 061D1418A8; Wed, 3 Apr 2024 19:54:43 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id r9kErH4EF0v7; Wed, 3 Apr 2024 19:54:41 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B1A034190D Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id B1A034190D; Wed, 3 Apr 2024 19:54:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 19A6D1BF4D5 for ; Wed, 3 Apr 2024 19:54:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E65C6418B9 for ; Wed, 3 Apr 2024 19:54:15 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zSgP1Nbh3ikM for ; Wed, 3 Apr 2024 19:54:14 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::436; helo=mail-wr1-x436.google.com; envelope-from=romain.naour@smile.fr; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org CDC444179A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org CDC444179A Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by smtp4.osuosl.org (Postfix) with ESMTPS id CDC444179A for ; Wed, 3 Apr 2024 19:54:12 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-34339f01cd2so116126f8f.2 for ; Wed, 03 Apr 2024 12:54:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712174051; x=1712778851; 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=DMEsu9eCAnLxwA9OSDxal4zrZ3wluHX/zpoOYOWbLMc=; b=MwZVGa04lQi38jcYSQ7x2fUzM0tqHeWIRlCJflMPpJ46iR6eW/PpNn9rpoZELcOkNx KnxUGZrTiSqNLD2ZNH330pKepU87D1wuEqZuTTAi0p6T+f7fAv8kJr6IyegEDwQ5AuxJ VU9JOTaZY1WehbtnB9uUwrLv55iLPuBkSS9EM4mvfviafoA1RUaRclc51toeIChknL8f 2jObg1ClXyz6zHD3d4crdQgb6nCaDe1s3tVL3+9stHuS+ZzRtXPNCW4UtoTGCYB45kyM jSo5vUNDSCGZg3GKHrOvzUDHashVDQef9dDKEjR2sI0aaR+y+CrCTrP9SAFa27A9ZvdP g44Q== X-Gm-Message-State: AOJu0YxQLk0w4SubhEIVQJY9mwvHipbQ5iU/BN8bGmLwNzFsxoBKsteG GiSOc4TAuJOOnRLGxlApO2RNeitRA9/kDA/nJfPUZp9WUePr5vT+mbensb0elCvXBzlXTTa+9SA U X-Google-Smtp-Source: AGHT+IEFtxRE1ZsNjfSAcP/8rZJ0//I/5/YwXIcNd7zJsYHLtFfdauRWz7BYmraXW3gmtSJbhoPk9A== X-Received: by 2002:a5d:6612:0:b0:343:617e:26ba with SMTP id n18-20020a5d6612000000b00343617e26bamr284198wru.54.1712174050814; Wed, 03 Apr 2024 12:54:10 -0700 (PDT) Received: from P-NTS-Evian.home (2a01cb05945b7e009bdc688723a24f31.ipv6.abo.wanadoo.fr. [2a01:cb05:945b:7e00:9bdc:6887:23a2:4f31]) by smtp.gmail.com with ESMTPSA id cc13-20020a5d5c0d000000b00341b8edbe8csm15595571wrb.87.2024.04.03.12.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 12:54:10 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Wed, 3 Apr 2024 21:53:42 +0200 Message-ID: <20240403195403.1359007-9-romain.naour@smile.fr> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240403195403.1359007-1-romain.naour@smile.fr> References: <20240403195403.1359007-1-romain.naour@smile.fr> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1712174051; x=1712778851; 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=DMEsu9eCAnLxwA9OSDxal4zrZ3wluHX/zpoOYOWbLMc=; b=nHPGUEAlvnOaL0vrP+BEz4inzmdW4ASTy1qLpgeg0g8ctSO6CkG/oH4zpCG6x7NYJx K2Rl3Tq0eemjEAzwpfIglRQiw6Lgsj5ZPVr1J/mdEqihLTb8vuiXoqAdijnjE35V/gtf 43oBI99kP212um3/BEVOKOicS04+kiYRkfZAPXCBTtoAhaSRsl2QUgEVb6I51COPdxbf cVd+0Zkk7GYvGFA0IfQLYcKkbVyvMuMT4GzDKJgZ4crerKf5SIObjA3goLBRsyrOafYS 4AERcB/RKMsofV0pBP7tpEmi/WATahf6V5qZITsKPIB4OMA5qmIqO0iWW9pGyQkAudPt f9VA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=smile.fr X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=smile-fr.20230601.gappssmtp.com header.i=@smile-fr.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=nHPGUEAl Subject: [Buildroot] [PATCH v11 08/17] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 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: Romain Naour , Dario Binacchi Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Dario Binacchi 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. - Remove BR2_TARGET_UBOOT_NEEDS_TI_K3_DM since ti-k3-boot-firmware is now required by binman for TI K3 SoC support. Tested on SK-AM62B-P1. Signed-off-by: Dario Binacchi Signed-off-by: Romain Naour --- Changes in v11: - remove BR2_TARGET_UBOOT_NEEDS_TI_K3_DM option - add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option - Use new BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS and BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS options to ease post build/image script. 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. --- 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 +++++++++++++++++++ configs/ti_am62x_sk_defconfig | 14 ++--- 4 files changed, 69 insertions(+), 8 deletions(-) create mode 100755 board/ti/am62x-sk/post-build.sh diff --git a/board/ti/am62x-sk/genimage.cfg b/board/ti/am62x-sk/genimage.cfg index 26304fe98f..398209f4d8 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 index 2a5c99c459..0e171c56f5 100644 --- 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 @@ -1,2 +1,2 @@ # Locally computed: -sha256 50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8 u-boot-2022.10.tar.bz2 +sha256 b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3 u-boot-2024.01.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 0000000000..4f19f4d6cf --- /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/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig index 19f7a7bd77..d664935db5 100644 --- a/configs/ti_am62x_sk_defconfig +++ b/configs/ti_am62x_sk_defconfig @@ -1,15 +1,16 @@ BR2_aarch64=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y BR2_GLOBAL_PATCH_DIR="board/ti/am62x-sk/patches" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg" 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 +26,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_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="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