Skip to contentSkip to conversation

how to simply build a common toolchain for multiple developers?

DISCUSSION Robert P. J. Day 2 participants 2 messages Sep 5, 2021

lore
Share & tools
lore
#0 lore raw

(sort of a "how to do this?" question, but also wondering if this is
covered in the docs so i could have found it there.)

over the last week, two separate colleagues asked how to build a
generic aarch64 toolchain they could subsequently use for builds so that they don't have to reproduce all that work in brand new builds, and since it's been a while since i dug into that, i'll ask here and make sure it's properly written up afterwards. (i think alexander k. explained some of this before, so i'm about to dig out his earlier post.)

the idea is to create (i'm assuming with "bitbake -c populate_sdk
...) the appropriate SDK, then install it and use it from then on when building other aarch64 images. the goal is a totally generic toolchain -- no customization; that is, create the simplest toolchain that has the widest application for developers who just want to build a new aarch64 image.

while i'm getting ready to build and test this very thing, i'm
going to assume that i could start with a fresh aarch64 build, and just:

  $ bitbake -c populate_sdk core-image-minimal

that is, no customization for either host or target -- just build the SDK .sh script, after which i can run it and install the SDK in a common location accessible to others, after which ... what?

if someone wanted to do a fresh (from scratch) aarch64-based build,
would they simply need to run the SDK's env setup script, then proceed normally to take advantage of all that earlier work? or is there more to it? it seems like a simple enough request, but i don't see it explained in the SDK manual.

thoughts?

rday

#1 lore raw
Quoted 28 lines · Robert P. J. Day

(sort of a "how to do this?" question, but also wondering if this is
covered in the docs so i could have found it there.)

over the last week, two separate colleagues asked how to build a
generic aarch64 toolchain they could subsequently use for builds so that they don't have to reproduce all that work in brand new builds, and since it's been a while since i dug into that, i'll ask here and make sure it's properly written up afterwards. (i think alexander k. explained some of this before, so i'm about to dig out his earlier post.)

the idea is to create (i'm assuming with "bitbake -c populate_sdk
...) the appropriate SDK, then install it and use it from then on when building other aarch64 images. the goal is a totally generic toolchain -- no customization; that is, create the simplest toolchain that has the widest application for developers who just want to build a new aarch64 image.

while i'm getting ready to build and test this very thing, i'm
going to assume that i could start with a fresh aarch64 build, and just:

  $ bitbake -c populate_sdk core-image-minimal

that is, no customization for either host or target -- just build the SDK .sh script, after which i can run it and install the SDK in a common location accessible to others, after which ... what?

Quoted 7 lines

if someone wanted to do a fresh (from scratch) aarch64-based build,
would they simply need to run the SDK's env setup script, then proceed normally to take advantage of all that earlier work? or is there more to it? it seems like a simple enough request, but i don't see it explained in the SDK manual.

thoughts?

When you say "building an image", what are you building the image with? Are you wanting OE to build the image with the external toolchain from the SDK? That is a really bad idea.

Isn't sstate the answer to this question? Even say a set of locked down signatures for the toolchain pieces?

Cheers,

Richard