I have an embedded project where I use an alpine based docker image to build binaries for micro controllers. These micro controllers have different architectures as well as processors. E.g. armhf cortex-m0 and armhf cortex-m4. The build depends on different libraries, which are built in their respective CI for each relevant processor.

I would like to store the prebuilt libraries as apk packages in a personal repository and use these packages when building the final binary. My problem is that I am not sure how to approach having the same library but for different architecture+processor combinations, as well as how to install a package that is not for the host machines architecture Apk normally automatically detects the host machines architecture and tries to install the right package(I assume that's the setting here). However, I would like to install a package for a specific processor, so I can cross compile with it.

How do I best approach this? How to properly cross compile with apk to start with?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.