* [Buildroot] [PATCH 0/2] boot/syslinux: fix top-level parallel builds, add lpxelinux
@ 2025-06-25 10:01 yann.morin
2025-06-25 10:01 ` [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build yann.morin
2025-06-25 10:01 ` [Buildroot] [PATCH 2/2] boot/syslinux: add option to install pxelinux yann.morin
0 siblings, 2 replies; 8+ messages in thread
From: yann.morin @ 2025-06-25 10:01 UTC (permalink / raw)
To: buildroot; +Cc: Yann E . MORIN
From: "Yann E. MORIN" <yann.morin@orange.com>
Hello All!
This two-patch series does exactly what it says on the tin.
Regards,
Yann E. MORIN.
The following changes since commit 1bb4a955fa6acceba3b6aab2e7f5ee2e3bbabc9e
package/python3: security bump to 3.13.5 (2025-06-22 15:30:57 +0200)
are available as patches in this mail series,
for you to apply patches up to 1fa681c118f4041317be9836e2031c3f636af1d2
boot/syslinux: add option to install pxelinux (2025-06-25 11:54:34 +0200)
----------------------------------------------------------------
Yann E. MORIN (2):
boot/syslinux: fix install with top-level parallel build
boot/syslinux: add option to install pxelinux
boot/syslinux/Config.in | 16 ++++++++++++++--
boot/syslinux/syslinux.mk | 18 +++++++++++++++---
2 files changed, 29 insertions(+), 5 deletions(-)
--
____________
.-----------------.--------------------: _ :------------------.
| Yann E. MORIN | Real-Time Embedded | __/ ) | /"\ ASCII RIBBON |
| | Software Designer | _/ - /' | \ / CAMPAIGN |
| +33 638.411.245 '--------------------: (_ `--, | X AGAINST |
| yann.morin (at) orange.com |_=" ,--' | / \ HTML MAIL |
'--------------------------------------:______/_____:------------------'
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build
2025-06-25 10:01 [Buildroot] [PATCH 0/2] boot/syslinux: fix top-level parallel builds, add lpxelinux yann.morin
@ 2025-06-25 10:01 ` yann.morin
2025-06-29 10:16 ` Julien Olivain via buildroot
` (2 more replies)
2025-06-25 10:01 ` [Buildroot] [PATCH 2/2] boot/syslinux: add option to install pxelinux yann.morin
1 sibling, 3 replies; 8+ messages in thread
From: yann.morin @ 2025-06-25 10:01 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin
From: "Yann E. MORIN" <yann.morin@orange.com>
syslinux is... special. It is a target package, but it is installed in
HOST_DIR *in the target install commands*: in addition to the boot files
that run on the target, syslinux installs a set of host tools that are
to be used at build time (e.g. extlinux, to prepare bootable media, like
an iso96660 image). Then, from HOST_DIR, the actual boot files are
copied into BINARIES_DIR (i.e. images/); we do it that way because the
boot files are scattered about everywhere in the build tree, while they
are all packed together in a single directory once installed.
However, there is no dependency between the target and image install
steps. So, when using top-level parallel builds, there is no guarantee
that the target install commands are finished before the image install
commands are started.
We fix that by first installing into a temporary location, as part of
the build step, and by then copying from there as part of the install
step. This ensures that the boot files are easily available, without
needing a dependency on the target install step, that we can't express.
Note that we do not change the actual installation into HOST_DIR: it can
be set up differently that our temporary location, and we do not want
to duplicate that setup here (it's going to diverge over time).
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
---
boot/syslinux/syslinux.mk | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
index cc52c49aee..084acc398e 100644
--- a/boot/syslinux/syslinux.mk
+++ b/boot/syslinux/syslinux.mk
@@ -56,6 +56,11 @@ SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP
# syslinux build system has no convenient way to pass CFLAGS,
# and the internal zlib should take precedence so -I shouldn't
# be used.
+# Install in a temporary location that eases final install into
+# images/ (see corresponding command, below).
+# Repeat the target, otherwise syslinux will try to build everything
+# Repeat LD (and CC) as it happens that some binaries are linked at
+# install-time.
define SYSLINUX_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) \
ASCIIDOC_OK=-1 \
@@ -70,6 +75,10 @@ define SYSLINUX_BUILD_CMDS
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
PYTHON=$(HOST_DIR)/bin/python3 \
$(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET)
+ $(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(@D)/br-root.temp \
+ CC="$(TARGET_CC)" \
+ LD="$(TARGET_LD)" \
+ -C $(@D) $(SYSLINUX_TARGET) install
endef
# While the actual bootloader is compiled for the target, several
@@ -77,6 +86,8 @@ endef
# Repeat the target, otherwise syslinux will try to build everything
# Repeat LD (and CC) as it happens that some binaries are linked at
# install-time.
+# Don't use the temporarily-installed br-root.temp: HOST_DIR may be setup
+# differently (merged usr, merged bin...)
define SYSLINUX_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \
CC="$(TARGET_CC)" \
@@ -99,15 +110,15 @@ SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.
SYSLINUX_C32 = $(call qstrip,$(BR2_TARGET_SYSLINUX_C32))
-# We install the c32 modules from the host-installed tree, where they
-# are all neatly installed in a single location, while they are
+# We install the c32 modules from the temporarily installed tree, where
+# they are all neatly installed in a single location, while they are
# scattered around everywhere in the build tree.
define SYSLINUX_INSTALL_IMAGES_CMDS
for i in $(SYSLINUX_IMAGES-y); do \
$(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/syslinux/$${i##*/}; \
done
for i in $(SYSLINUX_C32); do \
- $(INSTALL) -D -m 0755 $(HOST_DIR)/share/syslinux/$${i} \
+ $(INSTALL) -D -m 0755 $(@D)/br-root.temp/usr/share/syslinux/$${i} \
$(BINARIES_DIR)/syslinux/$${i}; \
done
endef
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] boot/syslinux: add option to install pxelinux
2025-06-25 10:01 [Buildroot] [PATCH 0/2] boot/syslinux: fix top-level parallel builds, add lpxelinux yann.morin
2025-06-25 10:01 ` [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build yann.morin
@ 2025-06-25 10:01 ` yann.morin
1 sibling, 0 replies; 8+ messages in thread
From: yann.morin @ 2025-06-25 10:01 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin
From: "Yann E. MORIN" <yann.morin@orange.com>
lpxelinux is like pxelinux, except it allows retrieving the files for
the kernel (with the KERNEL directive) and initrd (the path to initrd=
in the APPEND directive) from FTP or HTTP, rather than just from TFTP.
Using HTTP or FTP is musch faster than TFTP, so the boot time for big
kernels or big initrds is much shorter than with TFTP.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
---
boot/syslinux/Config.in | 16 ++++++++++++++--
boot/syslinux/syslinux.mk | 1 +
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/boot/syslinux/Config.in b/boot/syslinux/Config.in
index 2891eae013..66baf921d3 100644
--- a/boot/syslinux/Config.in
+++ b/boot/syslinux/Config.in
@@ -4,6 +4,7 @@ menuconfig BR2_TARGET_SYSLINUX
# Make sure at least one of the flavors is installed
select BR2_TARGET_SYSLINUX_ISOLINUX \
if !BR2_TARGET_SYSLINUX_PXELINUX && \
+ !BR2_TARGET_SYSLINUX_LPXELINUX && \
!BR2_TARGET_SYSLINUX_MBR && \
!BR2_TARGET_SYSLINUX_EFI
select BR2_PACKAGE_UTIL_LINUX
@@ -27,11 +28,22 @@ config BR2_TARGET_SYSLINUX_ISOLINUX
optical media (CDROM, DVD.)
config BR2_TARGET_SYSLINUX_PXELINUX
- bool "install pxelinux"
+ bool "install pxelinux (TFTP-only)"
select BR2_TARGET_SYSLINUX_LEGACY_BIOS
help
Install the legacy-BIOS 'pxelinux' image, to boot off
- the network using PXE.
+ the network using PXE and TFTP.
+
+config BR2_TARGET_SYSLINUX_LPXELINUX
+ bool "install lpxelinux (TFTP, HTTP, FTP)"
+ select BR2_TARGET_SYSLINUX_LEGACY_BIOS
+ help
+ Install the legacy-BIOS 'lpxelinux' image, to boot off
+ the network using PXE, and TFTP, HTTP, or FTP.
+
+ Note: a TFTP server is still required to serve the
+ lpxelinux boot image; HTTP or FTP can only be used
+ by lpxelinux to retrieve the kernel (and initrd...)
config BR2_TARGET_SYSLINUX_MBR
bool "install mbr"
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
index 084acc398e..127f6b3cc1 100644
--- a/boot/syslinux/syslinux.mk
+++ b/boot/syslinux/syslinux.mk
@@ -105,6 +105,7 @@ SYSLINUX_POST_INSTALL_TARGET_HOOKS += SYSLINUX_POST_INSTALL_CLEANUP
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin
+SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_LPXELINUX) += bios/core/lpxelinux.bin
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_MBR) += bios/mbr/mbr.bin
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.efi
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build
2025-06-25 10:01 ` [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build yann.morin
@ 2025-06-29 10:16 ` Julien Olivain via buildroot
2025-06-30 9:28 ` yann.morin
2025-07-04 6:46 ` Thomas Perale via buildroot
2025-07-04 6:48 ` Thomas Perale via buildroot
2 siblings, 1 reply; 8+ messages in thread
From: Julien Olivain via buildroot @ 2025-06-29 10:16 UTC (permalink / raw)
To: yann.morin; +Cc: buildroot
On 25/06/2025 12:01, yann.morin@orange.com wrote:
> From: "Yann E. MORIN" <yann.morin@orange.com>
>
> syslinux is... special. It is a target package, but it is installed in
> HOST_DIR *in the target install commands*: in addition to the boot
> files
> that run on the target, syslinux installs a set of host tools that are
> to be used at build time (e.g. extlinux, to prepare bootable media,
> like
> an iso96660 image). Then, from HOST_DIR, the actual boot files are
> copied into BINARIES_DIR (i.e. images/); we do it that way because the
> boot files are scattered about everywhere in the build tree, while they
> are all packed together in a single directory once installed.
>
> However, there is no dependency between the target and image install
> steps. So, when using top-level parallel builds, there is no guarantee
> that the target install commands are finished before the image install
> commands are started.
>
> We fix that by first installing into a temporary location, as part of
> the build step, and by then copying from there as part of the install
> step. This ensures that the boot files are easily available, without
> needing a dependency on the target install step, that we can't express.
>
> Note that we do not change the actual installation into HOST_DIR: it
> can
> be set up differently that our temporary location, and we do not want
> to duplicate that setup here (it's going to diverge over time).
>
> Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Series applied to master, thanks.
For info, I fixed the commit title of patch #2 (by adding the
missing "l" to lpxelinux).
Do you think it would be worth extending the syslinux test to cover
this new option?
I'm thinking about simply adding BR2_TARGET_SYSLINUX_LPXELINUX=y here:
https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05/support/testing/tests/boot/test_syslinux.py#L23
If yes, could you send a patch doing that please?
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build
2025-06-29 10:16 ` Julien Olivain via buildroot
@ 2025-06-30 9:28 ` yann.morin
2025-06-30 19:16 ` Julien Olivain via buildroot
0 siblings, 1 reply; 8+ messages in thread
From: yann.morin @ 2025-06-30 9:28 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot
Julien, All,
On 2025-06-29 12:16 +0200, Julien Olivain spake thusly:
> On 25/06/2025 12:01, yann.morin@orange.com wrote:
> > From: "Yann E. MORIN" <yann.morin@orange.com>
> > We fix that by first installing into a temporary location, as part of
> > the build step, and by then copying from there as part of the install
> > step. This ensures that the boot files are easily available, without
> > needing a dependency on the target install step, that we can't express.
[--SNIP--]
> Series applied to master, thanks.
> For info, I fixed the commit title of patch #2 (by adding the
> missing "l" to lpxelinux).
Woops, thanks! :-)
> Do you think it would be worth extending the syslinux test to cover
> this new option?
> I'm thinking about simply adding BR2_TARGET_SYSLINUX_LPXELINUX=y here:
> https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05/support/testing/tests/boot/test_syslinux.py#L23
> If yes, could you send a patch doing that please?
I pondered it, but that would only test whether lpxelinux builds on not;
checking that it does work would need a much more complex test. And the
build test is (suposedly) covered by the autobuilders already.
If you think that is still important to add lpxelinux to the runtime
test although it is not actually runtime-tested, then I'll cook up a
patch...
Regards,
Yann E. MORIN.
--
____________
.-----------------.--------------------: _ :------------------.
| Yann E. MORIN | Real-Time Embedded | __/ ) | /"\ ASCII RIBBON |
| | Software Designer | _/ - /' | \ / CAMPAIGN |
| +33 638.411.245 '--------------------: (_ `--, | X AGAINST |
| yann.morin (at) orange.com |_=" ,--' | / \ HTML MAIL |
'--------------------------------------:______/_____:------------------'
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build
2025-06-30 9:28 ` yann.morin
@ 2025-06-30 19:16 ` Julien Olivain via buildroot
0 siblings, 0 replies; 8+ messages in thread
From: Julien Olivain via buildroot @ 2025-06-30 19:16 UTC (permalink / raw)
To: yann.morin; +Cc: buildroot
Hi Yann,
On 30/06/2025 11:28, yann.morin@orange.com wrote:
> Julien, All,
>
> On 2025-06-29 12:16 +0200, Julien Olivain spake thusly:
>> On 25/06/2025 12:01, yann.morin@orange.com wrote:
>> > From: "Yann E. MORIN" <yann.morin@orange.com>
>> > We fix that by first installing into a temporary location, as part of
>> > the build step, and by then copying from there as part of the install
>> > step. This ensures that the boot files are easily available, without
>> > needing a dependency on the target install step, that we can't express.
> [--SNIP--]
>> Series applied to master, thanks.
>> For info, I fixed the commit title of patch #2 (by adding the
>> missing "l" to lpxelinux).
>
> Woops, thanks! :-)
>
>> Do you think it would be worth extending the syslinux test to cover
>> this new option?
>> I'm thinking about simply adding BR2_TARGET_SYSLINUX_LPXELINUX=y here:
>> https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05/support/testing/tests/boot/test_syslinux.py#L23
>> If yes, could you send a patch doing that please?
>
> I pondered it, but that would only test whether lpxelinux builds on
> not;
> checking that it does work would need a much more complex test. And the
> build test is (suposedly) covered by the autobuilders already.
>
> If you think that is still important to add lpxelinux to the runtime
> test although it is not actually runtime-tested, then I'll cook up a
> patch...
Yes, I think I'd like to have it build-tested in test_syslinux.py.
It does not cost much to add it, and it won't cost much in test time.
This way, we'll make sure the option is tested at least weekly or when
a tag is made.
> Regards,
> Yann E. MORIN.
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build
2025-06-25 10:01 ` [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build yann.morin
2025-06-29 10:16 ` Julien Olivain via buildroot
@ 2025-07-04 6:46 ` Thomas Perale via buildroot
2025-07-04 6:48 ` Thomas Perale via buildroot
2 siblings, 0 replies; 8+ messages in thread
From: Thomas Perale via buildroot @ 2025-07-04 6:46 UTC (permalink / raw)
To: yann.morin; +Cc: Thomas Perale, buildroot
In reply of:
> syslinux is... special. It is a target package, but it is installed in
> HOST_DIR *in the target install commands*: in addition to the boot files
> that run on the target, syslinux installs a set of host tools that are
> to be used at build time (e.g. extlinux, to prepare bootable media, like
> an iso96660 image). Then, from HOST_DIR, the actual boot files are
> copied into BINARIES_DIR (i.e. images/); we do it that way because the
> boot files are scattered about everywhere in the build tree, while they
> are all packed together in a single directory once installed.
>
> However, there is no dependency between the target and image install
> steps. So, when using top-level parallel builds, there is no guarantee
> that the target install commands are finished before the image install
> commands are started.
>
> We fix that by first installing into a temporary location, as part of
> the build step, and by then copying from there as part of the install
> step. This ensures that the boot files are easily available, without
> needing a dependency on the target install step, that we can't express.
>
> Note that we do not change the actual installation into HOST_DIR: it can
> be set up differently that our temporary location, and we do not want
> to duplicate that setup here (it's going to diverge over time).
>
> Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Applied to 2025.02.x. Thanks
> ---
> boot/syslinux/syslinux.mk | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
> index cc52c49aee..084acc398e 100644
> --- a/boot/syslinux/syslinux.mk
> +++ b/boot/syslinux/syslinux.mk
> @@ -56,6 +56,11 @@ SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP
> # syslinux build system has no convenient way to pass CFLAGS,
> # and the internal zlib should take precedence so -I shouldn't
> # be used.
> +# Install in a temporary location that eases final install into
> +# images/ (see corresponding command, below).
> +# Repeat the target, otherwise syslinux will try to build everything
> +# Repeat LD (and CC) as it happens that some binaries are linked at
> +# install-time.
> define SYSLINUX_BUILD_CMDS
> $(TARGET_MAKE_ENV) $(MAKE1) \
> ASCIIDOC_OK=-1 \
> @@ -70,6 +75,10 @@ define SYSLINUX_BUILD_CMDS
> LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
> PYTHON=$(HOST_DIR)/bin/python3 \
> $(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET)
> + $(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(@D)/br-root.temp \
> + CC="$(TARGET_CC)" \
> + LD="$(TARGET_LD)" \
> + -C $(@D) $(SYSLINUX_TARGET) install
> endef
>
> # While the actual bootloader is compiled for the target, several
> @@ -77,6 +86,8 @@ endef
> # Repeat the target, otherwise syslinux will try to build everything
> # Repeat LD (and CC) as it happens that some binaries are linked at
> # install-time.
> +# Don't use the temporarily-installed br-root.temp: HOST_DIR may be setup
> +# differently (merged usr, merged bin...)
> define SYSLINUX_INSTALL_TARGET_CMDS
> $(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \
> CC="$(TARGET_CC)" \
> @@ -99,15 +110,15 @@ SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.
>
> SYSLINUX_C32 = $(call qstrip,$(BR2_TARGET_SYSLINUX_C32))
>
> -# We install the c32 modules from the host-installed tree, where they
> -# are all neatly installed in a single location, while they are
> +# We install the c32 modules from the temporarily installed tree, where
> +# they are all neatly installed in a single location, while they are
> # scattered around everywhere in the build tree.
> define SYSLINUX_INSTALL_IMAGES_CMDS
> for i in $(SYSLINUX_IMAGES-y); do \
> $(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/syslinux/$${i##*/}; \
> done
> for i in $(SYSLINUX_C32); do \
> - $(INSTALL) -D -m 0755 $(HOST_DIR)/share/syslinux/$${i} \
> + $(INSTALL) -D -m 0755 $(@D)/br-root.temp/usr/share/syslinux/$${i} \
> $(BINARIES_DIR)/syslinux/$${i}; \
> done
> endef
> --
> 2.34.1
>
> ____________________________________________________________________________________________________________
> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
>
> This message and its attachments may contain confidential or privileged information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
> Thank you.
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build
2025-06-25 10:01 ` [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build yann.morin
2025-06-29 10:16 ` Julien Olivain via buildroot
2025-07-04 6:46 ` Thomas Perale via buildroot
@ 2025-07-04 6:48 ` Thomas Perale via buildroot
2 siblings, 0 replies; 8+ messages in thread
From: Thomas Perale via buildroot @ 2025-07-04 6:48 UTC (permalink / raw)
To: yann.morin; +Cc: Thomas Perale, buildroot
In reply of:
> syslinux is... special. It is a target package, but it is installed in
> HOST_DIR *in the target install commands*: in addition to the boot files
> that run on the target, syslinux installs a set of host tools that are
> to be used at build time (e.g. extlinux, to prepare bootable media, like
> an iso96660 image). Then, from HOST_DIR, the actual boot files are
> copied into BINARIES_DIR (i.e. images/); we do it that way because the
> boot files are scattered about everywhere in the build tree, while they
> are all packed together in a single directory once installed.
>
> However, there is no dependency between the target and image install
> steps. So, when using top-level parallel builds, there is no guarantee
> that the target install commands are finished before the image install
> commands are started.
>
> We fix that by first installing into a temporary location, as part of
> the build step, and by then copying from there as part of the install
> step. This ensures that the boot files are easily available, without
> needing a dependency on the target install step, that we can't express.
>
> Note that we do not change the actual installation into HOST_DIR: it can
> be set up differently that our temporary location, and we do not want
> to duplicate that setup here (it's going to diverge over time).
>
> Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Applied to 2025.05.x. Thanks
> ---
> boot/syslinux/syslinux.mk | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
> index cc52c49aee..084acc398e 100644
> --- a/boot/syslinux/syslinux.mk
> +++ b/boot/syslinux/syslinux.mk
> @@ -56,6 +56,11 @@ SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP
> # syslinux build system has no convenient way to pass CFLAGS,
> # and the internal zlib should take precedence so -I shouldn't
> # be used.
> +# Install in a temporary location that eases final install into
> +# images/ (see corresponding command, below).
> +# Repeat the target, otherwise syslinux will try to build everything
> +# Repeat LD (and CC) as it happens that some binaries are linked at
> +# install-time.
> define SYSLINUX_BUILD_CMDS
> $(TARGET_MAKE_ENV) $(MAKE1) \
> ASCIIDOC_OK=-1 \
> @@ -70,6 +75,10 @@ define SYSLINUX_BUILD_CMDS
> LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
> PYTHON=$(HOST_DIR)/bin/python3 \
> $(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET)
> + $(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(@D)/br-root.temp \
> + CC="$(TARGET_CC)" \
> + LD="$(TARGET_LD)" \
> + -C $(@D) $(SYSLINUX_TARGET) install
> endef
>
> # While the actual bootloader is compiled for the target, several
> @@ -77,6 +86,8 @@ endef
> # Repeat the target, otherwise syslinux will try to build everything
> # Repeat LD (and CC) as it happens that some binaries are linked at
> # install-time.
> +# Don't use the temporarily-installed br-root.temp: HOST_DIR may be setup
> +# differently (merged usr, merged bin...)
> define SYSLINUX_INSTALL_TARGET_CMDS
> $(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \
> CC="$(TARGET_CC)" \
> @@ -99,15 +110,15 @@ SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.
>
> SYSLINUX_C32 = $(call qstrip,$(BR2_TARGET_SYSLINUX_C32))
>
> -# We install the c32 modules from the host-installed tree, where they
> -# are all neatly installed in a single location, while they are
> +# We install the c32 modules from the temporarily installed tree, where
> +# they are all neatly installed in a single location, while they are
> # scattered around everywhere in the build tree.
> define SYSLINUX_INSTALL_IMAGES_CMDS
> for i in $(SYSLINUX_IMAGES-y); do \
> $(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/syslinux/$${i##*/}; \
> done
> for i in $(SYSLINUX_C32); do \
> - $(INSTALL) -D -m 0755 $(HOST_DIR)/share/syslinux/$${i} \
> + $(INSTALL) -D -m 0755 $(@D)/br-root.temp/usr/share/syslinux/$${i} \
> $(BINARIES_DIR)/syslinux/$${i}; \
> done
> endef
> --
> 2.34.1
>
> ____________________________________________________________________________________________________________
> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
>
> This message and its attachments may contain confidential or privileged information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
> Thank you.
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-07-04 6:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25 10:01 [Buildroot] [PATCH 0/2] boot/syslinux: fix top-level parallel builds, add lpxelinux yann.morin
2025-06-25 10:01 ` [Buildroot] [PATCH 1/2] boot/syslinux: fix install with top-level parallel build yann.morin
2025-06-29 10:16 ` Julien Olivain via buildroot
2025-06-30 9:28 ` yann.morin
2025-06-30 19:16 ` Julien Olivain via buildroot
2025-07-04 6:46 ` Thomas Perale via buildroot
2025-07-04 6:48 ` Thomas Perale via buildroot
2025-06-25 10:01 ` [Buildroot] [PATCH 2/2] boot/syslinux: add option to install pxelinux yann.morin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox