* Development and Open Embedded
@ 2009-05-06 21:33 Michael Sundius
2009-05-06 21:44 ` Chris Larson
2009-05-07 5:25 ` Roman I Khimov
0 siblings, 2 replies; 4+ messages in thread
From: Michael Sundius @ 2009-05-06 21:33 UTC (permalink / raw)
To: openembedded-devel
Hi,
I'm helping my organization move our platform build
infrastructure to better than the complicated and
disparate make jumble of make files and tarballs
that we currently use. I've integrated much of it
to Open Embedded (basic root fs image, kernel, tools).
This all works well, but it seems to me (a kernel hacker
mostly) that the hacking cycle of code, compile, run
is a bit difficult if you are working within the confines
of source control systems.
that is, say I modify a file within my kernel development (git)
tree and then want to compile it. under OE, the whole tree is
going to be copied to the sources dir, tarballed, and then
extracted into the ${S} directory. Further, when compiling,
all the output files are left in the ${S} dir, instead of
directing them to an output directory.
I find that most of the engineers I know start to grumble when
the have to wait any longer than status quo in any one of the
steps for turning around a small change to their source. My
experience is mostly inside the kernel, but I suppose other
projects are similar on embedded systems.
I'm wondering if anyone has done such a thing as creating a
recipe that forgoes the "fetch" task and point the ${S} to
a local devel tree.. then adds an extra onto the make command
to place the object in another directory (maybe ${O})...
Maybe people have solved this problem in other ways or a similar
way. I'd love to get some insight into how this is done in
other organizations... It would be great to beable to inherit
a class that allows use of an efficient dev cycle.
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Development and Open Embedded
2009-05-06 21:33 Development and Open Embedded Michael Sundius
@ 2009-05-06 21:44 ` Chris Larson
2009-05-06 22:09 ` Michael Sundius
2009-05-07 5:25 ` Roman I Khimov
1 sibling, 1 reply; 4+ messages in thread
From: Chris Larson @ 2009-05-06 21:44 UTC (permalink / raw)
To: openembedded-devel; +Cc: openembedded-devel
On Wed, May 6, 2009 at 2:33 PM, Michael Sundius <msundius@sundius.com> wrote:
> Hi,
>
> I'm helping my organization move our platform build
> infrastructure to better than the complicated and
> disparate make jumble of make files and tarballs
> that we currently use. I've integrated much of it
> to Open Embedded (basic root fs image, kernel, tools).
>
> This all works well, but it seems to me (a kernel hacker
> mostly) that the hacking cycle of code, compile, run
> is a bit difficult if you are working within the confines
> of source control systems.
>
> that is, say I modify a file within my kernel development (git)
> tree and then want to compile it. under OE, the whole tree is
> going to be copied to the sources dir, tarballed, and then
> extracted into the ${S} directory. Further, when compiling,
> all the output files are left in the ${S} dir, instead of
> directing them to an output directory.
>
> I find that most of the engineers I know start to grumble when
> the have to wait any longer than status quo in any one of the
> steps for turning around a small change to their source. My
> experience is mostly inside the kernel, but I suppose other
> projects are similar on embedded systems.
>
> I'm wondering if anyone has done such a thing as creating a
> recipe that forgoes the "fetch" task and point the ${S} to
> a local devel tree.. then adds an extra onto the make command
> to place the object in another directory (maybe ${O})...
>
> Maybe people have solved this problem in other ways or a similar
> way. I'd love to get some insight into how this is done in
> other organizations... It would be great to beable to inherit
> a class that allows use of an efficient dev cycle.
I have a little class somewhere around here that did that. Killed
fetch/unpack/patch, set S to ${TOPDIR}, set O to
${TOPDIR}/obj-${HOST_SYS} or so, redirect WORKDIR to
${TOPDIR}/somethingorother, etc. It works very well. You can then
add the recipe from the source tree to your BBFILES, or add your
development area to COLLECTIONS or so, and it mostly just works.
Cleaning up something like that would be a huge boon to the
application and kernel developer use cases, which are sadly not well
satisfied in current openembedded.
--
Chris Larson
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Software Engineer
MontaVista Software, Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Development and Open Embedded
2009-05-06 21:44 ` Chris Larson
@ 2009-05-06 22:09 ` Michael Sundius
0 siblings, 0 replies; 4+ messages in thread
From: Michael Sundius @ 2009-05-06 22:09 UTC (permalink / raw)
To: openembedded-devel
Chris Larson <clarson <at> kergoth.com> writes:
> > I'm wondering if anyone has done such a thing as creating a
> > recipe that forgoes the "fetch" task and point the ${S} to
> > a local devel tree.. then adds an extra onto the make command
> > to place the object in another directory (maybe ${O})...
> >
> I have a little class somewhere around here that did that. Killed
> fetch/unpack/patch, set S to ${TOPDIR}, set O to
> ${TOPDIR}/obj-${HOST_SYS} or so, redirect WORKDIR to
> ${TOPDIR}/somethingorother, etc. It works very well. You can then
> add the recipe from the source tree to your BBFILES, or add your
> development area to COLLECTIONS or so, and it mostly just works.
> Cleaning up something like that would be a huge boon to the
> application and kernel developer use cases, which are sadly not well
> satisfied in current openembedded.
I'm happy to help clean it up try it out etc for kernel and other
stuff. We're told here by our boss that giving back is good, so I'm
happy to do it if you don't mind sharing the code and giving me a
head start.
mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Development and Open Embedded
2009-05-06 21:33 Development and Open Embedded Michael Sundius
2009-05-06 21:44 ` Chris Larson
@ 2009-05-07 5:25 ` Roman I Khimov
1 sibling, 0 replies; 4+ messages in thread
From: Roman I Khimov @ 2009-05-07 5:25 UTC (permalink / raw)
To: openembedded-devel
On Thursday 07 May 2009 01:33:45 Michael Sundius wrote:
> I'm wondering if anyone has done such a thing as creating a
> recipe that forgoes the "fetch" task and point the ${S} to
> a local devel tree.. then adds an extra onto the make command
> to place the object in another directory (maybe ${O})...
One of our engineers (Alexey Zaytsev <zaytsev@altell.ru>) have done this for
kernel:
==================================================================
python do_fetch() {
linux_prefetch = bb.data.getVar('LINUX_PREFETCH', d)
if not linux_prefetch:
bb.build.exec_func('base_do_fetch', d)
}
python do_unpack() {
import os
linux_prefetch = bb.data.getVar('LINUX_PREFETCH', d)
if not linux_prefetch:
bb.build.exec_func('base_do_unpack', d)
else:
s = bb.data.expand(bb.data.getVar('S', d), d)
os.system("ln -sf %s %s" % (linux_prefetch, s))
config = "file://" + bb.data.getVar('LINUX_CONFIG', d)
oe_unpack_file(bb.fetch.localpath(config, d), d)
}
==================================================================
You set LINUX_PREFETCH to point to git tree in local.conf and LINUX_CONFIG to
config file (LINUX_CONFIG is set in kernel .bb file). That's it. I think it's
very hacky and generally don't like the approach, but the thing works and he's
been working successfully with this hack building two kernels from the same
source base. Of course, there is also separate directory building there, but
that's done in classes (will try to extract a good patch).
Also, just to give more hack directions, there is "git/git_repo/.git" in
sources directory that can be symlinked into "${S}/git/.git", that would allow
using "bitbake -c compile -f" to rebuild the package working with sources in
normal way. I think making bitbake patch to add this symlink would be a bit
better to start with, but then there should be some enforcement of local HEAD
usage without constant "rev=..." specifying in .bb.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-07 5:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06 21:33 Development and Open Embedded Michael Sundius
2009-05-06 21:44 ` Chris Larson
2009-05-06 22:09 ` Michael Sundius
2009-05-07 5:25 ` Roman I Khimov
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.