Re: [ptxdist] [PATCH 2/2] beep: version bump 1.3 -> 1.4.12

2024-04-24 Thread Ladislav Michl
On Tue, Apr 23, 2024 at 07:36:52AM +0200, Ladislav Michl wrote:
> Move package to a new upstream at https://github.com/spkr-beep/beep/

For v5te I needed to add LDFLAGS=-latomic to satisfy undefined reference:
arm-v5te-linux-gnueabi-gcc -Wl,-Map=beep.map,--cref 
-fasynchronous-unwind-tables -fanalyzer -fstack-protector-strong 
-fstack-clash-protection -fsanitize=undefined -save-temps=obj -O2 -g -std=gnu99 
-pedantic -Wall -Wextra -Werror -Wno-padded -Wno-format-nonliteral   -o beep 
beep-log.o beep-main.o beep-library.o beep-usage.o beep-drivers.o 
beep-driver-console.o beep-driver-evdev.o   
/opt/OSELAS.Toolchain-2023.07.1/arm-v5te-linux-gnueabi/gcc-13.2.1-glibc-2.37-binutils-2.40-kernel-6.3.6-sanitized/lib/gcc/arm-v5te-linux-gnueabi/13.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
 
/opt/OSELAS.Toolchain-2023.07.1/arm-v5te-linux-gnueabi/gcc-13.2.1-glibc-2.37-binutils-2.40-kernel-6.3.6-sanitized/lib/gcc/arm-v5te-linux-gnueabi/13.2.1/../../../../arm-v5te-linux-gnueabi/lib/libubsan.so:
 undefined reference to `__atomic_compare_exchange_8'
/opt/OSELAS.Toolchain-2023.07.1/arm-v5te-linux-gnueabi/gcc-13.2.1-glibc-2.37-binutils-2.40-kernel-6.3.6-sanitized/lib/gcc/arm-v5te-linux-gnueabi/13.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
 
/opt/OSELAS.Toolchain-2023.07.1/arm-v5te-linux-gnueabi/gcc-13.2.1-glibc-2.37-binutils-2.40-kernel-6.3.6-sanitized/lib/gcc/arm-v5te-linux-gnueabi/13.2.1/../../../../arm-v5te-linux-gnueabi/lib/libubsan.so:
 undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status

I can see haproxy and dhcp packages are adding target flags based on
selected architecture. Is it to way to follow here?

l.



[ptxdist] /bin/sh link setting incompatibility when bash and dash installed

2024-04-24 Thread Ian Abbott

Hi,

Currently, the Kconfig option for BASH_SH (which causes /usr/bin/sh to 
be linked to bash) is as follows:


config BASH_SH
bool
default BUSYBOX = n || BUSYBOX_SH_IS_NONE

However, if DASH_LINK_SH is enabled, that will cause /usr/bin/sh to be 
linked to dash, resulting in a conflict.


I suppose the most robust fix would be to add a prompt to allow BASH_SH 
to be configured manually. I'm not sure if the default should be changed 
to `default (BUSYBOX = n || BUSYBOX_SH_IS_NONE) && DASH_LINK_SH = n`. 
If both dash and bash are installed, it is likely that dash would be 
used as the system shell and bash would be used as the interactive shell.


--
-=( Ian Abbott  || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-



Re: [ptxdist] [PATCH] at91bootstrap: drop atmel download url

2024-04-24 Thread Alexander Dahl
Hei hei,

Am Wed, Apr 24, 2024 at 04:22:03PM +0200 schrieb Ladislav Michl:
> From: Ladislav Michl 
> 
> Atmel url just redirects to https://www.microchip.com/ happily
> feeding tarball with  content, so drop it entirely.
> 
> Signed-off-by: Ladislav Michl 
> ---
>  rules/at91bootstrap.make | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/rules/at91bootstrap.make b/rules/at91bootstrap.make
> index 7835564ea..1dfabdcbf 100644
> --- a/rules/at91bootstrap.make
> +++ b/rules/at91bootstrap.make
> @@ -20,9 +20,7 @@ AT91BOOTSTRAP_MD5   := 2d222312cf0af81c56db8747d6a38c7c
>  AT91BOOTSTRAP_SUFFIX := zip
>  AT91BOOTSTRAP:= Bootstrap-v$(AT91BOOTSTRAP_VERSION)
>  AT91BOOTSTRAP_TARBALL:= 
> AT91Bootstrap$(AT91BOOTSTRAP_VERSION).$(AT91BOOTSTRAP_SUFFIX)
> -AT91BOOTSTRAP_URL:= \
> -
> http://www.atmel.com/dyn/resources/prod_documents/$(AT91BOOTSTRAP_TARBALL) \
> -http://sources.buildroot.net/$(AT91BOOTSTRAP_TARBALL)
> +AT91BOOTSTRAP_URL:= http://sources.buildroot.net/$(AT91BOOTSTRAP_TARBALL)

Reviewed-by: Alexander Dahl 

Greets
Alex

>  AT91BOOTSTRAP_SOURCE := $(SRCDIR)/$(AT91BOOTSTRAP_TARBALL)
>  AT91BOOTSTRAP_DIR:= $(BUILDDIR)/$(AT91BOOTSTRAP)
>  AT91BOOTSTRAP_LICENSE:= BSD-Source-Code AND GPL-2.0-or-later
> -- 
> 2.39.2
> 
> 



[ptxdist] [PATCH 1/4] ptxd_make_world_inject: Remove useless test

2024-04-24 Thread Alexander Dahl
One line above $target is set to "${var}/$(subshell)" and even if $var
_and_ the result of the subshell call is empty, there's still the slash.
Thus target is never empty.

Signed-off-by: Alexander Dahl 
---
 scripts/lib/ptxd_make_world_inject.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index fe4eb8363..5c2d0dc5f 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -11,9 +11,6 @@ ptxd_make_inject() {
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
 target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
-if [ -z "${target}" ]; then
-   target="${source}"
-fi
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
-- 
2.39.2




[ptxdist] [PATCH 4/4] ptxd_make_world_inject: Introduce separate destination directory

2024-04-24 Thread Alexander Dahl
Setting the optional _INJECT_DEST now allows to give a different
target for putting the binary blobs into.  When building out-of-tree
some bootloaders like U-Boot expect injected files in the build dir, not
in the source dir.  Backwards compatibility is ensured, the source dir
is still the default, the new inject dest is optional and in case set it
overwrites the default.

For using this in u-boot package, on top of the things already done to
use the inject mechanism in general, add this line to
'rules/u-boot.make' for example:

U_BOOT_INJECT_DEST := $(U_BOOT_BUILD_DIR)

Signed-off-by: Alexander Dahl 
---
 rules/post/ptxd_make_world_inject.make |  3 ++-
 scripts/lib/ptxd_make_world_inject.sh  | 22 ++
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index eabcdd052..509d480ba 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -9,7 +9,8 @@
 world/inject/env = \
$(call world/env, $(1)) \
pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
-   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
+   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))" \
+   pkg_inject_dest="$(call ptx/escape,$($(1)_INJECT_DEST))"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index b74e464c6..90bd8b684 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -7,10 +7,15 @@
 #
 
 ptxd_make_inject() {
-local source target
+local dest source target
+
+dest="${pkg_dir}"
+if [ -n "${pkg_inject_dest}" ]; then
+   dest="${pkg_inject_dest}"
+fi
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
-target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
+target="${dest}/$(echo ${inject_file} | cut -d ":" -f 2)"
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
@@ -32,8 +37,17 @@ export -f ptxd_make_inject
 ptxd_make_world_inject() {
 ptxd_make_world_init || return
 
-if [ -z "${pkg_dir}" ]; then
-   ptxd_bailout "_DIR empty, no destination to inject to."
+if [ -z "${pkg_inject_dest}" ] && [ -z "${pkg_dir}" ]; then
+   ptxd_bailout "No destination to inject to." \
+   "Set either _DIR or _INJECT_DEST to have a valid 
destination!"
+fi
+
+if [ -n "${pkg_inject_dest}" ]; then
+   if [ "${pkg_build_dir}" = "${pkg_inject_dest}" ] && [ 
"${pkg_build_oot}" = "YES" ]; then
+   ptxd_warning "_INJECT_DEST is set to _BUILD_DIR and 
_BUILD_OOT is set to 'YES'." \
+   "If you called world/inject before world/prepare your files 
will be removed after injecting."
+   fi
+   mkdir -p -- "${pkg_inject_dest}"
 fi
 
 for inject_file in ${pkg_inject_files}; do
-- 
2.39.2




[ptxdist] [PATCH 2/4] ptxd_make_world_inject: Use _DIR directly

2024-04-24 Thread Alexander Dahl
pkg_source was defined as "$($(1)_DIR)" which is the same as pkg_dir in
ptxd_make_world_common.  We can use pkg_dir directly.  Add a safe-guard
to bail out early if that var is empty.

Signed-off-by: Alexander Dahl 
---
 rules/post/ptxd_make_world_inject.make | 3 +--
 scripts/lib/ptxd_make_world_inject.sh  | 6 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index b7d28e92f..3506ee114 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -9,8 +9,7 @@
 world/inject/env = \
$(call world/env, $(1)) \
pkg_inject_path="$($(1)_INJECT_PATH)" \
-   pkg_inject_files="$($(1)_INJECT_FILES)" \
-   pkg_source="$($(1)_DIR)"
+   pkg_inject_files="$($(1)_INJECT_FILES)"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index 5c2d0dc5f..b74e464c6 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -10,7 +10,7 @@ ptxd_make_inject() {
 local source target
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
-target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
+target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
@@ -32,6 +32,10 @@ export -f ptxd_make_inject
 ptxd_make_world_inject() {
 ptxd_make_world_init || return
 
+if [ -z "${pkg_dir}" ]; then
+   ptxd_bailout "_DIR empty, no destination to inject to."
+fi
+
 for inject_file in ${pkg_inject_files}; do
ptxd_make_inject || return
 done
-- 
2.39.2




[ptxdist] [PATCH 3/4] ptxd_make_world_inject: Escape inject path and files

2024-04-24 Thread Alexander Dahl
Same as in ptxd_make_world_common for all the other variables set in
make and used in shell.

Signed-off-by: Alexander Dahl 
---
 rules/post/ptxd_make_world_inject.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index 3506ee114..eabcdd052 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -8,8 +8,8 @@
 
 world/inject/env = \
$(call world/env, $(1)) \
-   pkg_inject_path="$($(1)_INJECT_PATH)" \
-   pkg_inject_files="$($(1)_INJECT_FILES)"
+   pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
+   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
-- 
2.39.2




[ptxdist] [PATCH 0/4] ptxd_make_world_inject: Spring cleanup and optional dest dir

2024-04-24 Thread Alexander Dahl
Hello,

some spring cleaning and a new feature for the firmware inject
mechanism.

When trying to re-build U-Boot as an oot build for the Karo QSBASE93
Evalkit (for QS93 Solder-Down System-on-Module) it became apparent
U-Boot wants some of those binary blobs in build folder instead of
source folder.  Supporting this usecase is nice to have, because you
won't clutter your source tree, especially when building from external
tree after something like `ptxdist local-src u-boot ~/src/u-boot` …

Maybe we should add some documentation for this inject mechanism?

Follow-up patches for u-boot package are not yet ready for submission.
Let me know what you thing of this first.

Greets
Alex

Alexander Dahl (4):
  ptxd_make_world_inject: Remove useless test
  ptxd_make_world_inject: Use _DIR directly
  ptxd_make_world_inject: Escape inject path and files
  ptxd_make_world_inject: Introduce separate destination directory

 rules/post/ptxd_make_world_inject.make |  6 +++---
 scripts/lib/ptxd_make_world_inject.sh  | 25 -
 2 files changed, 23 insertions(+), 8 deletions(-)


base-commit: 549a207826f541515b26c8f8bdcc1b8df23fe3c5
-- 
2.39.2




[ptxdist] [PATCH] at91bootstrap: drop atmel download url

2024-04-24 Thread Ladislav Michl
From: Ladislav Michl 

Atmel url just redirects to https://www.microchip.com/ happily
feeding tarball with  content, so drop it entirely.

Signed-off-by: Ladislav Michl 
---
 rules/at91bootstrap.make | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/rules/at91bootstrap.make b/rules/at91bootstrap.make
index 7835564ea..1dfabdcbf 100644
--- a/rules/at91bootstrap.make
+++ b/rules/at91bootstrap.make
@@ -20,9 +20,7 @@ AT91BOOTSTRAP_MD5 := 2d222312cf0af81c56db8747d6a38c7c
 AT91BOOTSTRAP_SUFFIX   := zip
 AT91BOOTSTRAP  := Bootstrap-v$(AT91BOOTSTRAP_VERSION)
 AT91BOOTSTRAP_TARBALL  := 
AT91Bootstrap$(AT91BOOTSTRAP_VERSION).$(AT91BOOTSTRAP_SUFFIX)
-AT91BOOTSTRAP_URL  := \
-
http://www.atmel.com/dyn/resources/prod_documents/$(AT91BOOTSTRAP_TARBALL) \
-http://sources.buildroot.net/$(AT91BOOTSTRAP_TARBALL)
+AT91BOOTSTRAP_URL  := http://sources.buildroot.net/$(AT91BOOTSTRAP_TARBALL)
 AT91BOOTSTRAP_SOURCE   := $(SRCDIR)/$(AT91BOOTSTRAP_TARBALL)
 AT91BOOTSTRAP_DIR  := $(BUILDDIR)/$(AT91BOOTSTRAP)
 AT91BOOTSTRAP_LICENSE  := BSD-Source-Code AND GPL-2.0-or-later
-- 
2.39.2




[ptxdist] [PATCH] tf-a: Update download defaults

2024-04-24 Thread Alexander Dahl
Previous URL threw 401 errors.  Experiments with other paths from the
same server yield no stable tarballs.  GitHub tarballs are stable, have
a different checksum however.  Tarball content was checked to be the
same (at least compared to those unstable git snapshot tarballs from the
previous URL).  GitHub tarball has same checksum as the one downloaded
by buildroot.

Signed-off-by: Alexander Dahl 
Link: 
https://lore.distrokit.org/distrokit/20240424124341.243323-1-...@thorsis.com/
---
 platforms/tf-a.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/platforms/tf-a.in b/platforms/tf-a.in
index 0a14bd8c4..495ae58fe 100644
--- a/platforms/tf-a.in
+++ b/platforms/tf-a.in
@@ -11,14 +11,14 @@ if TF_A
 
 config TF_A_URL
string
-   default 
"https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot;
+   default 
"https://github.com/ARM-software/arm-trusted-firmware/archive/refs/tags;
prompt "TF-A URL"
help
  Enter the TF-A URL you want to use.
 
 config TF_A_VERSION
string
-   default "v2.2"
+   default "v2.10"
prompt "TF-A version"
help
  Enter the TF-A git commit-ish you want to build. Usually a tagged
@@ -26,7 +26,7 @@ config TF_A_VERSION
 
 config TF_A_MD5
string
-   default "bb300e5a62c911e189c80d935d497a4b"
+   default "179042745d57dc03cb44063d43dc5301"
prompt "TF-A source md5"
 
 config TF_A_ARCH_STRING

base-commit: 549a207826f541515b26c8f8bdcc1b8df23fe3c5
-- 
2.39.2




[ptxdist] [PATCH] rauc: version bump 1.11.1 -> 1.11.3

2024-04-24 Thread Enrico Jörns
Signed-off-by: Enrico Jörns 
---
 rules/rauc.make | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/rauc.make b/rules/rauc.make
index 50b1ec35d..38577f94d 100644
--- a/rules/rauc.make
+++ b/rules/rauc.make
@@ -1,6 +1,6 @@
 # -*-makefile-*-
 #
-# Copyright (C) 2015-2023 by Enrico Joerns 
+# Copyright (C) 2015-2024 by Enrico Joerns 
 #
 # For further information about the PTXdist project and license conditions
 # see the README file.
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_RAUC) += rauc
 #
 # Paths and names
 #
-RAUC_VERSION   := 1.11.1
-RAUC_MD5   := 16e193e5e396a419a7ceee5777e7c077
+RAUC_VERSION   := 1.11.3
+RAUC_MD5   := f6822268230e50efb6b2fe3a4db28e2b
 RAUC   := rauc-$(RAUC_VERSION)
 RAUC_SUFFIX:= tar.xz
 RAUC_URL   := 
https://github.com/rauc/rauc/releases/download/v$(RAUC_VERSION)/$(RAUC).$(RAUC_SUFFIX)
-- 
2.39.2