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

Yocto Zeus support #12

Closed
jens-f opened this issue Jan 8, 2020 · 4 comments
Closed

Yocto Zeus support #12

jens-f opened this issue Jan 8, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jens-f
Copy link

jens-f commented Jan 8, 2020

Since Yocto version Zeus was mentioned in conf/layer.con I was trying to use it with the master branch of the project or the wip/release-day branch. In both cases, I was not able to make it compile successfully. Steps I took:

repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b zeus
repo sync
git clone https://github.com/kraj/meta-clang.git sources/meta-clang -b zeus
git clone https://github.com/mirzak/meta-coral.git sources/meta-coral -b wip/release-day
MACHINE=coral-dev DISTRO=fslc-wayland source ./setup-environment build
echo 'BBLAYERS += "${BSPDIR}/sources/meta-clang"' >> conf/bblayers.conf
echo 'BBLAYERS += "${BSPDIR}/sources/meta-coral"' >> conf/bblayers.conf
bitbake core-image-base

I'm getting the following error message:

Sstate summary: Wanted 876 Found 0 Missed 876 Current 322 (0% match, 26% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
ERROR: optee-os-3.2.0.imx-r0 do_compile: oe_runmake failed
ERROR: optee-os-3.2.0.imx-r0 do_compile: Execution of '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/temp/run.do_compile.9065' failed with exit code 1:
make: Entering directory '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git'
core/arch/arm/plat-imx/conf.mk:112: *** Unsupported PLATFORM_FLAVOR "oral-dev".  Stop.
make: Leaving directory '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git'
WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/temp/log.do_compile.9065
Log data follows:
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'bit-64', 'arm-common', 'arm-64', 'common-linux', 'common-glibc', 'aarch64-linux', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing shell function do_compile
| NOTE: make -j 6 PLATFORM=imx PLATFORM_FLAVOR=oral-dev CROSS_COMPILE=aarch64-fslc-linux- CROSS_COMPILE64=aarch64-fslc-linux- NOWERROR=1 LDFLAGS= O=/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/build.oral-dev CFG_SECURE_DATA_PATH=y CFG_TEE_SDP_MEM_BASE=0xCC000000 CFG_TEE_SDP_MEM_SIZE=0x02000000 CFG_TEE_SDP_NONCACHE=y -C /home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git all CFG_TEE_TA_LOG_LEVEL=0
| make: Entering directory '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git'
| core/arch/arm/plat-imx/conf.mk:112: *** Unsupported PLATFORM_FLAVOR "oral-dev".  Stop.
| make: Leaving directory '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/temp/run.do_compile.9065' failed with exit code 1:
| make: Entering directory '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git'
| core/arch/arm/plat-imx/conf.mk:112: *** Unsupported PLATFORM_FLAVOR "oral-dev".  Stop.
| make: Leaving directory '/home/jens/coral/build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git'
| WARNING: exit code 1 from a shell command.
| 
ERROR: Task (/home/jens/coral/sources/meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1622 tasks of which 1616 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds

Summary: 1 task failed:
  /home/jens/coral/sources/meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

The problem seems to be caused by meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb not correctly handling the new machine corel-dev. That file seems to check for machine ids that start with the prefix imx*. Then during compilation, file build/tmp/work/coral_dev-fslc-linux/optee-os/3.2.0.imx-r0/git/core/arch/arm/plat-imx/conf.mk does not support corel-dev and stops the build.

I'm trying to find ways to make it compile but I'm very new in Yocto development. @mirzak would you have ideas how to best add this support? Is the usual Yocto practice to add a patch into the meta-coral layer that makes changes to the recipee optee-imx/optee-os_3.2.0.imx and the source code it pulls in during compilation? I'd appreciate any kind of guidance.

@mirzak mirzak self-assigned this Jan 8, 2020
@mirzak mirzak added the bug Something isn't working label Jan 8, 2020
@mirzak
Copy link
Owner

mirzak commented Jan 8, 2020

zeus is something that is still in progress but the wip/release-day branch is the closest thing to support it. The holdup is that I like to support the "day" release from google before moving to zeus, which might also be required.

I suspect the optee-os problem is similar to to this one, https://github.com/mirzak/meta-coral/tree/warrior/recipes-bsp/imx-mkimage

Is the usual Yocto practice to add a patch into the meta-coral layer that makes changes to the recipee optee-imx/optee-os_3.2.0.imx and the source code it pulls in during compilation?

Yes, that is the common practice. Also the check the https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines, specifically the "Patch Header Recommendations: Upstream-Status" section.

@jens-f
Copy link
Author

jens-f commented Jan 8, 2020

Thanks @mirzak for the pointers. What do you think is left to support the "day" release? Anything you could use help with? I'd be motivated to get something running. I was trying to run the wip/release-day and master branches with the warrior release but also ended up getting compile errors in the meta-clang recipe (internal compiler errors). That's why I was trying my luck with zeus

@mirzak
Copy link
Owner

mirzak commented Jan 8, 2020

The idea was to run zeus and wip/release-day and this is the target to convert wip/release-day to support zeus.

To support the day release, I was planning on going trough the coral dev forks

https://coral.googlesource.com/?format=HTML

and checking which BSP components they have updated, and align them in the meta-coral layer. This probably just means pulling the sources from the google repos instead from the imx repos on a number of components. All these components should have a release-day tag so should be fairly easy to look up.

One example would be, https://coral.googlesource.com/imx-gst1.0-plugin/, which has some google specific patches. Though these patches seem to be optimizations so might work without them as well.

I guess the important parts are the Linux kernel and U-Boot components, to ensure these are are aligned and then move on to the rest.

@mirzak
Copy link
Owner

mirzak commented Apr 12, 2020

Zeus support has been added, please check https://github.com/mirzak/meta-coral/wiki/Quick-start-guide

@mirzak mirzak closed this as completed Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants