boot/syslinux: add option to install c32 modules
authorYann E. MORIN <yann.morin.1998@free.fr>
Fri, 2 May 2014 17:10:37 +0000 (19:10 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 3 May 2014 20:05:06 +0000 (22:05 +0200)
[Peter: reworded comment slightly]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
boot/syslinux/Config.in
boot/syslinux/syslinux.mk

index 28c5329ca715603b9ee097939885d379d1b58495..f4b987021f40ba955910da61786f6593d06656fd 100644 (file)
@@ -46,4 +46,14 @@ config BR2_TARGET_SYSLINUX_EFI
 
 endchoice
 
+if BR2_TARGET_SYSLINUX_LEGACY_BIOS
+
+config BR2_TARGET_SYSLINUX_C32
+       string "modules to install"
+       help
+         Enter a space-separated list of .c32 modules to install.
+         Leave empty to install no module.
+
+endif # BR2_TARGET_SYSLINUX_LEGACY_BIOS
+
 endif # BR2_TARGET_SYSLINUX
index 5432d0ac36c215fdf03640283a82e36b94aaaa22..c46c7b21771649676d3a4ee4e9df970306351d3a 100644 (file)
@@ -63,10 +63,19 @@ 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
 
+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
+# 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)/$${i##*/}; \
        done
+       for i in $(SYSLINUX_C32); do \
+               $(INSTALL) -D -m 0755 $(HOST_DIR)/usr/share/syslinux/$${i} \
+                                  $(BINARIES_DIR)/$${i}; \
+       done
 endef
 
 $(eval $(generic-package))