diff options
-rw-r--r-- | sys/arch/arm64/stand/efiboot/efiboot.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c index 5f28c2a4fcc..ecadf5f4aab 100644 --- a/sys/arch/arm64/stand/efiboot/efiboot.c +++ b/sys/arch/arm64/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.43 2022/11/05 18:58:24 patrick Exp $ */ +/* $OpenBSD: efiboot.c,v 1.44 2022/11/05 19:00:31 patrick Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -604,10 +604,15 @@ efi_makebootargs(char *bootargs, int howto) if (!fdt_init(fdt)) return NULL; + /* Create common nodes which might not exist when using mach dtb */ + node = fdt_find_node("/aliases"); + if (node == NULL) + fdt_node_add_node(fdt_find_node("/"), "aliases", &node); node = fdt_find_node("/chosen"); - if (!node) - return NULL; + if (node == NULL) + fdt_node_add_node(fdt_find_node("/"), "chosen", &node); + node = fdt_find_node("/chosen"); len = strlen(bootargs) + 1; fdt_node_add_property(node, "bootargs", bootargs, len); fdt_node_add_property(node, "openbsd,boothowto", |