| Message ID | 20250211093349.2153008-1-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBA5TVS6QMGQEYWDUCJI@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com
[209.85.208.71])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7A12E3F14A
for <linux-amarula@patchwork.amarulasolutions.com>;
Tue, 11 Feb 2025 10:33:56 +0100 (CET)
Received: by mail-ed1-f71.google.com with SMTP id
4fb4d7f45d1cf-5d90b88322asf4765357a12.3
for <linux-amarula@patchwork.amarulasolutions.com>;
Tue, 11 Feb 2025 01:33:56 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1739266436; cv=pass;
d=google.com; s=arc-20240605;
b=jMm8crQ5/zFb4ieWAUeoKYwxJi/QDuf6PfJBlt+six6TFliUaQmiVC9zMTWjfhbEpa
djdFUYy96cbm9JAfpdZUxCvxbIIl0vOXHE1ruyDFmuQP0rOb7yZuq4TehZMa1lFHdQpa
ROCJGl+IMM5Wivxx14NCLXCA1fen6GqG+358juz0GZ7dcaKmn+7WIgaqmI4Lj/uffygV
P4PRG6sI0S0vJFH6xqL6pmhPHD7AYDrBVqyFvb+x/hhHyOB55mFvdUhs6gSW9lFMiS1L
+evVbH5v8Gs1Pktdb+pVEvJg0oXlFLqNzzde7Pg3TR1JPFurCmFKbfS/07FWLDOWyjy8
TTCg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:message-id:date:subject:cc:to
:from:dkim-signature;
bh=FgXJmmVExtnzW4NM76+qwZVCRyLy6DvqSk7Pb5xGxnI=;
fh=jwG4tLYMexIgDQPLTUO6hovJg/mm5pLnaoV3uOErObU=;
b=hDIPQOWsAarxn5Plw/vJwTUuphThPN9GfjDYUd8SdjhgRPNZC8jShhm7XtVlqfy8w1
OzQgvylhNAwFs2UzniCf4EDL03n5aFQopxy1WspmHyAUGg+Y7m7jQ3JuQTVRtKtCI/8H
blfeP1ZE0zWn8xgsjfYF7wUI1fH/XniOXGvWKRe5tNBD80ni7FHSpjBLyXEWsRO/BvGX
/5i2SXNVp6bHDQRX+QK+LvUM+W6dbfslxZizFzvCAb8eOyPDn3o1TK6oUyFTyh4uNeF4
0XRvOKS51eKTmnMglKDipxd8aI5azPZ94L2qP7kLo8z3F02lA28CW0jeA9Z5BUlnWNM6
yUUw==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=OiGyRmxV;
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;
dara=pass header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1739266436; x=1739871236;
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:message-id:date:subject:cc:to:from
:from:to:cc:subject:date:message-id:reply-to;
bh=FgXJmmVExtnzW4NM76+qwZVCRyLy6DvqSk7Pb5xGxnI=;
b=c+6akAcf2Evqd9FjbpFd7fTLnB4VWkYg6yh93ryeoR/g5SboHqVqqaytAnzM9jTfwy
apma3AilV7HFiq1TFbVw4kjka41Axc/azUehaL968nPJ57kspcHZZxKzCNYuFEU+QX03
JD1nsZjlekola+S4/Tf1L246qdWUxfqmznrVc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1739266436; x=1739871236;
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
:message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=FgXJmmVExtnzW4NM76+qwZVCRyLy6DvqSk7Pb5xGxnI=;
b=ibatHwtb7Akp75EgxmojKgAC+KBmkO01PybvBnBgj3NSd64+E1+KGG+IjRndoDU4rl
LjqngpvpraZF/KGXkZNIc+irX9OUKRJ7wjMOS7u86uFxJcRNEEQWG2yBtJXmT60OfF+w
Ga6AW9CzuZQwES0vAkbd5BCmpZXMPAkTQXHepaRDHFtCF2vpxvkeYxfrxWGkSwuCQ5pZ
Du3l5BpZR7aZPLubZmBbAti/jkURHFwvd+IYXJ3tX4uSmnYKfJdhpSIn1BqYeU6VgDEj
I+Ogw5PeTV3g6K/BukdfkGgtoZansWEIZx6O/FLgxPcH2z2bXdoWwqYxwNXbM/bnWFTb
eViQ==
X-Forwarded-Encrypted: i=2;
AJvYcCV1zWgdQDYnyrapFsWxA2J/Rr47DCtahVYIh6PE5jB5Xax8OsXYL852kMibGA1tXwfulc/XaKy3V9i+Dq5s@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YwZnj0Rb9kEgui7cubZuz+/gDIebMaB9ilAyOm2zJAxdWo9jR/g
TVkYXiVVI4wYs7KUWIhIYp3JRx4KcaJj2H66P8vjmtg2Q0owIEs1O446uqp4puS3XQ==
X-Google-Smtp-Source:
AGHT+IEEz9VJSDnUjxsuWmPjysveCuM6tM/RczW3UdAC5h6ju2M3SvyRxsqnl2DXdbMNg757Jxzbcg==
X-Received: by 2002:a05:6402:2106:b0:5dc:a44d:36bd with SMTP id
4fb4d7f45d1cf-5de4500274cmr15053061a12.8.1739266435719;
Tue, 11 Feb 2025 01:33:55 -0800 (PST)
X-BeenThere: linux-amarula@amarulasolutions.com
Received: by 2002:a05:6402:4cc:b0:5dc:57af:e48b with SMTP id
4fb4d7f45d1cf-5de9ee456b6ls240679a12.0.-pod-prod-07-eu; Tue, 11 Feb 2025
01:33:54 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AJvYcCVoY5dI3JIbNZL17f1HkMpLZjVWSFBFz1RKCeTg917jKV+i3KHbAbcTp2aGLcUXpI9b7MlDf92hKyuOdnrW@amarulasolutions.com
X-Received: by 2002:a17:907:608c:b0:ab7:a5f2:ed27 with SMTP id
a640c23a62f3a-ab7a5f2f378mr865744366b.8.1739266433827;
Tue, 11 Feb 2025 01:33:53 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1739266433; cv=none;
d=google.com; s=arc-20240605;
b=hc/kGlUZnQfGZWJKCTx0sVb6fpDNi78vE47etMEVCFEUdCKy1gLOD5mWG8UbMTGJEI
8XjWVUgkpXVtSaCTofIzQ2w+VCFzGbpq2lKsg5+b7cyWyi0oqX4Lo/HbQBk1pJd35pAz
O8U7BMVzeu/A78yeZMt+WWUWSc8EkGS5Hxpna5lVxEI5ndctkyc95X8LDK0aOjJNqsi8
iqkrNH1PNMH1X2DQBY77+sVZCURUvrZshYnn+faDJ4/KaHoITVlWEEmtOqCYv7gVQiBG
y01S8nx4J8lGE/kL8kPBr4Z2oG6cntvm0U79TPfBB17h6iWxKdzxCWJK6tIm3jhBEO6k
dUAw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:dkim-signature;
bh=MpmM9AA6Ao9JGy3o8YF/nNgtIVP+l0e3XNb9UpekGQ8=;
fh=qC0O1Bnxq14BBPvCXSmaSWTXb/ZgEEvvqSPICw9m8r0=;
b=CpzO8r7DecmXxK/AvJYMbPWF48+DjAc09eLaQwVBd81ghcIixHPInAYVr13HZrqcsd
zdjnL1Or5dgIHDy5A2BTEjz8yBPuAYYFUiEQUm29jVLA2pyaKV+f5lvs/DYvg1mzb0Dp
3jKdax9rOH/i4hu6WYxvlHPakVkeabY5AWnTWhhKyJHcCViwQToJeNR+Fupfytp8FjpL
EYi2owY18F9uMzt8cZy3qLMj3VPJxHDYHz2GqXkT+URnGeji3JntGULwN7Gyct2kUI32
zQ5JE7Io9O80E5YfsKqUtfllmBtHt1t27FZP2HK90P/hmz8K4b8B6pCtliDeW8lFJ8mt
Wr2A==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=OiGyRmxV;
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;
dara=pass header.i=@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
a640c23a62f3a-ab7d1c35d25sor148178866b.10.2025.02.11.01.33.53
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Tue, 11 Feb 2025 01:33:53 -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;
AJvYcCVQ7KU9tOz5iFfRkOxMQZoD41p+mIM07XmuZ/929GygdBeemFQXSvGnlrQRUbIMmx5VUdGAm/bsROhqY4/O@amarulasolutions.com
X-Gm-Gg: ASbGnctYFlSaAoCqxdiq+LTFbxI/Qv10GMlVHCEuMAtSRPs9eccDFlFkU4MmF9ExLhu
zYGyM4c7KaLPapDriVe9eiRHNm22In9PD+SII4ulWRGcQ77JTzTwoO+hnnhYL1YScHrvcySArkX
DUNUeNgfF5ioRXl0qA1rfl+I9RtKwXMey//n+UQs3f6klmxzUy03KBSSnP+k2Fgcpb1Kxn9TJWR
8hD8Q/fCJ52rjIIRajVpZoRe+kdn3aIp0oi8hLyj8X2ynSBKwVmRkD2UFoJVSLIx1kJJS+DygVw
4NZa/6R5WhpUbK8rVJJfLWWP6PZbc2As6FbwoQrP1N12zmqeOr7U
X-Received: by 2002:a05:6402:440f:b0:5dc:8b8b:3527 with SMTP id
4fb4d7f45d1cf-5de45019d7cmr20088030a12.17.1739266433275;
Tue, 11 Feb 2025 01:33:53 -0800 (PST)
Received: from localhost.localdomain
([2001:b07:6474:ebbf:b949:915b:211e:da1b])
by smtp.gmail.com with ESMTPSA id
4fb4d7f45d1cf-5de525f35b7sm7049320a12.53.2025.02.11.01.33.52
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 11 Feb 2025 01:33:52 -0800 (PST)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: buildroot@buildroot.org
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Javad Rahimi <javad321javad@gmail.com>,
Marcin Niestroj <m.niestroj@grinn-global.com>,
Sergey Matyukevich <geomatsi@gmail.com>,
linux-amarula@amarulasolutions.com,
Julien Olivain <ju.o@free.fr>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>
Subject: [PATCH 1/1] boot/uboot: support System Control Processor (SCP)
firmware blob
Date: Tue, 11 Feb 2025 10:33:49 +0100
Message-ID: <20250211093349.2153008-1-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
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=OiGyRmxV;
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;
dara=pass header.i=@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: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
[1/1] boot/uboot: support System Control Processor (SCP) firmware blob
|
|
Commit Message
Dario Binacchi
Feb. 11, 2025, 9:33 a.m. UTC
The commit 4bce3270d680 ("Config.in: timeout earlier when connecting to
download servers"), among other things, adds the connection timeout
parameter to the default scp command:
config BR2_SCP
string "Secure copy (scp) command"
default "scp -o ConnectTimeout=10"
Since the package/pkg-download.mk file exports this command using the
SCP variable:
export SCP := $(call qstrip,$(BR2_SCP))
and the U-Boot Makefile uses this variable as the path for the system
control processor (SCP) firmware blob:
cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
$(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \
--toolpath $(objtree)/tools \
$(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \
build -u -d $(binman_dtb) -O . -m \
--allow-missing --fake-ext-blobs \
$(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
$(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \
$(foreach f,$(BINMAN_INDIRS),-I $(f)) \
-a atf-bl31-path=${BL31} \
-a tee-os-path=${TEE} \
-a ti-dm-path=${TI_DM} \
-a opensbi-path=${OPENSBI} \
-a default-dt=$(default_dt) \
-a scp-path=$(SCP) \
the following error occurs:
BINMAN .binman_stamp
usage: binman [-h] [-B BUILD_DIR] [-D] [-H] [--tooldir TOOLDIR] [--toolpath TOOLPATH] [-T THREADS] [--test-section-timeout] [-v VERBOSITY] [-V]
{build,bintool-docs,entry-docs,ls,extract,replace,sign,test,tool} ...
binman: error: unrecognized arguments: -o ConnectTimeout=10
make[2]: *** [Makefile:1126: .binman_stamp] Error 2
The issue was already present, as the scp command was being passed
instead of the path to the SCP firmware, but it is now detected due to
the compilation error.
Adding the BR2_TARGET_UBOOT_SCP_FIRMWARE option allows passing the
correct parameter to U-Boot, even if it is not set. This also requires
removing the SCP setting from BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS for
configurations that previously set this variable explicitly.
Fixes: 4bce3270d680 ("Config.in: timeout earlier when connecting to download servers")
Suggested-by: Julien Olivain <ju.o@free.fr>
Co-Developed-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
boot/uboot/Config.in | 8 ++++++++
boot/uboot/uboot.mk | 3 ++-
configs/olimex_a64_olinuxino_defconfig | 2 +-
configs/orangepi_pc2_defconfig | 2 +-
configs/orangepi_zero2w_defconfig | 2 +-
configs/orangepi_zero3_defconfig | 2 +-
configs/orangepi_zero_plus2_defconfig | 2 +-
configs/orangepi_zero_plus_defconfig | 2 +-
configs/pine64_defconfig | 2 +-
support/testing/tests/boot/test_atf.py | 2 +-
10 files changed, 18 insertions(+), 9 deletions(-)
Comments
On Tue, Feb 11, 2025 at 10:33:49AM +0100, Dario Binacchi wrote: > The commit 4bce3270d680 ("Config.in: timeout earlier when connecting to > download servers"), among other things, adds the connection timeout > parameter to the default scp command: > > config BR2_SCP > string "Secure copy (scp) command" > default "scp -o ConnectTimeout=10" > > Since the package/pkg-download.mk file exports this command using the > SCP variable: > > export SCP := $(call qstrip,$(BR2_SCP)) > > and the U-Boot Makefile uses this variable as the path for the system > control processor (SCP) firmware blob: > > cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ > $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \ > --toolpath $(objtree)/tools \ > $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ > build -u -d $(binman_dtb) -O . -m \ > --allow-missing --fake-ext-blobs \ > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \ > -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \ > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ > -a atf-bl31-path=${BL31} \ > -a tee-os-path=${TEE} \ > -a ti-dm-path=${TI_DM} \ > -a opensbi-path=${OPENSBI} \ > -a default-dt=$(default_dt) \ > -a scp-path=$(SCP) \ > > the following error occurs: > > BINMAN .binman_stamp > usage: binman [-h] [-B BUILD_DIR] [-D] [-H] [--tooldir TOOLDIR] [--toolpath TOOLPATH] [-T THREADS] [--test-section-timeout] [-v VERBOSITY] [-V] > {build,bintool-docs,entry-docs,ls,extract,replace,sign,test,tool} ... > binman: error: unrecognized arguments: -o ConnectTimeout=10 > make[2]: *** [Makefile:1126: .binman_stamp] Error 2 > > The issue was already present, as the scp command was being passed > instead of the path to the SCP firmware, but it is now detected due to > the compilation error. > > Adding the BR2_TARGET_UBOOT_SCP_FIRMWARE option allows passing the > correct parameter to U-Boot, even if it is not set. This also requires > removing the SCP setting from BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS for > configurations that previously set this variable explicitly. > > Fixes: 4bce3270d680 ("Config.in: timeout earlier when connecting to download servers") > Suggested-by: Julien Olivain <ju.o@free.fr> > Co-Developed-by: Julien Olivain <ju.o@free.fr> > Signed-off-by: Julien Olivain <ju.o@free.fr> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > --- > boot/uboot/Config.in | 8 ++++++++ > boot/uboot/uboot.mk | 3 ++- > configs/olimex_a64_olinuxino_defconfig | 2 +- > configs/orangepi_pc2_defconfig | 2 +- > configs/orangepi_zero2w_defconfig | 2 +- > configs/orangepi_zero3_defconfig | 2 +- > configs/orangepi_zero_plus2_defconfig | 2 +- > configs/orangepi_zero_plus_defconfig | 2 +- > configs/pine64_defconfig | 2 +- > support/testing/tests/boot/test_atf.py | 2 +- > 10 files changed, 18 insertions(+), 9 deletions(-) > > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in > index f17f932c9e95..6087534fee2d 100644 > --- a/boot/uboot/Config.in > +++ b/boot/uboot/Config.in > @@ -744,4 +744,12 @@ config BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS > List of custom make options passed at build time. Can be > used for example to pass a DEVICE_TREE= value. > > +config BR2_TARGET_UBOOT_SCP_FIRMWARE > + string "System Control Processor (SCP) firmware location" > + help > + Location of a SCP firmware binary. > + > + If not empty, holds firmware for an external platform-specific > + coprocessor. > + > endif # BR2_TARGET_UBOOT > diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk > index 2796b0a31010..18997cbdbe26 100644 > --- a/boot/uboot/uboot.mk > +++ b/boot/uboot/uboot.mk > @@ -176,7 +176,8 @@ UBOOT_MAKE_OPTS += \ > ARCH=$(UBOOT_ARCH) \ > HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \ > HOSTLDFLAGS="$(HOST_LDFLAGS)" \ > - $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) > + $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) \ > + SCP=$(BR2_TARGET_UBOOT_SCP_FIRMWARE) > > # Disable FDPIC if enabled by default in toolchain > ifeq ($(BR2_BINFMT_FDPIC),y) > diff --git a/configs/olimex_a64_olinuxino_defconfig b/configs/olimex_a64_olinuxino_defconfig > index ad446ea18c82..b63ea51bc6d3 100644 > --- a/configs/olimex_a64_olinuxino_defconfig > +++ b/configs/olimex_a64_olinuxino_defconfig > @@ -29,7 +29,7 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_FORMAT_CUSTOM=y > BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > BR2_PACKAGE_HOST_DOSFSTOOLS=y > BR2_PACKAGE_HOST_GENIMAGE=y > BR2_PACKAGE_HOST_MTOOLS=y > diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig > index 46d04b34c845..d61ffd0f5f24 100644 > --- a/configs/orangepi_pc2_defconfig > +++ b/configs/orangepi_pc2_defconfig > @@ -33,5 +33,5 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_SPL=y > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > BR2_PACKAGE_HOST_GENIMAGE=y > diff --git a/configs/orangepi_zero2w_defconfig b/configs/orangepi_zero2w_defconfig > index c2030b05c20a..64c06d42315a 100644 > --- a/configs/orangepi_zero2w_defconfig > +++ b/configs/orangepi_zero2w_defconfig > @@ -37,6 +37,6 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_SPL=y > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > BR2_PACKAGE_HOST_GENIMAGE=y > BR2_PACKAGE_HOST_UBOOT_TOOLS=y > diff --git a/configs/orangepi_zero3_defconfig b/configs/orangepi_zero3_defconfig > index c6aa9c991a6c..78c7d6daff00 100644 > --- a/configs/orangepi_zero3_defconfig > +++ b/configs/orangepi_zero3_defconfig > @@ -38,6 +38,6 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_SPL=y > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > BR2_PACKAGE_HOST_GENIMAGE=y > BR2_PACKAGE_HOST_UBOOT_TOOLS=y > diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig > index 2b7ad2064d96..73b18533a28e 100644 > --- a/configs/orangepi_zero_plus2_defconfig > +++ b/configs/orangepi_zero_plus2_defconfig > @@ -45,5 +45,5 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_SPL=y > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > BR2_PACKAGE_HOST_GENIMAGE=y > diff --git a/configs/orangepi_zero_plus_defconfig b/configs/orangepi_zero_plus_defconfig > index 48c8e993f020..c6eee1d4115b 100644 > --- a/configs/orangepi_zero_plus_defconfig > +++ b/configs/orangepi_zero_plus_defconfig > @@ -34,5 +34,5 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_SPL=y > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > BR2_PACKAGE_HOST_GENIMAGE=y > diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig > index 8975f3b1a211..f719cd9d2fef 100644 > --- a/configs/pine64_defconfig > +++ b/configs/pine64_defconfig > @@ -29,7 +29,7 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_SPL=y > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > BR2_PACKAGE_HOST_DOSFSTOOLS=y > BR2_PACKAGE_HOST_GENIMAGE=y > BR2_PACKAGE_HOST_MTOOLS=y > diff --git a/support/testing/tests/boot/test_atf.py b/support/testing/tests/boot/test_atf.py > index 6142dd36c12a..d00bfa0ff931 100644 > --- a/support/testing/tests/boot/test_atf.py > +++ b/support/testing/tests/boot/test_atf.py > @@ -25,7 +25,7 @@ class TestATFAllwinner(infra.basetest.BRTest): > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > BR2_TARGET_UBOOT_SPL=y > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > - BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > + BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > """ > > def test_run(self): > -- Hello Dario, here: https://lore.kernel.org/buildroot/a023971c7c8bfa4826a9a8721500c7ff@free.fr/ Julien said that it does not need to be /dev/null, and that it works fine with just an empty string (if the default is the empty string). So, shouldn't you simply be able to remove the: BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" lines from the defconfigs, without any need to add any BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" lines to the defconfigs? Kind regards, Niklas To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Tue, Feb 11, 2025 at 10:46:27AM +0100, Niklas Cassel wrote: > Hello Dario, > > here: > https://lore.kernel.org/buildroot/a023971c7c8bfa4826a9a8721500c7ff@free.fr/ > > Julien said that it does not need to be /dev/null, > and that it works fine with just an empty string > (if the default is the empty string). Here is an example of a config option where the default is the empty string: https://github.com/buildroot/buildroot/blob/2024.11/Config.in#L189 Kind regards, Niklas To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
Hi Niklas, On Tue, Feb 11, 2025 at 10:46 AM Niklas Cassel <Niklas.Cassel@wdc.com> wrote: > > On Tue, Feb 11, 2025 at 10:33:49AM +0100, Dario Binacchi wrote: > > The commit 4bce3270d680 ("Config.in: timeout earlier when connecting to > > download servers"), among other things, adds the connection timeout > > parameter to the default scp command: > > > > config BR2_SCP > > string "Secure copy (scp) command" > > default "scp -o ConnectTimeout=10" > > > > Since the package/pkg-download.mk file exports this command using the > > SCP variable: > > > > export SCP := $(call qstrip,$(BR2_SCP)) > > > > and the U-Boot Makefile uses this variable as the path for the system > > control processor (SCP) firmware blob: > > > > cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ > > $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \ > > --toolpath $(objtree)/tools \ > > $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ > > build -u -d $(binman_dtb) -O . -m \ > > --allow-missing --fake-ext-blobs \ > > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \ > > -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ > > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \ > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ > > -a atf-bl31-path=${BL31} \ > > -a tee-os-path=${TEE} \ > > -a ti-dm-path=${TI_DM} \ > > -a opensbi-path=${OPENSBI} \ > > -a default-dt=$(default_dt) \ > > -a scp-path=$(SCP) \ > > > > the following error occurs: > > > > BINMAN .binman_stamp > > usage: binman [-h] [-B BUILD_DIR] [-D] [-H] [--tooldir TOOLDIR] [--toolpath TOOLPATH] [-T THREADS] [--test-section-timeout] [-v VERBOSITY] [-V] > > {build,bintool-docs,entry-docs,ls,extract,replace,sign,test,tool} ... > > binman: error: unrecognized arguments: -o ConnectTimeout=10 > > make[2]: *** [Makefile:1126: .binman_stamp] Error 2 > > > > The issue was already present, as the scp command was being passed > > instead of the path to the SCP firmware, but it is now detected due to > > the compilation error. > > > > Adding the BR2_TARGET_UBOOT_SCP_FIRMWARE option allows passing the > > correct parameter to U-Boot, even if it is not set. This also requires > > removing the SCP setting from BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS for > > configurations that previously set this variable explicitly. > > > > Fixes: 4bce3270d680 ("Config.in: timeout earlier when connecting to download servers") > > Suggested-by: Julien Olivain <ju.o@free.fr> > > Co-Developed-by: Julien Olivain <ju.o@free.fr> > > Signed-off-by: Julien Olivain <ju.o@free.fr> > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > --- > > boot/uboot/Config.in | 8 ++++++++ > > boot/uboot/uboot.mk | 3 ++- > > configs/olimex_a64_olinuxino_defconfig | 2 +- > > configs/orangepi_pc2_defconfig | 2 +- > > configs/orangepi_zero2w_defconfig | 2 +- > > configs/orangepi_zero3_defconfig | 2 +- > > configs/orangepi_zero_plus2_defconfig | 2 +- > > configs/orangepi_zero_plus_defconfig | 2 +- > > configs/pine64_defconfig | 2 +- > > support/testing/tests/boot/test_atf.py | 2 +- > > 10 files changed, 18 insertions(+), 9 deletions(-) > > > > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in > > index f17f932c9e95..6087534fee2d 100644 > > --- a/boot/uboot/Config.in > > +++ b/boot/uboot/Config.in > > @@ -744,4 +744,12 @@ config BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS > > List of custom make options passed at build time. Can be > > used for example to pass a DEVICE_TREE= value. > > > > +config BR2_TARGET_UBOOT_SCP_FIRMWARE > > + string "System Control Processor (SCP) firmware location" > > + help > > + Location of a SCP firmware binary. > > + > > + If not empty, holds firmware for an external platform-specific > > + coprocessor. > > + > > endif # BR2_TARGET_UBOOT > > diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk > > index 2796b0a31010..18997cbdbe26 100644 > > --- a/boot/uboot/uboot.mk > > +++ b/boot/uboot/uboot.mk > > @@ -176,7 +176,8 @@ UBOOT_MAKE_OPTS += \ > > ARCH=$(UBOOT_ARCH) \ > > HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \ > > HOSTLDFLAGS="$(HOST_LDFLAGS)" \ > > - $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) > > + $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) \ > > + SCP=$(BR2_TARGET_UBOOT_SCP_FIRMWARE) > > > > # Disable FDPIC if enabled by default in toolchain > > ifeq ($(BR2_BINFMT_FDPIC),y) > > diff --git a/configs/olimex_a64_olinuxino_defconfig b/configs/olimex_a64_olinuxino_defconfig > > index ad446ea18c82..b63ea51bc6d3 100644 > > --- a/configs/olimex_a64_olinuxino_defconfig > > +++ b/configs/olimex_a64_olinuxino_defconfig > > @@ -29,7 +29,7 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_FORMAT_CUSTOM=y > > BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" > > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > BR2_PACKAGE_HOST_DOSFSTOOLS=y > > BR2_PACKAGE_HOST_GENIMAGE=y > > BR2_PACKAGE_HOST_MTOOLS=y > > diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig > > index 46d04b34c845..d61ffd0f5f24 100644 > > --- a/configs/orangepi_pc2_defconfig > > +++ b/configs/orangepi_pc2_defconfig > > @@ -33,5 +33,5 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_SPL=y > > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > BR2_PACKAGE_HOST_GENIMAGE=y > > diff --git a/configs/orangepi_zero2w_defconfig b/configs/orangepi_zero2w_defconfig > > index c2030b05c20a..64c06d42315a 100644 > > --- a/configs/orangepi_zero2w_defconfig > > +++ b/configs/orangepi_zero2w_defconfig > > @@ -37,6 +37,6 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_SPL=y > > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > BR2_PACKAGE_HOST_GENIMAGE=y > > BR2_PACKAGE_HOST_UBOOT_TOOLS=y > > diff --git a/configs/orangepi_zero3_defconfig b/configs/orangepi_zero3_defconfig > > index c6aa9c991a6c..78c7d6daff00 100644 > > --- a/configs/orangepi_zero3_defconfig > > +++ b/configs/orangepi_zero3_defconfig > > @@ -38,6 +38,6 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_SPL=y > > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > BR2_PACKAGE_HOST_GENIMAGE=y > > BR2_PACKAGE_HOST_UBOOT_TOOLS=y > > diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig > > index 2b7ad2064d96..73b18533a28e 100644 > > --- a/configs/orangepi_zero_plus2_defconfig > > +++ b/configs/orangepi_zero_plus2_defconfig > > @@ -45,5 +45,5 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_SPL=y > > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > BR2_PACKAGE_HOST_GENIMAGE=y > > diff --git a/configs/orangepi_zero_plus_defconfig b/configs/orangepi_zero_plus_defconfig > > index 48c8e993f020..c6eee1d4115b 100644 > > --- a/configs/orangepi_zero_plus_defconfig > > +++ b/configs/orangepi_zero_plus_defconfig > > @@ -34,5 +34,5 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_SPL=y > > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > BR2_PACKAGE_HOST_GENIMAGE=y > > diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig > > index 8975f3b1a211..f719cd9d2fef 100644 > > --- a/configs/pine64_defconfig > > +++ b/configs/pine64_defconfig > > @@ -29,7 +29,7 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_SPL=y > > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > BR2_PACKAGE_HOST_DOSFSTOOLS=y > > BR2_PACKAGE_HOST_GENIMAGE=y > > BR2_PACKAGE_HOST_MTOOLS=y > > diff --git a/support/testing/tests/boot/test_atf.py b/support/testing/tests/boot/test_atf.py > > index 6142dd36c12a..d00bfa0ff931 100644 > > --- a/support/testing/tests/boot/test_atf.py > > +++ b/support/testing/tests/boot/test_atf.py > > @@ -25,7 +25,7 @@ class TestATFAllwinner(infra.basetest.BRTest): > > BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y > > BR2_TARGET_UBOOT_SPL=y > > BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > - BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > + BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > """ > > > > def test_run(self): > > -- > > Hello Dario, > > here: > https://lore.kernel.org/buildroot/a023971c7c8bfa4826a9a8721500c7ff@free.fr/ > > Julien said that it does not need to be /dev/null, > and that it works fine with just an empty string > (if the default is the empty string). > > > So, shouldn't you simply be able to remove the: > > BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > lines from the defconfigs, without any need to add any > BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > lines to the defconfigs? Since I can't physically test the patch on the board, this way I'm sure that the modification is definitely backward compatible. This is the rationale I followed. Thanks and regards, Dario > > > Kind regards, > Niklas
On Tue, Feb 11, 2025 at 10:53:28AM +0100, Dario Binacchi wrote: > > Hello Dario, > > > > here: > > https://lore.kernel.org/buildroot/a023971c7c8bfa4826a9a8721500c7ff@free.fr/ > > > > Julien said that it does not need to be /dev/null, > > and that it works fine with just an empty string > > (if the default is the empty string). > > > > > > So, shouldn't you simply be able to remove the: > > > > BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > > > > lines from the defconfigs, without any need to add any > > BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" > > > > lines to the defconfigs? > > Since I can't physically test the patch on the board, this way > I'm sure that the modification is definitely backward compatible. > This is the rationale I followed. Considering that the problem is that the build fails if you don't have this, there should be no need to physically test on the board. You could simply build the defconfig for one of these boards: $ make foo_defconfig && make sha256sum the uboot binary. Then apply your patch and: $ make foo_defconfig && uboot-rebuild then sha256sum the new uboot binary. If the sha256sums match, I think you are good. Personally, I think it would be cleaner if these defconfigs could drop these lines, since they shouldn't be needed once your patch is applied. Kind regards, Niklas To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
>>>>> "Dario" == Dario Binacchi <dario.binacchi@amarulasolutions.com> writes: > The commit 4bce3270d680 ("Config.in: timeout earlier when connecting to > download servers"), among other things, adds the connection timeout > parameter to the default scp command: > config BR2_SCP > string "Secure copy (scp) command" > default "scp -o ConnectTimeout=10" > Since the package/pkg-download.mk file exports this command using the > SCP variable: > export SCP := $(call qstrip,$(BR2_SCP)) > and the U-Boot Makefile uses this variable as the path for the system > control processor (SCP) firmware blob: > cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ > $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \ > --toolpath $(objtree)/tools \ > $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ > build -u -d $(binman_dtb) -O . -m \ > --allow-missing --fake-ext-blobs \ > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \ > -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \ > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ > -a atf-bl31-path=${BL31} \ > -a tee-os-path=${TEE} \ > -a ti-dm-path=${TI_DM} \ > -a opensbi-path=${OPENSBI} \ > -a default-dt=$(default_dt) \ > -a scp-path=$(SCP) \ > the following error occurs: > BINMAN .binman_stamp > usage: binman [-h] [-B BUILD_DIR] [-D] [-H] [--tooldir TOOLDIR] [--toolpath TOOLPATH] [-T THREADS] [--test-section-timeout] [-v VERBOSITY] [-V] > {build,bintool-docs,entry-docs,ls,extract,replace,sign,test,tool} ... > binman: error: unrecognized arguments: -o ConnectTimeout=10 > make[2]: *** [Makefile:1126: .binman_stamp] Error 2 > The issue was already present, as the scp command was being passed > instead of the path to the SCP firmware, but it is now detected due to > the compilation error. Indeed. > Adding the BR2_TARGET_UBOOT_SCP_FIRMWARE option allows passing the > correct parameter to U-Boot, even if it is not set. This also requires > removing the SCP setting from BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS for > configurations that previously set this variable explicitly. > Fixes: 4bce3270d680 ("Config.in: timeout earlier when connecting to download servers") > Suggested-by: Julien Olivain <ju.o@free.fr> > Co-Developed-by: Julien Olivain <ju.o@free.fr> > Signed-off-by: Julien Olivain <ju.o@free.fr> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> So the real fix is presumably to stop globally exporting all these variables in package/pkg-download.mk. I don't right away see why they couldn't just be passed in $(PKG)_DL_ENV to the dl-wrapper instead.
Hi Niklas, Dario, All, On 11/02/2025 11:13, Niklas Cassel via buildroot wrote: > On Tue, Feb 11, 2025 at 10:53:28AM +0100, Dario Binacchi wrote: >> > Hello Dario, >> > >> > here: >> > https://lore.kernel.org/buildroot/a023971c7c8bfa4826a9a8721500c7ff@free.fr/ >> > >> > Julien said that it does not need to be /dev/null, >> > and that it works fine with just an empty string >> > (if the default is the empty string). >> > >> > >> > So, shouldn't you simply be able to remove the: >> > >> > BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" >> > >> > lines from the defconfigs, without any need to add any >> > BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" >> > >> > lines to the defconfigs? >> >> Since I can't physically test the patch on the board, this way >> I'm sure that the modification is definitely backward compatible. >> This is the rationale I followed. > > Considering that the problem is that the build fails if you don't have > this, > there should be no need to physically test on the board. > > You could simply build the defconfig for one of these boards: > $ make foo_defconfig && make > sha256sum the uboot binary. > > Then apply your patch and: > $ make foo_defconfig && uboot-rebuild > then sha256sum the new uboot binary. > > If the sha256sums match, I think you are good. > > Personally, I think it would be cleaner if these defconfigs could drop > these lines, since they shouldn't be needed once your patch is applied. I was able to do some more tests around this. I tested with orangepi_zero_plus2_defconfig, since I have access to a board. So, some versions of uboot (e.g. v2024.10) are building fine when SCP is empty, but build print a warning. This is what I initially seen when building orangepi_zero_plus2_defconfig. Some other versions of uboot (e.g. v2023.10 and v2025.01) are failing to build by default, but can configured to ignore those errors with the uboot make option BINMAN_ALLOW_MISSING=1. All versions are building and booting on my test board if SCP=/dev/null is passed. See upstream commits: https://source.denx.de/u-boot/u-boot/-/commit/b38da15a054c4ce5ac7c46147995f1387ab24d3b https://source.denx.de/u-boot/u-boot/-/commit/8bbd8a35942aee05adca4c8909b133df23b91b3a https://source.denx.de/u-boot/u-boot/-/commit/bbc3d12516ec759379d71819ff49b8574f233aec ... So, Dario, you were right to be conservative. Thank you for that. Also, reading the uboot documentation: https://source.denx.de/u-boot/u-boot/-/blob/v2025.01/board/sunxi/README.sunxi64#L64 It seems this SCP is very specific to sunxi. There is no infratructure in Buildroot to build it (or to download a binary). I initially thought this binary would come from a firmware package. I now see a limited use of such BR2_TARGET_UBOOT_SCP_FIRMWARE, if any, in this state. It is also not completely fixing the current issue, due to the different behaviors of uboot versions. So Peter's suggestion to avoid exporting globally the SCP variable (and other download infra variables) in package/pkg-download.mk seems a better solution now. See: https://lore.kernel.org/buildroot/87zfis2zsg.fsf@dell.be.48ers.dk/T/#me93f1a884e422fea63917d4c7992291a38dba4f8 I think is worth exploring this path. In the meantime, the workaround can still be to set: BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" > Kind regards, > Niklas Best regards, Julien. To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On 11/02/2025 17:48, Peter Korsgaard wrote: >>>>>> "Dario" == Dario Binacchi <dario.binacchi@amarulasolutions.com> writes: > > > The commit 4bce3270d680 ("Config.in: timeout earlier when connecting to > > download servers"), among other things, adds the connection timeout > > parameter to the default scp command: > > > config BR2_SCP > > string "Secure copy (scp) command" > > default "scp -o ConnectTimeout=10" > > > Since the package/pkg-download.mk file exports this command using the > > SCP variable: > > > export SCP := $(call qstrip,$(BR2_SCP)) > > > and the U-Boot Makefile uses this variable as the path for the system > > control processor (SCP) firmware blob: > > > cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ > > $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \ > > --toolpath $(objtree)/tools \ > > $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ > > build -u -d $(binman_dtb) -O . -m \ > > --allow-missing --fake-ext-blobs \ > > $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \ > > -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ > > $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \ > > $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ > > -a atf-bl31-path=${BL31} \ > > -a tee-os-path=${TEE} \ > > -a ti-dm-path=${TI_DM} \ > > -a opensbi-path=${OPENSBI} \ > > -a default-dt=$(default_dt) \ > > -a scp-path=$(SCP) \ > > > the following error occurs: > > > BINMAN .binman_stamp > > usage: binman [-h] [-B BUILD_DIR] [-D] [-H] [--tooldir TOOLDIR] [--toolpath TOOLPATH] [-T THREADS] [--test-section-timeout] [-v VERBOSITY] [-V] > > {build,bintool-docs,entry-docs,ls,extract,replace,sign,test,tool} ... > > binman: error: unrecognized arguments: -o ConnectTimeout=10 > > make[2]: *** [Makefile:1126: .binman_stamp] Error 2 > > > The issue was already present, as the scp command was being passed > > instead of the path to the SCP firmware, but it is now detected due to > > the compilation error. > > Indeed. > > > Adding the BR2_TARGET_UBOOT_SCP_FIRMWARE option allows passing the > > correct parameter to U-Boot, even if it is not set. This also requires > > removing the SCP setting from BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS for > > configurations that previously set this variable explicitly. > > > Fixes: 4bce3270d680 ("Config.in: timeout earlier when connecting to download servers") > > Suggested-by: Julien Olivain <ju.o@free.fr> > > Co-Developed-by: Julien Olivain <ju.o@free.fr> > > Signed-off-by: Julien Olivain <ju.o@free.fr> > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > So the real fix is presumably to stop globally exporting all these > variables in package/pkg-download.mk. I don't right away see why they > couldn't just be passed in $(PKG)_DL_ENV to the dl-wrapper instead. It shouldn't be in _DL_ENV, but directly in the DOWNLOAD macro like is already done for TAR. Also, they are Buildroot-internal environment variables, so they should normally be prefixed by BR_. Regards, Arnout To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index f17f932c9e95..6087534fee2d 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -744,4 +744,12 @@ config BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS List of custom make options passed at build time. Can be used for example to pass a DEVICE_TREE= value. +config BR2_TARGET_UBOOT_SCP_FIRMWARE + string "System Control Processor (SCP) firmware location" + help + Location of a SCP firmware binary. + + If not empty, holds firmware for an external platform-specific + coprocessor. + endif # BR2_TARGET_UBOOT diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 2796b0a31010..18997cbdbe26 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -176,7 +176,8 @@ UBOOT_MAKE_OPTS += \ ARCH=$(UBOOT_ARCH) \ HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \ - $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) + $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) \ + SCP=$(BR2_TARGET_UBOOT_SCP_FIRMWARE) # Disable FDPIC if enabled by default in toolchain ifeq ($(BR2_BINFMT_FDPIC),y) diff --git a/configs/olimex_a64_olinuxino_defconfig b/configs/olimex_a64_olinuxino_defconfig index ad446ea18c82..b63ea51bc6d3 100644 --- a/configs/olimex_a64_olinuxino_defconfig +++ b/configs/olimex_a64_olinuxino_defconfig @@ -29,7 +29,7 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_FORMAT_CUSTOM=y BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig index 46d04b34c845..d61ffd0f5f24 100644 --- a/configs/orangepi_pc2_defconfig +++ b/configs/orangepi_pc2_defconfig @@ -33,5 +33,5 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/configs/orangepi_zero2w_defconfig b/configs/orangepi_zero2w_defconfig index c2030b05c20a..64c06d42315a 100644 --- a/configs/orangepi_zero2w_defconfig +++ b/configs/orangepi_zero2w_defconfig @@ -37,6 +37,6 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/configs/orangepi_zero3_defconfig b/configs/orangepi_zero3_defconfig index c6aa9c991a6c..78c7d6daff00 100644 --- a/configs/orangepi_zero3_defconfig +++ b/configs/orangepi_zero3_defconfig @@ -38,6 +38,6 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig index 2b7ad2064d96..73b18533a28e 100644 --- a/configs/orangepi_zero_plus2_defconfig +++ b/configs/orangepi_zero_plus2_defconfig @@ -45,5 +45,5 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/configs/orangepi_zero_plus_defconfig b/configs/orangepi_zero_plus_defconfig index 48c8e993f020..c6eee1d4115b 100644 --- a/configs/orangepi_zero_plus_defconfig +++ b/configs/orangepi_zero_plus_defconfig @@ -34,5 +34,5 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig index 8975f3b1a211..f719cd9d2fef 100644 --- a/configs/pine64_defconfig +++ b/configs/pine64_defconfig @@ -29,7 +29,7 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" +BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y diff --git a/support/testing/tests/boot/test_atf.py b/support/testing/tests/boot/test_atf.py index 6142dd36c12a..d00bfa0ff931 100644 --- a/support/testing/tests/boot/test_atf.py +++ b/support/testing/tests/boot/test_atf.py @@ -25,7 +25,7 @@ class TestATFAllwinner(infra.basetest.BRTest): BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" - BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" + BR2_TARGET_UBOOT_SCP_FIRMWARE="/dev/null" """ def test_run(self):