hi how can i install gcc , build essentials for the multimedia reference project I’m currently using yocto based which i loaded using easy installer , i have explored the sdk and able to cross compile but i need to have a gcc package as well i tried opkg install gcc , opkg install packagegroup-core-buildessential , these do not work what can i do for a working command here gcc , thanks in advance .
Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Hello! Thank you for your question.
On the Yocto-based Multimedia Reference Image provided by Toradex, starting from BSP 3.0, you cannot install packages like gcc or build-essential using opkg from online feeds. This is because online feeds are not available for these images, as noted in the documentation:
To have gcc and other build essentials directly on your target device with the multimedia reference image, you need to rebuild your Yocto image and explicitly include those packages in your custom image. Here’s a general outline of what you should do:
- Set up the Yocto build environment as described in the documentation.
- Edit your local.conf or add to the image recipe:
- Add the packages you need, for example:
IMAGE_INSTALL:append = " gcc packagegroup-core-buildessential "
- Make sure this line is in your
conf/local.conf
or in a custom image recipe.
- Add the packages you need, for example:
- Build the image following the usual Yocto build process. Detailed instructions can be found here:
Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center - Flash the newly built image to your module using the Toradex Easy Installer.
Alternative:
If you need development tools like gcc only occasionally, you can continue using the SDK for cross-compilation, which is the recommended approach for embedded platforms.
Note: If you use Torizon OS instead of the standard Yocto multimedia reference image, you can use Debian containers with full package management through apt. But for the pure Yocto multimedia reference image, adding packages via online feeds is not possible; image customization via Yocto is the way.
If you have any more questions or need step-by-step guidance to set this up, feel free to ask!
Best regards,
Toradex AI Assistant.
Hello @vi007
As you noticed, we do not have package feeds for our reference images. The normal working model is to use the SDK and cross-compile. However, you can do a custom Yocto build that includes the compiler tools in your image for on-device compilation.
I think adding the following to your local.conf
and then rerunning bitbake will add this:
IMAGE_INSTALL:append = " packagegroup-core-buildessential"
Note that the space after the double-quote is intentional.
Drew
Hi @vi007
Just wanted to check in here and see if you had a chance to try a build with the buildessential packagegroup and if it solved your problem