Skip to contentSkip to conversation

buildman and multiple toolchains?

U-Boot Tom Rini 2 participants 6 messages Apr 23, 2015

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

Hey,

So I'm merging (or rather have merged and will push shortly) the ARMv7-M support. You can't build this with your normal arm-linux toolchain. Is there some way in buildman to be able to say, roughly:
[toolchain]
arm: /usr/bin/arm-linux-gnueabi
armnone: /usr/bin/arm-none-eabi

[toolchain-alias]
stm32f429-discovery: armnone

And have the 'arm' toolchain used normally for arm but 'armnone' used for the stm32f429-discovery board?

Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150423/4a5fb89c/attachment.sig>
#1 lore raw

Hi Tom,

Quoted 9 lines · Tom Rini

Hey,

So I'm merging (or rather have merged and will push shortly) the ARMv7-M support. You can't build this with your normal arm-linux toolchain. Is there some way in buildman to be able to say, roughly:
[toolchain]
arm: /usr/bin/arm-linux-gnueabi
armnone: /usr/bin/arm-none-eabi

Quoted 5 lines

[toolchain-alias]
stm32f429-discovery: armnone

And have the 'arm' toolchain used normally for arm but 'armnone' used for the stm32f429-discovery board?

I don't see why not, or something similar. Are you asking for a patch? :-)

I don't have one one of those boards. Maybe I should take a look.

Regards,
Simon

author
#2 lore raw
Quoted 12 lines · Simon Glass

Hi Tom,

Quoted 9 lines · Tom Rini

Hey,

So I'm merging (or rather have merged and will push shortly) the ARMv7-M support. You can't build this with your normal arm-linux toolchain. Is there some way in buildman to be able to say, roughly:
[toolchain]
arm: /usr/bin/arm-linux-gnueabi
armnone: /usr/bin/arm-none-eabi

Quoted 7 lines
Quoted 5 lines

[toolchain-alias]
stm32f429-discovery: armnone

And have the 'arm' toolchain used normally for arm but 'armnone' used for the stm32f429-discovery board?

I don't see why not, or something similar. Are you asking for a patch? :-)

Or a pointer to where to start hacking :)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150423/06f1e07c/attachment.sig>
#3 lore raw

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 15 lines · Simon Glass

Hi Tom,

Quoted 12 lines · Tom Rini

Hey,

So I'm merging (or rather have merged and will push shortly) the ARMv7-M support. You can't build this with your normal arm-linux toolchain. Is there some way in buildman to be able to say, roughly:
[toolchain]
arm: /usr/bin/arm-linux-gnueabi
armnone: /usr/bin/arm-none-eabi

[toolchain-alias]
stm32f429-discovery: armnone

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

And have the 'arm' toolchain used normally for arm but 'armnone' used for the stm32f429-discovery board?

I don't see why not, or something similar. Are you asking for a patch? :-)

Or a pointer to where to start hacking :)

The toolchain is selected in builderthread.py:

self.toolchain = self.builder.toolchains.Select(brd.arch)

brd is a Board object.

At present only the arch is passed in, but you could pass in brd.target if you like.

You'll then need to enhance toolchain.Select() to check for an alias for that target.

Regards,
Simon

author
#4 lore raw
Quoted 30 lines · Simon Glass

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 15 lines · Simon Glass

Hi Tom,

Quoted 12 lines · Tom Rini

Hey,

So I'm merging (or rather have merged and will push shortly) the ARMv7-M support. You can't build this with your normal arm-linux toolchain. Is there some way in buildman to be able to say, roughly:
[toolchain]
arm: /usr/bin/arm-linux-gnueabi
armnone: /usr/bin/arm-none-eabi

[toolchain-alias]
stm32f429-discovery: armnone

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

And have the 'arm' toolchain used normally for arm but 'armnone' used for the stm32f429-discovery board?

I don't see why not, or something similar. Are you asking for a patch? :-)

Or a pointer to where to start hacking :)

The toolchain is selected in builderthread.py:

self.toolchain = self.builder.toolchains.Select(brd.arch)

Quoted 7 lines

brd is a Board object.

At present only the arch is passed in, but you could pass in brd.target if you like.

You'll then need to enhance toolchain.Select() to check for an alias for that target.

Ah, but the first problem is that I can't convince buildman that if I have both /usr/bin/arm-linux-gnueabi-gcc and /usr/bin/arm-none-eabi-gcc to let me set both "arm" and "armnone" to something. Or even /somewhere/else/bin/arm-linux-gnueabi-gcc and /usr/bin/arm-none-eabi-gcc Where does that need beating up? :)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150423/cc5a42c0/attachment.sig>
#5 lore raw

Hi Tom,

Quoted 36 lines · Tom Rini
Quoted 35 lines · Simon Glass

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 15 lines · Simon Glass

Hi Tom,

Quoted 12 lines · Tom Rini

Hey,

So I'm merging (or rather have merged and will push shortly) the ARMv7-M support. You can't build this with your normal arm-linux toolchain. Is there some way in buildman to be able to say, roughly:
[toolchain]
arm: /usr/bin/arm-linux-gnueabi
armnone: /usr/bin/arm-none-eabi

[toolchain-alias]
stm32f429-discovery: armnone

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

And have the 'arm' toolchain used normally for arm but 'armnone' used for the stm32f429-discovery board?

I don't see why not, or something similar. Are you asking for a patch? :-)

Or a pointer to where to start hacking :)

The toolchain is selected in builderthread.py:

self.toolchain = self.builder.toolchains.Select(brd.arch)

brd is a Board object.

At present only the arch is passed in, but you could pass in brd.target if you like.

Quoted 8 lines
Quoted 2 lines

You'll then need to enhance toolchain.Select() to check for an alias for that target.

Ah, but the first problem is that I can't convince buildman that if I have both /usr/bin/arm-linux-gnueabi-gcc and /usr/bin/arm-none-eabi-gcc to let me set both "arm" and "armnone" to something. Or even /somewhere/else/bin/arm-linux-gnueabi-gcc and /usr/bin/arm-none-eabi-gcc Where does that need beating up? :)

Ah, well at present there is only one toolchain per arch.

Toolchains.Add() relies on toolchain.arch as a key for its dictionary.

Public members:
toolchains: Dict of Toolchain objects, keyed by architecture name

So this is a problem. I suppose you need to allow more than one toolchain for each arch - e.g. change the valuers in that dict from being a single Toolchain to being a list of Toolchain objects. But you need a label for each toolchain - thatt could be kept in the Toolchain object.

At present Toolchain.arch tells you everything you need to know about which toolchain to use. But if you add Toolchain.target (for example) then Toolchains.Select() could look for that first.

I think that list-tool-chains should be enhanced to list all tool chains in that case.

Happy hacking. Let me know if you want me to take a look.

Regards,
Simon