hw/arm/ranch.c: Add firmware node to DT
To boot arm64 again, borrowed similar changes
from: https://android-review.googlesource.com/#/c/143670/
"Platform information should be acquired from the
DT firmware node since init script does not parse
/proc/cpuinfo anymore :
https://android-review.googlesource.com/#/c/141740/
"
Change-Id: I4202fa4c52d19d527dfd3754d218012cf5fbec87
diff --git a/hw/arm/ranchu.c b/hw/arm/ranchu.c
index 4391a40..b2cafc8 100644
--- a/hw/arm/ranchu.c
+++ b/hw/arm/ranchu.c
@@ -154,6 +154,12 @@
qemu_fdt_setprop_cell(fdt, "/", "#address-cells", 0x2);
qemu_fdt_setprop_cell(fdt, "/", "#size-cells", 0x2);
+ /* Firmware node */
+ qemu_fdt_add_subnode(fdt, "/firmware");
+ qemu_fdt_add_subnode(fdt, "/firmware/android");
+ qemu_fdt_setprop_string(fdt, "/firmware/android", "compatible", "android,firmware");
+ qemu_fdt_setprop_string(fdt, "/firmware/android", "hardware", "ranchu");
+
/*
* /chosen and /memory nodes must exist for load_dtb
* to fill in necessary properties later