radxa / meta-rockchip

Yocto BSP layer for the Rockchip SOC boards
MIT License
24 stars 14 forks source link

Yocto Support for ROCK 2A #19

Open elockman opened 2 weeks ago

elockman commented 2 weeks ago

Are there plans for yocto support for the ROCK 2A board?

Our company is looking to transition to the ROCK 2A platform. I would like to build my own custom image, which would allow me to load packages for my application and remove unused ones. There appears to be some work completed, but the ROCK 2A board is not in the supported list.

The defconfig file is found here: https://github.com/radxa/u-boot/blob/next-dev-v2024.03/configs/rock-2a-rk3528_defconfig

The dts file is found here: https://github.com/radxa/u-boot/blob/next-dev-v2024.03/arch/arm/dts/rk3528-rock-2a.dts

I have edited the following files: local.conf bblayers.conf u-boot%.bbappend linux-yocto%.bbappend trusted-firmware-a_%.bbappend

I have written the following files: rk3528.inc rock-2a.conf

I am still running into issues that appear to be related to a mismatch in linux versions.

@RadxaStephen and @RadxaYuntian is there an effort to support this board in yocto? Can you or others at Radxa provide advice on creating this board image through yocto?

RadxaYuntian commented 1 week ago

ROCK 2A uses the same kernel as RK356X devices. You can use those as a reference.

elockman commented 1 week ago

Thank you. I'll be out of the office for a few days, but I'll make sure that is what I have done. I was using the ROCK 5B and the ROCK 3A as examples.

On Mon, Oct 7, 2024, 11:50 PM ZHANG Yuntian @.***> wrote:

ROCK 2A uses the same kernel as RK356X devices. You can use those as a reference.

— Reply to this email directly, view it on GitHub https://github.com/radxa/meta-rockchip/issues/19#issuecomment-2398908552, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD7UXZPUA6UHMDE5DSQLRTZ2NXCZAVCNFSM6AAAAABPMXRMI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJYHEYDQNJVGI . You are receiving this because you authored the thread.Message ID: @.***>

RadxaStephen commented 1 week ago

Can you show me the boot log from serial tool? And does your ROCK 2A use eMMC? (I have some patches for eMMC boot. Cannot boot from SD card so far.)

elockman commented 1 week ago

I do not have a boot log. I'm still waiting for hardware. The tracking info shows that my boards are still in Hong Kong. Eventually, I'll want to use eMMC, but I started with an SD version, since eMMC was out of stock through all distributors. I am trying to get a successful image built through yocto in order to evaluate the board for our application. There seems to be a kernel mismatch between version 6.1 and version 6.6. Which version should the ROCK 2A be using?

On Tue, Oct 8, 2024, 10:15 PM RadxaStephen @.***> wrote:

Can you show me the boot log from serial tool? And does your ROCK 2A use eMMC?

— Reply to this email directly, view it on GitHub https://github.com/radxa/meta-rockchip/issues/19#issuecomment-2401185333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD7UX7JIAXQBNC7SUTTHJLZ2SNV5AVCNFSM6AAAAABPMXRMI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBRGE4DKMZTGM . You are receiving this because you authored the thread.Message ID: @.***>

RadxaYuntian commented 1 week ago

5.10 currently, same as our RK356X products. Where did you see kernel 6.6?

elockman commented 1 week ago

Mr. Zhang, I appreciate your help. I'm out of the office this week, but I'll try to get better information to you as soon as I can.

elockman commented 1 day ago

@RadxaStephen, for clarity does the Rock 2A not yet boot from the SD Card? We purchased boards without eMMC because they are not available and had a 6-8 week lead time.

I've had issues with my build PC and put a fresh Ubuntu 24.04.1 LTS install on it and ran into some issues. 1) The libegl1-mesa package was not found 2) ERROR: PermissionError: [Errno 1] Operation not permitted during the the build

What build environment do you suggest I use? Thanks again for the help.

RadxaYuntian commented 1 day ago

The build environment should be no different from the upstream requirement.

Can you attach the full log with the error here?

elockman commented 1 day ago

@RadxaYuntian @RadxaStephen it looks like yocto may not yet support Ubuntu 24.04. I have reverted to Ubuntu 22.04.5 LTS and things are working much better. The build is still running, I'll provide more info once I have it.

elockman commented 1 day ago

I'm seeing the following errors:

ERROR: linux-yocto-6.6.50+git-r0 do_kernel_version_sanity_check: Package Version (6.6.50+git) does not match of kernel being built (6.1.43). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
ERROR: linux-yocto-6.6.50+git-r0 do_kernel_version_sanity_check: Execution of '/home/builder/projects/rock2a/yocto/build/tmp-glibc/work/rock_2a-oe-linux/linux-yocto/6.6.50+git/temp/run.do_kernel_version_sanity_check.919756' failed with exit code 1
ERROR: Logfile of failure stored in: /home/builder/projects/rock2a/yocto/build/tmp-glibc/work/rock_2a-oe-linux/linux-yocto/6.6.50+git/temp/log.do_kernel_version_sanity_check.919756
ERROR: Task (/home/builder/projects/rock2a/yocto/build/../openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.6.bb:do_kernel_version_sanity_check) failed with exit code '1'
ERROR: trusted-firmware-a-2.10.4-r0 do_compile: oe_runmake failed
ERROR: trusted-firmware-a-2.10.4-r0 do_compile: Execution of '/home/builder/projects/rock2a/yocto/build/tmp-glibc/work/rock_2a-oe-linux/trusted-firmware-a/2.10.4/temp/run.do_compile.919800' failed with exit code 1
ERROR: Logfile of failure stored in: /home/builder/projects/rock2a/yocto/build/tmp-glibc/work/rock_2a-oe-linux/trusted-firmware-a/2.10.4/temp/log.do_compile.919800

Here is the log file. log.do_compile_919800.txt

This should help you understand the process I'm using to build the image. https://github.com/elockman/rock2a-patches (I realize this isn't the correct way to create patches. I'll fork the meta-rockchip repo and make the changes.)

RadxaYuntian commented 1 day ago

Can you first try building a RK356X based device that's already in the tree? Your kernel and bootloader configuration is not correct, as they are referencing upstream components. You should use Rockchip kernel and bootloader.

elockman commented 1 day ago

@RadxaYuntian this is what I run into when building the rock3a board (based on RK3568) per the instructions in the README, except I am building core-image-minimal.

ERROR: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook 'update_mime_database' failed, details in /home/builder/projects/rock2a/yocto/build/tmp-glibc/work/rock_3a-oe-linux/core-image-minimal/1.0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /home/builder/projects/rock2a/yocto/build/tmp-glibc/work/rock_3a-oe-linux/core-image-minimal/1.0/temp/log.do_rootfs.2495180
ERROR: Task (/home/builder/projects/rock2a/yocto/build/../openembedded-core/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code '1'

I am using the following command MACHINE=rock-3a bitbake core-image-minimal

Log file attached: log_do_rootfs.txt

Also, if you can provide instruction on how to "use Rockchip kernel and bootloader" for the rock-2a build, I'd be happy to try that.

Thanks again.