All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-rockchip][PATCH] Add machine definitions for NanoPi-M4 boards
@ 2021-03-22 13:42 Yann Dirson
  2021-03-22 14:47 ` Trevor Woerner
  0 siblings, 1 reply; 13+ messages in thread
From: Yann Dirson @ 2021-03-22 13:42 UTC (permalink / raw)
  To: yocto; +Cc: twoerner, Yann Dirson

From: Yann Dirson <yann@blade-group.com>

This supports both the 2GB and 4GB versions of the board.  This is not
done with 2 different machine definitions since only u-boot has to
change between those two configurations, but with a NANOPIM4_HW variable
to set in local.conf.

Note I could only test the 2GB version.

---

 conf/machine/nanopi-m4.conf                   | 29 +++++++++++++++++++
 recipes-kernel/linux/linux-yocto-dev.bbappend |  1 +
 .../linux/linux-yocto-rt_%.bbappend           |  1 +
 .../linux/linux-yocto-tiny_%.bbappend         |  1 +
 recipes-kernel/linux/linux-yocto_%.bbappend   |  1 +
 5 files changed, 33 insertions(+)
 create mode 100644 conf/machine/nanopi-m4.conf

diff --git a/conf/machine/nanopi-m4.conf b/conf/machine/nanopi-m4.conf
new file mode 100644
index 0000000..64a962e
--- /dev/null
+++ b/conf/machine/nanopi-m4.conf
@@ -0,0 +1,29 @@
+# Copyright (C) 2021 Blade SAS
+
+#@TYPE: Machine
+#@NAME: NanoPi M4
+#@DESCRIPTION: NanoPi M4 RK3399 board from FriendlyElec, 2GB and 4GB variants
+
+# specify NANOPIM4_HW="" in local.conf for the 4GB version
+NANOPIM4_HW ?= "-2gb"
+
+require include/rk3399.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3399-nanopi-m4.dtb"
+UBOOT_MACHINE = "nanopi-m4${NANOPIM4_HW}-rk3399_defconfig"
+
+RK_BOOT_DEVICE = "mmcblk1"
+WKS_FILE ?= "rock-pi-4.wks"
+IMAGE_FSTYPES += "wic"
+
+WKS_FILE_DEPENDS ?= " \
+    mtools-native \
+    dosfstools-native \
+    virtual/bootloader \
+    virtual/kernel \
+    "
+IMAGE_BOOT_FILES ?= "\
+    ${KERNEL_IMAGETYPE} \
+    "
+
+SERIAL_CONSOLES = "1500000;ttyS2"
diff --git a/recipes-kernel/linux/linux-yocto-dev.bbappend b/recipes-kernel/linux/linux-yocto-dev.bbappend
index e5ea197..3eca360 100644
--- a/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ b/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -6,3 +6,4 @@ COMPATIBLE_MACHINE_vyasa-rk3288 = "vyasa-rk3288"
 COMPATIBLE_MACHINE_tinker-board = "tinker-board"
 COMPATIBLE_MACHINE_tinker-board-s = "tinker-board-s"
 COMPATIBLE_MACHINE_rock-pi-4 = "rock-pi-4"
+COMPATIBLE_MACHINE_nanopi-m4 = "nanopi-m4"
diff --git a/recipes-kernel/linux/linux-yocto-rt_%.bbappend b/recipes-kernel/linux/linux-yocto-rt_%.bbappend
index e5ea197..3eca360 100644
--- a/recipes-kernel/linux/linux-yocto-rt_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto-rt_%.bbappend
@@ -6,3 +6,4 @@ COMPATIBLE_MACHINE_vyasa-rk3288 = "vyasa-rk3288"
 COMPATIBLE_MACHINE_tinker-board = "tinker-board"
 COMPATIBLE_MACHINE_tinker-board-s = "tinker-board-s"
 COMPATIBLE_MACHINE_rock-pi-4 = "rock-pi-4"
+COMPATIBLE_MACHINE_nanopi-m4 = "nanopi-m4"
diff --git a/recipes-kernel/linux/linux-yocto-tiny_%.bbappend b/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
index e5ea197..3eca360 100644
--- a/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
@@ -6,3 +6,4 @@ COMPATIBLE_MACHINE_vyasa-rk3288 = "vyasa-rk3288"
 COMPATIBLE_MACHINE_tinker-board = "tinker-board"
 COMPATIBLE_MACHINE_tinker-board-s = "tinker-board-s"
 COMPATIBLE_MACHINE_rock-pi-4 = "rock-pi-4"
+COMPATIBLE_MACHINE_nanopi-m4 = "nanopi-m4"
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend
index e5ea197..3eca360 100644
--- a/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -6,3 +6,4 @@ COMPATIBLE_MACHINE_vyasa-rk3288 = "vyasa-rk3288"
 COMPATIBLE_MACHINE_tinker-board = "tinker-board"
 COMPATIBLE_MACHINE_tinker-board-s = "tinker-board-s"
 COMPATIBLE_MACHINE_rock-pi-4 = "rock-pi-4"
+COMPATIBLE_MACHINE_nanopi-m4 = "nanopi-m4"
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-04-01  9:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 13:42 [meta-rockchip][PATCH] Add machine definitions for NanoPi-M4 boards Yann Dirson
2021-03-22 14:47 ` Trevor Woerner
2021-03-22 14:59   ` Yann Dirson
2021-03-22 16:19     ` Trevor Woerner
2021-03-22 18:24     ` [yocto] " Joshua Watt
2021-03-22 19:30       ` Yann Dirson
2021-03-22 19:39         ` Joshua Watt
     [not found]   ` <166EB22A27C12C43.28220@lists.yoctoproject.org>
2021-03-22 15:31     ` Yann Dirson
2021-03-22 15:50       ` Trevor Woerner
2021-03-23 11:59         ` [yocto] [meta-rockchip] defconfig alternatives Yann Dirson
2021-03-24  0:40           ` Trevor Woerner
2021-03-25 17:10             ` Yann Dirson
     [not found]             ` <166FA50C98CCB357.21604@lists.yoctoproject.org>
2021-04-01  9:17               ` Yann Dirson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.