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

Feature request for nativesdk-packagegroup-avr-toolchain-host #3

Open
lgrosz opened this issue Mar 21, 2023 · 2 comments
Open

Feature request for nativesdk-packagegroup-avr-toolchain-host #3

lgrosz opened this issue Mar 21, 2023 · 2 comments

Comments

@lgrosz
Copy link

lgrosz commented Mar 21, 2023

Hi. This is somewhat related to #2, which allows for building of avr binaries during bitbake execution. It would be nice to also have the tools be populated during the populate_sdk task so the same toolchain can be used to build when sourcing the Yocto sdk. Is this something that can be done? Looking into poky, it seems like all that would be needed is the packagegroup and have BBCLASSEXTENDS contain nativesdk.

I attempted this myself by adding

  • BBCLASSEXTENDS = "nativesdk" to, avr-* recipes

  • Added a package group...

    SUMMARY = "Host packages for AVR SDK or external toolchain"
    LICENSE = "MIT"
    
    inherit nativesdk packagegroup
    
    PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
    
    RDEPENDS_${PN} += " \
        nativesdk-packagegroup-sdk-host \
        nativesdk-avr-binutils \
        nativesdk-avr-gcc \
        nativesdk-avr-gdb \
        nativesdk-avr-libc \
    "
    

However, I encountered an error when compiling nativesdk-avr-gcc:

g++: error: unrecognized command line option ‘-fmacro-prefix-map=...'

I am not well versed in target vs native vs nativesdk, so I am unsure where to go from here.

@lgrosz
Copy link
Author

lgrosz commented Mar 22, 2023

I was able to get the avr-binutils in the sdk by

  • Adding BBCLASSEXTEND =+ "nativesdk" to avr-binutils.bb
  • TOOLCHAIN_HOST_TASK_append = " nativesdk-avr-binutils

avr-gcc does not seem to be that simple though as I am unable to compile with the aforementioned error.

@lgrosz
Copy link
Author

lgrosz commented Apr 5, 2023

In case anyone comes across this.. here's a way to minimally reproduce the issue:

$ git clone -b zeus git://git.yoctoproject.org/poky
$ cd poky
$ git clone -b zeus https://github.com/openembedded/meta-openembedded.git
$ git clone -b zeus https://github.com/schnitzeltony/meta-microcontroller.git
$ sed -i 's/BBCLASSEXTEND = "native"/BBCLASSEXTEND = "native nativesdk"/' meta-microcontroller/recipes-avr/avr-binutils/avr-binutils_2.34.bb
$ sed -i 's/BBCLASSEXTEND = "native"/BBCLASSEXTEND = "native nativesdk"/' meta-microcontroller/recipes-avr/avr-gcc/avr-gcc_8.4.0.bb
$ source oe-init-build-env
$ echo 'BBMASK += "meta-microcontroller/recipes-eda/opencascade/opencascade.bb"' >> conf/local.conf
$ echo 'BBMASK += "meta-microcontroller/recipes-graphics/vtk/vtk.bb"' >> conf/local.conf
$ bitbake-layers add-layer ../meta-openembedded/meta-*
$ bitbake-layers add-layer ../meta-microcontroller
$ bitbake nativesdk-avr-gcc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant