Skip to contentSkip to conversation

Bump and improve syslinux (branch yem/syslinux)

PATCH Superseded Yann E. MORIN 3 participants 13 messages Apr 29, 2014 – Apr 30, 2014

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Bump and improve syslinux (branch yem/syslinux)

From: "Yann E. MORIN" <[email protected]>

Hello All!

Here are a few patches to bump and enhance syslinux:
- patches 1..4: preparatory fixing and cleanup patches
- patches 5..6: new pacakges, dependency of the new syslinux
- patch 7 : actual syslinux bump
- patches 8..9: new options to install new types of blobs

To be noted, the syslinx build system is, well, a bit weird, to say the least. There is I hope extensive-enough information about this in the bump-patch. Please pay it a bit of attention, it is really convoluted, and would benefit from some in-depth review.

Thanks to Frank for his preliminary work on ucl and upx, and to Thomas L. whose extlinux patch prompted me to look at syslinux. ;-)

Changes v1 -> v2:
- explain the need for an ia32 compiler (Arnout)
- make the image selection a choice (Arnout)
- improve upx commit log (Arnout)
- typoes (Arnout)
- improve help entry for the mbr option

Regards,
Yann E. MORIN.

The following changes since commit a72b73852568227ee948a380c720756fbbdbec46:

upstream glibc 2.18/2.19 works fine with microblaze (2014-04-28 22:16:37 +0200)

are available in the git repository at:

git://gitorious.org/buildroot/buildroot.git

for you to fetch changes up to 8643aef1dfbf257e6cd7a0721d4cfd9f9e3a6dea:

boot/syslinux: add an option to install an MBR blob (2014-04-29 18:41:59 +0200)

----------------------------------------------------------------
Frank Hunleth (2):
package/ucl: new package
package/upx: new package

Yann E. MORIN (7):
boot/syslinux: needs an ia32-capable compiler boot/syslinux: prepare to install non-core images boot/syslinux: make the sub-options a choice boot/syslinux: rewrite options prompts boot/syslinux: bump version
boot/syslinux: add option to install the EFI image boot/syslinux: add an option to install an MBR blob

 boot/syslinux/Config.in                            | 39 ++++++++++++++---
 .../syslinux-000-user-headers-from-sysroot.patch   | 37 ++++++++++++++++
 boot/syslinux/syslinux.mk                          | 50 ++++++++++++++++++----
 package/ucl/ucl.mk                                 | 12 ++++++
 package/upx/upx.mk                                 | 28 ++++++++++++
 5 files changed, 152 insertions(+), 14 deletions(-)
 create mode 100644 boot/syslinux/syslinux-000-user-headers-from-sysroot.patch
 create mode 100644 package/ucl/ucl.mk
 create mode 100644 package/upx/upx.mk
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/9 boot/syslinux: needs an ia32-capable compiler

From: "Yann E. MORIN" <[email protected]>

The pxelinux and isolionux images are 32-bit binaries, so we need a compiler that can generate them (ie. a compiler that understands -m32).

Cc Frank Hunleth <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

---
Changes v1 -> v2:
- explain why we need it (Arnout)

---
 boot/syslinux/Config.in | 1 +
 1 file changed, 1 insertion(+)
boot/syslinux/Config.in +1 -0
index 2c39e65..5b1122d 100644
@@ -1,6 +1,7 @@
 config BR2_TARGET_SYSLINUX
 	bool "syslinux"
 	depends on BR2_i386 || BR2_x86_64
+	select BR2_HOSTARCH_NEEDS_IA32_COMPILER
 	help
 	  The syslinux bootloader for x86 systems.
 	  This includes: syslinux, pxelinux, extlinux.
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH v2 2/9 boot/syslinux: prepare to install non-core images

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Currently, we hard-code the path to the images we install, and expect them to be from the core/ sub-dir.

Not all images we can install are located in core/. For example, the efi boot images (to come later) are not located in core/.

Prepare the upcoming installation of extlinux by not expecting images are in core/.

Cc Thomas Lundquist <[email protected]>
Cc Frank Hunleth <[email protected]>
---
 boot/syslinux/syslinux.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
boot/syslinux/syslinux.mk +3 -3
index 0faa81f..a1eb394 100644
@@ -28,12 +28,12 @@ define SYSLINUX_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) INSTALLROOT=$(HOST_DIR) install
 endef
 
-SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += isolinux.bin
-SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += pxelinux.bin
+SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += core/isolinux.bin
+SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += core/pxelinux.bin
 
 define SYSLINUX_INSTALL_IMAGES_CMDS
 	for i in $(SYSLINUX_IMAGES-y); do \
-		$(INSTALL) -D -m 0755 $(@D)/core/$$i $(BINARIES_DIR)/$$i; \
+		$(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/$${i##*/}; \
 	done
 endef
 
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH v2 3/9 boot/syslinux: make the sub-options a choice

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Currently it is possible to choose either, both or none of the pxelinux or isolinux images.

But it does not make sense to build none or both, as we need at least one to boot the target, and the target can use more than one.

So, we need one and only one image to be selected at once.

Cc Thomas Lundquist <[email protected]>
Cc Frank Hunleth <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

---
Changes v1 -> v2:
- make it a choice, not a forced-bool (Arnout)

---
 boot/syslinux/Config.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
boot/syslinux/Config.in +5 -2
index 5b1122d..f7525b8 100644
@@ -10,12 +10,15 @@ config BR2_TARGET_SYSLINUX
 
 if BR2_TARGET_SYSLINUX
 
+choice
+	bool "Image to install"
+
 config BR2_TARGET_SYSLINUX_ISOLINUX
 	bool "Install isolinux"
-	default y
 
 config BR2_TARGET_SYSLINUX_PXELINUX
 	bool "Install pxelinux"
-	default y
+
+endchoice
 
 endif
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH v2 4/9 boot/syslinux: rewrite options prompts

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Rewrite the options prompt in preparation to adding a new type of image to install.

Add help entries to each option, too.

---
Changes v1 -> v2:
- typo s/medias/media/ (Arnout)
- s/legacy BIOS/legacy-BIOS/ to remove ambiguity (Arnout)

---
 boot/syslinux/Config.in | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
boot/syslinux/Config.in +9 -3
index f7525b8..7263128 100644
@@ -14,11 +14,17 @@ choice
 	bool "Image to install"
 
 config BR2_TARGET_SYSLINUX_ISOLINUX
-	bool "Install isolinux"
+	bool "isolinux"
+	help
+	  Install the legacy-BIOS 'isolinux' image, to boot off
+	  optical media (CDROM, DVD.)
 
 config BR2_TARGET_SYSLINUX_PXELINUX
-	bool "Install pxelinux"
+	bool "pxelinux"
+	help
+	  Install the legacy-BIOS 'pxelinux' image, to boot off
+	  the network using PXE.
 
 endchoice
 
-endif
+endif # BR2_TARGET_SYSLINUX
Signature · 1 line
1.8.3.2
#5 lore raw

PATCH v2 5/9 package/ucl: new package

In reply to Yann E. MORIN

From: Frank Hunleth <[email protected]>

UCL implements a number of compression algorithms that achieve an excellent compression ratio while allowing *very* fast decompression. Decompression requires no additional memory.

This is needed for UPX, which is needed for syslinux 6.x.

[yann.morin.1998 at free.fr: don't add a menuconfig entry, since it
currently is for internal use only]

---
 package/ucl/ucl.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 package/ucl/ucl.mk
package/ucl/ucl.mk new file +12 -0
new file mode 100644
index 0000000..225ad7c
@@ -0,0 +1,12 @@
+################################################################################
+#
+# ucl
+#
+################################################################################
+
+UCL_VERSION = 1.03
+UCL_SITE = http://www.oberhumer.com/opensource/ucl/download/
+UCL_LICENSE = GPLv2+
+UCL_LICENSE_FILES = COPYING
+
+$(eval $(host-autotools-package))
Signature · 1 line
1.8.3.2
#6 lore raw

PATCH v2 6/9 package/upx: new package

In reply to Yann E. MORIN

From: Frank Hunleth <[email protected]>

UPX is a free, portable, extendable, high-performance executable packer for several executable formats.

This is needed for syslinux 6.x.

Note: upx is a host-only package. Although it supports quite a few target architectures, the only use so far wil be syslinux, which already has an x86-on-x86 requirement anyway. So we currently do not care to have target-dependencies on host-upx.

[yann.morin.1998 at free.fr: builds fine in parallel; fix build to
locate libucl; fix installation; don't add a menuconfig entry]

---
Changes v1 -> v2:
- slightly improve on the commit log about host <-> target architectutre limitations (Arnout)

---
 package/upx/upx.mk | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/upx/upx.mk
package/upx/upx.mk new file +28 -0
new file mode 100644
index 0000000..a039376
@@ -0,0 +1,28 @@
+################################################################################
+#
+# upx
+#
+################################################################################
+
+UPX_VERSION = 3.91
+UPX_SITE = http://upx.sourceforge.net/download/
+UPX_SOURCE = upx-$(UPX_VERSION)-src.tar.bz2
+UPX_LICENSE = GPLv2+
+UPX_LICENSE_FILES = COPYING
+
+HOST_UPX_DEPENDENCIES = host-ucl
+
+# We need to specify all, otherwise the default target only prints a message
+# stating to "please choose a target for 'make'"... :-(
+define HOST_UPX_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) CPPFLAGS="$(HOST_CPPFLAGS)" \
+	    LDFLAGS="$(HOST_LDFLAGS)" UPX_UCLDIR=$(HOST_DIR)/usr \
+	    -C $(@D) all
+endef
+
+# UPX has no install procedure, so install it manually.
+define HOST_UPX_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/upx.out $(HOST_DIR)/usr/bin/upx
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH v2 7/9 boot/syslinux: bump version

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

This new version has a very, very weird build system. There are different images that syslinux can now build:
- the plain legacy-bios images we already supported previously
- two new EFI32 and EFI64 applications

To build one or the other, the Makefile accepts one or more of:

    make (bios|efi32|efi64)

Specify all of them, and it builds all. Specify 'install', and it installs all of them, as one may expect.

Still a regular behaviour, is to build only a subset (down to one):
make bios <-- builds just the legacy-bios images
make efi32 bios <-- builds just the legacy-bios and efi32 images

Where it gets weird is the install procedure. Can you guess how it's done?
Hint: the syslinux guys have invented the multiple-argument parsing in pure Makefiles. To build then install only the bios images, one would do:
make bios
make bios install

Yep, that's it. make bios install. Two arguments, one action.

That makes for some funky workarounds in our install procedure...

'bios' is the only image we support so far, with efi to come in a future patch.

Using MAKE1, as there are issues with highly-parallel builds.

---
 boot/syslinux/syslinux.mk | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)
boot/syslinux/syslinux.mk +24 -8
index a1eb394..bec132f 100644
@@ -4,32 +4,48 @@
 #
 ################################################################################
 
-SYSLINUX_VERSION = 4.07
-SYSLINUX_SOURCE  = syslinux-$(SYSLINUX_VERSION).tar.bz2
-SYSLINUX_SITE    = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux/4.xx/
+SYSLINUX_VERSION = 6.02
+SYSLINUX_SOURCE  = syslinux-$(SYSLINUX_VERSION).tar.xz
+SYSLINUX_SITE    = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux/
 
 SYSLINUX_LICENSE = GPLv2+
 SYSLINUX_LICENSE_FILES = COPYING
 
 SYSLINUX_INSTALL_IMAGES = YES
 
-SYSLINUX_DEPENDENCIES = host-nasm host-util-linux
+SYSLINUX_DEPENDENCIES = host-nasm host-util-linux host-upx
+
+# The syslinux tarball comes with pre-compiled binaries.
+# Since timestamps might not be in the correct order, a rebuild is
+# not always triggered for all the different images.
+# Cleanup the mess even before we attempt a build, so we indeed
+# build everything from source.
+define SYSLINUX_CLEANUP
+	rm -rf $(@D)/bios $(@D)/efi32 $(@D)/efi64
+endef
+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.
 define SYSLINUX_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" AR="$(HOSTAR)" -C $(@D)
+	$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
+	    AR="$(HOSTAR)" -C $(@D) bios
 endef
 
 define SYSLINUX_INSTALL_TARGET_CMDS
 	# While the actual bootloader is compiled for the target, several
 	# utilities for installing the bootloader are meant for the host.
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) INSTALLROOT=$(HOST_DIR) install
+	# Repeat the target, otherwise syslinux will try to build everything
+	# Repeat CC and AR, since syslinux really wants to check them at
+	# install time
+	$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
+	    AR="$(HOSTAR)" INSTALLROOT=$(HOST_DIR) \
+	    -C $(@D) bios install
 endef
 
-SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += core/isolinux.bin
-SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += core/pxelinux.bin
+SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin
+SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin
 
 define SYSLINUX_INSTALL_IMAGES_CMDS
 	for i in $(SYSLINUX_IMAGES-y); do \
Signature · 1 line
1.8.3.2
#8 lore raw

PATCH v2 8/9 boot/syslinux: add option to install the EFI image

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

syslinux can now also build an EFI application.

If the target is 64-bit, we build the 64-bit EFI app, otherwise we build the 32-bit EFI app.

---
Changes v1 -> v2:
- move it in the existing choice (Arnout)

---
 boot/syslinux/Config.in                            | 11 +++++++
 .../syslinux-000-user-headers-from-sysroot.patch   | 37 ++++++++++++++++++++++
 boot/syslinux/syslinux.mk                          | 21 ++++++++++--
 3 files changed, 66 insertions(+), 3 deletions(-)
 create mode 100644 boot/syslinux/syslinux-000-user-headers-from-sysroot.patch
boot/syslinux/Config.in +11 -0
index 7263128..5f0fe97 100644
@@ -10,21 +10,32 @@ config BR2_TARGET_SYSLINUX
 
 if BR2_TARGET_SYSLINUX
 
+config BR2_TARGET_SYSLINUX_LEGACY_BIOS
+	bool
+
 choice
 	bool "Image to install"
 
 config BR2_TARGET_SYSLINUX_ISOLINUX
 	bool "isolinux"
+	select BR2_TARGET_SYSLINUX_LEGACY_BIOS
 	help
 	  Install the legacy-BIOS 'isolinux' image, to boot off
 	  optical media (CDROM, DVD.)
 
 config BR2_TARGET_SYSLINUX_PXELINUX
 	bool "pxelinux"
+	select BR2_TARGET_SYSLINUX_LEGACY_BIOS
 	help
 	  Install the legacy-BIOS 'pxelinux' image, to boot off
 	  the network using PXE.
 
+config BR2_TARGET_SYSLINUX_EFI
+	bool "efi"
+	select BR2_PACKAGE_GNU_EFI
+	help
+	  Install the 'efi' image, to boot from an EFI environment.
+
 endchoice
 
 endif # BR2_TARGET_SYSLINUX
boot/syslinux/syslinux-000-user-headers-from-sysroot.patch new file +37 -0
new file mode 100644
index 0000000..5edf79f
@@ -0,0 +1,37 @@
+efi: look for headers and libs in the sysroot
+
+Currently, syslinux hard-codes search paths to /usr/.... directories.
+This does not play well in cross-compilation.
+
+If $SYSROOT is defined, prepend it to the search paths.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff -durN syslinux-6.02.orig/efi/find-gnu-efi.sh syslinux-6.02/efi/find-gnu-efi.sh
+--- syslinux-6.02.orig/efi/find-gnu-efi.sh	2013-10-13 19:59:03.000000000 +0200
++++ syslinux-6.02/efi/find-gnu-efi.sh	2014-04-22 00:19:23.638483887 +0200
+@@ -9,7 +9,7 @@
+ find_include()
+ {
+     for d in $include_dirs; do
+-	found=`find $d -name efi -type d 2> /dev/null`
++	found=`find $SYSROOT$d -name efi -type d 2> /dev/null`
+ 	if [ "$found"x != "x" ] && [ -e $found/$ARCH/efibind.h ]; then
+ 	    echo $found
+ 	    break;
+@@ -20,12 +20,12 @@
+ find_lib()
+ {
+     for d in $lib_dirs; do
+-	found=`find $d -name libgnuefi.a 2> /dev/null`
++	found=`find $SYSROOT$d -name libgnuefi.a 2> /dev/null`
+ 	if [ "$found"x != "x" ]; then
+ 	    crt_name='crt0-efi-'$ARCH'.o'
+-	    crt=`find $d -name $crt_name 2> /dev/null`
++	    crt=`find $SYSROOT$d -name $crt_name 2> /dev/null`
+ 	    if [ "$crt"x != "x" ]; then
+-		echo $d
++		echo $SYSROOT$d
+ 		break;
+ 	    fi
+ 	fi
boot/syslinux/syslinux.mk +18 -3
index bec132f..bf0bae5 100644
@@ -15,6 +15,20 @@ SYSLINUX_INSTALL_IMAGES = YES
 
 SYSLINUX_DEPENDENCIES = host-nasm host-util-linux host-upx
 
+ifeq ($(BR2_TARGET_SYSLINUX_LEGACY_BIOS),y)
+SYSLINUX_TARGET = bios
+endif
+
+ifeq ($(BR2_TARGET_SYSLINUX_EFI),y)
+ifeq ($(BR2_ARCH_IS_64),y)
+SYSLINUX_EFI_BITS = efi64
+else
+SYSLINUX_EFI_BITS = efi32
+endif # 64-bit
+SYSLINUX_DEPENDENCIES += gnu-efi
+SYSLINUX_TARGET = $(SYSLINUX_EFI_BITS)
+endif # EFI
+
 # The syslinux tarball comes with pre-compiled binaries.
 # Since timestamps might not be in the correct order, a rebuild is
 # not always triggered for all the different images.
@@ -30,7 +44,7 @@ SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP
 # be used.
 define SYSLINUX_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
-	    AR="$(HOSTAR)" -C $(@D) bios
+	    AR="$(HOSTAR)" SYSROOT=$(STAGING_DIR) -C $(@D) $(SYSLINUX_TARGET)
 endef
 
 define SYSLINUX_INSTALL_TARGET_CMDS
@@ -40,12 +54,13 @@ define SYSLINUX_INSTALL_TARGET_CMDS
 	# Repeat CC and AR, since syslinux really wants to check them at
 	# install time
 	$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
-	    AR="$(HOSTAR)" INSTALLROOT=$(HOST_DIR) \
-	    -C $(@D) bios install
+	    AR="$(HOSTAR)" SYSROOT=$(STAGING_DIR) INSTALLROOT=$(HOST_DIR) \
+	    -C $(@D) $(SYSLINUX_TARGET) install
 endef
 
 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_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.efi
 
 define SYSLINUX_INSTALL_IMAGES_CMDS
 	for i in $(SYSLINUX_IMAGES-y); do \
Signature · 1 line
1.8.3.2
#9 lore raw

PATCH v2 9/9 boot/syslinux: add an option to install an MBR blob

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

This MBR blob will look for an active partition, and boot the bootcode present in that partition. This can be used to boot an extlinux-prepared partition.

Cc Thomas Lundquist <[email protected]>
Cc Frank Hunleth <[email protected]>

---
Changes v1 -> v2:
- slightly expand the help entry

---
 boot/syslinux/Config.in   | 8 ++++++++
 boot/syslinux/syslinux.mk | 1 +
 2 files changed, 9 insertions(+)
boot/syslinux/Config.in +8 -0
index 5f0fe97..b6e8673 100644
@@ -30,6 +30,14 @@ config BR2_TARGET_SYSLINUX_PXELINUX
 	  Install the legacy-BIOS 'pxelinux' image, to boot off
 	  the network using PXE.
 
+config BR2_TARGET_SYSLINUX_MBR
+	bool "mbr"
+	select BR2_TARGET_SYSLINUX_LEGACY_BIOS
+	help
+	  Install the legacy BIOS 'mbr' image, to boot off a
+	  local MBR-partition (e.g. prepared with 'extlinux'
+	  or 'syslinux').
+
 config BR2_TARGET_SYSLINUX_EFI
 	bool "efi"
 	select BR2_PACKAGE_GNU_EFI
boot/syslinux/syslinux.mk +1 -0
index bf0bae5..c614b1d 100644
@@ -60,6 +60,7 @@ endef
 
 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_MBR) += bios/mbr/mbr.bin
 SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.efi
 
 define SYSLINUX_INSTALL_IMAGES_CMDS
Signature · 1 line
1.8.3.2
#10 lore raw

v2 cover Bump and improve syslinux (branch yem/syslinux)

In reply to Yann E. MORIN

Yann and all,

Quoted 9 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Hello All!

Here are a few patches to bump and enhance syslinux:
- patches 1..4: preparatory fixing and cleanup patches
- patches 5..6: new pacakges, dependency of the new syslinux
- patch 7 : actual syslinux bump
- patches 8..9: new options to install new types of blobs

This series works for me (MBR option):

Thanks,
Frank

Quoted 63 lines

To be noted, the syslinx build system is, well, a bit weird, to say the least. There is I hope extensive-enough information about this in the bump-patch. Please pay it a bit of attention, it is really convoluted, and would benefit from some in-depth review.

Thanks to Frank for his preliminary work on ucl and upx, and to Thomas L. whose extlinux patch prompted me to look at syslinux. ;-)

