x86: qemu: Create separate i440fx and q35 device trees
Although the two qemu-x86 targets (i440fx and q35) share a lot in
common, they still have something that cannot easily handled in one
single device tree). Split to create two dedicated device tree files
and make the i440fx be the default build target.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile
index ca2eab3..f86514c 100644
--- a/arch/x86/dts/Makefile
+++ b/arch/x86/dts/Makefile
@@ -3,7 +3,8 @@
crownbay.dtb \
galileo.dtb \
minnowmax.dtb \
- qemu-x86.dtb
+ qemu-x86_i440fx.dtb \
+ qemu-x86_q35.dtb
targets += $(dtb-y)
diff --git a/arch/x86/dts/qemu-x86.dts b/arch/x86/dts/qemu-x86_i440fx.dts
similarity index 94%
rename from arch/x86/dts/qemu-x86.dts
rename to arch/x86/dts/qemu-x86_i440fx.dts
index f1291b5..4cf843b 100644
--- a/arch/x86/dts/qemu-x86.dts
+++ b/arch/x86/dts/qemu-x86_i440fx.dts
@@ -10,7 +10,7 @@
/include/ "serial.dtsi"
/ {
- model = "QEMU x86";
+ model = "QEMU x86 (I440FX)";
compatible = "qemu,x86";
config {
diff --git a/arch/x86/dts/qemu-x86.dts b/arch/x86/dts/qemu-x86_q35.dts
similarity index 94%
copy from arch/x86/dts/qemu-x86.dts
copy to arch/x86/dts/qemu-x86_q35.dts
index f1291b5..6c89283 100644
--- a/arch/x86/dts/qemu-x86.dts
+++ b/arch/x86/dts/qemu-x86_q35.dts
@@ -10,7 +10,7 @@
/include/ "serial.dtsi"
/ {
- model = "QEMU x86";
+ model = "QEMU x86 (Q35)";
compatible = "qemu,x86";
config {
diff --git a/board/coreboot/coreboot/Kconfig b/board/coreboot/coreboot/Kconfig
index 69e3437..3ff64f4 100644
--- a/board/coreboot/coreboot/Kconfig
+++ b/board/coreboot/coreboot/Kconfig
@@ -23,7 +23,7 @@
config DEFAULT_DEVICE_TREE
string "Board Device Tree Source (dts) file"
- default "qemu-x86"
+ default "qemu-x86_i440fx"
help
This option selects the board Device Tree Source (dts) file in
arch/x86/dts/ directory to be used to build U-Boot for coreboot.
diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
index 4509d52..0959a98 100644
--- a/configs/qemu-x86_defconfig
+++ b/configs/qemu-x86_defconfig
@@ -1,10 +1,9 @@
CONFIG_X86=y
CONFIG_VENDOR_EMULATION=y
+CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx"
CONFIG_TARGET_QEMU_X86=y
CONFIG_CMD_NET=y
CONFIG_OF_CONTROL=y
-CONFIG_OF_SEPARATE=y
-CONFIG_DEFAULT_DEVICE_TREE="qemu-x86"
CONFIG_VIDEO_VESA=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
CONFIG_FRAMEBUFFER_VESA_MODE_111=y
diff --git a/doc/README.x86 b/doc/README.x86
index 0726205..c19f4a0 100644
--- a/doc/README.x86
+++ b/doc/README.x86
@@ -40,7 +40,7 @@
x86 architecture --->
...
(qemu-x86) Board configuration file
- (qemu-x86) Board Device Tree Source (dts) file
+ (qemu-x86_i440fx) Board Device Tree Source (dts) file
(0x01920000) Board specific Cache-As-RAM (CAR) address
(0x4000) Board specific Cache-As-RAM (CAR) size
@@ -186,6 +186,14 @@
$ make qemu-x86_defconfig
$ make all
+Note this default configuration will build a U-Boot for the QEMU x86 i440FX
+board. To build a U-Boot against QEMU x86 Q35 board, you can change the build
+configuration during the 'make menuconfig' process like below:
+
+Device Tree Control --->
+ ...
+ (qemu-x86_q35) Default Device Tree for DT control
+
Test with coreboot
------------------
For testing U-Boot as the coreboot payload, there are things that need be paid