From: Luca Boccassi Date: Fri, 26 May 2023 11:42:42 +0000 (+0100) Subject: nspawn: restore cross-architecture booting X-Git-Tag: v254-rc1~367 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af262e5fa2c832a9134f6f977e8ef20b22bd28cd;p=thirdparty%2Fsystemd.git 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. --- 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)