Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo: Default bootloader to zipl on s390x #3059

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

cgwalters
Copy link
Member

This will allow us to drop code like
https://github.com/coreos/coreos-assembler/blob/87fc693c115eae1e7ff0e1621ce26c9167af6e84/src/create_disk.sh#L503 which is really just unnecessary since there aren't any other bootloaders we care about on this architecture.

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though I think we also want auto on s390x to just use zipl, no? Hmm, should we do something like this instead:

diff --git a/src/libostree/ostree-bootloader-zipl.c b/src/libostree/ostree-bootloader-zipl.c
index 4ff093ff..c0a2a145 100644
--- a/src/libostree/ostree-bootloader-zipl.c
+++ b/src/libostree/ostree-bootloader-zipl.c
@@ -63,10 +63,11 @@ static gboolean
 _ostree_bootloader_zipl_query (OstreeBootloader *bootloader, gboolean *out_is_active,
                                GCancellable *cancellable, GError **error)
 {
-  /* We don't auto-detect this one; should be explicitly chosen right now.
-   * see also https://github.com/coreos/coreos-assembler/pull/849
-   */
+#if defined(__s390x__)
+  *out_is_active = TRUE;
+#else
   *out_is_active = FALSE;
+#endif
   return TRUE;
 }

diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index 91b63f94..76912d0e 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -1493,6 +1493,7 @@ _ostree_sysroot_query_bootloader (OstreeSysroot *sysroot, OstreeBootloader **out
   if (bootloader_config == CFG_SYSROOT_BOOTLOADER_OPT_AUTO)
     {
       OstreeCfgSysrootBootloaderOpt probe[] = {
+        CFG_SYSROOT_BOOTLOADER_OPT_ZIPL,
         CFG_SYSROOT_BOOTLOADER_OPT_SYSLINUX,
         CFG_SYSROOT_BOOTLOADER_OPT_GRUB2,
         CFG_SYSROOT_BOOTLOADER_OPT_UBOOT,

?

This will allow us to drop code like
https://github.com/coreos/coreos-assembler/blob/87fc693c115eae1e7ff0e1621ce26c9167af6e84/src/create_disk.sh#L503
which is really just unnecessary since there aren't any other
bootloaders we care about on this architecture.
@cgwalters
Copy link
Member Author

Though I think we also want auto on s390x to just use zipl, no?

This seems pretty theoretical given it'd require someone explicitly setting sysroot.bootloader=auto. But I think indeed there's no reason not to also fix the other place, so I combined the changes and hoisted the constant to the same place as other bootloader bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants