U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] buildman and multiple toolchains?
@ 2015-04-23 13:07 Tom Rini
  2015-04-23 18:44 ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2015-04-23 13:07 UTC (permalink / raw)
  To: u-boot

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!

-- 
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] buildman and multiple toolchains?
  2015-04-23 13:07 [U-Boot] buildman and multiple toolchains? Tom Rini
@ 2015-04-23 18:44 ` Simon Glass
  2015-04-23 18:57   ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2015-04-23 18:44 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 23 April 2015 at 07:07, Tom Rini <trini@konsulko.com> wrote:
> 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?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] buildman and multiple toolchains?
  2015-04-23 18:44 ` Simon Glass
@ 2015-04-23 18:57   ` Tom Rini
  2015-04-23 19:22     ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2015-04-23 18:57 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 23, 2015 at 12:44:12PM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 23 April 2015 at 07:07, Tom Rini <trini@konsulko.com> wrote:
> > 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?
> 
> I don't see why not, or something similar. Are you asking for a patch? :-)

Or a pointer to where to start hacking :)

-- 
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] buildman and multiple toolchains?
  2015-04-23 18:57   ` Tom Rini
@ 2015-04-23 19:22     ` Simon Glass
  2015-04-23 19:26       ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2015-04-23 19:22 UTC (permalink / raw)
  To: u-boot

 Hi Tom,

On 23 April 2015 at 12:57, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Apr 23, 2015 at 12:44:12PM -0600, Simon Glass wrote:
>> Hi Tom,
>>
>> On 23 April 2015 at 07:07, Tom Rini <trini@konsulko.com> wrote:
>> > 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?
>>
>> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] buildman and multiple toolchains?
  2015-04-23 19:22     ` Simon Glass
@ 2015-04-23 19:26       ` Tom Rini
  2015-04-23 19:35         ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2015-04-23 19:26 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 23, 2015 at 01:22:55PM -0600, Simon Glass wrote:
>  Hi Tom,
> 
> On 23 April 2015 at 12:57, Tom Rini <trini@konsulko.com> wrote:
> > On Thu, Apr 23, 2015 at 12:44:12PM -0600, Simon Glass wrote:
> >> Hi Tom,
> >>
> >> On 23 April 2015 at 07:07, Tom Rini <trini@konsulko.com> wrote:
> >> > 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?
> >>
> >> 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.

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? :)

-- 
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] buildman and multiple toolchains?
  2015-04-23 19:26       ` Tom Rini
@ 2015-04-23 19:35         ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2015-04-23 19:35 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 23 April 2015 at 13:26, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Apr 23, 2015 at 01:22:55PM -0600, Simon Glass wrote:
>>  Hi Tom,
>>
>> On 23 April 2015 at 12:57, Tom Rini <trini@konsulko.com> wrote:
>> > On Thu, Apr 23, 2015 at 12:44:12PM -0600, Simon Glass wrote:
>> >> Hi Tom,
>> >>
>> >> On 23 April 2015 at 07:07, Tom Rini <trini@konsulko.com> wrote:
>> >> > 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?
>> >>
>> >> 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.
>
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-23 19:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 13:07 [U-Boot] buildman and multiple toolchains? Tom Rini
2015-04-23 18:44 ` Simon Glass
2015-04-23 18:57   ` Tom Rini
2015-04-23 19:22     ` Simon Glass
2015-04-23 19:26       ` Tom Rini
2015-04-23 19:35         ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox