From patchwork Tue Apr 30 13:37:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Gero_Schw=C3=A4ricke?= X-Patchwork-Id: 1929524 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=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4VTLqz6SWMz20fY for ; Tue, 30 Apr 2024 23:38:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B871D81FAF; Tue, 30 Apr 2024 13:38:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id dVMxLStv35su; Tue, 30 Apr 2024 13:38:20 +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 smtp1.osuosl.org 85F7781FAC Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 85F7781FAC; Tue, 30 Apr 2024 13:38:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 97E761BF348 for ; Tue, 30 Apr 2024 13:38:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9123B41495 for ; Tue, 30 Apr 2024 13:38:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Q901yjmNmhOl for ; Tue, 30 Apr 2024 13:38:17 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::531; helo=mail-ed1-x531.google.com; envelope-from=gero.schwaericke@grandcentrix.net; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 17FDE40446 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 17FDE40446 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by smtp2.osuosl.org (Postfix) with ESMTPS id 17FDE40446 for ; Tue, 30 Apr 2024 13:38:16 +0000 (UTC) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-572669fd9f9so4836509a12.0 for ; Tue, 30 Apr 2024 06:38:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714484294; x=1715089094; 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=gaBrk954ElFTmbIJ61WH9w9+O7XCAnb2GHfiefw+Nyk=; b=KOmBiJa0JCbd3qPZYGFtKMGdXjHQhLj7B2nxLJ3uv7aREykbE9cCrMYMImRDeWTN5Q HG/+qlGdM0VZLPws4NV352RkzLjJympyPuP6OyecrCs6Gz9WAwyw4csMMZjg//jeQKqS Z4uCCdidr+YDjk1zNsHXEXdJPVXAhxJzDyiGHgaRMf2m+VrpY1WavXs2gYSGlAUsVsTp b8mrOkiR1YT8qEIG6TnVCtgRUsOGPSvGlSQ0Y8wyrExS5ei9TX/vf+QL2ssgUEx3Q1d8 D+1cbMAaEWhv3ugKmYsnIXcX7nMBCTqt/CZssBkf8X0U2ibz5GhY0RJcYqKvqqtPbP+3 XvYg== X-Gm-Message-State: AOJu0YzHOsdbQ8UJeB0NEMikChXCGGB1o1fW9tIuWPTvh4TDcv/+5yWZ DWH/rIz/sCWq9GzgTubxCznXOd+mxM1vpcMbR6cL3zqpiRDm1fygGHXuFg0J6R64UOV1ClY1jcl KdWm4XSJHrbZHcIfvZKMhFhPOyMjyY/1gfzjdAvPU7Lfhede/Zj3r3U1Uo8ci5M3NpkydGhdSt1 WttAQiHxjtDI4oSyKja2NLtjTXv//dsgmiSuObVzWOyO1jFpc+SzPb9yapGD8= X-Google-Smtp-Source: AGHT+IHPmT+r/pmXpTYBZfoJJo1/b69fdgQJ2iY1aoC5nB/anM8UDoX+szpgl/AgkYinv2u4khu5Hg== X-Received: by 2002:a17:907:987:b0:a58:c09d:199d with SMTP id bf7-20020a170907098700b00a58c09d199dmr10918506ejc.73.1714484294234; Tue, 30 Apr 2024 06:38:14 -0700 (PDT) Received: from localhost.localdomain ([2a02:8109:8abb:b200:831c:6fac:95a9:d72e]) by smtp.gmail.com with ESMTPSA id lf17-20020a170906ae5100b00a526fd6362asm15199901ejb.117.2024.04.30.06.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:38:14 -0700 (PDT) To: buildroot@buildroot.org Date: Tue, 30 Apr 2024 15:37:51 +0200 Message-ID: <20240430133754.1288162-1-gero.schwaericke@grandcentrix.net> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20230907003002.474334-1-patrick.oppenlander@gmail.com> References: <20230907003002.474334-1-patrick.oppenlander@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grandcentrix.net; s=google; t=1714484294; x=1715089094; 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=gaBrk954ElFTmbIJ61WH9w9+O7XCAnb2GHfiefw+Nyk=; b=w+rb4mKW6RfmeG68lsFP0pnxGHuT0DEhIwMqdcZpPozhDZw3Co9Qpv+i7NzlKcARmN 68LVk57TTTsL6sJLI2LdMemh7zvxInc0OvFAL3fyHgjJ8phb93Fg2r2UkueGDyjQlIS4 QGkRlM/O3Z+r9gWVncGwQBzYRpo4W4Dfe3DpAmCVFqhkq59CgKbk8uo5xsJNa85jNwZO JtnBNle/k/JpHLnDt8zdTvE2oi19VS/f7t0KQOZNJlvtpo179o7gipUaegYVoIIrCtM6 si1c0SKeqv9PDur/Kg5tqLc73Jh+Ir2o1Nz8LArPGYrH11kvO+3CF/7zumwFdBH4ruqI g83w== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none) header.from=grandcentrix.net X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=grandcentrix.net header.i=@grandcentrix.net header.a=rsa-sha256 header.s=google header.b=w+rb4mKW Subject: [Buildroot] [PATCH v2] ti-k3-r5-loader: support devicetree customization 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: , X-Patchwork-Original-From: =?utf-8?q?Gero_Schw=C3=A4ricke_via_buildroot?= From: =?utf-8?q?Gero_Schw=C3=A4ricke?= Reply-To: =?utf-8?q?Gero_Schw=C3=A4ricke?= Cc: Xuanhao Shi , =?utf-8?q?Gero_Schw=C3=A4ricke?= , Patrick Oppenlander , Anand Gadiyar Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This is duplicated from the U-Boot makefile & Kconfig. Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree. Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit 3609e1dc5f4d4c238dcd23e045ba6223310feffa in the U-Boot tree. Signed-off-by: Patrick Oppenlander Signed-off-by: Gero Schwäricke --- v1 -> v2: - make it apply on current master - move the config option into if BR2_TARGET_TI_K3_R5_LOADER - fix help string mentioning ARCH though it's fixed to arm in .mk --- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in index 6d1adbeac3..df885cc2af 100644 --- a/boot/ti-k3-r5-loader/Config.in +++ b/boot/ti-k3-r5-loader/Config.in @@ -95,6 +95,16 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE help Path to the TI K3 R5 Loader configuration file. +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/arm/dts/ before starting the + build. + + To use this device tree source file, the U-Boot configuration + file must refer to it. + config BR2_TARGET_TI_K3_R5_LOADER_TIBOOT3_BIN string "tiboot3.bin binary name" default "tiboot3.bin" diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk index 891783e40f..98a6d473f1 100644 --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk @@ -88,7 +88,12 @@ define TI_K3_R5_LOADER_INSTALL_SWSFW_ITB fi endef +TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) + define TI_K3_R5_LOADER_BUILD_CMDS + $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH), + cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/ + ) $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS) endef