1 // SPDX-License-Identifier: GPL-2.0-only
3 #include <linux/init.h>
4 #include <linux/of_fdt.h>
5 #include <linux/printk.h>
6 #include <linux/memblock.h>
11 static char *dtb __initdata;
13 void uml_dtb_init(void)
18 area = uml_load_file(dtb, &size);
22 if (!early_init_dt_scan(area)) {
23 pr_err("invalid DTB %s\n", dtb);
24 memblock_free(area, size);
28 early_init_fdt_scan_reserved_mem();
29 unflatten_device_tree();
32 static int __init uml_dtb_setup(char *line, int *add)
38 __uml_setup("dtb=", uml_dtb_setup,
40 " Boot the kernel with the devicetree blob from the specified file.\n"