diff --git a/Kconfig b/Kconfig index 792a806..c4b9506 100644 --- a/Kconfig +++ b/Kconfig @@ -135,7 +135,7 @@ config MACHINE_FILTER_ALL choice prompt "Filter Machines" - default PLATFORM_QEMU + default MACHINE_FILTER_QEMU depends on MACHINE_FILTER_ALL = n config MACHINE_FILTER_QEMU @@ -166,6 +166,9 @@ config MACHINE_FILTER_TI config MACHINE_FILTER_RISCV bool "RISC-V" +config MACHINE_FILTER_RADXA + bool "Radxa" + endchoice config PLATFORM_CORAL @@ -195,6 +198,9 @@ config PLATFORM_ROCKCHIP config PLATFORM_SUNXI bool +config PLATFORM_RADXA + bool + choice prompt "Machine" default MACHINE_QEMUARM @@ -323,6 +329,12 @@ config MACHINE_RISCV_VISIONFIVE2 depends on MACHINE_FILTER_ALL || MACHINE_FILTER_RISCV select PLATFORM_RISCV +config MACHINE_RADXA_ROCK5A + bool "radxa rock5a" + depends on MACHINE_FILTER_ALL || MACHINE_FILTER_RADXA + select PLATFORM_RADXA + + endchoice config KAS_INCLUDE_MACHINE_QEMUX86_64 @@ -452,3 +464,7 @@ config KAS_INCLUDE_SCARTHGAP_RISCV string default "kas/scarthgap-riscv.yaml" if CODENAME_SCARTHGAP && PLATFORM_RISCV +config KAS_INCLUDE_MACHINE_RADXA_ROCK5A + string + default "kas/machines/radxa-rock5a.yaml" if MACHINE_RADXA_ROCK5A + diff --git a/kas/machines/radxa-rock5a.yaml b/kas/machines/radxa-rock5a.yaml new file mode 100644 index 0000000..0c7def8 --- /dev/null +++ b/kas/machines/radxa-rock5a.yaml @@ -0,0 +1,14 @@ +# Every file needs to contain a header, that provides kas with information +# about the context of this file. +header: + # The `version` entry in the header describes for which configuration + # format version this file was created for. It is used by kas to figure + # out if it is compatible with this file. The version is an integer that + # is increased on every format change. + version: 16 + includes: + - kas/platforms/radxa.yaml + +# The machine as it is written into the `local.conf` of bitbake. +machine: rock-5a + diff --git a/kas/platforms/radxa.yaml b/kas/platforms/radxa.yaml new file mode 100644 index 0000000..4164869 --- /dev/null +++ b/kas/platforms/radxa.yaml @@ -0,0 +1,35 @@ +# Every file needs to contain a header, that provides kas with information +# about the context of this file. +header: + # The `version` entry in the header describes for which configuration + # format version this file was created for. It is used by kas to figure + # out if it is compatible with this file. The version is an integer that + # is increased on every format change. + version: 16 + +# The machine as it is written into the `local.conf` of bitbake. +repos: + meta-rockchip: + url: "https://github.com/radxa/meta-rockchip.git" + path: layers/meta-rockchip-radxa + patches: + wks-root-label: + repo: meta-pantavisor + path: patches/meta-rockchip-radxa/0001-wic-Fix-root-label.patch + + meta-arm: + url: git://git.yoctoproject.org/meta-arm + path: layers/meta-arm + layers: + meta-arm: + meta-arm-toolchain: + +local_conf_header: + platform-rockchip: | + PV_UBOOT_AUTOFDT = "1" + # keep rockchip prefix in dtb + # otherwise fit configuration doesn't fit + # with fdtfile varible and board won't boot + KERNEL_DTBVENDORED = "1" + + diff --git a/patches/meta-rockchip-radxa/0001-wic-Fix-root-label.patch b/patches/meta-rockchip-radxa/0001-wic-Fix-root-label.patch new file mode 100644 index 0000000..8f3749c --- /dev/null +++ b/patches/meta-rockchip-radxa/0001-wic-Fix-root-label.patch @@ -0,0 +1,25 @@ +From 44cf6391261a521b3813464fe473ab65761cb102 Mon Sep 17 00:00:00 2001 +From: Marek Belisko +Date: Wed, 16 Oct 2024 11:38:20 +0200 +Subject: [PATCH] wic: Fix root label + +Signed-off-by: Marek Belisko +--- + wic/rockchip.wks | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wic/rockchip.wks b/wic/rockchip.wks +index cabdb65..0b939ad 100644 +--- a/wic/rockchip.wks ++++ b/wic/rockchip.wks +@@ -26,6 +26,6 @@ part uboot_env --offset 8128s --fixed-size 32K --fstype=none --part-name uboo + part reserved2 --offset 8192s --fixed-size 4096K --fstype=none --part-name reserved2 + part loader2 --offset 16384s --fixed-size 4096K --fstype=none --part-name loader2 --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" + part atf --offset 24576s --fixed-size 4096K --fstype=none --part-name atf +-part / --label rootfsA --active --fstype=ext4 --part-name rootfsA --source rootfs --part-type ${ROOT_DPS} ++part / --label root --active --fstype=ext4 --part-name root --source rootfs --part-type ${ROOT_DPS} + + bootloader --ptable gpt +-- +2.25.1 + diff --git a/recipes-bsp/u-boot/files/pv.cfg b/recipes-bsp/u-boot/files/pv.cfg index 7fd9b69..560de9a 100644 --- a/recipes-bsp/u-boot/files/pv.cfg +++ b/recipes-bsp/u-boot/files/pv.cfg @@ -5,3 +5,4 @@ CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_PART=y +CONFIG_CMD_SETEXPR=y diff --git a/recipes-core/util-linux/util-linux_%.bbappend b/recipes-core/util-linux/util-linux_%.bbappend new file mode 100644 index 0000000..1e9a954 --- /dev/null +++ b/recipes-core/util-linux/util-linux_%.bbappend @@ -0,0 +1,3 @@ +# drop this support for rockchip +PACKAGECONFIG:class-target:rockchip:remove = "libmount-mountfd-support" +