Changes v1 -> v2:
- explain the need for an ia32 compiler (Arnout)
- make the image selection a choice (Arnout)
- improve upx commit log (Arnout)
- typoes (Arnout)
- improve help entry for the mbr option

Regards,
Yann E. MORIN.

The following changes since commit a72b73852568227ee948a380c720756fbbdbec46:

upstream glibc 2.18/2.19 works fine with microblaze (2014-04-28 22:16:37 +0200)

are available in the git repository at:

git://gitorious.org/buildroot/buildroot.git

for you to fetch changes up to 8643aef1dfbf257e6cd7a0721d4cfd9f9e3a6dea:

boot/syslinux: add an option to install an MBR blob (2014-04-29 18:41:59 +0200)

----------------------------------------------------------------
Frank Hunleth (2):
package/ucl: new package
package/upx: new package

Yann E. MORIN (7):
boot/syslinux: needs an ia32-capable compiler boot/syslinux: prepare to install non-core images boot/syslinux: make the sub-options a choice boot/syslinux: rewrite options prompts boot/syslinux: bump version
boot/syslinux: add option to install the EFI image boot/syslinux: add an option to install an MBR blob

 boot/syslinux/Config.in                            | 39 ++++++++++++++---
 .../syslinux-000-user-headers-from-sysroot.patch   | 37 ++++++++++++++++
 boot/syslinux/syslinux.mk                          | 50 ++++++++++++++++++----
 package/ucl/ucl.mk                                 | 12 ++++++
 package/upx/upx.mk                                 | 28 ++++++++++++
 5 files changed, 152 insertions(+), 14 deletions(-)
 create mode 100644 boot/syslinux/syslinux-000-user-headers-from-sysroot.patch
 create mode 100644 package/ucl/ucl.mk
 create mode 100644 package/upx/upx.mk

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

