[PATCH 08/20] grub: change @linux_suffix@
Anton Midyukov
antohami at altlinux.org
Fri Jan 3 12:58:15 MSK 2020
---
features.in/grub/cfg.in/00defaults.cfg | 11 -----------
features.in/grub/cfg.in/20install2.cfg | 4 ++--
features.in/grub/cfg.in/25install-vnc-connect.cfg | 4 ++--
features.in/grub/cfg.in/25install-vnc-listen.cfg | 4 ++--
features.in/grub/cfg.in/30live.cfg | 4 ++--
features.in/grub/cfg.in/32live_rw.cfg | 4 ++--
features.in/grub/cfg.in/80rescue.cfg | 4 ++--
features.in/grub/cfg.in/82rescue_rw.cfg | 4 ++--
features.in/grub/cfg.in/83rescue_fm.cfg | 4 ++--
features.in/grub/cfg.in/85mediacheck.cfg | 4 ++--
features.in/grub/cfg.in/90memtest_efi.cfg | 2 +-
features.in/grub/stage1/scripts.d/01-grub | 12 ++++++++++++
12 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/features.in/grub/cfg.in/00defaults.cfg b/features.in/grub/cfg.in/00defaults.cfg
index 4d469d4817..88b56d9873 100644
--- a/features.in/grub/cfg.in/00defaults.cfg
+++ b/features.in/grub/cfg.in/00defaults.cfg
@@ -4,14 +4,3 @@ insmod minicmd
insmod normal
insmod test
set timeout=@timeout@
-
-if [ $grub_cpu = x86_64 -o $grub_cpu = i386 ]; then
- if [ $grub_platform = efi ]; then
- linux_suffix=efi
- elif [ $grub_platform = pc ]; then
- linux_suffix=16
- else
- linux_suffix=
-else
- linux_suffix=
-fi
diff --git a/features.in/grub/cfg.in/20install2.cfg b/features.in/grub/cfg.in/20install2.cfg
index fb6d0407b6..0031499e4c 100644
--- a/features.in/grub/cfg.in/20install2.cfg
+++ b/features.in/grub/cfg.in/20install2.cfg
@@ -1,6 +1,6 @@
default='linux'
menuentry 'Install @relname@' --hotkey 'i' --id 'linux' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/25install-vnc-connect.cfg b/features.in/grub/cfg.in/25install-vnc-connect.cfg
index 5041350e6f..2c41df10d3 100644
--- a/features.in/grub/cfg.in/25install-vnc-connect.cfg
+++ b/features.in/grub/cfg.in/25install-vnc-connect.cfg
@@ -1,5 +1,5 @@
menuentry 'Install ALT @relname@ (headless with DHCP+VNC client) (edit to set server IP address)' --id 'vncconnect' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncconnect=IP
- initrd$linux_suffix /boot/BOOT/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncconnect=IP
+ initrd ÎÁ linux_suffix@ /boot/BOOT/full.cz
}
diff --git a/features.in/grub/cfg.in/25install-vnc-listen.cfg b/features.in/grub/cfg.in/25install-vnc-listen.cfg
index f6252ba262..1b847bd14a 100644
--- a/features.in/grub/cfg.in/25install-vnc-listen.cfg
+++ b/features.in/grub/cfg.in/25install-vnc-listen.cfg
@@ -1,6 +1,6 @@
menuentry 'Install ALT @relname@ (headless with DHCP+VNC) (password VNCPWD)' --id 'vncpasswd' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/30live.cfg b/features.in/grub/cfg.in/30live.cfg
index 079eaae8f5..d4fd6a8303 100644
--- a/features.in/grub/cfg.in/30live.cfg
+++ b/features.in/grub/cfg.in/30live.cfg
@@ -1,6 +1,6 @@
menuentry 'LiveCD (no hard disk needed)' --id 'live' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/32live_rw.cfg b/features.in/grub/cfg.in/32live_rw.cfg
index 406ff19486..11df0b62ed 100644
--- a/features.in/grub/cfg.in/32live_rw.cfg
+++ b/features.in/grub/cfg.in/32live_rw.cfg
@@ -1,4 +1,4 @@
menuentry 'LiveCD with sessions support' --id 'session' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/80rescue.cfg b/features.in/grub/cfg.in/80rescue.cfg
index d863ef0c1e..59a266c231 100644
--- a/features.in/grub/cfg.in/80rescue.cfg
+++ b/features.in/grub/cfg.in/80rescue.cfg
@@ -1,4 +1,4 @@
menuentry 'Rescue LiveCD' --id 'rescue' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/82rescue_rw.cfg b/features.in/grub/cfg.in/82rescue_rw.cfg
index c6365be080..2bf7dd628e 100644
--- a/features.in/grub/cfg.in/82rescue_rw.cfg
+++ b/features.in/grub/cfg.in/82rescue_rw.cfg
@@ -1,4 +1,4 @@
menuentry 'Rescue with sessions support' --id 'rescue_session' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ live_rw
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ live_rw
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/83rescue_fm.cfg b/features.in/grub/cfg.in/83rescue_fm.cfg
index fa8bf7adfb..a374a76311 100644
--- a/features.in/grub/cfg.in/83rescue_fm.cfg
+++ b/features.in/grub/cfg.in/83rescue_fm.cfg
@@ -1,4 +1,4 @@
menuentry 'Forensic mode (leave disks alone)' --id 'rescue_forensic' {
- linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 forensic hash=@rescue_hash@
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 forensic hash=@rescue_hash@
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/85mediacheck.cfg b/features.in/grub/cfg.in/85mediacheck.cfg
index 3a2fbe4105..02c0dfe286 100644
--- a/features.in/grub/cfg.in/85mediacheck.cfg
+++ b/features.in/grub/cfg.in/85mediacheck.cfg
@@ -1,4 +1,4 @@
menuentry 'Check this media for defects' --id 'mediachk' {
- linux$linux_suffix /boot/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@
- initrd$linux_suffix /boot/full.cz
+ linux ÎÁ linux_suffix@ /boot/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@
+ initrd ÎÁ linux_suffix@ /boot/full.cz
}
diff --git a/features.in/grub/cfg.in/90memtest_efi.cfg b/features.in/grub/cfg.in/90memtest_efi.cfg
index d0d27372d9..c52d1a6ffc 100644
--- a/features.in/grub/cfg.in/90memtest_efi.cfg
+++ b/features.in/grub/cfg.in/90memtest_efi.cfg
@@ -1,3 +1,3 @@
menuentry 'Memory Test' --id 'memtest' {
- linux$linux_suffix /EFI/tools/memtest86.efi
+ linux ÎÁ linux_suffix@ /EFI/tools/memtest86.efi
}
diff --git a/features.in/grub/stage1/scripts.d/01-grub b/features.in/grub/stage1/scripts.d/01-grub
index eeb3c49760..4cd1825ef9 100755
--- a/features.in/grub/stage1/scripts.d/01-grub
+++ b/features.in/grub/stage1/scripts.d/01-grub
@@ -57,6 +57,18 @@ fi
[ ! -f "$CFG" ] || default_change "$CFG"
[ ! -f "$CFG_EFI" ] || default_change "$CFG_EFI"
+# change @linux_suffix@
+case "$GLOBAL_ARCH" in
+ i586|x86_64)
+ [ ! -f "$CFG" ] || sed -i 's/@linux_suffix@/16/g' "$CFG"
+ [ ! -f "$CFG_EFI" ] || sed -i 's/@linux_suffix@/efi/g' "$CFG_EFI"
+ ;;
+ *)
+ [ ! -f "$CFG" ] || sed -i 's/@linux_suffix@//g' "$CFG"
+ [ ! -f "$CFG_EFI" ] || sed -i 's/@linux_suffix@//g' "$CFG_EFI"
+ ;;
+esac
+
# snippets are not going into the actual image
if [ "$DEBUG" != 2 ]; then
rm -r .in/
--
2.24.1
--------------57A0C61BE7D9EDE338E3E6C8
Content-Type: text/x-patch;
name="0009-grub-available-for-i586-x86_64-aarch64-ppc64le.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0009-grub-available-for-i586-x86_64-aarch64-ppc64le.patch"
More information about the devel-distro
mailing list