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

How to add a customized toolchain #87

Open
yli147 opened this issue Aug 23, 2022 · 4 comments
Open

How to add a customized toolchain #87

yli147 opened this issue Aug 23, 2022 · 4 comments

Comments

@yli147
Copy link

yli147 commented Aug 23, 2022

Hi,

We are doing some changes to the toolchain, and want to build the riscv64 toolchain by ourselves,
Do you know how to integrate our own build toolchain building process to the isar system.

I can see there already one pre-installed crossbuild-essential-riscv64, the question is how to build a new one rather than use the community generated toolchain
https://github.com/ilbers/isar/tree/master/meta/recipes-devtools/crossbuild-essential-riscv64

Thanks

@jan-kiszka
Copy link
Contributor

That crossbuild-essential package is just a meta package that compensates the missing one in Debian upstream.

When you are building your own toolchain, you are leaving the common Debian path. You can use Isar to rebuild all packages, at least in theory. But all the benefits of using a standard distro are gone and, thus, no one is doing that in practice. Consequently, there is no convenient way of doing that so far.

If you want your own toolchain quickly, use OE, Yocto or buildroot. If you want to fix / enhance the Debian toolchain, open a bug with upstream or submit a patch there.

@ismagulb
Copy link
Contributor

Hi @yli147,

bootstrapping a new toolchain with Isar should in theory be possible but I expect some complexities on the way. I'm personally interested in that but we are not investing into it at the moment.

A simpler first step could be to have your toolchain in a separate apt repo and get it installed into the sbuild environment -- we did that with Isar's predecessor but not tried with Isar itself.

Just out of curiosity, what is the motivation to use a different compiler? Which versions of Debian and compiler are you targeting for?

@yli147
Copy link
Author

yli147 commented Aug 26, 2022

Hi,
->A simpler first step could be to have your toolchain in a separate apt repo and get it installed into the sbuild environment -- we did that with Isar's predecessor but not tried with Isar itself.
We probably choose this appoach, will give feedback once any update

->Just out of curiosity, what is the motivation to use a different compiler? Which versions of Debian and compiler are you targeting for?
We may want to do some specific optmization to the toolchain, before upstream, we may need maintain our own repo, and use it to build our image

@yli147
Copy link
Author

yli147 commented Apr 13, 2023

Forgot to update, we enabled cursomized toolchain compiling by using the following Arch options in BB file, so the cross compile toolchain can also be generated from source code and used in the isar system

HOST_ARCH = "amd64"
DPKG_ARCH ?= "amd64"
DISTRO_ARCH = "riscv64"
PACKAGE_ARCH = "amd64"

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

3 participants