Index: head/stand/efi/fdt/efi_fdt.c =================================================================== --- head/stand/efi/fdt/efi_fdt.c +++ head/stand/efi/fdt/efi_fdt.c @@ -44,19 +44,27 @@ fdt_platform_load_dtb(void) { struct fdt_header *hdr; + const char *s; hdr = efi_get_table(&fdtdtb); - if (hdr != NULL) { - if (fdt_load_dtb_addr(hdr) == 0) { - printf("Using DTB provided by EFI at %p.\n", hdr); - return (0); - } + if (hdr == NULL) + return (1); + if (fdt_load_dtb_addr(hdr) != 0) + return (1); + printf("Using DTB provided by EFI at %p.\n", hdr); + + s = getenv("fdt_overlays"); + if (s != NULL && *s != '\0') { + printf("Loading DTB overlays: '%s'\n", s); + fdt_load_dtb_overlays(s); } - return (1); + return (0); } void fdt_platform_fixups(void) { + + fdt_apply_overlays(); } Index: head/stand/uboot/fdt/uboot_fdt.c =================================================================== --- head/stand/uboot/fdt/uboot_fdt.c +++ head/stand/uboot/fdt/uboot_fdt.c @@ -64,7 +64,8 @@ if (fdt_load_dtb_addr(hdr) == 0) { printf("Using DTB provided by U-Boot at " "address %p.\n", hdr); - return (0); + rv = 0; + goto exit; } } } @@ -83,9 +84,11 @@ if (fdt_load_dtb_file(s) == 0) { printf("Loaded DTB from file '%s'.\n", s); rv = 0; + goto exit; } } +exit: if (rv == 0) { s = getenv("fdt_overlays"); if (s == NULL)