All of lore.kernel.org
 help / color / mirror / Atom feed
* SDK-only build
@ 2013-03-02 16:47 Trevor Woerner
  2013-03-08  8:59 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Trevor Woerner @ 2013-03-02 16:47 UTC (permalink / raw)
  To: yocto

I've been really blown away by the breadth of the Yocto Project; not
only will it help you create a distribution for a device but it can
also help you create things like a -dev image or a self-extracting
SDK.

Sometimes I like to work with a "sub-Linux" device, something that is
too small to run Linux, or a device on which, for whatever reason,
I've decided I don't want to run Linux.

I've been wondering lately if, theoretically, it would be possible to
use yocto to create a development environment for such projects
(specifically an SDK). Sometimes these devices need specialized
software tools (e.g. flash programmers), or maybe you need to use the
vendor's special, hacked-up version of binutils/gcc.

Often these projects have instructions pages on how to setup your
environment, and for the most part these instructions work fine and
will produce something which with you can work. But sometimes the
development environments they create are... strange. For example,
they'll leave you having to provide long argument lists to gcc so they
can find all the relevant headers and libraries. Nothing tragic, but
just cumbersome.

It would be nice, I think, to be able to create a yocto layer and
provide recipes that would allow a user to very easily bitbake a
development environment for, say, an ST Discovery board. These
recipes, then, would follow the vendor's instructions, but using yocto
all these instructions could be performed with one simple step (which
would then make use of bitbake's powerful fetching, sstate, and
cross-building tools).

Is the concept of "I'm going to build a distribution/root-filesystem
for you" too deeply engrained in the logic of the Yocto Project that
it couldn't be used to only build -native tools and assemble an SDK?


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

* Re: SDK-only build
  2013-03-02 16:47 SDK-only build Trevor Woerner
@ 2013-03-08  8:59 ` Khem Raj
  2013-03-08 18:30   ` Trevor Woerner
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2013-03-08  8:59 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto


On Mar 2, 2013, at 8:47 AM, Trevor Woerner <twoerner@gmail.com> wrote:

> I've been really blown away by the breadth of the Yocto Project; not
> only will it help you create a distribution for a device but it can
> also help you create things like a -dev image or a self-extracting
> SDK.
> 
> Sometimes I like to work with a "sub-Linux" device, something that is
> too small to run Linux, or a device on which, for whatever reason,
> I've decided I don't want to run Linux.

you could add  -ffreestanding  -nostdlib and -nodefaultlibs to compiler
and it would compile bare-metal apps but you may need to provide
libgcc if needed. You may not be able to use the one shipped with
toolchain in SDK since it is for Linux env. However adding a pure bare metal
SDK generation is a whole different story and may be out of scope here


> 
> I've been wondering lately if, theoretically, it would be possible to
> use yocto to create a development environment for such projects
> (specifically an SDK). Sometimes these devices need specialized
> software tools (e.g. flash programmers), or maybe you need to use the
> vendor's special, hacked-up version of binutils/gcc.
> 
> Often these projects have instructions pages on how to setup your
> environment, and for the most part these instructions work fine and
> will produce something which with you can work. But sometimes the
> development environments they create are... strange. For example,
> they'll leave you having to provide long argument lists to gcc so they
> can find all the relevant headers and libraries. Nothing tragic, but
> just cumbersome.
> 
> It would be nice, I think, to be able to create a yocto layer and
> provide recipes that would allow a user to very easily bitbake a
> development environment for, say, an ST Discovery board. These
> recipes, then, would follow the vendor's instructions, but using yocto
> all these instructions could be performed with one simple step (which
> would then make use of bitbake's powerful fetching, sstate, and
> cross-building tools).
> 
> Is the concept of "I'm going to build a distribution/root-filesystem
> for you" too deeply engrained in the logic of the Yocto Project that
> it couldn't be used to only build -native tools and assemble an SDK?
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



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

* Re: SDK-only build
  2013-03-08  8:59 ` Khem Raj
@ 2013-03-08 18:30   ` Trevor Woerner
  0 siblings, 0 replies; 3+ messages in thread
From: Trevor Woerner @ 2013-03-08 18:30 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

Hi Khem,

Thanks for adding your thoughts; you were exactly who I was hoping
would have input to my question :-)

On Fri, Mar 8, 2013 at 3:59 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> Sometimes I like to work with a "sub-Linux" device, something that is
>> too small to run Linux, or a device on which, for whatever reason,
>> I've decided I don't want to run Linux.
>
> However adding a pure bare metal
> SDK generation is a whole different story and may be out of scope here
>
>> I've been wondering lately if, theoretically, it would be possible to
>> use yocto to create a development environment for such projects
>> (specifically an SDK).

I watched the video of your presentation a couple years ago at some
ELC(E?) where you discussed using Yocto to generate an SDK. That
presentation struck a chord with me because I know exactly how I would
use such an SDK. I knew, of course, of using Yocto to create a Linux
distribution, and I was aware of creating a -dev form of that
distribution for doing development on the target, but I wasn't aware
of the SDK option for putting together the -native programs, sysroot,
and cross-development tools for independent development for a given
distribution.

I recently started working with a Cortex-M4 based device. Knowing that
simply pushing my code to github wasn't going to help many people
unless I provided instructions on how to setup an environment to work
with the code and the device, I wrote a script that aims to easily
setup someone's environment to be the same as mine. Setting up an
environment involves generating cross-development tools, building a
set of native tools which are used with the device (for example some
sort of flash programmer or openOCD), and having a sysroot-like area
populated with libraries, linker scripts, and header files specific to
the device which the cross-development tools can find without
requiring any -L and -I options.

The whole time I was writing my script I couldn't help think to myself
how nice it would be to be able to write recipes instead of a script,
how nice it would be to make use of bitbake's fetchers, and the
ability to apply patches etc., and then have that all wrapped up into
a nice, self-extracting SDK! Why re-invent the wheel?

Somehow I can't help think this could/should be possible. I can
perform all the necessary steps by hand, but when I consider using
OE/Yocto I feel a bit overwhelmed. Maybe all I need is just bitbake?


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

end of thread, other threads:[~2013-03-08 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02 16:47 SDK-only build Trevor Woerner
2013-03-08  8:59 ` Khem Raj
2013-03-08 18:30   ` Trevor Woerner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.