Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rockchip fixes + add rock5a radxa board support #41

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -195,6 +198,9 @@ config PLATFORM_ROCKCHIP
config PLATFORM_SUNXI
bool

config PLATFORM_RADXA
bool

choice
prompt "Machine"
default MACHINE_QEMUARM
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

14 changes: 14 additions & 0 deletions kas/machines/radxa-rock5a.yaml
Original file line number Diff line number Diff line change
@@ -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

35 changes: 35 additions & 0 deletions kas/platforms/radxa.yaml
Original file line number Diff line number Diff line change
@@ -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"


25 changes: 25 additions & 0 deletions patches/meta-rockchip-radxa/0001-wic-Fix-root-label.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 44cf6391261a521b3813464fe473ab65761cb102 Mon Sep 17 00:00:00 2001
From: Marek Belisko <[email protected]>
Date: Wed, 16 Oct 2024 11:38:20 +0200
Subject: [PATCH] wic: Fix root label

Signed-off-by: Marek Belisko <[email protected]>
---
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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this could be upstreamable if this was a variable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nandra have you opened the upstreaming threat on this? I think first choice would be to use 'root' everywhere or if not use ${RK_ROOT_LABEL} or something....


bootloader --ptable gpt
--
2.25.1

1 change: 1 addition & 0 deletions recipes-bsp/u-boot/files/pv.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions recipes-core/util-linux/util-linux_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# drop this support for rockchip
PACKAGECONFIG:class-target:rockchip:remove = "libmount-mountfd-support"