]> code.ossystems Code Review - openembedded-core.git/commitdiff
gummiboot: Remove/change gummiboot references with systemd-boot
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>
Wed, 23 Nov 2016 22:53:30 +0000 (16:53 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Jan 2017 13:34:29 +0000 (13:34 +0000)
After systemd-boot was introduced, its been tested for a while with no major
issues being found until now, this patch completely replaces all gummiboot
instances with systemd-boot ones, taking the next step into cleaning
up systemd-boot/gummiboot.

[YOCTO #10332]

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/fs-uuid.bbclass
meta/classes/systemd-boot.bbclass
meta/conf/distro/include/distro_alias.inc
meta/lib/oeqa/controllers/masterimage.py
meta/recipes-bsp/systemd-boot/systemd-boot_232.bb
meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
meta/recipes-core/initrdscripts/files/init-install-efi.sh
scripts/contrib/mkefidisk.sh
scripts/lib/wic/plugins/source/bootimg-efi.py

index 313c5a359705865d38869382660acb3f231caef8..9b53dfba7abf7a210cf07f7f91a7762caff2b620 100644 (file)
@@ -13,7 +13,7 @@ def get_rootfs_uuid(d):
     bb.fatal('Could not determine filesystem UUID of %s' % rootfs)
 
 # Replace the special <<uuid-of-rootfs>> inside a string (like the
-# root= APPEND string in a syslinux.cfg or gummiboot entry) with the
+# root= APPEND string in a syslinux.cfg or systemd-boot entry) with the
 # actual UUID of the rootfs. Does nothing if the special string
 # is not used.
 def replace_rootfs_uuid(d, string):
index 60729a756cd9fe101449aadad3f1505c37d9ba9e..6718783367565c6e437cc9adf154bd1c8394e974 100644 (file)
@@ -4,9 +4,7 @@
 
 # systemd-boot.bbclass - The "systemd-boot" is essentially the gummiboot merged into systemd.
 #                        The original standalone gummiboot project is dead without any more
-#                        maintenance. As a start point, we replace all gummitboot occurrences
-#                        with systemd-boot in gummiboot.bbclass to have a base version of this
-#                        systemd-boot.bbclass.
+#                        maintenance.
 #
 # Set EFI_PROVIDER = "systemd-boot" to use systemd-boot on your live images instead of grub-efi
 # (images built by image-live.bbclass or image-vm.bbclass)
index a59265a21ea0e284d68e21cec9d032da7f258380..489f5ea63d3c77b5e4515e7f71c2ad542e1b70ff 100644 (file)
@@ -135,7 +135,7 @@ DISTRO_PN_ALIAS_pn-gtk-doc = "Fedora=gtk-doc Ubuntu=gtk-doc"
 DISTRO_PN_ALIAS_pn-gtk-engines = "Fedora=gtk2-engines OpenSuSE=gtk2-engines Ubuntu=gtk2-engines Mandriva=gtk-engines2 Debian=gtk2-engines"
 DISTRO_PN_ALIAS_pn-gtk-sato-engine = "OpenedHand"
 DISTRO_PN_ALIAS_pn-gtk-icon-utils-native = "OSPDT"
-DISTRO_PN_ALIAS_pn-gummiboot = "Debian=gummiboot Fedora=gummiboot"
+DISTRO_PN_ALIAS_pn-systemd-boot = "Ubuntu=systemd-boot Fedora=systemd-boot"
 DISTRO_PN_ALIAS_pn-hello-mod = "OE-Core"
 DISTRO_PN_ALIAS_pn-hostap-conf = "OE-Core"
 DISTRO_PN_ALIAS_pn-hwlatdetect = "OSPDT"
index d796fc3c309277e6708f69044f3d156b2b74e1f2..07418fcda19108747dbf1a0a08c397736e8c6a3d 100644 (file)
@@ -159,10 +159,10 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
         self.power_cycle(self.connection)
 
 
-class GummibootTarget(MasterImageHardwareTarget):
+class SystemdbootTarget(MasterImageHardwareTarget):
 
     def __init__(self, d):
-        super(GummibootTarget, self).__init__(d)
+        super(SystemdbootTarget, self).__init__(d)
         # this the value we need to set in the LoaderEntryOneShot EFI variable
         # so the system boots the 'test' bootloader label and not the default
         # The first four bytes are EFI bits, and the rest is an utf-16le string
index 70366643c6ab81429e9d1efda179c56ca4e9a519..602052ca131f0a1875a0c174dc2f8766b8a298b2 100644 (file)
@@ -15,7 +15,7 @@ EXTRA_OECONF = " --enable-gnuefi \
                  --disable-manpages \
                "
 
-# Imported from gummiboot recipe
+# Imported from the old gummiboot recipe
 TUNE_CCARGS_remove = "-mfpmath=sse"
 COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
 
index b5621091574f38d36d2048f1dd0d47f3c45e7c8d..9c4b263d544ec17255e451a5f9fcd8317f91d044 100644 (file)
@@ -171,19 +171,19 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
 fi
 
 if [ -d /run/media/$1/loader ]; then
-    GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf"
-    # copy config files for gummiboot
+    SYSTEMDBOOT_CFGS="/ssd/loader/entries/*.conf"
+    # copy config files for systemd-boot
     cp -dr /run/media/$1/loader /ssd
     # delete the install entry
     rm -f /ssd/loader/entries/install.conf
     # delete the initrd lines
-    sed -i "/initrd /d" $GUMMIBOOT_CFGS
+    sed -i "/initrd /d" $SYSTEMDBOOT_CFGS
     # delete any LABEL= strings
-    sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS
+    sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_CFGS
     # delete any root= strings
-    sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS
+    sed -i "s/ root=[^ ]*/ /" $SYSTEMDBOOT_CFGS
     # add the root= and other standard boot options
-    sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS
+    sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $SYSTEMDBOOT_CFGS
     # Add the test label
     echo -ne "title test\nlinux /test-kernel\noptions root=$testfs rw $rootwait quiet\n" > /ssd/loader/entries/test.conf
 fi
index ffb709c1ce6a20eac9ac5ccb51fd028710d35b90..5ad3a60c0558c7782c5fbdd8dbed9b64ef556bca 100644 (file)
@@ -245,19 +245,19 @@ fi
 
 if [ -d /run/media/$1/loader ]; then
     rootuuid=$(blkid -o value -s PARTUUID ${rootfs})
-    GUMMIBOOT_CFGS="/boot/loader/entries/*.conf"
-    # copy config files for gummiboot
+    SYSTEMDBOOT_CFGS="/boot/loader/entries/*.conf"
+    # copy config files for systemd-boot
     cp -dr /run/media/$1/loader /boot
     # delete the install entry
     rm -f /boot/loader/entries/install.conf
     # delete the initrd lines
-    sed -i "/initrd /d" $GUMMIBOOT_CFGS
+    sed -i "/initrd /d" $SYSTEMDBOOT_CFGS
     # delete any LABEL= strings
-    sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS
+    sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_CFGS
     # delete any root= strings
-    sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS
+    sed -i "s/ root=[^ ]*/ /" $SYSTEMDBOOT_CFGS
     # add the root= and other standard boot options
-    sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $GUMMIBOOT_CFGS
+    sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $SYSTEMDBOOT_CFGS
 fi
 
 umount /tgt_root
index a175895d8149686e28f2e70efa31d6cfc288beb0..800733f0afdabb33b963caa515ed8a80f24a7a17 100755 (executable)
@@ -384,7 +384,7 @@ EFIDIR="$BOOTFS_MNT/EFI/BOOT"
 cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz"
 # Copy the efi loader and configs (booti*.efi and grub.cfg if it exists)
 cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir"
-# Silently ignore a missing gummiboot loader dir (we might just be a GRUB image)
+# Silently ignore a missing systemd-boot loader dir (we might just be a GRUB image)
 cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>&1
 
 # Update the boot loaders configurations for an installed image
@@ -410,25 +410,25 @@ if [ -e "$GRUB_CFG" ]; then
        sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GRUB_CFG
 fi
 
-# Look for a gummiboot installation
-GUMMI_ENTRIES="$BOOTFS_MNT/loader/entries"
-GUMMI_CFG="$GUMMI_ENTRIES/boot.conf"
-if [ -d "$GUMMI_ENTRIES" ]; then
-       info "Configuring Gummiboot"
+# Look for a systemd-boot installation
+SYSTEMD_BOOT_ENTRIES="$BOOTFS_MNT/loader/entries"
+SYSTEMD_BOOT_CFG="$SYSTEMD_BOOT_ENTRIES/boot.conf"
+if [ -d "$SYSTEMD_BOOT_ENTRIES" ]; then
+       info "Configuring SystemD-boot"
        # remove the install target if it exists
-       rm $GUMMI_ENTRIES/install.conf >$OUT 2>&1
+       rm $SYSTEMD_BOOT_ENTRIES/install.conf >$OUT 2>&1
 
-       if [ ! -e "$GUMMI_CFG" ]; then
-               echo "ERROR: $GUMMI_CFG not found"
+       if [ ! -e "$SYSTEMD_BOOT_CFG" ]; then
+               echo "ERROR: $SYSTEMD_BOOT_CFG not found"
        fi
 
-       sed -i "/initrd /d" $GUMMI_CFG
-       sed -i "s@ root=[^ ]*@ @" $GUMMI_CFG
-       sed -i "s@options *LABEL=boot @options LABEL=Boot root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GUMMI_CFG
+       sed -i "/initrd /d" $SYSTEMD_BOOT_CFG
+       sed -i "s@ root=[^ ]*@ @" $SYSTEMD_BOOT_CFG
+       sed -i "s@options *LABEL=boot @options LABEL=Boot root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $SYSTEMD_BOOT_CFG
 fi
 
 # Ensure we have at least one EFI bootloader configured
-if [ ! -e $GRUB_CFG ] && [ ! -e $GUMMI_CFG ]; then
+if [ ! -e $GRUB_CFG ] && [ ! -e $SYSTEMD_BOOT_CFG ]; then
        die "No EFI bootloader configuration found"
 fi
 
index 4adb80becc11a6d30ffeae64ff87ebeb959dde86..305e910d6a8e8ae7b543c1835830f1f928aa741a 100644 (file)
@@ -36,7 +36,7 @@ from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
 class BootimgEFIPlugin(SourcePlugin):
     """
     Create EFI boot partition.
-    This plugin supports GRUB 2 and gummiboot bootloaders.
+    This plugin supports GRUB 2 and systemd-boot bootloaders.
     """
 
     name = 'bootimg-efi'
@@ -82,7 +82,7 @@ class BootimgEFIPlugin(SourcePlugin):
         cfg.close()
 
     @classmethod
-    def do_configure_gummiboot(cls, hdddir, creator, cr_workdir):
+    def do_configure_systemdboot(cls, hdddir, creator, cr_workdir):
         """
         Create loader-specific systemd-boot/gummiboot config
         """
@@ -98,7 +98,7 @@ class BootimgEFIPlugin(SourcePlugin):
         loader_conf += "default boot\n"
         loader_conf += "timeout %d\n" % bootloader.timeout
 
-        msger.debug("Writing gummiboot config %s/hdd/boot/loader/loader.conf" \
+        msger.debug("Writing systemd-boot config %s/hdd/boot/loader/loader.conf" \
                         % cr_workdir)
         cfg = open("%s/hdd/boot/loader/loader.conf" % cr_workdir, "w")
         cfg.write(loader_conf)
@@ -109,16 +109,16 @@ class BootimgEFIPlugin(SourcePlugin):
         if configfile:
             custom_cfg = get_custom_config(configfile)
             if custom_cfg:
-                # Use a custom configuration for gummiboot
+                # Use a custom configuration for systemd-boot
                 boot_conf = custom_cfg
                 msger.debug("Using custom configuration file "
-                        "%s for gummiboots's boot.conf" % configfile)
+                        "%s for systemd-boots's boot.conf" % configfile)
             else:
                 msger.error("configfile is specified but failed to "
                         "get it from %s." % configfile)
 
         if not custom_cfg:
-            # Create gummiboot configuration using parameters from wks file
+            # Create systemd-boot configuration using parameters from wks file
             kernel = "/bzImage"
 
             boot_conf = ""
@@ -127,7 +127,7 @@ class BootimgEFIPlugin(SourcePlugin):
             boot_conf += "options LABEL=Boot root=%s %s\n" % \
                              (creator.rootdev, bootloader.append)
 
-        msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
+        msger.debug("Writing systemd-boot config %s/hdd/boot/loader/entries/boot.conf" \
                         % cr_workdir)
         cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w")
         cfg.write(boot_conf)
@@ -149,9 +149,8 @@ class BootimgEFIPlugin(SourcePlugin):
         try:
             if source_params['loader'] == 'grub-efi':
                 cls.do_configure_grubefi(hdddir, creator, cr_workdir)
-            elif source_params['loader'] == 'gummiboot' \
-                 or source_params['loader'] == 'systemd-boot':
-                cls.do_configure_gummiboot(hdddir, creator, cr_workdir)
+            elif source_params['loader'] == 'systemd-boot':
+                cls.do_configure_systemdboot(hdddir, creator, cr_workdir)
             else:
                 msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
         except KeyError:
@@ -190,8 +189,7 @@ class BootimgEFIPlugin(SourcePlugin):
                 exec_cmd(cp_cmd, True)
                 shutil.move("%s/grub.cfg" % cr_workdir,
                             "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir)
-            elif source_params['loader'] == 'gummiboot' \
-                 or source_params['loader'] == 'systemd-boot':
+            elif source_params['loader'] == 'systemd-boot':
                 cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
                 exec_cmd(cp_cmd, True)
             else: