[PATCH 13/22] syslinux: do not use syslinux to generate config on unsupported arches

Anton Midyukov antohami at altlinux.org
Sun Jan 5 18:10:07 MSK 2020


These are partial commits reverts:
01ee4075438e9ecfcf1b7bb71b37025f3232c3bf
e42bcdcb3095346a4c653938f7e90fa3c80b292f
5cfc7ede81024fa62039013a09160b8a7da1457d
---
 features.in/syslinux/config.mk                | 20 ++-----------------
 .../syslinux/scripts.d/20-propagator-ramdisk  |  8 +-------
 .../syslinux/stage1/scripts.d/01-syslinux     |  2 +-
 3 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/features.in/syslinux/config.mk b/features.in/syslinux/config.mk
index c355d8a875..7fa8e2198b 100644
--- a/features.in/syslinux/config.mk
+++ b/features.in/syslinux/config.mk
@@ -1,36 +1,26 @@
 # default is plain text prompt
 # NB: might be usbflash-ready hybrid iso
-
-# on ppc64le, aarch64 syslinux feature is used only to generate config
-# (it's converted into grub.cfg later)
-ifeq (,$(filter-out i586 x86_64 ppc64le aarch64,$(ARCH)))
-
+ifeq (,$(filter-out i586 x86_64,$(ARCH)))
 use/syslinux: sub/stage1 $(ISOHYBRID:%=use/isohybrid)
 	@$(call add_feature)
-ifeq (,$(filter-out i586 x86_64,$(ARCH)))
 	@$(call add,STAGE1_PACKAGES,syslinux)
 	@$(call try,BOOTVGA,normal)
 	@$(call add,SYSLINUX_FILES,/usr/lib/syslinux/pxelinux.0)
-endif
 	@$(call try,META_SYSTEM_ID,SYSLINUX)
 	@$(call set,RELNAME,ALT ($(IMAGE_NAME)))
 	@$(call set,IMAGE_PACKTYPE,boot)
 else
-
 use/syslinux: ; @:
-
 endif
 
-ifeq (,$(filter-out i586 x86_64,$(ARCH)))
 # UI is overwritten
 use/syslinux/ui/%: use/syslinux
 	@$(call set,SYSLINUX_UI,$*)
+ifeq (,$(filter-out i586 x86_64,$(ARCH)))
 	@if [ "$*" == gfxboot ]; then \
 		$(call add,STAGE1_PACKAGES,gfxboot); \
 		$(call add,STAGE1_BRANDING,bootloader); \
 	fi
-else
-use/syslinux/ui/%: use/syslinux; @:
 endif
 
 # modules and config snippets just add up
@@ -40,11 +30,5 @@ use/syslinux/%.com use/syslinux/%.c32: use/syslinux
 use/syslinux/%.cfg: use/syslinux
 	@$(call add,SYSLINUX_CFG,$*)
 
-ifeq (,$(filter-out ppc64le aarch64,$(ARCH)))
-use/syslinux/localboot.cfg use/syslinux/removable.cfg use/syslinux/lateboot.cfg use/syslinux/sdab.cfg: use/syslinux; @:
-use/syslinux/install-vnc-connect.cfg: use/syslinux/grub-install-vnc-connect.cfg; @:
-use/syslinux/install-vnc-listen.cfg: use/syslinux/grub-install-vnc-listen.cfg; @:
-endif
-
 use/syslinux/timeout/%: use/syslinux
 	@$(call set,SYSLINUX_TIMEOUT,$*)
diff --git a/features.in/syslinux/scripts.d/20-propagator-ramdisk b/features.in/syslinux/scripts.d/20-propagator-ramdisk
index b9d9c6266d..525512a0e5 100755
--- a/features.in/syslinux/scripts.d/20-propagator-ramdisk
+++ b/features.in/syslinux/scripts.d/20-propagator-ramdisk
@@ -5,16 +5,10 @@
 
 cd "$WORKDIR"
 
-cfgs="$(find syslinux boot/grub EFI/BOOT -name '*.cfg')"
-[ -n "$cfgs" ] || {
-	echo "${0##*/}: did not find any config under /syslinux or /boot/grub" >&2
-	exit 1
-}
-
 # apply size census while looking for potential squashfs images
 find -maxdepth 1 -type f -size +1M \
 | sed 's,^\./,,' \
 | while read image; do
 	size="$[ $(stat -c%s "$image") / 1024 + 1 ]"
-	sed -i "s,@${image}_size@,$size," $cfgs
+	sed -i "s,@${image}_size@,$size," syslinux/*.cfg
 done
diff --git a/features.in/syslinux/stage1/scripts.d/01-syslinux b/features.in/syslinux/stage1/scripts.d/01-syslinux
index 693a1f58ca..e9390715aa 100755
--- a/features.in/syslinux/stage1/scripts.d/01-syslinux
+++ b/features.in/syslinux/stage1/scripts.d/01-syslinux
@@ -10,7 +10,7 @@ cd "$WORKDIR/syslinux"
 
 # validate just in case (see also stage1 Makefile)
 case "$GLOBAL_BOOTLOADER" in
-	isolinux|syslinux|ieee1275boot|grubaa64boot) ;;
+	isolinux|syslinux) ;;
 	*) echo "error: weird GLOBAL_BOOTLOADER: \`$GLOBAL_BOOTLOADER'" >&2;
 	   exit 1;;
 esac
-- 
2.24.1


--------------E54E3444F4BC138E1CEC79A9
Content-Type: text/x-patch;
 name="0014-syslinux-fixed-for-using-BOOTLOADER-not-equal-syslin.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0014-syslinux-fixed-for-using-BOOTLOADER-not-equal-syslin.pa";
 filename*1="tch"



More information about the devel-distro mailing list