Re: [yocto] [meta-rockchip] [PATCH v3] rock-3a add
Hi, It is in that the rk3568 won't boot without rkbin and it needed to be modified to allow multiple machines to be able to have their own rkbin. I never had a problem with not having the catchall, just old habits of never have a conditional without a catchall explaining the problem of getting there (if it should never get there) On Thu, 26 Oct 2023 at 01:22, Quentin Schulz wrote: > > Hi Trevor, > > On 10/25/23 15:56, Trevor Woerner via lists.yoctoproject.org wrote: > > Hi Anthony, > > > > Thanks for working on this. > > > > On Mon 2023-10-16 @ 09:43:45 PM, anthony.t.dav...@gmail.com wrote: > >> From: Anthony Davies > >> > >> Add support for the Radxa Rock 3A > >> https://wiki.radxa.com/Rock3/3a > >> > >> The TF-A project does not currently have support for > >> the rk3568. Therefore, for the time-being, the only way to supply a > >> TPL/DDR-init for the rk3568 is to use the closed-source rkbin binaries > >> from Rockchip. If/when TF-A adds support for the rk3588 we can investigate > >> switching. > >> > >> recipes-bsp/rkbin/rockchip-rkbin_git.bb was modified to allow a machine > >> override to allow both rk3568 and rk3588s to use differnet binary blobs > >> > >> Signed-off-by: Anthony Davies > >> --- > >> README | 1 + > >> conf/machine/include/rk3568.inc | 17 + > >> conf/machine/rock-3a.conf | 12 > >> recipes-bsp/rkbin/rockchip-rkbin_git.bb | 16 +++- > >> recipes-bsp/u-boot/u-boot%.bbappend | 5 + > >> 5 files changed, 50 insertions(+), 1 deletion(-) > >> create mode 100644 conf/machine/include/rk3568.inc > >> create mode 100644 conf/machine/rock-3a.conf > >> > >> diff --git a/README b/README > >> index 8104474..3357b47 100644 > >> --- a/README > >> +++ b/README > >> @@ -32,6 +32,7 @@ Status of supported boards: > >> nanopi-r4s > >> rock-5b > >> nanopi-r2s > >> +rock-3a > > > > There's still an issue with indents/tabs. > > > >> builds: > >> marsboard-rk3066 > >> radxarock > >> diff --git a/conf/machine/include/rk3568.inc > >> b/conf/machine/include/rk3568.inc > >> new file mode 100644 > >> index 000..5382b58 > >> --- /dev/null > >> +++ b/conf/machine/include/rk3568.inc > >> @@ -0,0 +1,17 @@ > >> +MACHINEOVERRIDES =. "rk3568:" > >> +DEFAULTTUNE ?= "cortexa55" > >> + > >> +require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc > >> +require conf/machine/include/rockchip-defaults.inc > >> +require conf/machine/include/rockchip-wic.inc > >> + > >> +KBUILD_DEFCONFIG ?= "defconfig" > >> +KERNEL_FEATURES:append:rk3568 = " > >> bsp/rockchip/remove-non-rockchip-arch-arm64.scc" > >> +KERNEL_CLASSES ??= "kernel-fitimage" > >> +KERNEL_IMAGETYPE ??= "fitImage" > >> + > >> +PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin" > >> +PREFERRED_PROVIDER_optee-os = "rockchip-rkbin" > >> + > >> +UBOOT_SUFFIX ?= "itb" > >> +UBOOT_ENTRYPOINT ?= "0x0600" > >> diff --git a/conf/machine/rock-3a.conf b/conf/machine/rock-3a.conf > >> new file mode 100644 > >> index 000..2ed83a3 > >> --- /dev/null > >> +++ b/conf/machine/rock-3a.conf > >> @@ -0,0 +1,12 @@ > >> +#@TYPE: Machine > >> +#@NAME: Radxa Rock 3a > >> +#@DESCRIPTION: ROCK3 is a series of Rockchip RK3566/RK3568 based > >> +#SBC(Single Board Computer) and Compute Module by Radxa. > >> +#https://wiki.radxa.com/Rock3 > >> + > >> +require conf/machine/include/rk3568.inc > >> + > >> +KERNEL_DEVICETREE = "rockchip/rk3568-rock-3a.dtb" > >> +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" > >> + > >> +UBOOT_MACHINE = "rock-3a-rk3568_defconfig" > >> diff --git a/recipes-bsp/rkbin/rockchip-rkbin_git.bb > >> b/recipes-bsp/rkbin/rockchip-rkbin_git.bb > >> index 7fefb01..ad5593c 100644 > >> --- a/recipes-bsp/rkbin/rockchip-rkbin_git.bb > >> +++ b/recipes-bsp/rkbin/rockchip-rkbin_git.bb > >> @@ -14,6 +14,7 @@ S = "${WORKDIR}/git" > >> > >> COMPATIBLE_MACHINE = "" > >> COMP
[yocto] [meta-rockchip] [PATCH v3] rock-3a add
From: Anthony Davies Add support for the Radxa Rock 3A https://wiki.radxa.com/Rock3/3a The TF-A project does not currently have support for the rk3568. Therefore, for the time-being, the only way to supply a TPL/DDR-init for the rk3568 is to use the closed-source rkbin binaries from Rockchip. If/when TF-A adds support for the rk3588 we can investigate switching. recipes-bsp/rkbin/rockchip-rkbin_git.bb was modified to allow a machine override to allow both rk3568 and rk3588s to use differnet binary blobs Signed-off-by: Anthony Davies --- README | 1 + conf/machine/include/rk3568.inc | 17 + conf/machine/rock-3a.conf | 12 recipes-bsp/rkbin/rockchip-rkbin_git.bb | 16 +++- recipes-bsp/u-boot/u-boot%.bbappend | 5 + 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 conf/machine/include/rk3568.inc create mode 100644 conf/machine/rock-3a.conf diff --git a/README b/README index 8104474..3357b47 100644 --- a/README +++ b/README @@ -32,6 +32,7 @@ Status of supported boards: nanopi-r4s rock-5b nanopi-r2s +rock-3a builds: marsboard-rk3066 radxarock diff --git a/conf/machine/include/rk3568.inc b/conf/machine/include/rk3568.inc new file mode 100644 index 000..5382b58 --- /dev/null +++ b/conf/machine/include/rk3568.inc @@ -0,0 +1,17 @@ +MACHINEOVERRIDES =. "rk3568:" +DEFAULTTUNE ?= "cortexa55" + +require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc +require conf/machine/include/rockchip-defaults.inc +require conf/machine/include/rockchip-wic.inc + +KBUILD_DEFCONFIG ?= "defconfig" +KERNEL_FEATURES:append:rk3568 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" +KERNEL_CLASSES ??= "kernel-fitimage" +KERNEL_IMAGETYPE ??= "fitImage" + +PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin" +PREFERRED_PROVIDER_optee-os = "rockchip-rkbin" + +UBOOT_SUFFIX ?= "itb" +UBOOT_ENTRYPOINT ?= "0x0600" diff --git a/conf/machine/rock-3a.conf b/conf/machine/rock-3a.conf new file mode 100644 index 000..2ed83a3 --- /dev/null +++ b/conf/machine/rock-3a.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: Radxa Rock 3a +#@DESCRIPTION: ROCK3 is a series of Rockchip RK3566/RK3568 based +#SBC(Single Board Computer) and Compute Module by Radxa. +#https://wiki.radxa.com/Rock3 + +require conf/machine/include/rk3568.inc + +KERNEL_DEVICETREE = "rockchip/rk3568-rock-3a.dtb" +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" + +UBOOT_MACHINE = "rock-3a-rk3568_defconfig" diff --git a/recipes-bsp/rkbin/rockchip-rkbin_git.bb b/recipes-bsp/rkbin/rockchip-rkbin_git.bb index 7fefb01..ad5593c 100644 --- a/recipes-bsp/rkbin/rockchip-rkbin_git.bb +++ b/recipes-bsp/rkbin/rockchip-rkbin_git.bb @@ -14,6 +14,7 @@ S = "${WORKDIR}/git" COMPATIBLE_MACHINE = "" COMPATIBLE_MACHINE:rk3588s = "rk3588s" +COMPATIBLE_MACHINE:rk3568 = "rk3568" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -25,7 +26,16 @@ do_install() { PACKAGES = "${PN}" ALLOW_EMPTY:${PN} = "1" -do_deploy() { +do_deploy:rk3568() { + # Prebuilt TF-A + install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3568.elf + # Prebuilt OPTEE-OS + install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin ${DEPLOYDIR}/tee-rk3568.bin + # Prebuilt U-Boot TPL (DDR init) + install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.18.bin ${DEPLOYDIR}/ddr-rk3568.bin +} + +do_deploy:rk3588s() { # Prebuilt TF-A install -m 644 ${S}/bin/rk35/rk3588_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3588.elf # Prebuilt OPTEE-OS @@ -34,4 +44,8 @@ do_deploy() { install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v*.bin ${DEPLOYDIR}/ddr-rk3588.bin } +do_deploy() { + bbfatal "COMPATIBLE_MACHINE requires a corressponding do_deploy:() override" +} + addtask deploy after do_install diff --git a/recipes-bsp/u-boot/u-boot%.bbappend b/recipes-bsp/u-boot/u-boot%.bbappend index e79c471..66c81da 100644 --- a/recipes-bsp/u-boot/u-boot%.bbappend +++ b/recipes-bsp/u-boot/u-boot%.bbappend @@ -9,12 +9,17 @@ EXTRA_OEMAKE:append:rk3588s = " \ BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \ ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin \ " +EXTRA_OEMAKE:append:rk3568 = " \ + BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3568.elf \ + ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3568.bin \ + " INIT_FIRMWARE_DEPENDS ??= "" INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy" INIT_FIRMWARE_DEPENDS:rk3328 = " trusted-firmware-a:do_deploy" INIT_FIRMWARE_DEPENDS:rk3399 = " trusted-firmware-a:do_deploy" INIT_FIRMWARE_DEPENDS:rk3588s = " rockchi
Re: [yocto] [meta-rockchip] [PATCH v2] rock-3a add
Hi Quentin, On Mon, 9 Oct 2023 at 19:25, Quentin Schulz wrote: > > Hi Anthony, > > On 10/7/23 01:26, Anthony Davies via lists.yoctoproject.org wrote: > > From: Anthony Davies > > > > Add support for the Radxa Rock 3A > > https://wiki.radxa.com/Rock3/3a > > > > The TF-A project does not currently have support for > > the rk3568. Therefore, for the time-being, the only way to supply a > > TPL/DDR-init for the rk3568 is to use the closed-source rkbin binaries > > from Rockchip. If/when TF-A adds support for the rk3588 we can investigate > > switching. > > > > recipes-bsp/rkbin/rockchip-rkbin_git.bb was modified to allow a machine > > override to allow both rk3568 and rk3588s to use differnet binary blobs > > > > Signed-off-by: Anthony Davies > > --- > > README | 1 + > > conf/machine/include/rk3568.inc | 17 + > > conf/machine/rock-3a.conf | 12 > > recipes-bsp/rkbin/rockchip-rkbin_git.bb | 16 +++- > > recipes-bsp/u-boot/u-boot%.bbappend | 5 + > > 5 files changed, 50 insertions(+), 1 deletion(-) > > create mode 100644 conf/machine/include/rk3568.inc > > create mode 100644 conf/machine/rock-3a.conf > > > > diff --git a/README b/README > > index 8104474..3357b47 100644 > > --- a/README > > +++ b/README > > @@ -32,6 +32,7 @@ Status of supported boards: > > nanopi-r4s > > rock-5b > > nanopi-r2s > > +rock-3a > > Please use the same indentation here so it's aligned with the other boards. > > It's 2 tabs for the indentation there it seems. This would be my vim converting my \t to spaces. I will update and resend. > > > builds: > > marsboard-rk3066 > > radxarock > > diff --git a/conf/machine/include/rk3568.inc > > b/conf/machine/include/rk3568.inc > > new file mode 100644 > > index 000..5382b58 > > --- /dev/null > > +++ b/conf/machine/include/rk3568.inc > > @@ -0,0 +1,17 @@ > > +MACHINEOVERRIDES =. "rk3568:" > > +DEFAULTTUNE ?= "cortexa55" > > + > > +require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc > > +require conf/machine/include/rockchip-defaults.inc > > +require conf/machine/include/rockchip-wic.inc > > + > > +KBUILD_DEFCONFIG ?= "defconfig" > > +KERNEL_FEATURES:append:rk3568 = " > > bsp/rockchip/remove-non-rockchip-arch-arm64.scc" > > +KERNEL_CLASSES ??= "kernel-fitimage" > > +KERNEL_IMAGETYPE ??= "fitImage" > > + > > +PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin" > > +PREFERRED_PROVIDER_optee-os = "rockchip-rkbin" > > + > > +UBOOT_SUFFIX ?= "itb" > > +UBOOT_ENTRYPOINT ?= "0x0600" > > diff --git a/conf/machine/rock-3a.conf b/conf/machine/rock-3a.conf > > new file mode 100644 > > index 000..2ed83a3 > > --- /dev/null > > +++ b/conf/machine/rock-3a.conf > > @@ -0,0 +1,12 @@ > > +#@TYPE: Machine > > +#@NAME: Radxa Rock 3a > > +#@DESCRIPTION: ROCK3 is a series of Rockchip RK3566/RK3568 based > > +#SBC(Single Board Computer) and Compute Module by Radxa. > > +#https://wiki.radxa.com/Rock3 > > + > > +require conf/machine/include/rk3568.inc > > + > > +KERNEL_DEVICETREE = "rockchip/rk3568-rock-3a.dtb" > > +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" > > + > > +UBOOT_MACHINE = "rock-3a-rk3568_defconfig" > > diff --git a/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > b/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > index 7fefb01..273f394 100644 > > --- a/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > +++ b/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > @@ -14,6 +14,7 @@ S = "${WORKDIR}/git" > > > > COMPATIBLE_MACHINE = "" > > COMPATIBLE_MACHINE:rk3588s = "rk3588s" > > +COMPATIBLE_MACHINE:rk3568 = "rk3568" > > > > PACKAGE_ARCH = "${MACHINE_ARCH}" > > > > @@ -25,7 +26,16 @@ do_install() { > > PACKAGES = "${PN}" > > ALLOW_EMPTY:${PN} = "1" > > > > -do_deploy() { > > +do_deploy:rk3568() { > > + # Prebuilt TF-A > > + install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf > > ${DEPLOYDIR}/bl31-rk3568.elf > > + # Prebuilt OPTEE-OS > > + install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin > > ${DEPLOYDIR}/tee-rk3568.bin > > + # Preb
Re: [yocto] [meta-rockchip] [PATCH] Add support for the Radxa Rock-3a based on rk3568
Apologies Trevor, I have sent an updated patch this morning which should hopefully be a better fit. On Fri, 6 Oct 2023 at 11:19, Trevor Woerner wrote: > > On Fri 2023-10-06 @ 09:45:44 AM, anthony.t.dav...@gmail.com wrote: > > From: Anthony Davies > > > > Added appropriate inc files and machine.conf > > > > Modified rockchip-rkbin_git.bb to allow machine overrides on > > do_deploy. > > > > I have tested this patch on my own rock-3a > > This commit message is lacking. Take a look at some of the other commits > adding new machines and try to follow suit. > > > > > Signed-off-by: Anthony Davies > > --- > > README | 1 + > > conf/machine/include/rk3568.inc | 17 ++ > > conf/machine/rock-3a.conf | 12 +++ > > recipes-bsp/rkbin/rockchip-rkbin_git.bb | 16 - > > recipes-bsp/u-boot/u-boot%.bbappend | 43 - > > 5 files changed, 73 insertions(+), 16 deletions(-) > > create mode 100644 conf/machine/include/rk3568.inc > > create mode 100644 conf/machine/rock-3a.conf > > > > diff --git a/README b/README > > index 8104474..aa1c834 100644 > > --- a/README > > +++ b/README > > @@ -30,6 +30,7 @@ Status of supported boards: > > vyasa-rk3288 > > firefly-rk3288 > > nanopi-r4s > > +rock-3a > > rock-5b > > nanopi-r2s > > builds: > > diff --git a/conf/machine/include/rk3568.inc > > b/conf/machine/include/rk3568.inc > > new file mode 100644 > > index 000..5382b58 > > --- /dev/null > > +++ b/conf/machine/include/rk3568.inc > > @@ -0,0 +1,17 @@ > > +MACHINEOVERRIDES =. "rk3568:" > > +DEFAULTTUNE ?= "cortexa55" > > + > > +require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc > > +require conf/machine/include/rockchip-defaults.inc > > +require conf/machine/include/rockchip-wic.inc > > + > > +KBUILD_DEFCONFIG ?= "defconfig" > > +KERNEL_FEATURES:append:rk3568 = " > > bsp/rockchip/remove-non-rockchip-arch-arm64.scc" > > +KERNEL_CLASSES ??= "kernel-fitimage" > > +KERNEL_IMAGETYPE ??= "fitImage" > > + > > +PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin" > > +PREFERRED_PROVIDER_optee-os = "rockchip-rkbin" > > + > > +UBOOT_SUFFIX ?= "itb" > > +UBOOT_ENTRYPOINT ?= "0x0600" > > diff --git a/conf/machine/rock-3a.conf b/conf/machine/rock-3a.conf > > new file mode 100644 > > index 000..452bde0 > > --- /dev/null > > +++ b/conf/machine/rock-3a.conf > > @@ -0,0 +1,12 @@ > > +#@TYPE: Machine > > +#@NAME: Radxa Rock3a > > +#@DESCRIPTION: ROCK3 is a series of Rockchip RK3566/RK3568 based > > SBC(Single Board Computer) and Compute Module by Radxa. > > +#https://wiki.radxa.com/Rock3 > > + > > +require conf/machine/include/rk3568.inc > > + > > +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-dev" > > +KERNEL_DEVICETREE = "rockchip/rk3568-rock-3a.dtb" > > +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" > > + > > +UBOOT_MACHINE = "rock-3a-rk3568_defconfig" > > diff --git a/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > b/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > index 7fefb01..273f394 100644 > > --- a/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > +++ b/recipes-bsp/rkbin/rockchip-rkbin_git.bb > > @@ -14,6 +14,7 @@ S = "${WORKDIR}/git" > > > > COMPATIBLE_MACHINE = "" > > COMPATIBLE_MACHINE:rk3588s = "rk3588s" > > +COMPATIBLE_MACHINE:rk3568 = "rk3568" > > > > PACKAGE_ARCH = "${MACHINE_ARCH}" > > > > @@ -25,7 +26,16 @@ do_install() { > > PACKAGES = "${PN}" > > ALLOW_EMPTY:${PN} = "1" > > > > -do_deploy() { > > +do_deploy:rk3568() { > > + # Prebuilt TF-A > > + install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf > > ${DEPLOYDIR}/bl31-rk3568.elf > > + # Prebuilt OPTEE-OS > > + install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin > > ${DEPLOYDIR}/tee-rk3568.bin > > + # Prebuilt U-Boot TPL (DDR init) > > + install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.18.bin > > ${DEPLOYDIR}/ddr-rk3568.bin > > +} > > + > > +do_deploy:rk3588s() { > > # Prebuilt TF-A > > install -m 644 ${S}/bin/rk35/rk3588_bl31_v*.elf > > ${DEPLOYDIR}/bl31-rk3588.elf >
[yocto] [meta-rockchip] [PATCH v2] rock-3a add
From: Anthony Davies Add support for the Radxa Rock 3A https://wiki.radxa.com/Rock3/3a The TF-A project does not currently have support for the rk3568. Therefore, for the time-being, the only way to supply a TPL/DDR-init for the rk3568 is to use the closed-source rkbin binaries from Rockchip. If/when TF-A adds support for the rk3588 we can investigate switching. recipes-bsp/rkbin/rockchip-rkbin_git.bb was modified to allow a machine override to allow both rk3568 and rk3588s to use differnet binary blobs Signed-off-by: Anthony Davies --- README | 1 + conf/machine/include/rk3568.inc | 17 + conf/machine/rock-3a.conf | 12 recipes-bsp/rkbin/rockchip-rkbin_git.bb | 16 +++- recipes-bsp/u-boot/u-boot%.bbappend | 5 + 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 conf/machine/include/rk3568.inc create mode 100644 conf/machine/rock-3a.conf diff --git a/README b/README index 8104474..3357b47 100644 --- a/README +++ b/README @@ -32,6 +32,7 @@ Status of supported boards: nanopi-r4s rock-5b nanopi-r2s +rock-3a builds: marsboard-rk3066 radxarock diff --git a/conf/machine/include/rk3568.inc b/conf/machine/include/rk3568.inc new file mode 100644 index 000..5382b58 --- /dev/null +++ b/conf/machine/include/rk3568.inc @@ -0,0 +1,17 @@ +MACHINEOVERRIDES =. "rk3568:" +DEFAULTTUNE ?= "cortexa55" + +require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc +require conf/machine/include/rockchip-defaults.inc +require conf/machine/include/rockchip-wic.inc + +KBUILD_DEFCONFIG ?= "defconfig" +KERNEL_FEATURES:append:rk3568 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" +KERNEL_CLASSES ??= "kernel-fitimage" +KERNEL_IMAGETYPE ??= "fitImage" + +PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin" +PREFERRED_PROVIDER_optee-os = "rockchip-rkbin" + +UBOOT_SUFFIX ?= "itb" +UBOOT_ENTRYPOINT ?= "0x0600" diff --git a/conf/machine/rock-3a.conf b/conf/machine/rock-3a.conf new file mode 100644 index 000..2ed83a3 --- /dev/null +++ b/conf/machine/rock-3a.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: Radxa Rock 3a +#@DESCRIPTION: ROCK3 is a series of Rockchip RK3566/RK3568 based +#SBC(Single Board Computer) and Compute Module by Radxa. +#https://wiki.radxa.com/Rock3 + +require conf/machine/include/rk3568.inc + +KERNEL_DEVICETREE = "rockchip/rk3568-rock-3a.dtb" +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" + +UBOOT_MACHINE = "rock-3a-rk3568_defconfig" diff --git a/recipes-bsp/rkbin/rockchip-rkbin_git.bb b/recipes-bsp/rkbin/rockchip-rkbin_git.bb index 7fefb01..273f394 100644 --- a/recipes-bsp/rkbin/rockchip-rkbin_git.bb +++ b/recipes-bsp/rkbin/rockchip-rkbin_git.bb @@ -14,6 +14,7 @@ S = "${WORKDIR}/git" COMPATIBLE_MACHINE = "" COMPATIBLE_MACHINE:rk3588s = "rk3588s" +COMPATIBLE_MACHINE:rk3568 = "rk3568" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -25,7 +26,16 @@ do_install() { PACKAGES = "${PN}" ALLOW_EMPTY:${PN} = "1" -do_deploy() { +do_deploy:rk3568() { + # Prebuilt TF-A + install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3568.elf + # Prebuilt OPTEE-OS + install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin ${DEPLOYDIR}/tee-rk3568.bin + # Prebuilt U-Boot TPL (DDR init) + install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.18.bin ${DEPLOYDIR}/ddr-rk3568.bin +} + +do_deploy:rk3588s() { # Prebuilt TF-A install -m 644 ${S}/bin/rk35/rk3588_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3588.elf # Prebuilt OPTEE-OS @@ -34,4 +44,8 @@ do_deploy() { install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v*.bin ${DEPLOYDIR}/ddr-rk3588.bin } +do_deploy() { +# Needed as a default perhaps a bb.fatal with a message saying an override needs to be set +} + addtask deploy after do_install diff --git a/recipes-bsp/u-boot/u-boot%.bbappend b/recipes-bsp/u-boot/u-boot%.bbappend index e79c471..66c81da 100644 --- a/recipes-bsp/u-boot/u-boot%.bbappend +++ b/recipes-bsp/u-boot/u-boot%.bbappend @@ -9,12 +9,17 @@ EXTRA_OEMAKE:append:rk3588s = " \ BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \ ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin \ " +EXTRA_OEMAKE:append:rk3568 = " \ + BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3568.elf \ + ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3568.bin \ + " INIT_FIRMWARE_DEPENDS ??= "" INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy" INIT_FIRMWARE_DEPENDS:rk3328 = " trusted-firmware-a:do_deploy" INIT_FIRMWARE_DEPENDS:rk3399 = " trusted-firmware-a:do_deploy" INIT_FIRMWARE_DEPENDS:rk3588s = " rock
[yocto] [meta-rockchip] [PATCH] Add support for the Radxa Rock-3a based on rk3568
From: Anthony Davies Added appropriate inc files and machine.conf Modified rockchip-rkbin_git.bb to allow machine overrides on do_deploy. I have tested this patch on my own rock-3a Signed-off-by: Anthony Davies --- README | 1 + conf/machine/include/rk3568.inc | 17 ++ conf/machine/rock-3a.conf | 12 +++ recipes-bsp/rkbin/rockchip-rkbin_git.bb | 16 - recipes-bsp/u-boot/u-boot%.bbappend | 43 - 5 files changed, 73 insertions(+), 16 deletions(-) create mode 100644 conf/machine/include/rk3568.inc create mode 100644 conf/machine/rock-3a.conf diff --git a/README b/README index 8104474..aa1c834 100644 --- a/README +++ b/README @@ -30,6 +30,7 @@ Status of supported boards: vyasa-rk3288 firefly-rk3288 nanopi-r4s +rock-3a rock-5b nanopi-r2s builds: diff --git a/conf/machine/include/rk3568.inc b/conf/machine/include/rk3568.inc new file mode 100644 index 000..5382b58 --- /dev/null +++ b/conf/machine/include/rk3568.inc @@ -0,0 +1,17 @@ +MACHINEOVERRIDES =. "rk3568:" +DEFAULTTUNE ?= "cortexa55" + +require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc +require conf/machine/include/rockchip-defaults.inc +require conf/machine/include/rockchip-wic.inc + +KBUILD_DEFCONFIG ?= "defconfig" +KERNEL_FEATURES:append:rk3568 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" +KERNEL_CLASSES ??= "kernel-fitimage" +KERNEL_IMAGETYPE ??= "fitImage" + +PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin" +PREFERRED_PROVIDER_optee-os = "rockchip-rkbin" + +UBOOT_SUFFIX ?= "itb" +UBOOT_ENTRYPOINT ?= "0x0600" diff --git a/conf/machine/rock-3a.conf b/conf/machine/rock-3a.conf new file mode 100644 index 000..452bde0 --- /dev/null +++ b/conf/machine/rock-3a.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: Radxa Rock3a +#@DESCRIPTION: ROCK3 is a series of Rockchip RK3566/RK3568 based SBC(Single Board Computer) and Compute Module by Radxa. +#https://wiki.radxa.com/Rock3 + +require conf/machine/include/rk3568.inc + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-dev" +KERNEL_DEVICETREE = "rockchip/rk3568-rock-3a.dtb" +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" + +UBOOT_MACHINE = "rock-3a-rk3568_defconfig" diff --git a/recipes-bsp/rkbin/rockchip-rkbin_git.bb b/recipes-bsp/rkbin/rockchip-rkbin_git.bb index 7fefb01..273f394 100644 --- a/recipes-bsp/rkbin/rockchip-rkbin_git.bb +++ b/recipes-bsp/rkbin/rockchip-rkbin_git.bb @@ -14,6 +14,7 @@ S = "${WORKDIR}/git" COMPATIBLE_MACHINE = "" COMPATIBLE_MACHINE:rk3588s = "rk3588s" +COMPATIBLE_MACHINE:rk3568 = "rk3568" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -25,7 +26,16 @@ do_install() { PACKAGES = "${PN}" ALLOW_EMPTY:${PN} = "1" -do_deploy() { +do_deploy:rk3568() { + # Prebuilt TF-A + install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3568.elf + # Prebuilt OPTEE-OS + install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin ${DEPLOYDIR}/tee-rk3568.bin + # Prebuilt U-Boot TPL (DDR init) + install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.18.bin ${DEPLOYDIR}/ddr-rk3568.bin +} + +do_deploy:rk3588s() { # Prebuilt TF-A install -m 644 ${S}/bin/rk35/rk3588_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3588.elf # Prebuilt OPTEE-OS @@ -34,4 +44,8 @@ do_deploy() { install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v*.bin ${DEPLOYDIR}/ddr-rk3588.bin } +do_deploy() { +# Needed as a default perhaps a bb.fatal with a message saying an override needs to be set +} + addtask deploy after do_install diff --git a/recipes-bsp/u-boot/u-boot%.bbappend b/recipes-bsp/u-boot/u-boot%.bbappend index e79c471..5af86aa 100644 --- a/recipes-bsp/u-boot/u-boot%.bbappend +++ b/recipes-bsp/u-boot/u-boot%.bbappend @@ -1,25 +1,38 @@ +do_compile:append:rock2-square () { + # copy to default search path + if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then + cp ${B}/spl/${SPL_BINARY} ${B} + fi +} + +DEPENDS:append:rock-pi-4 = " gnutls-native" # various machines require the pyelftools library for parsing dtb files DEPENDS:append = " python3-pyelftools-native" -DEPENDS:append:rock-pi-4 = " gnutls-native" -EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf" -EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf" -EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf" +INIT_FIRMWARE_DEPENDS ??= "" + EXTRA_OEMAKE:append:rk3588s = " \ BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \ ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}
Re: [yocto] [meta-rockchip] [PATCH] Stop u-boot sections partition table
On Wed, 4 Oct 2023 at 00:42, Trevor Woerner wrote: > > On Tue 2023-10-03 @ 12:22:01 PM, Quentin Schulz wrote: > > Hi Anthony, > > > > On 10/3/23 03:26, Anthony Davies via lists.yoctoproject.org wrote: > > > From: Anthony Davies > > > > > > When checking the partition table of builds using this layer you get > > > numerous extra partitions due to each bootloader entry creating a > > > partition. --no-table on these entries should stop this from happening. > > > > > > Signed-off-by: Anthony Davies > > > > While this is annoying in some aspects, it's also very nice when you want to > > flash a new U-Boot manually for example. You just need to flash the raw file > > in the partition directly instead of having to figure out which offset to > > use. FWIW, I actually do flash by offset instead of by partition and I have > > to remember the offsets for different products (we don't use Rockchip's > > defaults :) ) and I guess this would make things easier. > > > > So, > > Reviewed-by: Quentin Schulz > > > > Up to Trevor to decide what to do with the patch :) > > The whole point of partitions is to keep things safely separated from each > other, avoid overruns that clobber adjacent things, and make it easier to > modify contents (flash a partition instead of magic offsets). I've worked with > a device that had hidden/magic offsets and ended up redefining the partition > table to call everything its own partition. > > I don't know what we'd be gaining be keeping these "partitions" hidden? > > > > > Cheers, > > Quentin > > > > > --- > > > wic/rockchip.wks | 10 +- > > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > > > diff --git a/wic/rockchip.wks b/wic/rockchip.wks > > > index 1cc30ae..eb50d8c 100644 > > > --- a/wic/rockchip.wks > > > +++ b/wic/rockchip.wks > > > @@ -15,11 +15,11 @@ > > > # boot32768 229376 > > > # root262144 - (suggested) > > > -part loader1--offset 32 --fixed-size 4000K--source > > > rawcopy > > > --sourceparams="file=${SPL_BINARY}" > > > -part reserved1 --offset 4032 --fixed-size 64K > > > -part reserved2 --offset 4096 --fixed-size 4096K > > > -part loader2--offset 8192 --fixed-size 4096K--source > > > rawcopy > > > --sourceparams="file=u-boot.${UBOOT_SUFFIX}" > > > -part atf--offset 12288 --fixed-size 4096K > > > +part loader1--offset 32 --fixed-size 4000K--source > > > rawcopy --no-table > > > --sourceparams="file=${SPL_BINARY}" > > > +part reserved1 --offset 4032 --fixed-size 64K > > > --no-table > > > +part reserved2 --offset 4096 --fixed-size 4096K > > > --no-table > > > +part loader2--offset 8192 --fixed-size 4096K--source > > > rawcopy --no-table > > > --sourceparams="file=u-boot.${UBOOT_SUFFIX}" > > > +part atf--offset 12288 --fixed-size 4096K > > > --no-table > > > part /boot --offset 16384 --size 114688K --active --source > > > bootimg-partition --fstype=vfat --label boot --use-uuid > > > --sourceparams="loader=u-boot" > > > part /--source > > > rootfs--fstype=ext4 --label root --use-uuid > > > > > > > > > > > > > > > Differences in style I guess. To me a partition is really something you are supposed to be able to format and mount. To be honest I would be more likely to format the wrong partition and blow away the binary as I would over run or use an incorrect offset, I tend to format more then replace a binary file manually. Having partitions for u-boot binaries is not something I have come across before I agree with Quentin, ultimately it's up to you as the maintainer. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61226): https://lists.yoctoproject.org/g/yocto/message/61226 Mute This Topic: https://lists.yoctoproject.org/mt/101726546/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[yocto] [meta-rockchip] [PATCH] machine include files use weak defaults
From: Anthony Davies This allows defaults to be set per machine.conf but also allows overrides in local.conf. Signed-off-by: Anthony Davies --- conf/machine/include/px30.inc | 8 conf/machine/include/rk3288.inc| 4 ++-- conf/machine/include/rk3328.inc| 8 conf/machine/include/rk3399.inc| 8 conf/machine/include/rk3588s.inc | 8 conf/machine/include/rockchip-defaults.inc | 6 +++--- conf/machine/include/rockchip-wic.inc | 8 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/conf/machine/include/px30.inc b/conf/machine/include/px30.inc index a3727fb..8b94c9d 100644 --- a/conf/machine/include/px30.inc +++ b/conf/machine/include/px30.inc @@ -3,19 +3,19 @@ SOC_FAMILY = "px30" -DEFAULTTUNE ?= "cortexa35-crypto" +DEFAULTTUNE ??= "cortexa35-crypto" require conf/machine/include/soc-family.inc require conf/machine/include/arm/armv8a/tune-cortexa35.inc require conf/machine/include/rockchip-defaults.inc require conf/machine/include/rockchip-wic.inc -KBUILD_DEFCONFIG ?= "defconfig" +KBUILD_DEFCONFIG ??= "defconfig" KERNEL_CLASSES = "kernel-fitimage" KERNEL_IMAGETYPE = "fitImage" TFA_PLATFORM = "px30" TFA_BUILD_TARGET = "bl31" -UBOOT_SUFFIX ?= "itb" -UBOOT_ENTRYPOINT ?= "0x0600" +UBOOT_SUFFIX ??= "itb" +UBOOT_ENTRYPOINT ??= "0x0600" diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc index b4c559d..978a2ab 100644 --- a/conf/machine/include/rk3288.inc +++ b/conf/machine/include/rk3288.inc @@ -9,8 +9,8 @@ require conf/machine/include/rockchip-defaults.inc SERIAL_CONSOLES = "115200;ttyS2" -KBUILD_DEFCONFIG ?= "multi_v7_defconfig" +KBUILD_DEFCONFIG ??= "multi_v7_defconfig" KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" KERNEL_IMAGETYPE = "zImage" -UBOOT_SUFFIX ?= "bin" +UBOOT_SUFFIX ??= "bin" diff --git a/conf/machine/include/rk3328.inc b/conf/machine/include/rk3328.inc index f9f8792..69ec7bc 100644 --- a/conf/machine/include/rk3328.inc +++ b/conf/machine/include/rk3328.inc @@ -3,14 +3,14 @@ SOC_FAMILY = "rk3328" -DEFAULTTUNE ?= "cortexa53-crypto" +DEFAULTTUNE ??= "cortexa53-crypto" require conf/machine/include/soc-family.inc require conf/machine/include/arm/armv8a/tune-cortexa53.inc require conf/machine/include/rockchip-defaults.inc require conf/machine/include/rockchip-wic.inc -KBUILD_DEFCONFIG ?= "defconfig" +KBUILD_DEFCONFIG ??= "defconfig" KERNEL_FEATURES:append:rk3328 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" KERNEL_IMAGETYPE = "fitImage" @@ -18,5 +18,5 @@ KERNEL_IMAGETYPE = "fitImage" TFA_PLATFORM = "rk3328" TFA_BUILD_TARGET = "bl31" -UBOOT_SUFFIX ?= "itb" -UBOOT_ENTRYPOINT ?= "0x0600" +UBOOT_SUFFIX ??= "itb" +UBOOT_ENTRYPOINT ??= "0x0600" diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc index 88c87af..491bc3d 100644 --- a/conf/machine/include/rk3399.inc +++ b/conf/machine/include/rk3399.inc @@ -3,14 +3,14 @@ SOC_FAMILY = "rk3399" -DEFAULTTUNE ?= "cortexa72-cortexa53-crypto" +DEFAULTTUNE ??= "cortexa72-cortexa53-crypto" require conf/machine/include/soc-family.inc require conf/machine/include/arm/armv8a/tune-cortexa72-cortexa53.inc require conf/machine/include/rockchip-defaults.inc require conf/machine/include/rockchip-wic.inc -KBUILD_DEFCONFIG ?= "defconfig" +KBUILD_DEFCONFIG ??= "defconfig" KERNEL_FEATURES:append:rk3399 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" KERNEL_IMAGETYPE = "fitImage" @@ -18,5 +18,5 @@ KERNEL_IMAGETYPE = "fitImage" TFA_PLATFORM = "rk3399" TFA_BUILD_TARGET = "bl31" -UBOOT_SUFFIX ?= "itb" -UBOOT_ENTRYPOINT ?= "0x0600" +UBOOT_SUFFIX ??= "itb" +UBOOT_ENTRYPOINT ??= "0x0600" diff --git a/conf/machine/include/rk3588s.inc b/conf/machine/include/rk3588s.inc index 7bfc947..f8292aa 100644 --- a/conf/machine/include/rk3588s.inc +++ b/conf/machine/include/rk3588s.inc @@ -1,11 +1,11 @@ MACHINEOVERRIDES =. "rk3588s:" -DEFAULTTUNE ?= "cortexa76-cortexa55-crypto" +DEFAULTTUNE ??= "cortexa76-cortexa55-crypto" require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc require conf/machine/include/rockchip-defaults.inc require conf/machine/include/rockchip-wic.inc -KBUILD_DEFCONFIG ?= "defconfig" +KBUILD_DEFCONFIG ??= "defconfig" KERNEL_FEATURES:
[yocto] [meta-rockchip] [PATCH] Stop u-boot sections partition table
From: Anthony Davies When checking the partition table of builds using this layer you get numerous extra partitions due to each bootloader entry creating a partition. --no-table on these entries should stop this from happening. Signed-off-by: Anthony Davies --- wic/rockchip.wks | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wic/rockchip.wks b/wic/rockchip.wks index 1cc30ae..eb50d8c 100644 --- a/wic/rockchip.wks +++ b/wic/rockchip.wks @@ -15,11 +15,11 @@ # boot32768 229376 # root262144 - (suggested) -part loader1--offset 32 --fixed-size 4000K--source rawcopy --sourceparams="file=${SPL_BINARY}" -part reserved1 --offset 4032 --fixed-size 64K -part reserved2 --offset 4096 --fixed-size 4096K -part loader2--offset 8192 --fixed-size 4096K--source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" -part atf--offset 12288 --fixed-size 4096K +part loader1--offset 32 --fixed-size 4000K--source rawcopy --no-table --sourceparams="file=${SPL_BINARY}" +part reserved1 --offset 4032 --fixed-size 64K --no-table +part reserved2 --offset 4096 --fixed-size 4096K --no-table +part loader2--offset 8192 --fixed-size 4096K--source rawcopy --no-table --sourceparams="file=u-boot.${UBOOT_SUFFIX}" +part atf--offset 12288 --fixed-size 4096K --no-table part /boot --offset 16384 --size 114688K --active --source bootimg-partition --fstype=vfat --label boot --use-uuid --sourceparams="loader=u-boot" part /--source rootfs --fstype=ext4 --label root --use-uuid -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61208): https://lists.yoctoproject.org/g/yocto/message/61208 Mute This Topic: https://lists.yoctoproject.org/mt/101726546/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[yocto] [meta-rockchip] [PATCH] Allow KERNEL_IMAGETYPE override v3
From: Anthony Davies Updated inc files to allow overriding KERNEL_IMAGETYPE in local.conf Signed-off-by: Anthony Davies --- conf/machine/include/px30.inc | 2 +- conf/machine/include/rk3066.inc | 2 +- conf/machine/include/rk3188.inc | 2 +- conf/machine/include/rk3288.inc | 2 +- conf/machine/include/rk3328.inc | 2 +- conf/machine/include/rk3399.inc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/machine/include/px30.inc b/conf/machine/include/px30.inc index a3727fb..badcbcd 100644 --- a/conf/machine/include/px30.inc +++ b/conf/machine/include/px30.inc @@ -12,7 +12,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "px30" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rk3066.inc b/conf/machine/include/rk3066.inc index fa97906..3510df2 100644 --- a/conf/machine/include/rk3066.inc +++ b/conf/machine/include/rk3066.inc @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyS2" KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_FEATURES:append:rk3066 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" diff --git a/conf/machine/include/rk3188.inc b/conf/machine/include/rk3188.inc index bc96a0c..830f908 100644 --- a/conf/machine/include/rk3188.inc +++ b/conf/machine/include/rk3188.inc @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyFIQ0" KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_FEATURES:append:rk3188 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc index b4c559d..e682c0b 100644 --- a/conf/machine/include/rk3288.inc +++ b/conf/machine/include/rk3288.inc @@ -11,6 +11,6 @@ SERIAL_CONSOLES = "115200;ttyS2" KBUILD_DEFCONFIG ?= "multi_v7_defconfig" KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" UBOOT_SUFFIX ?= "bin" diff --git a/conf/machine/include/rk3328.inc b/conf/machine/include/rk3328.inc index f9f8792..6be777c 100644 --- a/conf/machine/include/rk3328.inc +++ b/conf/machine/include/rk3328.inc @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_FEATURES:append:rk3328 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "rk3328" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc index 88c87af..5a3f439 100644 --- a/conf/machine/include/rk3399.inc +++ b/conf/machine/include/rk3399.inc @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_FEATURES:append:rk3399 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "rk3399" TFA_BUILD_TARGET = "bl31" -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61202): https://lists.yoctoproject.org/g/yocto/message/61202 Mute This Topic: https://lists.yoctoproject.org/mt/101725871/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] [meta-rockchip] [PATCH] Allow KERNEL_IMAGETYPE override v2
Hi Quentin Happy to contribute but not all that familiar with emailing patches, sorry. I lumped them together because if you modify the KERNEL_IMAGETYPE you trigger the bug. I agree moving it out of the include file would be the best way to go but if you dont have the directory in the KERNEL_DEVICETREE it will fail to compile, quickly searching other layers are handling it similar to how I have, probably just in a more robust way. Regards, Tony On Tue, 26 Sept 2023 at 18:08, Quentin Schulz wrote: > > Hi Anthony, > > Thanks for the patch! > > On 9/26/23 06:36, Anthony Davies via lists.yoctoproject.org wrote: > > [You don't often get email from > > anthony.t.davies=gmail@lists.yoctoproject.org. Learn why this is > > important at https://aka.ms/LearnAboutSenderIdentification ] > > > > From: Anthony Davies > > > > Apologies, this is the correct patch > > > > Updated inc files to allow overriding KERNEL_IMAGETYPE in local.conf > > > > Fixed bug where dtb couldnt be found when generating KERNEL_IMAGETYPE > > other then fitImage image due to KERNEL_DEVICETREE containing the dtb > > directory which is not available in the DEPLOY_DIR_IMAGE directory > > Here we are missing your Signed-off-by. > > I would highly suggest to split this into two separate commits, one for > allowing to override the KERNEL_IMAGETYPE through local.conf and another > one for the device tree thing. > > On another topic, I really feel like this is more of an issue with the > class handling KERNEL_DEVICETREE when we're not using a fitImage don't > you think? Otherwise all layers will have to fix this one up and I don't > think that's the right way to go. > > Cheers, > Quentin -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61120): https://lists.yoctoproject.org/g/yocto/message/61120 Mute This Topic: https://lists.yoctoproject.org/mt/101589776/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[yocto] [meta-rockchip] [PATCH] Allow KERNEL_IMAGETYPE override v2
From: Anthony Davies Apologies, this is the correct patch Updated inc files to allow overriding KERNEL_IMAGETYPE in local.conf Fixed bug where dtb couldnt be found when generating KERNEL_IMAGETYPE other then fitImage image due to KERNEL_DEVICETREE containing the dtb directory which is not available in the DEPLOY_DIR_IMAGE directory --- conf/machine/include/px30.inc | 2 +- conf/machine/include/rk3066.inc | 2 +- conf/machine/include/rk3188.inc | 2 +- conf/machine/include/rk3288.inc | 2 +- conf/machine/include/rk3328.inc | 2 +- conf/machine/include/rk3399.inc | 2 +- conf/machine/include/rockchip-wic.inc | 5 - 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/conf/machine/include/px30.inc b/conf/machine/include/px30.inc index a3727fb..badcbcd 100644 --- a/conf/machine/include/px30.inc +++ b/conf/machine/include/px30.inc @@ -12,7 +12,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "px30" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rk3066.inc b/conf/machine/include/rk3066.inc index fa97906..3510df2 100644 --- a/conf/machine/include/rk3066.inc +++ b/conf/machine/include/rk3066.inc @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyS2" KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_FEATURES:append:rk3066 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" diff --git a/conf/machine/include/rk3188.inc b/conf/machine/include/rk3188.inc index bc96a0c..830f908 100644 --- a/conf/machine/include/rk3188.inc +++ b/conf/machine/include/rk3188.inc @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyFIQ0" KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_FEATURES:append:rk3188 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc index b4c559d..e682c0b 100644 --- a/conf/machine/include/rk3288.inc +++ b/conf/machine/include/rk3288.inc @@ -11,6 +11,6 @@ SERIAL_CONSOLES = "115200;ttyS2" KBUILD_DEFCONFIG ?= "multi_v7_defconfig" KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" UBOOT_SUFFIX ?= "bin" diff --git a/conf/machine/include/rk3328.inc b/conf/machine/include/rk3328.inc index f9f8792..6be777c 100644 --- a/conf/machine/include/rk3328.inc +++ b/conf/machine/include/rk3328.inc @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_FEATURES:append:rk3328 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "rk3328" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc index 88c87af..5a3f439 100644 --- a/conf/machine/include/rk3399.inc +++ b/conf/machine/include/rk3399.inc @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_FEATURES:append:rk3399 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "rk3399" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc index 635288c..8ff6066 100644 --- a/conf/machine/include/rockchip-wic.inc +++ b/conf/machine/include/rockchip-wic.inc @@ -11,9 +11,12 @@ WKS_FILE_DEPENDS ?= " \ virtual/bootloader \ virtual/kernel \ " + +KERNEL_DEVICETREE_BASENAME = "${@os.path.basename('${KERNEL_DEVICETREE}')}" + IMAGE_BOOT_FILES = " \ ${KERNEL_IMAGETYPE} \ - ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${KERNEL_DEVICETREE}', d)} \ + ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${KERNEL_DEVICETREE_BASENAME}', d)} \ " # use the first-defined ; pair in SERIAL_CONSOLES -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61114): https://lists.yoctoproject.org/g/yocto/message/61114 Mute This Topic: https://lists.yoctoproject.org/mt/101589776/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] [meta-rockchip] [PATCH] Allow KERNEL_IMAGETYPE override
So sorry, this is the wrong branch, I will send a new one. On Tue, 26 Sept 2023 at 13:07, Anthony Davies via lists.yoctoproject.org wrote: > From: Anthony Davies > > Updated inc files to allow overriding KERNEL_IMAGETYPE in local.conf > > Fixed bug where dtb couldnt be found when generating KERNEL_IMAGETYPE > other then fitImage image due to KERNEL_DEVICETREE containing the dtb > directory which is not available in the DEPLOY_DIR_IMAGE directory > --- > conf/machine/include/px30.inc | 2 +- > conf/machine/include/rk3066.inc| 2 +- > conf/machine/include/rk3188.inc| 2 +- > conf/machine/include/rk3288.inc| 2 +- > conf/machine/include/rk3328.inc| 2 +- > conf/machine/include/rk3399.inc| 2 +- > conf/machine/include/rockchip-defaults.inc | 2 +- > conf/machine/include/rockchip-wic.inc | 6 +- > 8 files changed, 12 insertions(+), 8 deletions(-) > > diff --git a/conf/machine/include/px30.inc b/conf/machine/include/px30.inc > index a3727fb..badcbcd 100644 > --- a/conf/machine/include/px30.inc > +++ b/conf/machine/include/px30.inc > @@ -12,7 +12,7 @@ require conf/machine/include/rockchip-wic.inc > > KBUILD_DEFCONFIG ?= "defconfig" > KERNEL_CLASSES = "kernel-fitimage" > -KERNEL_IMAGETYPE = "fitImage" > +KERNEL_IMAGETYPE ?= "fitImage" > > TFA_PLATFORM = "px30" > TFA_BUILD_TARGET = "bl31" > diff --git a/conf/machine/include/rk3066.inc > b/conf/machine/include/rk3066.inc > index fa97906..3510df2 100644 > --- a/conf/machine/include/rk3066.inc > +++ b/conf/machine/include/rk3066.inc > @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyS2" > > KBUILD_DEFCONFIG = "multi_v7_defconfig" > KERNEL_FEATURES:append:rk3066 = " > bsp/rockchip/remove-non-rockchip-arch-arm.scc" > -KERNEL_IMAGETYPE = "zImage" > +KERNEL_IMAGETYPE ?= "zImage" > diff --git a/conf/machine/include/rk3188.inc > b/conf/machine/include/rk3188.inc > index bc96a0c..830f908 100644 > --- a/conf/machine/include/rk3188.inc > +++ b/conf/machine/include/rk3188.inc > @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyFIQ0" > > KBUILD_DEFCONFIG = "multi_v7_defconfig" > KERNEL_FEATURES:append:rk3188 = " > bsp/rockchip/remove-non-rockchip-arch-arm.scc" > -KERNEL_IMAGETYPE = "zImage" > +KERNEL_IMAGETYPE ?= "zImage" > diff --git a/conf/machine/include/rk3288.inc > b/conf/machine/include/rk3288.inc > index b4c559d..e682c0b 100644 > --- a/conf/machine/include/rk3288.inc > +++ b/conf/machine/include/rk3288.inc > @@ -11,6 +11,6 @@ SERIAL_CONSOLES = "115200;ttyS2" > > KBUILD_DEFCONFIG ?= "multi_v7_defconfig" > KERNEL_FEATURES:append:rk3288 = " > bsp/rockchip/remove-non-rockchip-arch-arm.scc" > -KERNEL_IMAGETYPE = "zImage" > +KERNEL_IMAGETYPE ?= "zImage" > > UBOOT_SUFFIX ?= "bin" > diff --git a/conf/machine/include/rk3328.inc > b/conf/machine/include/rk3328.inc > index f9f8792..6be777c 100644 > --- a/conf/machine/include/rk3328.inc > +++ b/conf/machine/include/rk3328.inc > @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc > KBUILD_DEFCONFIG ?= "defconfig" > KERNEL_FEATURES:append:rk3328 = " > bsp/rockchip/remove-non-rockchip-arch-arm64.scc" > KERNEL_CLASSES = "kernel-fitimage" > -KERNEL_IMAGETYPE = "fitImage" > +KERNEL_IMAGETYPE ?= "fitImage" > > TFA_PLATFORM = "rk3328" > TFA_BUILD_TARGET = "bl31" > diff --git a/conf/machine/include/rk3399.inc > b/conf/machine/include/rk3399.inc > index 88c87af..5a3f439 100644 > --- a/conf/machine/include/rk3399.inc > +++ b/conf/machine/include/rk3399.inc > @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc > KBUILD_DEFCONFIG ?= "defconfig" > KERNEL_FEATURES:append:rk3399 = " > bsp/rockchip/remove-non-rockchip-arch-arm64.scc" > KERNEL_CLASSES = "kernel-fitimage" > -KERNEL_IMAGETYPE = "fitImage" > +KERNEL_IMAGETYPE ?= "fitImage" > > TFA_PLATFORM = "rk3399" > TFA_BUILD_TARGET = "bl31" > diff --git a/conf/machine/include/rockchip-defaults.inc > b/conf/machine/include/rockchip-defaults.inc > index 3ce2e24..c5cf6c2 100644 > --- a/conf/machine/include/rockchip-defaults.inc > +++ b/conf/machine/include/rockchip-defaults.inc > @@ -1,7 +1,7 @@ > # meta-rockchip default settings > > # kernel > -PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" > +PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto" > KCONFIG_MODE ?= &
[yocto] [meta-rockchip] [PATCH] Allow KERNEL_IMAGETYPE override
From: Anthony Davies Updated inc files to allow overriding KERNEL_IMAGETYPE in local.conf Fixed bug where dtb couldnt be found when generating KERNEL_IMAGETYPE other then fitImage image due to KERNEL_DEVICETREE containing the dtb directory which is not available in the DEPLOY_DIR_IMAGE directory --- conf/machine/include/px30.inc | 2 +- conf/machine/include/rk3066.inc| 2 +- conf/machine/include/rk3188.inc| 2 +- conf/machine/include/rk3288.inc| 2 +- conf/machine/include/rk3328.inc| 2 +- conf/machine/include/rk3399.inc| 2 +- conf/machine/include/rockchip-defaults.inc | 2 +- conf/machine/include/rockchip-wic.inc | 6 +- 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/conf/machine/include/px30.inc b/conf/machine/include/px30.inc index a3727fb..badcbcd 100644 --- a/conf/machine/include/px30.inc +++ b/conf/machine/include/px30.inc @@ -12,7 +12,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "px30" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rk3066.inc b/conf/machine/include/rk3066.inc index fa97906..3510df2 100644 --- a/conf/machine/include/rk3066.inc +++ b/conf/machine/include/rk3066.inc @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyS2" KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_FEATURES:append:rk3066 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" diff --git a/conf/machine/include/rk3188.inc b/conf/machine/include/rk3188.inc index bc96a0c..830f908 100644 --- a/conf/machine/include/rk3188.inc +++ b/conf/machine/include/rk3188.inc @@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyFIQ0" KBUILD_DEFCONFIG = "multi_v7_defconfig" KERNEL_FEATURES:append:rk3188 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc index b4c559d..e682c0b 100644 --- a/conf/machine/include/rk3288.inc +++ b/conf/machine/include/rk3288.inc @@ -11,6 +11,6 @@ SERIAL_CONSOLES = "115200;ttyS2" KBUILD_DEFCONFIG ?= "multi_v7_defconfig" KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc" -KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPE ?= "zImage" UBOOT_SUFFIX ?= "bin" diff --git a/conf/machine/include/rk3328.inc b/conf/machine/include/rk3328.inc index f9f8792..6be777c 100644 --- a/conf/machine/include/rk3328.inc +++ b/conf/machine/include/rk3328.inc @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_FEATURES:append:rk3328 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "rk3328" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc index 88c87af..5a3f439 100644 --- a/conf/machine/include/rk3399.inc +++ b/conf/machine/include/rk3399.inc @@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc KBUILD_DEFCONFIG ?= "defconfig" KERNEL_FEATURES:append:rk3399 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc" KERNEL_CLASSES = "kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE ?= "fitImage" TFA_PLATFORM = "rk3399" TFA_BUILD_TARGET = "bl31" diff --git a/conf/machine/include/rockchip-defaults.inc b/conf/machine/include/rockchip-defaults.inc index 3ce2e24..c5cf6c2 100644 --- a/conf/machine/include/rockchip-defaults.inc +++ b/conf/machine/include/rockchip-defaults.inc @@ -1,7 +1,7 @@ # meta-rockchip default settings # kernel -PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto" KCONFIG_MODE ?= "alldefconfig" # xserver diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc index 635288c..23ac9d9 100644 --- a/conf/machine/include/rockchip-wic.inc +++ b/conf/machine/include/rockchip-wic.inc @@ -11,10 +11,14 @@ WKS_FILE_DEPENDS ?= " \ virtual/bootloader \ virtual/kernel \ " + +KERNEL_DEVICETREE_BASENAME = "${@os.path.basename('${KERNEL_DEVICETREE}')}" + IMAGE_BOOT_FILES = " \ ${KERNEL_IMAGETYPE} \ - ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${KERNEL_DEVICETREE}', d)} \ + ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '',
Re: [yocto] [meta-rockchip][PATCH v2] rock5b: add
Thanks for your work Trevor, I have been waiting for this for a while. I am new around here so forgive me if I am being impertinent but my only feedback would be to keep the naming of the machines consistent with the dtb and uboot defconfig? ie, rock-5b rather then rock5b? -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61095): https://lists.yoctoproject.org/g/yocto/message/61095 Mute This Topic: https://lists.yoctoproject.org/mt/101530319/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-