[meta-rockchip,v3] NanoPi-M4: add machines

Submitted by yann.dirson@blade-group.com on March 23, 2021, 10:20 a.m. | Patch ID: 179399

Details

Message ID 20210323102013.717850-1-yann@blade-group.com
State New
Headers show

Commit Message

yann.dirson@blade-group.com March 23, 2021, 10:20 a.m.
From: Yann Dirson <yann@blade-group.com>

We have two board variants, respectively with 2GB and 4GB RAM.

Signed-off-by: Yann Dirson <yann@blade-group.com>
---

Changes from v2:
- commit message rework
- add wic.bmap
Changes from v1:
- split in two distinct machines: nanopi-m4 and nanopi-m4-2gb

 conf/machine/include/nanopi-m4.inc            | 22 +++++++++++++++++++
 conf/machine/nanopi-m4-2gb.conf               |  8 +++++++
 conf/machine/nanopi-m4.conf                   |  8 +++++++
 recipes-kernel/linux/linux-yocto-dev.bbappend |  2 ++
 .../linux/linux-yocto-rt_%.bbappend           |  2 ++
 .../linux/linux-yocto-tiny_%.bbappend         |  2 ++
 recipes-kernel/linux/linux-yocto_%.bbappend   |  2 ++
 7 files changed, 46 insertions(+)
 create mode 100644 conf/machine/include/nanopi-m4.inc
 create mode 100644 conf/machine/nanopi-m4-2gb.conf
 create mode 100644 conf/machine/nanopi-m4.conf

Patch hide | download patch | download mbox

diff --git a/conf/machine/include/nanopi-m4.inc b/conf/machine/include/nanopi-m4.inc
new file mode 100644
index 0000000..74cdae8
--- /dev/null
+++ b/conf/machine/include/nanopi-m4.inc
@@ -0,0 +1,22 @@ 
+# Copyright (C) 2021 Blade SAS
+# Common definitions for all NanoPi M4 RK3399 board variants
+
+require rk3399.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3399-nanopi-m4.dtb"
+
+RK_BOOT_DEVICE = "mmcblk1"
+WKS_FILE ?= "rock-pi-4.wks"
+IMAGE_FSTYPES += "wic wic.bmap"
+
+WKS_FILE_DEPENDS ?= " \
+    mtools-native \
+    dosfstools-native \
+    virtual/bootloader \
+    virtual/kernel \
+    "
+IMAGE_BOOT_FILES ?= "\
+    ${KERNEL_IMAGETYPE} \
+    "
+
+SERIAL_CONSOLES = "1500000;ttyS2"
diff --git a/conf/machine/nanopi-m4-2gb.conf b/conf/machine/nanopi-m4-2gb.conf
new file mode 100644
index 0000000..9fd7279
--- /dev/null
+++ b/conf/machine/nanopi-m4-2gb.conf
@@ -0,0 +1,8 @@ 
+# Copyright (C) 2021 Blade SAS
+
+#@TYPE: Machine
+#@NAME: NanoPi M4
+#@DESCRIPTION: NanoPi M4 RK3399 board from FriendlyElec, 2GB variant
+
+require include/nanopi-m4.inc
+UBOOT_MACHINE = "nanopi-m4-2gb-rk3399_defconfig"
diff --git a/conf/machine/nanopi-m4.conf b/conf/machine/nanopi-m4.conf
new file mode 100644
index 0000000..648fc75
--- /dev/null
+++ b/conf/machine/nanopi-m4.conf
@@ -0,0 +1,8 @@ 
+# Copyright (C) 2021 Blade SAS
+
+#@TYPE: Machine
+#@NAME: NanoPi M4
+#@DESCRIPTION: NanoPi M4 RK3399 board from FriendlyElec, 4GB variant
+
+require include/nanopi-m4.inc
+UBOOT_MACHINE = "nanopi-m4-rk3399_defconfig"
diff --git a/recipes-kernel/linux/linux-yocto-dev.bbappend b/recipes-kernel/linux/linux-yocto-dev.bbappend
index e5ea197..7702e3f 100644
--- a/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ b/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -6,3 +6,5 @@  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"
+COMPATIBLE_MACHINE_nanopi-m4-2gb = "nanopi-m4-2gb"
diff --git a/recipes-kernel/linux/linux-yocto-rt_%.bbappend b/recipes-kernel/linux/linux-yocto-rt_%.bbappend
index e5ea197..7702e3f 100644
--- a/recipes-kernel/linux/linux-yocto-rt_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto-rt_%.bbappend
@@ -6,3 +6,5 @@  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"
+COMPATIBLE_MACHINE_nanopi-m4-2gb = "nanopi-m4-2gb"
diff --git a/recipes-kernel/linux/linux-yocto-tiny_%.bbappend b/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
index e5ea197..7702e3f 100644
--- a/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
@@ -6,3 +6,5 @@  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"
+COMPATIBLE_MACHINE_nanopi-m4-2gb = "nanopi-m4-2gb"
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend
index e5ea197..7702e3f 100644
--- a/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -6,3 +6,5 @@  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"
+COMPATIBLE_MACHINE_nanopi-m4-2gb = "nanopi-m4-2gb"

Comments

Trevor Woerner March 23, 2021, 2:20 p.m.
Applied, thanks! :-)


Anecdotally, having the bmap file available has the following effect on
writing a core-image-base image to a µSD card:
	without: 33s
	with:    11s
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52822): https://lists.yoctoproject.org/g/yocto/message/52822
Mute This Topic: https://lists.yoctoproject.org/mt/81547344/3617530
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-