[meta-rockchip][PATCH 1/4] centralize console settings


Trevor Woerner
 

The console settings (baud and device) are scrambled and spread throughout the
MACHINE configurations. Consolidate them and set defaults which are then
overridden only as required.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
conf/machine/include/nanopi-m4.inc | 2 --
conf/machine/include/rk3066.inc | 1 +
conf/machine/include/rk3188.inc | 3 +++
conf/machine/include/rk3288.inc | 2 +-
conf/machine/include/rk3328.inc | 2 --
conf/machine/include/rk3399.inc | 2 --
conf/machine/include/rock-pi-4.inc | 2 --
conf/machine/include/rockchip-defaults.inc | 3 +++
conf/machine/marsboard-rk3066.conf | 1 -
conf/machine/radxarock.conf | 1 -
10 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/conf/machine/include/nanopi-m4.inc b/conf/machine/include/nanopi-m4.inc
index a14b705..8a7c1d9 100644
--- a/conf/machine/include/nanopi-m4.inc
+++ b/conf/machine/include/nanopi-m4.inc
@@ -21,5 +21,3 @@ WKS_FILE_DEPENDS ?= " \
IMAGE_BOOT_FILES ?= "\
${KERNEL_IMAGETYPE} \
"
-
-SERIAL_CONSOLES = "1500000;ttyS2"
diff --git a/conf/machine/include/rk3066.inc b/conf/machine/include/rk3066.inc
index dffbee0..76744ee 100644
--- a/conf/machine/include/rk3066.inc
+++ b/conf/machine/include/rk3066.inc
@@ -7,5 +7,6 @@ require conf/machine/include/tune-cortexa9.inc
require conf/machine/include/soc-family.inc
require conf/machine/include/rockchip-defaults.inc

+RK_CONSOLE_BAUD = "115200"
KBUILD_DEFCONFIG = "multi_v7_defconfig"
KERNEL_IMAGETYPE = "zImage"
diff --git a/conf/machine/include/rk3188.inc b/conf/machine/include/rk3188.inc
index 59e65d1..e21bbf7 100644
--- a/conf/machine/include/rk3188.inc
+++ b/conf/machine/include/rk3188.inc
@@ -9,3 +9,6 @@ require conf/machine/include/rockchip-defaults.inc

KBUILD_DEFCONFIG = "multi_v7_defconfig"
KERNEL_IMAGETYPE = "zImage"
+
+RK_CONSOLE_BAUD = "115200"
+RK_CONSOLE_DEVICE = "ttyFIQ0"
diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index 480e250..2715e73 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -10,7 +10,7 @@ require conf/machine/include/rockchip-defaults.inc
KBUILD_DEFCONFIG ?= "multi_v7_defconfig"
KERNEL_IMAGETYPE = "zImage"

-SERIAL_CONSOLES = "115200;ttyS2"
+RK_CONSOLE_BAUD = "115200"

PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
SPL_BINARY ?= "idbloader.img"
diff --git a/conf/machine/include/rk3328.inc b/conf/machine/include/rk3328.inc
index a4bbc5d..5b11868 100644
--- a/conf/machine/include/rk3328.inc
+++ b/conf/machine/include/rk3328.inc
@@ -19,7 +19,5 @@ TFA_BUILD_TARGET = "bl31"
UBOOT_SUFFIX ?= "itb"
UBOOT_ENTRYPOINT ?= "0x06000000"

-SERIAL_CONSOLES = "1500000;ttyS2"
-
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
SPL_BINARY ?= "idbloader.img"
diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc
index f6b7826..9f9f474 100644
--- a/conf/machine/include/rk3399.inc
+++ b/conf/machine/include/rk3399.inc
@@ -19,8 +19,6 @@ TFA_BUILD_TARGET = "bl31"
UBOOT_SUFFIX ?= "itb"
UBOOT_ENTRYPOINT ?= "0x06000000"

-SERIAL_CONSOLES = "115200;ttyS2"
-
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
SPL_BINARY ?= "idbloader.img"

diff --git a/conf/machine/include/rock-pi-4.inc b/conf/machine/include/rock-pi-4.inc
index 9c21084..a3e60c7 100644
--- a/conf/machine/include/rock-pi-4.inc
+++ b/conf/machine/include/rock-pi-4.inc
@@ -17,6 +17,4 @@ IMAGE_BOOT_FILES ?= "\
${KERNEL_IMAGETYPE} \
"

-SERIAL_CONSOLES = "1500000;ttyS2"
-
MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
diff --git a/conf/machine/include/rockchip-defaults.inc b/conf/machine/include/rockchip-defaults.inc
index a4e2a2c..fe4052e 100644
--- a/conf/machine/include/rockchip-defaults.inc
+++ b/conf/machine/include/rockchip-defaults.inc
@@ -21,6 +21,9 @@ XSERVER = " \
"

# misc
+RK_CONSOLE_DEVICE ?= "ttyS2"
+RK_CONSOLE_BAUD ?= "1500000"
+SERIAL_CONSOLES = "${RK_CONSOLE_BAUD};${RK_CONSOLE_DEVICE}"
IMAGE_FSTYPES += "ext4"

# boot device (sd-card/emmc)
diff --git a/conf/machine/marsboard-rk3066.conf b/conf/machine/marsboard-rk3066.conf
index 09414bc..52fd256 100644
--- a/conf/machine/marsboard-rk3066.conf
+++ b/conf/machine/marsboard-rk3066.conf
@@ -8,5 +8,4 @@

require conf/machine/include/rk3066.inc

-SERIAL_CONSOLES = "115200;ttyS2"
KERNEL_DEVICETREE = "rk3066a-marsboard.dtb"
diff --git a/conf/machine/radxarock.conf b/conf/machine/radxarock.conf
index 2036f6a..42d8848 100644
--- a/conf/machine/radxarock.conf
+++ b/conf/machine/radxarock.conf
@@ -9,5 +9,4 @@

require conf/machine/include/rk3188.inc

-SERIAL_CONSOLES = "115200;ttyFIQ0"
KERNEL_DEVICETREE = "rk3188-radxarock.dtb"
--
2.30.0.rc0

Join yocto@lists.yoctoproject.org to automatically receive all group messages.