centralize console settings
PATCH 1/4 centralize console settings
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.
--- 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(-)
conf/machine/include/nanopi-m4.inc +0 -2
@@ -21,5 +21,3 @@ WKS_FILE_DEPENDS ?= " \ IMAGE_BOOT_FILES ?= "\ ${KERNEL_IMAGETYPE} \ " - -SERIAL_CONSOLES = "1500000;ttyS2"
conf/machine/include/rk3066.inc +1 -0
@@ -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"
conf/machine/include/rk3188.inc +3 -0
@@ -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"
conf/machine/include/rk3288.inc +1 -1
@@ -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"
conf/machine/include/rk3328.inc +0 -2
@@ -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"
conf/machine/include/rk3399.inc +0 -2
@@ -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"
conf/machine/include/rock-pi-4.inc +0 -2
@@ -17,6 +17,4 @@ IMAGE_BOOT_FILES ?= "\ ${KERNEL_IMAGETYPE} \ " -SERIAL_CONSOLES = "1500000;ttyS2" - MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
conf/machine/include/rockchip-defaults.inc +3 -0
@@ -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)
conf/machine/marsboard-rk3066.conf +0 -1
@@ -8,5 +8,4 @@ require conf/machine/include/rk3066.inc -SERIAL_CONSOLES = "115200;ttyS2" KERNEL_DEVICETREE = "rk3066a-marsboard.dtb"
conf/machine/radxarock.conf +0 -1
@@ -9,5 +9,4 @@ require conf/machine/include/rk3188.inc -SERIAL_CONSOLES = "115200;ttyFIQ0" KERNEL_DEVICETREE = "rk3188-radxarock.dtb"
Signature · 1 line
2.30.0.rc0
PATCH 2/4 wic console device and baud
Take the console device and baud settings from the MACHINE configurations and reuse them in the wic files. This reduces duplication and eliminates a potential source of mistakes.
--- conf/machine/include/rockchip-defaults.inc | 2 +- wic/firefly-rk3288.wks | 2 +- wic/rock-pi-4.wks | 2 +- wic/rock-pi-e.wks | 2 +- wic/tinker-board.wks | 2 +- wic/vyasa-rk3288.wks | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
conf/machine/include/rockchip-defaults.inc +1 -1
@@ -28,5 +28,5 @@ IMAGE_FSTYPES += "ext4" # boot device (sd-card/emmc) RK_BOOT_DEVICE ??= "mmcblk0" -WICVARS_append = " RK_BOOT_DEVICE" +WICVARS_append = " RK_BOOT_DEVICE RK_CONSOLE_BAUD RK_CONSOLE_DEVICE"
wic/firefly-rk3288.wks +1 -1
@@ -4,4 +4,4 @@ include rk3288-boot.wks part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root -bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init" +bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/rock-pi-4.wks +1 -1
@@ -4,4 +4,4 @@ include rk3399-boot.wks part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root -bootloader --ptable gpt --append="console=tty1 console=ttyS2,1500000n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init" +bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/rock-pi-e.wks +1 -1
@@ -1,4 +1,4 @@ include rk3328-boot.wks part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root -bootloader --ptable gpt --append="console=tty1 console=ttyS2,1500000n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init" +bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/tinker-board.wks +1 -1
@@ -5,4 +5,4 @@ include rk3288-boot.wks part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root -bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init" +bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/vyasa-rk3288.wks +1 -1
@@ -4,5 +4,5 @@ include rk3288-boot.wks part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root -bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init" +bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
Signature · 1 line
2.30.0.rc0
PATCH 3/4 machine common include cleanup
In reply to Trevor WoernerBreak out the conf/machine/include/rockchip-defaults.inc into:
- conf/machine/include/rockchip-defaults.inc
- conf/machine/include/rockchip-32.inc
- conf/machine/include/rockchip-64.inc
- conf/machine/include/rockchip-wic.inc
Re-organize the machine and SoC configurations to make use of these common include files to reduce duplication of common elements.
For every currently-defined machine in meta-rockchip, the following variables were checked before and after this change to make sure the results were correct and/or reasonable:
- RK_CONSOLE_BAUD
- RK_CONSOLE_DEVICE
- SERIAL_CONSOLES
- WKS_FILE
- UBOOT_SUFFIX
- SPL_BINARY
- UBOOT_ENTRYPOINT
- UBOOT_MACHINE
- KBUILD_DEFCONFIG
- KERNEL_IMAGETYPE
- KERNEL_DEVICETREE
- TFA_BUILD_TARGET
- TFA_PLATFORM
- IMAGE_FSTYPES
- RK_BOOT_DEVICE
- IMAGE_BOOT_FILES
The following boards were boot-tested after this change to make sure they booted to a console login prompt correctly (core-image-base):
- tinker-board
- rock-pi-e
- rock64
- nanopi-m4-2gb
- rock-pi-4b
--- conf/machine/firefly-rk3288.conf | 15 ++------------- conf/machine/include/nanopi-m4.inc | 13 +------------ conf/machine/include/rk3066.inc | 2 +- conf/machine/include/rk3188.inc | 2 +- conf/machine/include/rk3288.inc | 10 +++------- conf/machine/include/rk3328.inc | 13 ++----------- conf/machine/include/rk3399.inc | 14 ++------------ conf/machine/include/rock-pi-4.inc | 15 +-------------- conf/machine/include/rockchip-32.inc | 4 ++++ conf/machine/include/rockchip-64.inc | 12 ++++++++++++ conf/machine/include/rockchip-defaults.inc | 12 +++++++----- conf/machine/include/rockchip-wic.inc | 10 ++++++++++ conf/machine/include/tinker.inc | 15 ++------------- conf/machine/rock-pi-e.conf | 12 ------------ conf/machine/rock2-square.conf | 4 ++-- conf/machine/rock64.conf | 15 +-------------- conf/machine/vyasa-rk3288.conf | 15 ++------------- 17 files changed, 53 insertions(+), 130 deletions(-) create mode 100644 conf/machine/include/rockchip-32.inc create mode 100644 conf/machine/include/rockchip-64.inc create mode 100644 conf/machine/include/rockchip-wic.inc
conf/machine/firefly-rk3288.conf +2 -13
@@ -11,16 +11,5 @@ require conf/machine/include/rk3288.inc KERNEL_DEVICETREE = "rk3288-firefly.dtb" UBOOT_MACHINE = "firefly-rk3288_defconfig" -WKS_FILE ?= "firefly-rk3288.wks" -IMAGE_FSTYPES += "wic wic.bmap" - -WKS_FILE_DEPENDS ?= " \ - mtools-native \ - dosfstools-native \ - virtual/bootloader \ - virtual/kernel \ - " -IMAGE_BOOT_FILES ?= "\ - ${KERNEL_IMAGETYPE} \ - ${KERNEL_DEVICETREE} \ - " +WKS_FILE = "firefly-rk3288.wks" +IMAGE_BOOT_FILES += "${KERNEL_DEVICETREE}"
conf/machine/include/nanopi-m4.inc +1 -12
@@ -9,15 +9,4 @@ KMACHINE = "nanopi-m4" 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} \ - " +WKS_FILE = "rock-pi-4.wks"
conf/machine/include/rk3066.inc +1 -1
@@ -6,7 +6,7 @@ SOC_FAMILY = "rk3066" require conf/machine/include/tune-cortexa9.inc require conf/machine/include/soc-family.inc require conf/machine/include/rockchip-defaults.inc +require conf/machine/include/rockchip-32.inc -RK_CONSOLE_BAUD = "115200" KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_IMAGETYPE = "zImage"
conf/machine/include/rk3188.inc +1 -1
@@ -6,9 +6,9 @@ SOC_FAMILY = "rk3188" require conf/machine/include/tune-cortexa9.inc require conf/machine/include/soc-family.inc require conf/machine/include/rockchip-defaults.inc +require conf/machine/include/rockchip-32.inc KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_IMAGETYPE = "zImage" -RK_CONSOLE_BAUD = "115200" RK_CONSOLE_DEVICE = "ttyFIQ0"
conf/machine/include/rk3288.inc +3 -7
@@ -6,12 +6,8 @@ SOC_FAMILY = "rk3288" require conf/machine/include/tune-cortexa17.inc require conf/machine/include/soc-family.inc require conf/machine/include/rockchip-defaults.inc +require conf/machine/include/rockchip-32.inc +require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "multi_v7_defconfig" -KERNEL_IMAGETYPE = "zImage" - -RK_CONSOLE_BAUD = "115200" - -PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" -SPL_BINARY ?= "idbloader.img" - +KERNEL_IMAGETYPE ?= "zImage"
conf/machine/include/rk3328.inc +2 -11
@@ -8,16 +8,7 @@ DEFAULTTUNE ?= "cortexa53-crypto" require conf/machine/include/soc-family.inc require conf/machine/include/tune-cortexa53.inc require conf/machine/include/rockchip-defaults.inc - -KBUILD_DEFCONFIG ?= "defconfig" -KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +require conf/machine/include/rockchip-64.inc +require conf/machine/include/rockchip-wic.inc TFA_PLATFORM = "rk3328" -TFA_BUILD_TARGET = "bl31" - -UBOOT_SUFFIX ?= "itb" -UBOOT_ENTRYPOINT ?= "0x06000000" - -PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" -SPL_BINARY ?= "idbloader.img"
conf/machine/include/rk3399.inc +2 -12
@@ -8,17 +8,7 @@ DEFAULTTUNE ?= "cortexa72-cortexa53-crypto" 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" -KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +require conf/machine/include/rockchip-64.inc +require conf/machine/include/rockchip-wic.inc TFA_PLATFORM = "rk3399" -TFA_BUILD_TARGET = "bl31" - -UBOOT_SUFFIX ?= "itb" -UBOOT_ENTRYPOINT ?= "0x06000000" - -PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" -SPL_BINARY ?= "idbloader.img" -
conf/machine/include/rock-pi-4.inc +1 -14
@@ -4,17 +4,4 @@ MACHINEOVERRIDES =. "rock-pi-4:" require conf/machine/include/rk3399.inc 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} \ - " - -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" +WKS_FILE = "rock-pi-4.wks"
conf/machine/include/rockchip-32.inc new file +4 -0
@@ -0,0 +1,4 @@ +# meta-rockchip defaults for 32-bit systems + +UBOOT_SUFFIX ?= "bin" +RK_CONSOLE_BAUD ?= "115200"
conf/machine/include/rockchip-64.inc new file +12 -0
@@ -0,0 +1,12 @@ +# meta-rockchip defaults for 64-bit systems + +UBOOT_SUFFIX ?= "itb" +UBOOT_ENTRYPOINT ?= "0x06000000" + +RK_CONSOLE_BAUD ?= "1500000" + +KBUILD_DEFCONFIG ??= "defconfig" +KERNEL_CLASSES ?= "kernel-fitimage" +KERNEL_IMAGETYPE ?= "fitImage" + +TFA_BUILD_TARGET ?= "bl31"
conf/machine/include/rockchip-defaults.inc +7 -5
@@ -1,9 +1,10 @@ -# meta-rockchip default settings +# common meta-rockchip default settings # kernel PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" KCONFIG_MODE ?= "alldefconfig" LINUX_VERSION_EXTENSION ?= "-rockchip" +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" # xserver PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
@@ -20,13 +21,14 @@ XSERVER = " \ xf86-input-keyboard \ " +# u-boot +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" +SPL_BINARY ?= "idbloader.img" + # misc -RK_CONSOLE_DEVICE ?= "ttyS2" -RK_CONSOLE_BAUD ?= "1500000" +RK_CONSOLE_DEVICE ??= "ttyS2" SERIAL_CONSOLES = "${RK_CONSOLE_BAUD};${RK_CONSOLE_DEVICE}" -IMAGE_FSTYPES += "ext4" # boot device (sd-card/emmc) RK_BOOT_DEVICE ??= "mmcblk0" WICVARS_append = " RK_BOOT_DEVICE RK_CONSOLE_BAUD RK_CONSOLE_DEVICE" -
conf/machine/include/rockchip-wic.inc new file +10 -0
@@ -0,0 +1,10 @@ +# common defaults for systems that use wic + +IMAGE_FSTYPES += "wic wic.bmap" +WKS_FILE_DEPENDS = " \ + mtools-native \ + dosfstools-native \ + virtual/bootloader \ + virtual/kernel \ + " +IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE}"
conf/machine/include/tinker.inc +2 -13
@@ -1,15 +1,4 @@ require conf/machine/include/rk3288.inc -WKS_FILE ?= "tinker-board.wks" -IMAGE_FSTYPES += "wic wic.bmap" - -WKS_FILE_DEPENDS ?= " \ - mtools-native \ - dosfstools-native \ - virtual/bootloader \ - virtual/kernel \ - " -IMAGE_BOOT_FILES ?= "\ - ${KERNEL_IMAGETYPE} \ - ${KERNEL_DEVICETREE} \ - " +WKS_FILE = "tinker-board.wks" +IMAGE_BOOT_FILES += "${KERNEL_DEVICETREE}"
conf/machine/rock-pi-e.conf +0 -12
@@ -9,19 +9,7 @@ MACHINEOVERRIDES =. "rock-pi-e:" PREFERRED_PROVIDER_virtual/kernel = "linux-stable-bleeding" KERNEL_DEVICETREE = "rockchip/rk3328-rock-pi-e.dtb" -MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" -PREFERRED_PROVIDER_virtual/bootloader = "u-boot" UBOOT_MACHINE = "rock-pi-e-rk3328_defconfig" WKS_FILE = "rock-pi-e.wks" -IMAGE_FSTYPES += "wic.xz wic.bmap" -WKS_FILE_DEPENDS = " \ - mtools-native \ - dosfstools-native \ - virtual/bootloader \ - virtual/kernel \ - " -IMAGE_BOOT_FILES ?= " \ - ${KERNEL_IMAGETYPE} \ - "
conf/machine/rock2-square.conf +2 -2
@@ -14,6 +14,6 @@ UBOOT_MACHINE = "rock2_defconfig" # This board doesn't support the combined idbloader, so resort to the older # image class -IMAGE_FSTYPES += "rockchip-gpt-img" +IMAGE_FSTYPES += "ext4 rockchip-gpt-img" +IMAGE_FSTYPES_remove = "wic wic.bmap" IMAGE_CLASSES += "rockchip-gpt-img" -
conf/machine/rock64.conf +1 -14
@@ -15,17 +15,4 @@ KERNEL_DEVICETREE = "rockchip/rk3328-rock64.dtb" # set to mmcblk0 for booting from optional eMMC RK_BOOT_DEVICE ?= "mmcblk1" -WKS_FILE ?= "rock-pi-e.wks" -IMAGE_FSTYPES += "wic wic.bmap" - -WKS_FILE_DEPENDS ?= " \ - mtools-native \ - dosfstools-native \ - virtual/bootloader \ - virtual/kernel \ - " -IMAGE_BOOT_FILES ?= "\ - ${KERNEL_IMAGETYPE} \ - " - -KBUILD_DEFCONFIG = "defconfig" +WKS_FILE = "rock-pi-e.wks"
conf/machine/vyasa-rk3288.conf +2 -13
@@ -14,16 +14,5 @@ KERNEL_EXTRA_ARGS += "LOADADDR=0x02000000" UBOOT_MACHINE = "vyasa-rk3288_defconfig" RK_BOOT_DEVICE = "mmcblk2" -WKS_FILE ?= "vyasa-rk3288.wks" -IMAGE_FSTYPES += "wic wic.bmap" - -WKS_FILE_DEPENDS ?= " \ - mtools-native \ - dosfstools-native \ - virtual/bootloader \ - virtual/kernel \ - " -IMAGE_BOOT_FILES ?= "\ - ${KERNEL_IMAGETYPE} \ - ${KERNEL_DEVICETREE} \ - " +WKS_FILE = "vyasa-rk3288.wks" +IMAGE_BOOT_FILES += "${KERNEL_DEVICETREE}"
Signature · 1 line
2.30.0.rc0
PATCH 4/4 wic/wks cleanup
In reply to Trevor WoernerInstead of having SoC-specific wks files and machine-specific wks files, it turns out all we need is one rockchip-specific wks file; any differences can be specified with variables.
Boot tested with the following boards (core-image-base):
- tinker-board
- rock-pi-e
- rock64
- nanopi-m4-2gb
- rock-pi-4b
---
conf/machine/firefly-rk3288.conf | 1 -
conf/machine/include/nanopi-m4.inc | 1 -
conf/machine/include/rock-pi-4.inc | 1 -
conf/machine/include/rockchip-defaults.inc | 4 ----
conf/machine/include/rockchip-wic.inc | 12 +++++++++++
conf/machine/include/tinker.inc | 1 -
conf/machine/rock-pi-e.conf | 2 --
conf/machine/rock64.conf | 2 --
conf/machine/vyasa-rk3288.conf | 1 -
wic/firefly-rk3288.wks | 7 -------
wic/rk3328-boot.wks | 23 ---------------------
wic/rk3399-boot.wks | 24 ----------------------
wic/rock-pi-4.wks | 7 -------
wic/rock-pi-e.wks | 4 ----
wic/{rk3288-boot.wks => rockchip.wks} | 10 ++++++---
wic/tinker-board.wks | 8 --------
wic/vyasa-rk3288.wks | 8 --------
17 files changed, 19 insertions(+), 97 deletions(-)
delete mode 100644 wic/firefly-rk3288.wks
delete mode 100644 wic/rk3328-boot.wks
delete mode 100644 wic/rk3399-boot.wks
delete mode 100644 wic/rock-pi-4.wks
delete mode 100644 wic/rock-pi-e.wks
rename wic/{rk3288-boot.wks => rockchip.wks} (71%)
delete mode 100644 wic/tinker-board.wks
delete mode 100644 wic/vyasa-rk3288.wksconf/machine/firefly-rk3288.conf +0 -1
@@ -11,5 +11,4 @@ require conf/machine/include/rk3288.inc KERNEL_DEVICETREE = "rk3288-firefly.dtb" UBOOT_MACHINE = "firefly-rk3288_defconfig" -WKS_FILE = "firefly-rk3288.wks" IMAGE_BOOT_FILES += "${KERNEL_DEVICETREE}"
conf/machine/include/nanopi-m4.inc +0 -1
@@ -9,4 +9,3 @@ KMACHINE = "nanopi-m4" KERNEL_DEVICETREE = "rockchip/rk3399-nanopi-m4.dtb" RK_BOOT_DEVICE = "mmcblk1" -WKS_FILE = "rock-pi-4.wks"
conf/machine/include/rock-pi-4.inc +0 -1
@@ -4,4 +4,3 @@ MACHINEOVERRIDES =. "rock-pi-4:" require conf/machine/include/rk3399.inc RK_BOOT_DEVICE = "mmcblk1" -WKS_FILE = "rock-pi-4.wks"
conf/machine/include/rockchip-defaults.inc +0 -4
@@ -28,7 +28,3 @@ SPL_BINARY ?= "idbloader.img" # misc RK_CONSOLE_DEVICE ??= "ttyS2" SERIAL_CONSOLES = "${RK_CONSOLE_BAUD};${RK_CONSOLE_DEVICE}" - -# boot device (sd-card/emmc) -RK_BOOT_DEVICE ??= "mmcblk0" -WICVARS_append = " RK_BOOT_DEVICE RK_CONSOLE_BAUD RK_CONSOLE_DEVICE"
conf/machine/include/rockchip-wic.inc +12 -0
@@ -8,3 +8,15 @@ WKS_FILE_DEPENDS = " \ virtual/kernel \ " IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE}" + +# boot device (sd-card/emmc) +RK_BOOT_DEVICE ??= "mmcblk0" + +WKS_FILE = "rockchip.wks" +WICVARS_append = " \ + RK_BOOT_DEVICE \ + RK_CONSOLE_BAUD \ + RK_CONSOLE_DEVICE \ + SPL_BINARY \ + UBOOT_SUFFIX \ + "
conf/machine/include/tinker.inc +0 -1
@@ -1,4 +1,3 @@ require conf/machine/include/rk3288.inc -WKS_FILE = "tinker-board.wks" IMAGE_BOOT_FILES += "${KERNEL_DEVICETREE}"
conf/machine/rock-pi-e.conf +0 -2
@@ -11,5 +11,3 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-stable-bleeding" KERNEL_DEVICETREE = "rockchip/rk3328-rock-pi-e.dtb" UBOOT_MACHINE = "rock-pi-e-rk3328_defconfig" - -WKS_FILE = "rock-pi-e.wks"
conf/machine/rock64.conf +0 -2
@@ -14,5 +14,3 @@ KERNEL_DEVICETREE = "rockchip/rk3328-rock64.dtb" # set to mmcblk0 for booting from optional eMMC RK_BOOT_DEVICE ?= "mmcblk1" - -WKS_FILE = "rock-pi-e.wks"
conf/machine/vyasa-rk3288.conf +0 -1
@@ -14,5 +14,4 @@ KERNEL_EXTRA_ARGS += "LOADADDR=0x02000000" UBOOT_MACHINE = "vyasa-rk3288_defconfig" RK_BOOT_DEVICE = "mmcblk2" -WKS_FILE = "vyasa-rk3288.wks" IMAGE_BOOT_FILES += "${KERNEL_DEVICETREE}"
wic/firefly-rk3288.wks deleted +0 -7
@@ -1,7 +0,0 @@ -# Copyright (C) 2019 Garmin Ltd. or its subsidiaries -# Released under the MIT license (see COPYING.MIT for the terms) - -include rk3288-boot.wks -part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root - -bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/rk3328-boot.wks deleted +0 -23
@@ -1,23 +0,0 @@ -# Copyright (C) 2021 Trevor Woerner -# Released under the MIT license (see COPYING.MIT for the terms) -# -# Disk layout -# Note that the reference documentation refers to 512 byte disk sectors, but -# wic uses 1KB blocks -# -# Partition Start Sector Number of Sectors -# loader1 64 8000 -# reserved1 8064 128 -# reserved2 8192 8192 -# loader2 16384 8192 -# atf 24576 8192 -# boot 32768 229376 -# root 262144 - (suggested) -# - -part loader1 --offset 32 --fixed-size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img" -part reserved1 --offset 4032 --fixed-size 64K --ondisk ${RK_BOOT_DEVICE} -part reserved2 --offset 4096 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} -part loader2 --offset 8192 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.itb" -part atf --offset 12288 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} -part /boot --offset 16384 --size 114688K --active --ondisk ${RK_BOOT_DEVICE} --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
wic/rk3399-boot.wks deleted +0 -24
@@ -1,24 +0,0 @@ -# Copyright (C) 2020 Garmin Ltd. or its subsidiaries -# Released under the MIT license (see COPYING.MIT for the terms) -# -# Disk layout -# Note that the reference documentation refers to 512 byte disk sectors, but -# wic uses 1KB blocks -# -# Partition Start Sector Number of Sectors -# loader1 64 8000 -# reserved1 8064 128 -# reserved2 8192 8192 -# loader2 16384 8192 -# atf 24576 8192 -# boot 32768 229376 -# root 262144 - (suggested) -# - -part loader1 --offset 32 --fixed-size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img" -part reserved1 --offset 4032 --fixed-size 64K --ondisk ${RK_BOOT_DEVICE} -part reserved2 --offset 4096 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} -part loader2 --offset 8192 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.itb" -part atf --offset 12288 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} -part /boot --offset 16384 --size 114688K --active --ondisk ${RK_BOOT_DEVICE} --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot" -
wic/rock-pi-4.wks deleted +0 -7
@@ -1,7 +0,0 @@ -# Copyright (C) 2020 Garmin Ltd. or its subsidiaries -# Released under the MIT license (see COPYING.MIT for the terms) - -include rk3399-boot.wks -part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root - -bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/rock-pi-e.wks deleted +0 -4
@@ -1,4 +0,0 @@ -include rk3328-boot.wks -part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root - -bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/rockchip.wks renamed from wic/rk3288-boot.wks +7 -3
@@ -1,4 +1,5 @@ -# Copyright (C) 2020 Garmin Ltd. or its subsidiaries +# Copyright (C) 2021 Trevor Woerner <[email protected]> +# Copyright (C) 2019,2020 Garmin Ltd. or its subsidiaries # Released under the MIT license (see COPYING.MIT for the terms) # # Disk layout
@@ -15,10 +16,13 @@ # root 262144 - (suggested) # -part loader1 --offset 32 --fixed-size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img" +part loader1 --offset 32 --fixed-size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=${SPL_BINARY}" part reserved1 --offset 4032 --fixed-size 64K --ondisk ${RK_BOOT_DEVICE} part reserved2 --offset 4096 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} -part loader2 --offset 8192 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.bin" +part loader2 --offset 8192 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" part atf --offset 12288 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} part /boot --offset 16384 --size 114688K --active --ondisk ${RK_BOOT_DEVICE} --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot" +part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root + +bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/tinker-board.wks deleted +0 -8
@@ -1,8 +0,0 @@ -# Copyright (C) 2019 Garmin Ltd. or its subsidiaries -# Released under the MIT license (see COPYING.MIT for the terms) - -include rk3288-boot.wks - -part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root - -bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
wic/vyasa-rk3288.wks deleted +0 -8
@@ -1,8 +0,0 @@ -# Copyright (C) 2019 Garmin Ltd. or its subsidiaries -# Released under the MIT license (see COPYING.MIT for the terms) - -include rk3288-boot.wks -part / --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root - -bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init" -
Signature · 1 line
2.30.0.rc0
Quoted 45 lines · 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 <[email protected]>--- 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(-)conf/machine/include/nanopi-m4.inc +0
-2@@ -21,5 +21,3 @@ WKS_FILE_DEPENDS ?= " \ IMAGE_BOOT_FILES ?= "\ ${KERNEL_IMAGETYPE} \ " - -SERIAL_CONSOLES = "1500000;ttyS2"conf/machine/include/rk3066.inc +1
-0@@ -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"conf/machine/include/rk3188.inc +0
-0
conf/machine/include/rk3188.inc require conf/machine/include/rockchip-defaults.inc · line 14
Quoted 6 lines
conf/machine/include/rk3188.inc +3
-0@@ -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"
while I appreciate this change, it does have an effect of removing the users away from
BSP variables that core metadata layers have, e.g. SERIAL_CONSOLES is a well defined
and documented variable and if we synthesize it then its hidden which is fine if we document
the new variables equally well although that means every BSP will invent these kind of
variables so if a person was doing RPI and comes to work on rockchip boards he has more
learnings to do.
Quoted 89 lines
conf/machine/include/rk3288.inc +1
-1@@ -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"conf/machine/include/rk3328.inc +0
-2@@ -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"conf/machine/include/rk3399.inc +0
-2@@ -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"conf/machine/include/rock-pi-4.inc +0
-2@@ -17,6 +17,4 @@ IMAGE_BOOT_FILES ?= "\ ${KERNEL_IMAGETYPE} \ " -SERIAL_CONSOLES = "1500000;ttyS2" - MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"conf/machine/include/rockchip-defaults.inc +3
-0@@ -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)conf/machine/marsboard-rk3066.conf +0
-1@@ -8,5 +8,4 @@ require conf/machine/include/rk3066.inc -SERIAL_CONSOLES = "115200;ttyS2" KERNEL_DEVICETREE = "rk3066a-marsboard.dtb"conf/machine/radxarock.conf +0
-2@@ -9,5 +9,4 @@ require conf/machine/include/rk3188.inc -SERIAL_CONSOLES = "115200;ttyFIQ0" KERNEL_DEVICETREE = "rk3188-radxarock.dtb" --2.30.0.rc0
----- Mail original -----
Quoted 69 lines
De: "Khem Raj" <[email protected]>
À: "Trevor Woerner" <[email protected]>
Cc: "Yocto-mailing-list" <[email protected]> Envoyé: Mercredi 23 Juin 2021 11:32:57
Objet: Re: [yocto] [meta-rockchip][PATCH 1/4] centralize console settingsQuoted 50 lines · 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 <[email protected]>--- 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(-)conf/machine/include/nanopi-m4.inc +0
-2@@ -21,5 +21,3 @@ WKS_FILE_DEPENDS ?= " \ IMAGE_BOOT_FILES ?= "\ ${KERNEL_IMAGETYPE} \ " - -SERIAL_CONSOLES = "1500000;ttyS2"conf/machine/include/rk3066.inc +1
-0@@ -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"conf/machine/include/rk3188.inc +0
-0conf/machine/include/rk3188.inc require conf/machine/include/rockchip-defaults.inc · line 14
Quoted 6 lines
conf/machine/include/rk3188.inc +3
-0@@ -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"while I appreciate this change, it does have an effect of removing the
users away from
BSP variables that core metadata layers have, e.g.SERIAL_CONSOLESis
Quoted 8 lines
a well defined
and documented variable and if we synthesize it then its hidden which is fine if we document
the new variables equally well although that means every BSP will invent these kind of
variables so if a person was doing RPI and comes to work on rockchip boards he has more
learnings to do.
What about making this change at the poky level, then ?
Quoted 103 lines
Quoted 98 lines
conf/machine/include/rk3288.inc +0
-0@@ -10,7 +10,7 @@ requireconf/machine/include/rockchip-defaults.inc
KBUILD_DEFCONFIG?= "multi_v7_defconfig"
KERNEL_IMAGETYPE= "zImage"conf/machine/include/rk3288.inc +1
-1-SERIAL_CONSOLES = "115200;ttyS2" +RK_CONSOLE_BAUD = "115200" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" SPL_BINARY ?= "idbloader.img"conf/machine/include/rk3328.inc +0
-2@@ -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"conf/machine/include/rk3399.inc +0
-2@@ -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"conf/machine/include/rock-pi-4.inc +0
-2@@ -17,6 +17,4 @@ IMAGE_BOOT_FILES ?= "\ ${KERNEL_IMAGETYPE} \ " -SERIAL_CONSOLES = "1500000;ttyS2" - MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"conf/machine/include/rockchip-defaults.inc +3
-0@@ -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)conf/machine/marsboard-rk3066.conf +0
-1@@ -8,5 +8,4 @@ require conf/machine/include/rk3066.inc -SERIAL_CONSOLES = "115200;ttyS2" KERNEL_DEVICETREE = "rk3066a-marsboard.dtb"conf/machine/radxarock.conf +0
-2@@ -9,5 +9,4 @@ require conf/machine/include/rk3188.inc -SERIAL_CONSOLES = "115200;ttyFIQ0" KERNEL_DEVICETREE = "rk3188-radxarock.dtb" --2.30.0.rc0
Quoted 6 lines · On Wed 2021-06-23 @ 08:10:07 PM, [email protected] wrote:
Quoted 5 lines
De: "Khem Raj" <[email protected]>
À: "Trevor Woerner" <[email protected]>
Cc: "Yocto-mailing-list" <[email protected]> Envoyé: Mercredi 23 Juin 2021 11:32:57
Objet: Re: [yocto] [meta-rockchip][PATCH 1/4] centralize console settings
Quoted 15 lines
Quoted 7 lines
conf/machine/include/rk3188.inc require conf/machine/include/rockchip-defaults.inc · line 14
Quoted 2 lines
conf/machine/include/rk3188.inc +2
-0+RK_CONSOLE_BAUD = "115200" +RK_CONSOLE_DEVICE = "ttyFIQ0"while I appreciate this change, it does have an effect of removing the
users away from
BSP variables that core metadata layers have, e.g.SERIAL_CONSOLESisQuoted 8 lines
a well defined
and documented variable and if we synthesize it then its hidden which is fine if we document
the new variables equally well although that means every BSP will invent these kind of
variables so if a person was doing RPI and comes to work on rockchip boards he has more
learnings to do.
Good point, thanks for mentioning it.
Quoted 1 line
What about making this change at the poky level, then ?
I suspect it would break things in all sorts of unimaginable ways ;-)
For example, SERIAL_CONSOLES (note: plural) can contain more than one baud+device pair so if we try to break out the baud and device then we'd need an array (?) so we could break out multiple baud and device pairs (?), and then that would get messy... ugh!
Quoted 39 lines
De: "Trevor Woerner" <[email protected]>
À: [email protected]
Cc: "Khem Raj" <[email protected]>, "Yocto-mailing-list" <[email protected]> Envoyé: Mercredi 23 Juin 2021 14:51:39
Objet: Re: [yocto] [meta-rockchip][PATCH 1/4] centralize console settingsQuoted 18 lines · On Wed 2021-06-23 @ 08:10:07 PM, [email protected] wrote:
Quoted 18 lines
De: "Khem Raj" <[email protected]>
À: "Trevor Woerner" <[email protected]>
Cc: "Yocto-mailing-list" <[email protected]> Envoyé: Mercredi 23 Juin 2021 11:32:57
Objet: Re: [yocto] [meta-rockchip][PATCH 1/4] centralize console settingsconf/machine/include/rk3188.inc require conf/machine/include/rockchip-defaults.inc · line 14
Quoted 2 lines
conf/machine/include/rk3188.inc +2
-0+RK_CONSOLE_BAUD = "115200" +RK_CONSOLE_DEVICE = "ttyFIQ0"while I appreciate this change, it does have an effect of removing
the
users away from
BSP variables that core metadata layers have, e.g.SERIAL_CONSOLESis
a well defined
and documented variable and if we synthesize it then its hiddenQuoted 8 lines
Quoted 8 lines
which
is fine if we document
the new variables equally well although that means every BSP will invent these kind of
variables so if a person was doing RPI and comes to work on rockchip
boards he has more
learnings to do.Good point, thanks for mentioning it.
Quoted 1 line
What about making this change at the poky level, then ?
Quoted 8 lines
I suspect it would break things in all sorts of unimaginable ways ;-)
For example,
SERIAL_CONSOLES(note: plural) can contain more than one baud+device pair so if we try to break out the baud and device then we'd need
an array (?) so we could break out multiple baud and device pairs (?), and
then that would get messy... ugh!
Damned that makes things more complicated :)
That could push us along the following lines ?
CONSOLE_DEVICES = "/dev/ttyS2 /dev/tty1"
CONSOLE_BAUD_ttyS2 = "1500000"
CONSOLE_BAUD_tty1 = "115200"
(well, with /dev/ being what it is, CONSOLE_DEVICES = "ttyS2 tty1" could even be decided as sufficient, removing any possibility for syntactic ambiguities)
or maybe even this ?
CONSOLE_BAUD = <default value>
CONSOLE_BAUD[/dev/ttyS2] = <overriden value>