Signature · 4 lines
Frank Hunleth
Troodon Software LLC
Embedded Software Development
http://troodon-software.com/
#11 lore raw

v2 cover Bump and improve syslinux (branch yem/syslinux)

In reply to Yann E. MORIN

Hi Yann, all

----- Mail original -----

| De: "Yann E. MORIN" <[email protected]>
| ?: buildroot at buildroot.org
| Cc: "Thomas Lundquist" <[email protected]>, "Yann E. MORIN" <[email protected]>
| Envoy?: Mardi 29 Avril 2014 18:49:12
| Objet: [Buildroot] [PATCH 0/9 v2] Bump and improve syslinux (branch	yem/syslinux)
| 
| From: "Yann E. MORIN" <[email protected]>
| 
| Hello All!
| 
| Here are a few patches to bump and enhance syslinux:
|   - patches 1..4: preparatory fixing and cleanup patches
|   - patches 5..6: new pacakges, dependency of the new syslinux
|   - patch   7   : actual syslinux bump
|   - patches 8..9: new options to install new types of blobs
| 
| To be noted, the syslinx build system is, well, a bit weird, to say
| the least. There is I hope extensive-enough information about this
| in the bump-patch. Please pay it a bit of attention, it is really
| convoluted, and would benefit from some in-depth review.
| 
| Thanks to Frank for his preliminary work on ucl and upx, and to
| Thomas L. whose extlinux patch prompted me to look at syslinux. ;-)
| 
| Changes v1 -> v2:
|   - explain the need for an ia32 compiler  (Arnout)
|   - make the image selection a choice  (Arnout)
|   - improve upx commit log  (Arnout)
|   - typoes  (Arnout)
|   - improve help entry for the mbr option
| 

