Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] syslinux: Add patch to build with the latest gnu-efi release
@ 2017-06-09 10:20 Benoît Allard
  2017-06-11 13:37 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Benoît Allard @ 2017-06-09 10:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Beno?t Allard <benoit.allard@greenbone.net>
---
 ...definition-is-now-part-of-the-exports-of-.patch | 37 ++++++++++++++++++++++
 ..._BASE_CODE-struct-has-been-renamed-to-EFI.patch | 30 ++++++++++++++++++
 ...longjump-calls-to-fit-the-new-declaration.patch | 37 ++++++++++++++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 boot/syslinux/0007-The-VPrint-definition-is-now-part-of-the-exports-of-.patch
 create mode 100644 boot/syslinux/0008-The-EFI_PXE_BASE_CODE-struct-has-been-renamed-to-EFI.patch
 create mode 100644 boot/syslinux/0009-Update-the-longjump-calls-to-fit-the-new-declaration.patch

diff --git a/boot/syslinux/0007-The-VPrint-definition-is-now-part-of-the-exports-of-.patch b/boot/syslinux/0007-The-VPrint-definition-is-now-part-of-the-exports-of-.patch
new file mode 100644
index 0000000..f2a578a
--- /dev/null
+++ b/boot/syslinux/0007-The-VPrint-definition-is-now-part-of-the-exports-of-.patch
@@ -0,0 +1,37 @@
+From 39274503292a6003b1b0c93f694e34f11e85ea44 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
+Date: Fri, 9 Jun 2017 11:55:14 +0200
+Subject: [PATCH 1/3] The VPrint definition is now part of the exports of
+ gnu-efi
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Beno?t Allard <benoit.allard@greenbone.net>
+---
+ efi/fio.h | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/efi/fio.h b/efi/fio.h
+index 65fff8d..a1bfe68 100644
+--- a/efi/fio.h
++++ b/efi/fio.h
+@@ -11,15 +11,6 @@
+ #define MAX_EFI_ARGS		64
+ #define WS(c16)         (c16 == L' ' || c16 == CHAR_TAB)
+ 
+-/* VPrint is not in export declarations in gnu-efi lib yet
+- * although it is a global function; declare it here
+- */
+-extern UINTN
+-VPrint (
+-    IN CHAR16   *fmt,
+-    va_list     args
+-    );
+-
+ extern EFI_STATUS efi_errno;
+ 
+ void efi_memcpy(unsigned char *dst, unsigned char *src, size_t len);
+-- 
+2.1.4
+
diff --git a/boot/syslinux/0008-The-EFI_PXE_BASE_CODE-struct-has-been-renamed-to-EFI.patch b/boot/syslinux/0008-The-EFI_PXE_BASE_CODE-struct-has-been-renamed-to-EFI.patch
new file mode 100644
index 0000000..d1cf2b9
--- /dev/null
+++ b/boot/syslinux/0008-The-EFI_PXE_BASE_CODE-struct-has-been-renamed-to-EFI.patch
@@ -0,0 +1,30 @@
+From 6e25d11a062ef49c8add24476cf1bb74aa67e906 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
+Date: Fri, 9 Jun 2017 11:56:27 +0200
+Subject: [PATCH 2/3] The EFI_PXE_BASE_CODE struct has been renamed to
+ EFI_PXE_BASE_CODE_PROTOCOL
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Beno?t Allard <benoit.allard@greenbone.net>
+---
+ efi/pxe.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/efi/pxe.c b/efi/pxe.c
+index 6e59109..8060dff 100644
+--- a/efi/pxe.c
++++ b/efi/pxe.c
+@@ -90,7 +90,7 @@ struct embedded_dhcp_options embedded_dhcp_options =
+ void net_parse_dhcp(void)
+ {
+     EFI_PXE_BASE_CODE_MODE *mode;
+-    EFI_PXE_BASE_CODE *bc;
++    EFI_PXE_BASE_CODE_PROTOCOL *bc;
+     unsigned int pkt_len = sizeof(EFI_PXE_BASE_CODE_PACKET);
+     EFI_STATUS status;
+     uint8_t hardlen;
+-- 
+2.1.4
+
diff --git a/boot/syslinux/0009-Update-the-longjump-calls-to-fit-the-new-declaration.patch b/boot/syslinux/0009-Update-the-longjump-calls-to-fit-the-new-declaration.patch
new file mode 100644
index 0000000..5c3cce2
--- /dev/null
+++ b/boot/syslinux/0009-Update-the-longjump-calls-to-fit-the-new-declaration.patch
@@ -0,0 +1,37 @@
+From db49dbac8a0c563fb6d07c348873e8ae50fee2a6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
+Date: Fri, 9 Jun 2017 11:59:43 +0200
+Subject: [PATCH 3/3] Update the longjump calls to fit the new declaration
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Beno?t Allard <benoit.allard@greenbone.net>
+---
+ efi/main.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/efi/main.c b/efi/main.c
+index fd95f5c..b5383cd 100644
+--- a/efi/main.c
++++ b/efi/main.c
+@@ -10,7 +10,6 @@
+ #include <syslinux/firmware.h>
+ #include <syslinux/linux.h>
+ #include <sys/ansi.h>
+-#include <setjmp.h>
+ 
+ #include "efi.h"
+ #include "fio.h"
+@@ -31,7 +30,7 @@ uint32_t timer_irq;
+ __export uint8_t KbdMap[256];
+ char aux_seg[256];
+ 
+-static jmp_buf load_error_buf;
++static jmp_buf *load_error_buf;
+ 
+ EFI_HANDLE image_handle, image_device_handle, mnpsb_handle;
+ 
+-- 
+2.1.4
+
-- 
2.1.4

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

* [Buildroot] [PATCH] syslinux: Add patch to build with the latest gnu-efi release
  2017-06-09 10:20 [Buildroot] [PATCH] syslinux: Add patch to build with the latest gnu-efi release Benoît Allard
@ 2017-06-11 13:37 ` Thomas Petazzoni
  2017-06-12 13:20   ` Benoît Allard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-06-11 13:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  9 Jun 2017 12:20:38 +0200, Beno?t Allard wrote:
> Signed-off-by: Beno?t Allard <benoit.allard@greenbone.net>
> ---
>  ...definition-is-now-part-of-the-exports-of-.patch | 37 ++++++++++++++++++++++
>  ..._BASE_CODE-struct-has-been-renamed-to-EFI.patch | 30 ++++++++++++++++++
>  ...longjump-calls-to-fit-the-new-declaration.patch | 37 ++++++++++++++++++++++
>  3 files changed, 104 insertions(+)
>  create mode 100644 boot/syslinux/0007-The-VPrint-definition-is-now-part-of-the-exports-of-.patch
>  create mode 100644 boot/syslinux/0008-The-EFI_PXE_BASE_CODE-struct-has-been-renamed-to-EFI.patch
>  create mode 100644 boot/syslinux/0009-Update-the-longjump-calls-to-fit-the-new-declaration.patch

I've applied your patch. It does fix some build issues with gnu-efi.
However here the build of syslinux doesn't complete successfully. With
the following defconfig:

BR2_x86_64=y
BR2_x86_core2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-x86-64-core2-full-2017.02-1096-g54a5333.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_5=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_SYSLINUX=y
BR2_TARGET_SYSLINUX_ISOLINUX=y
BR2_TARGET_SYSLINUX_EFI=y

I get:

/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-gcc /home/thomas/projets/buildroot/output/build/syslinux-6.03/efi/wrapper.c -o wrapper
/home/thomas/projets/buildroot/output/build/syslinux-6.03/efi64/efi/wrapper syslinux.so syslinux.efi
make[5]: /home/thomas/projets/buildroot/output/build/syslinux-6.03/efi64/efi/wrapper: Command not found

The problem is that it builds a tool called "wrapper" with the
cross-compiler, and then tries to run it on the host. It might work if
your host and target use the same architecture and libc. Here, I'm
using the same architecture (x86-64) but not the same libc (glibc for
the host, uclibc for the target).

Do you think you could have a look?

> +Subject: [PATCH 1/3] The VPrint definition is now part of the exports of
> + gnu-efi

Nit: please use 'git format-patch -N' to generate your patches. This
will generate patches with [PATCH] as a prefix instead of [PATCH X/Y].
Indeed, the 1/3, 2/3 and 3/3 in your patches don't make sense: your
patches are patches 7, 8 and 9! To avoid this, in Buildroot, we have
decided to not add numbering inside the patches themselves.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] syslinux: Add patch to build with the latest gnu-efi release
  2017-06-11 13:37 ` Thomas Petazzoni
@ 2017-06-12 13:20   ` Benoît Allard
  2017-06-12 13:32     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Benoît Allard @ 2017-06-12 13:20 UTC (permalink / raw)
  To: buildroot

On Sun, 11 Jun 2017 15:37:50 +0200
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Hello,
> 
> On Fri,  9 Jun 2017 12:20:38 +0200, Beno?t Allard wrote:
> > Signed-off-by: Beno?t Allard <benoit.allard@greenbone.net>
> > ---
> >  ...definition-is-now-part-of-the-exports-of-.patch | 37
> > ++++++++++++++++++++++ ..._BASE_CODE-struct-has-been-renamed-to-EFI.patch
> > | 30
> > ++++++++++++++++++ ...longjump-calls-to-fit-the-new-declaration.patch
> > | 37 ++++++++++++++++++++++ 3 files changed, 104 insertions(+)
> > create mode 100644
> > boot/syslinux/0007-The-VPrint-definition-is-now-part-of-the-exports-of-.patch
> > create mode 100644
> > boot/syslinux/0008-The-EFI_PXE_BASE_CODE-struct-has-been-renamed-to-EFI.patch
> > create mode 100644
> > boot/syslinux/0009-Update-the-longjump-calls-to-fit-the-new-declaration.patch
> 
> I've applied your patch. It does fix some build issues with gnu-efi.

Thanks about that !

> However here the build of syslinux doesn't complete successfully. With
> the following defconfig:
> 
> BR2_x86_64=y
> BR2_x86_core2=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-x86-64-core2-full-2017.02-1096-g54a5333.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_GCC_5=y
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
> BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
> # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
> BR2_TOOLCHAIN_EXTERNAL_CXX=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> # BR2_TARGET_ROOTFS_TAR is not set
> BR2_TARGET_SYSLINUX=y
> BR2_TARGET_SYSLINUX_ISOLINUX=y
> BR2_TARGET_SYSLINUX_EFI=y
> 
> I get:
> 
> /home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-gcc /home/thomas/projets/buildroot/output/build/syslinux-6.03/efi/wrapper.c
> -o
> wrapper /home/thomas/projets/buildroot/output/build/syslinux-6.03/efi64/efi/wrapper
> syslinux.so syslinux.efi
> make[5]: /home/thomas/projets/buildroot/output/build/syslinux-6.03/efi64/efi/wrapper:
> Command not found
> 
> The problem is that it builds a tool called "wrapper" with the
> cross-compiler, and then tries to run it on the host. It might work if
> your host and target use the same architecture and libc. Here, I'm
> using the same architecture (x86-64) but not the same libc (glibc for
> the host, uclibc for the target).
> 
> Do you think you could have a look?

