Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Buildroot] [PATCH 1/4] package/adsp-ldr: new package
@ 2025-08-19 11:53 Philip Molloy
  2025-08-19 12:39 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Philip Molloy @ 2025-08-19 11:53 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Philip Molloy, Michael Hennerich

Hi Thomas,

Thanks for the super quick review!

On Monday, August 18th, 2025 at 6:31 PM, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
>
> Hello Philip,
>
> Thanks for this contribution! See below some feedback.
>
> On Mon, 18 Aug 2025 14:22:30 +0000
> Philip Molloy philip@philipmolloy.com wrote:
>
> > From: Philip Molloy philip.molloy@analog.com
> >
> > Signed-off-by: Philip Molloy philip.molloy@analog.com
> > Signed-off-by: Philip Molloy philip@philipmolloy.com
> > ---
> > package/Config.in | 1 +
> > package/adsp-ldr/Config.in | 9 +++++++++
> > package/adsp-ldr/adsp-ldr.hash | 3 +++
> > package/adsp-ldr/adsp-ldr.mk | 19 +++++++++++++++++++
> > 4 files changed, 32 insertions(+)
>
>
> I see in PATCH 4/4 you add an entry in the DEVELOPERS file for this
> package. You should squash PATCH 4/4 into this patch, so that the
> addition in DEVELOPERS comes in the patch adding the package.
>
> > diff --git a/package/Config.in b/package/Config.in
> > index 579b5ffc87..63aee051e9 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -470,6 +470,7 @@ endmenu
> > source "package/acpica/Config.in"
> > source "package/acpid/Config.in"
> > source "package/acpitool/Config.in"
> > + source "package/adsp-ldr/Config.in"
>
>
> This will not be needed (see below).
>
> > diff --git a/package/adsp-ldr/Config.in b/package/adsp-ldr/Config.in
> > new file mode 100644
> > index 0000000000..a1806df576
> > --- /dev/null
> > +++ b/package/adsp-ldr/Config.in
> > @@ -0,0 +1,9 @@
> > +config BR2_PACKAGE_ADSP_LDR
> > + bool "adsp-ldr"
> > + depends on BR2_arm || BR2_aarch64
>
>
> This file is not relevant: your package is a host only package. In
> fact, if you enable this option and try to build, you should get a
> failure as your .mk file does not create a target variant of this
> package (which is correct).

Absolutely, renamed it to Config.in.host and updated accordingly. Pushed it, along
with all other changes to the branch linked to in the cover letter.

> > diff --git a/package/adsp-ldr/adsp-ldr.mk b/package/adsp-ldr/adsp-ldr.mk
> > new file mode 100644
> > index 0000000000..9fdf3c3c4e
> > --- /dev/null
> > +++ b/package/adsp-ldr/adsp-ldr.mk
> > @@ -0,0 +1,19 @@
> > +################################################################################
> > +#
> > +# adsp-ldr
> > +#
> > +################################################################################
> > +
> > +ADSP_LDR_VERSION = 1.0.0
> > +ADSP_LDR_SITE = $(call github,analogdevicesinc,adsp-ldr,v$(ADSP_LDR_VERSION))
> > +ADSP_LDR_LICENSE = GPL-3.0
> > +ADSP_LDR_LICENSE_FILES = LICENSE
>
>
> Are you sure that this license file is correct? Indeed, all source
> files seem to have a BSD-3-Clause license, for example:
> https://github.com/analogdevicesinc/adsp-ldr/blob/main/src/ldr/lfd.c.

Thanks for noticing this! I'll try to address it in a new release.

See https://github.com/analogdevicesinc/adsp-ldr/issues/6

> > +ADSP_LDR_SUBDIR = src/ldr
> > +
> > +define HOST_ADSP_LDR_INSTALL_CMDS
> > + $(INSTALL) -m 755 -D $(@D)/src/ldr/ldr \
> > + $(TARGET_CROSS)ldr
>
>
> Why do you install it with a $(TARGET_CROSS) prefix?

It is currently required by mainline U-Boot.[1] More context below.

[1]: https://elixir.bootlin.com/u-boot/v2025.07/source/Makefile#L405

> Also, you seem to be the author of this repo. Why is the ldr code
> burried in src/ldr, with not much outside of this folder? It would make
> a lot more sense to have the code directly at the project root, and
> avoid having to pass ADSP_LDR_SUBDIR = src/ldr.

This code is very very old. I was not even able to track down the full history internally at ADI.

The DSP line of processors were (and largely still are) used to run baremetal or FreeRTOS applications, which are developed using a IDE called CCES, which includes a custom toolchain (hence the prefix above). Some DSP processors do not even have ARM cores.

As they began to support Linux with larger ARM cores, the code necessary to generate boot streams was extracted from a CCES related mono repo and copied into the Github repository. That happened a few years ago and was never updated.

So far I've renamed the repo, switched from master to main, merged a "release" branch into main, and created a Github release. But there is still a lot that can be improved.

I have spent some time cleaning things up[2], but I need to refactor it a bit and rebase onto main since merging the release branch. As I'm sure you can imagine, this isn't a high priority. :-P

We are also focusing more on mainline U-Boot and Linux support, but it is naturally a slow process.

[2]: https://github.com/analogdevicesinc/adsp-ldr/pull/1

> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 0/4] Generate ADI ADSP boot streams
@ 2025-08-18 14:22 Philip Molloy
  2025-08-18 14:22 ` [Buildroot] [PATCH 1/4] package/adsp-ldr: new package Philip Molloy
  0 siblings, 1 reply; 6+ messages in thread
From: Philip Molloy @ 2025-08-18 14:22 UTC (permalink / raw)
  To: buildroot; +Cc: Philip Molloy, Michael Hennerich, Philip Molloy

adsp-ldr is a command-line tool that generates boot streams for ADI ADSP
processors. It is required to boot U-Boot on ADSP processors. This series is
the first step in adding support for the SC598 EZ-KIT evaluation board, and
eventually other boards.

Successful pipeline for this series:

https://gitlab.com/pamolloy/buildroot/-/pipelines/1989414592

Branch containing this series:

https://github.com/analogdevicesinc/buildroot/commits/staging/philip/adsp-ldr/

The entire series adding support for the SC598 EZ-KIT evaluation board:

https://github.com/analogdevicesinc/buildroot/commits/staging/philip/support-sc5xx-eval-boards/

Philip Molloy (4):
  package/adsp-ldr: new package
  boot/uboot: depend on adsp-ldr if needed
  boot/uboot: add ADSP LDR binary format
  DEVELOPERS: add Philip Molloy for adsp-ldr

 DEVELOPERS                     |  3 +++
 boot/uboot/Config.in           | 12 ++++++++++++
 boot/uboot/uboot.mk            |  8 ++++++++
 package/Config.in              |  1 +
 package/adsp-ldr/Config.in     |  9 +++++++++
 package/adsp-ldr/adsp-ldr.hash |  3 +++
 package/adsp-ldr/adsp-ldr.mk   | 19 +++++++++++++++++++
 7 files changed, 55 insertions(+)
 create mode 100644 package/adsp-ldr/Config.in
 create mode 100644 package/adsp-ldr/adsp-ldr.hash
 create mode 100644 package/adsp-ldr/adsp-ldr.mk

-- 
2.50.1


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-08-19 16:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19 11:53 [Buildroot] [PATCH 1/4] package/adsp-ldr: new package Philip Molloy
2025-08-19 12:39 ` Thomas Petazzoni via buildroot
2025-08-19 16:00   ` Philip Molloy
2025-08-19 16:21     ` Thomas Petazzoni via buildroot
  -- strict thread matches above, loose matches on Subject: below --
2025-08-18 14:22 [Buildroot] [PATCH 0/4] Generate ADI ADSP boot streams Philip Molloy
2025-08-18 14:22 ` [Buildroot] [PATCH 1/4] package/adsp-ldr: new package Philip Molloy
2025-08-18 16:31   ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox