From af262e5fa2c832a9134f6f977e8ef20b22bd28cd Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 26 May 2023 12:42:42 +0100 Subject: [PATCH] nspawn: restore cross-architecture booting 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 74b15dcb44a..f54e955caea 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -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) -- 2.47.3