I just sent a patch about that. Thanks for noticing, and reporting the
issue.

> 
> > +Subject: [PATCH 1/3] The VPrint definition is now part of the
> > exports of
> > + gnu-efi
> 
> Nit: please use 'git format-patch -N' to generate your patches. This
> will generate patches with [PATCH] as a prefix instead of [PATCH X/Y].
> Indeed, the 1/3, 2/3 and 3/3 in your patches don't make sense: your
> patches are patches 7, 8 and 9! To avoid this, in Buildroot, we have
> decided to not add numbering inside the patches themselves.
> 

Maybe it would make sense to add the '-N' to the example command-lines
in the manual ? ;) ( That would be section 21.5.2 and 21.5.4)

Thanks !
Ben.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170612/4e925a6a/attachment.asc>

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

* [Buildroot] [PATCH] syslinux: Add patch to build with the latest gnu-efi release
  2017-06-12 13:20   ` Benoît Allard
@ 2017-06-12 13:32     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-06-12 13:32 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 12 Jun 2017 15:20:32 +0200, Beno?t Allard wrote:

> > The problem is that it builds a tool called "wrapper" with the
> > cross-compiler, and then tries to run it on the host. It might work if
> > your host and target use the same architecture and libc. Here, I'm
> > using the same architecture (x86-64) but not the same libc (glibc for
> > the host, uclibc for the target).
> > 
> > Do you think you could have a look?  
> 
> I just sent a patch about that. Thanks for noticing, and reporting the
> issue.

Thanks, I'll have a look.

> > Nit: please use 'git format-patch -N' to generate your patches. This
> > will generate patches with [PATCH] as a prefix instead of [PATCH X/Y].
> > Indeed, the 1/3, 2/3 and 3/3 in your patches don't make sense: your
> > patches are patches 7, 8 and 9! To avoid this, in Buildroot, we have
> > decided to not add numbering inside the patches themselves.
> >   
> 
> Maybe it would make sense to add the '-N' to the example command-lines
> in the manual ? ;) ( That would be section 21.5.2 and 21.5.4)

No, because those sections are about formatting patches for Buildroot,
not patches for packages.

But it should indeed be explained somewhere in the manual, i.e in
https://buildroot.org/downloads/manual/manual.html#patch-policy.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-06-12 13:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 10:20 [Buildroot] [PATCH] syslinux: Add patch to build with the latest gnu-efi release Benoît Allard
2017-06-11 13:37 ` Thomas Petazzoni
2017-06-12 13:20   ` Benoît Allard
2017-06-12 13:32     ` Thomas Petazzoni

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