conf/machine/include/rockchip-wic.inc: create

Create a conf/machine/include/rockchip-wic.inc file to contain all the common
wic/wks things for easy inclusion by any MACHINEs that use wic for their image
creation.

NOTE: the wic image type of rock-pi-e changed from "wic.xz" to "wic" which
      matches all the other meta-rockchip MACHINEs that use wic

The following variables were checked before and after to make sure they remain
correct/sensible:
- IMAGE_FSTYPES
- WKS_FILE_DEPENDS
- IMAGE_BOOT_FILES
- RK_CONSOLE_BAUD
- RK_CONSOLE_DEVICE
- RK_BOOT_DEVICE
- SERIAL_CONSOLES
- WICVARS

Build-tested for all currently-defined MACHINEs.

Boot-tested on the following boards to make sure they continue to boot to a
console correctly (core-image-base):
- tinker-board
- rock64
- rock-pi-4b
- rock-pi-e
- nanopi-m4-2gb

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
This commit is contained in:
Trevor Woerner 2021-06-24 16:38:39 -04:00
parent 8cd56cdcd8
commit 62d4201415
11 changed files with 32 additions and 93 deletions

View File

@ -7,20 +7,9 @@
#http://www.t-firefly.com/en/
require conf/machine/include/rk3288.inc
require conf/machine/include/rockchip-wic.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} \
"

View File

@ -10,14 +10,3 @@ 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} \
"

View File

@ -8,6 +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
require conf/machine/include/rockchip-wic.inc
KBUILD_DEFCONFIG ?= "defconfig"
KERNEL_CLASSES = "kernel-fitimage"

View File

@ -8,6 +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
require conf/machine/include/rockchip-wic.inc
KBUILD_DEFCONFIG ?= "defconfig"
KERNEL_CLASSES = "kernel-fitimage"

View File

@ -5,16 +5,5 @@ 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"

View File

@ -23,17 +23,3 @@ XSERVER = " \
# misc
SERIAL_CONSOLES ?= "1500000;ttyS2"
IMAGE_FSTYPES += "ext4"
# use the first-defined <baud>;<device> pair in SERIAL_CONSOLES
# for the console parameter in the wks files
RK_CONSOLE_BAUD ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[0]}"
RK_CONSOLE_DEVICE ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[1].split()[0]}"
# boot device (sd-card/emmc)
RK_BOOT_DEVICE ??= "mmcblk0"
WICVARS_append = " \
RK_BOOT_DEVICE \
RK_CONSOLE_BAUD \
RK_CONSOLE_DEVICE \
"

View File

@ -0,0 +1,27 @@
# common meta-rockchip wic/wks items
IMAGE_FSTYPES += "wic wic.bmap"
WKS_FILE_DEPENDS ?= " \
mtools-native \
dosfstools-native \
virtual/bootloader \
virtual/kernel \
"
IMAGE_BOOT_FILES = " \
${KERNEL_IMAGETYPE} \
${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${KERNEL_DEVICETREE}', d)} \
"
# use the first-defined <baud>;<device> pair in SERIAL_CONSOLES
# for the console parameter in the wks files
RK_CONSOLE_BAUD ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[0]}"
RK_CONSOLE_DEVICE ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[1].split()[0]}"
# boot device (sd-card/emmc)
RK_BOOT_DEVICE ??= "mmcblk0"
WICVARS_append = " \
RK_BOOT_DEVICE \
RK_CONSOLE_BAUD \
RK_CONSOLE_DEVICE \
"

View File

@ -1,15 +1,4 @@
require conf/machine/include/rk3288.inc
require conf/machine/include/rockchip-wic.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} \
"

View File

@ -15,13 +15,3 @@ 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} \
"

View File

@ -16,16 +16,5 @@ KERNEL_DEVICETREE = "rockchip/rk3328-rock64.dtb"
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"

View File

@ -6,6 +6,7 @@
#@DESCRIPTION: Amarula Vyasa is Rockchip RK3288 SOC based Single board computer with fully supported opensource software.
require conf/machine/include/rk3288.inc
require conf/machine/include/rockchip-wic.inc
KERNEL_IMAGETYPE = "uImage"
KERNEL_DEVICETREE = "rk3288-vyasa.dtb"
@ -15,15 +16,3 @@ 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} \
"