]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: restore cross-architecture booting
authorLuca Boccassi <bluca@debian.org>
Fri, 26 May 2023 11:42:42 +0000 (12:42 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 26 May 2023 15:00:58 +0000 (17:00 +0200)
The check added by 4c27749b8c6b24ef7481ba183ae1fca3749afbf7 breaks
booting an arm64 image on x86 using qemu-bin-fmt, so remove it.
Without it, the image built with mkosi --architecture=aarch64
boots fine in nspawn.

src/nspawn/nspawn.c

index 74b15dcb44a99b1b8edb4d0e41c6524c0b1703cc..f54e955caea81cb255c0b6fd2bcde851cd6954c6 100644 (file)
@@ -3397,10 +3397,10 @@ static int inner_child(
                 if (r < 0)
                         return log_error_errno(r, "personality() failed: %m");
 #endif
-        } else if (arg_architecture >= 0 && arg_architecture != native_architecture())
-                return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
-                                       "Selected architecture '%s' not supported locally, refusing.",
-                                       architecture_to_string(arg_architecture));
+        } else if (!arg_quiet && arg_architecture >= 0 && arg_architecture != native_architecture())
+                log_notice("Selected architecture '%s' not supported natively on the local CPU, assuming "
+                           "invocation with qemu userspace emulator (or equivalent) in effect.",
+                           architecture_to_string(arg_architecture));
 
         r = setrlimit_closest_all((const struct rlimit *const*) arg_rlimit, &which_failed);
         if (r < 0)