mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
Merge pull request #30944 from CodethinkLabs/vmspawn/fix_fedora_issues
vmspawn: fix more issues
This commit is contained in:
commit
b9b426b5b2
@ -191,7 +191,12 @@ int find_ovmf_config(int search_sb, OvmfConfig **ret) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sb_present = !!strv_find(fwd->features, "secure-boot");
|
if (strv_contains(fwd->features, "enrolled-keys")) {
|
||||||
|
log_debug("Skipping %s, firmware has enrolled keys which has been known to cause issues", *file);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool sb_present = strv_contains(fwd->features, "secure-boot");
|
||||||
|
|
||||||
/* exclude firmware which doesn't match our Secure Boot requirements */
|
/* exclude firmware which doesn't match our Secure Boot requirements */
|
||||||
if (search_sb >= 0 && search_sb != sb_present) {
|
if (search_sb >= 0 && search_sb != sb_present) {
|
||||||
|
@ -10,6 +10,16 @@
|
|||||||
#define ARCHITECTURE_SUPPORTS_SMBIOS 0
|
#define ARCHITECTURE_SUPPORTS_SMBIOS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__arm__) || defined(__aarch64__)
|
||||||
|
#define DEFAULT_SERIAL_TTY "ttyAMA0"
|
||||||
|
#elif defined(__s390__) || defined(__s390x__)
|
||||||
|
#define DEFAULT_SERIAL_TTY "ttysclp0"
|
||||||
|
#elif defined(__powerpc__) || defined(__powerpc64__)
|
||||||
|
#define DEFAULT_SERIAL_TTY "hvc0"
|
||||||
|
#else
|
||||||
|
#define DEFAULT_SERIAL_TTY "ttyS0"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct OvmfConfig {
|
typedef struct OvmfConfig {
|
||||||
char *path;
|
char *path;
|
||||||
char *vars;
|
char *vars;
|
||||||
|
@ -616,22 +616,24 @@ static int run_virtual_machine(void) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
|
||||||
if (!strv_isempty(arg_parameters)) {
|
r = strv_prepend(&arg_parameters, "console=" DEFAULT_SERIAL_TTY);
|
||||||
if (ARCHITECTURE_SUPPORTS_SMBIOS) {
|
if (r < 0)
|
||||||
_cleanup_free_ char *kcl = strv_join(arg_parameters, " ");
|
return log_oom();
|
||||||
if (!kcl)
|
|
||||||
return log_oom();
|
|
||||||
|
|
||||||
r = strv_extend(&cmdline, "-smbios");
|
if (ARCHITECTURE_SUPPORTS_SMBIOS) {
|
||||||
if (r < 0)
|
_cleanup_free_ char *kcl = strv_join(arg_parameters, " ");
|
||||||
return log_oom();
|
if (!kcl)
|
||||||
|
return log_oom();
|
||||||
|
|
||||||
r = strv_extendf(&cmdline, "type=11,value=io.systemd.stub.kernel-cmdline-extra=%s", kcl);
|
r = strv_extend(&cmdline, "-smbios");
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
} else
|
|
||||||
log_warning("Cannot append extra args to kernel cmdline, native architecture doesn't support SMBIOS");
|
r = strv_extendf(&cmdline, "type=11,value=io.systemd.stub.kernel-cmdline-extra=%s", kcl);
|
||||||
}
|
if (r < 0)
|
||||||
|
return log_oom();
|
||||||
|
} else
|
||||||
|
log_warning("Cannot append extra args to kernel cmdline, native architecture doesn't support SMBIOS");
|
||||||
|
|
||||||
if (use_vsock) {
|
if (use_vsock) {
|
||||||
vsock_fd = open_vsock();
|
vsock_fd = open_vsock();
|
||||||
|
Loading…
Reference in New Issue
Block a user