Splits out the three variants of the rock-pi-4 (A, B & C) into their own
machines. Unfortunately, it is not possible to have a single machine
that works for all three, as there isn't any known ways for the
bootloader to distinguish them.

Signed-off-by: Joshua Watt <[email protected]>
---
 conf/machine/include/rk3399.inc                        | 2 +-
 conf/machine/{rock-pi-4.conf => include/rock-pi-4.inc} | 8 ++------
 conf/machine/rock-pi-4a.conf                           | 8 ++++++++
 conf/machine/rock-pi-4b.conf                           | 8 ++++++++
 conf/machine/rock-pi-4c.conf                           | 8 ++++++++
 5 files changed, 27 insertions(+), 7 deletions(-)
 rename conf/machine/{rock-pi-4.conf => include/rock-pi-4.inc} (68%)
 create mode 100644 conf/machine/rock-pi-4a.conf
 create mode 100644 conf/machine/rock-pi-4b.conf
 create mode 100644 conf/machine/rock-pi-4c.conf

diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc
index 4019988..f6b7826 100644
--- a/conf/machine/include/rk3399.inc
+++ b/conf/machine/include/rk3399.inc
@@ -5,8 +5,8 @@ SOC_FAMILY = "rk3399"
 
 DEFAULTTUNE ?= "cortexa72-cortexa53-crypto"
 
-require conf/machine/include/tune-cortexa72-cortexa53.inc
 require conf/machine/include/soc-family.inc
+require conf/machine/include/tune-cortexa72-cortexa53.inc
 require conf/machine/include/rockchip-defaults.inc
 
 KBUILD_DEFCONFIG ?= "defconfig"
diff --git a/conf/machine/rock-pi-4.conf b/conf/machine/include/rock-pi-4.inc
similarity index 68%
rename from conf/machine/rock-pi-4.conf
rename to conf/machine/include/rock-pi-4.inc
index 5231abf..7a98063 100644
--- a/conf/machine/rock-pi-4.conf
+++ b/conf/machine/include/rock-pi-4.inc
@@ -1,15 +1,11 @@
 # Copyright (C) 2020 Garmin Ltd. or its subsidaries
 # Released under the MIT license (see COPYING.MIT for the terms)
 
-#@TYPE: Machine
-#@NAME: Rock Pi 4 RK3399
-#@DESCRIPTION: Rock Pi 4 is a Raspberry Pi 4 Alternative based on Rockchip 
RK3399 Processor.
+# Add a common override for all Rock Pi 4 machines
+MACHINEOVERRIDES =. "rock-pi-4:"
 
 require conf/machine/include/rk3399.inc
 
-KERNEL_DEVICETREE = "rockchip/rk3399-rock-pi-4.dtb"
-UBOOT_MACHINE = "rock-pi-4-rk3399_defconfig"
-
 RK_BOOT_DEVICE = "mmcblk1"
 WKS_FILE ?= "rock-pi-4.wks"
 IMAGE_FSTYPES += "wic wic.bmap"
diff --git a/conf/machine/rock-pi-4a.conf b/conf/machine/rock-pi-4a.conf
new file mode 100644
index 0000000..9f3aa5a
--- /dev/null
+++ b/conf/machine/rock-pi-4a.conf
@@ -0,0 +1,8 @@
+#@TYPE: Machine
+#@NAME: Rock Pi 4A RK3399
+#@DESCRIPTION: Rock Pi 4 is a Raspberry Pi 4 Alternative based on Rockchip 
RK3399 Processor.
+
+require conf/machine/include/rock-pi-4.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3399-rock-pi-4a.dtb"
+UBOOT_MACHINE = "rock-pi-4-rk3399_defconfig"
diff --git a/conf/machine/rock-pi-4b.conf b/conf/machine/rock-pi-4b.conf
new file mode 100644
index 0000000..033c063
--- /dev/null
+++ b/conf/machine/rock-pi-4b.conf
@@ -0,0 +1,8 @@
+#@TYPE: Machine
+#@NAME: Rock Pi 4B RK3399
+#@DESCRIPTION: Rock Pi 4 is a Raspberry Pi 4 Alternative based on Rockchip 
RK3399 Processor.
+
+require conf/machine/include/rock-pi-4.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3399-rock-pi-4b.dtb"
+UBOOT_MACHINE = "rock-pi-4-rk3399_defconfig"
diff --git a/conf/machine/rock-pi-4c.conf b/conf/machine/rock-pi-4c.conf
new file mode 100644
index 0000000..9e9bbbb
--- /dev/null
+++ b/conf/machine/rock-pi-4c.conf
@@ -0,0 +1,8 @@
+#@TYPE: Machine
+#@NAME: Rock Pi 4C RK3399
+#@DESCRIPTION: Rock Pi 4 is a Raspberry Pi 4 Alternative based on Rockchip 
RK3399 Processor.
+
+require conf/machine/include/rock-pi-4.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3399-rock-pi-4c.dtb"
+UBOOT_MACHINE = "rock-pi-4c-rk3399_defconfig"
-- 
2.30.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52072): https://lists.yoctoproject.org/g/yocto/message/52072
Mute This Topic: https://lists.yoctoproject.org/mt/80065303/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to