I did a quick test on real hardware with extlinux 6.02 and BIOS-legacy configuration. I reused the same config as for 5.10-pre4, so it's ok for me :)

Tested using serial port and menu.c32 module.

Tested-by Romain Naour <[email protected]>

Note: all *.c32 modules for the target are installed in $(HOST_DIR)/usr/share/syslinux/ They can be installed in $(STAGING_DIR) instead ?

Thanks,
Romain Naour

| Regards,
| Yann E. MORIN.
| 
| 
| The following changes since commit
| a72b73852568227ee948a380c720756fbbdbec46:
| 
|   upstream glibc 2.18/2.19 works fine with microblaze (2014-04-28
|   22:16:37 +0200)
| 
| are available in the git repository at:
| 
|   git://gitorious.org/buildroot/buildroot.git
| 
| for you to fetch changes up to
| 8643aef1dfbf257e6cd7a0721d4cfd9f9e3a6dea:
| 
|   boot/syslinux: add an option to install an MBR blob (2014-04-29
|   18:41:59 +0200)
| 
| ----------------------------------------------------------------
| Frank Hunleth (2):
|       package/ucl: new package
|       package/upx: new package
| 
| Yann E. MORIN (7):
|       boot/syslinux: needs an ia32-capable compiler
|       boot/syslinux: prepare to install non-core images
|       boot/syslinux: make the sub-options a choice
|       boot/syslinux: rewrite options prompts
|       boot/syslinux: bump version
|       boot/syslinux: add option to install the EFI image
|       boot/syslinux: add an option to install an MBR blob
| 
|  boot/syslinux/Config.in                            | 39
|  ++++++++++++++---
|  .../syslinux-000-user-headers-from-sysroot.patch   | 37
|  ++++++++++++++++
|  boot/syslinux/syslinux.mk                          | 50
|  ++++++++++++++++++----
|  package/ucl/ucl.mk                                 | 12 ++++++
|  package/upx/upx.mk                                 | 28 ++++++++++++
|  5 files changed, 152 insertions(+), 14 deletions(-)
|  create mode 100644
|  boot/syslinux/syslinux-000-user-headers-from-sysroot.patch
|  create mode 100644 package/ucl/ucl.mk
|  create mode 100644 package/upx/upx.mk
| 
| --
| .-----------------.--------------------.------------------.--------------------.
| |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
| |  conspiracy: |
| | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___
| |               |
| | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/
| |  There is no  |
| | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v
| |   conspiracy.  |
| '------------------------------^-------^------------------^--------------------'
| _______________________________________________
| buildroot mailing list
| buildroot at busybox.net
| http://lists.busybox.net/mailman/listinfo/buildroot
| 
#12 lore raw

v2 cover Bump and improve syslinux (branch yem/syslinux)

Romain, All,

On 2014-04-30 17:58 +0200, Romain Naour spake thusly:

Quoted 1 line

----- Mail original -----

[--SNIP--]

Quoted 5 lines
| Here are a few patches to bump and enhance syslinux:
|   - patches 1..4: preparatory fixing and cleanup patches
|   - patches 5..6: new pacakges, dependency of the new syslinux
|   - patch   7   : actual syslinux bump
|   - patches 8..9: new options to install new types of blobs

[--SNIP--]

Quoted 9 lines

I did a quick test on real hardware with extlinux 6.02 and BIOS-legacy configuration. I reused the same config as for 5.10-pre4, so it's ok for me :)

Tested using serial port and menu.c32 module.

Tested-by Romain Naour <[email protected]>

Note: all *.c32 modules for the target are installed in $(HOST_DIR)/usr/share/syslinux/ They can be installed in $(STAGING_DIR) instead ?

What are those .c32 modules? How are they to be used?

From what I can infer, I doubt we want them in $(STAGING_DIR); they probably belong to either somewhere in $(TARGET_DIR) (in /boot ?) or to $(IMAGES_DIR).

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'