All of lore.kernel.org
 help / color / mirror / Atom feed
* Package selection
@ 2012-06-18 16:57 Dallas Clement
  2012-06-18 18:26 ` Mark Hatle
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dallas Clement @ 2012-06-18 16:57 UTC (permalink / raw)
  To: openembedded-devel

Pardon my ignorance, I am a newb to OE / BitBake.  I've been building
custom embedded rootfs images the old fashioned way by hand for a long
time.

Recently I've been experimenting with OE / BitBake to determine if it
is suitable for my needs.  I want to be able to select exactly which
packages are included in my custom distro.  I tried to build the
"helloworld" example, and it seemed to download and build gobs of
packages, when all I wanted was the most rudimentary rootfs.  In fact,
for starters I'd like to build a rootfs that simply consists of a
statically built busybox and have the init process point to the ash
shell.  Is this even possible with OE?  Once I gain confidence with
something simple like this, I'd like to continue refining things by
adding packages that I select.

Lastly, it is possible to avoid the repeated fetching of source
packages?  In other words, can the source URI's point to packages in a
local file system repository?

Thanks much,

Dallas



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

* Re: Package selection
  2012-06-18 16:57 Package selection Dallas Clement
@ 2012-06-18 18:26 ` Mark Hatle
  2012-06-18 18:31 ` Khem Raj
  2012-06-19  0:32 ` Ciprian Ciubotariu
  2 siblings, 0 replies; 8+ messages in thread
From: Mark Hatle @ 2012-06-18 18:26 UTC (permalink / raw)
  To: openembedded-devel

On 6/18/12 11:57 AM, Dallas Clement wrote:
> Pardon my ignorance, I am a newb to OE / BitBake.  I've been building
> custom embedded rootfs images the old fashioned way by hand for a long
> time.
>
> Recently I've been experimenting with OE / BitBake to determine if it
> is suitable for my needs.  I want to be able to select exactly which
> packages are included in my custom distro.  I tried to build the
> "helloworld" example, and it seemed to download and build gobs of
> packages, when all I wanted was the most rudimentary rootfs.  In fact,
> for starters I'd like to build a rootfs that simply consists of a
> statically built busybox and have the init process point to the ash
> shell.  Is this even possible with OE?  Once I gain confidence with
> something simple like this, I'd like to continue refining things by
> adding packages that I select.
>
> Lastly, it is possible to avoid the repeated fetching of source
> packages?  In other words, can the source URI's point to packages in a
> local file system repository?

if you use 'hob' you can get a graphical environment and an easy way to select 
exactly what you want on the target rootfs.  Don't be surprised though if it 
builds more then you think it should, as dependency resolution is complete 
during the build process.. the image generation uses a package specific 
resolution to get the smallest set for your image based on your requirements.

--Mark

> Thanks much,
>
> Dallas
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel




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

* Re: Package selection
  2012-06-18 16:57 Package selection Dallas Clement
  2012-06-18 18:26 ` Mark Hatle
@ 2012-06-18 18:31 ` Khem Raj
  2012-06-19  0:32 ` Ciprian Ciubotariu
  2 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2012-06-18 18:31 UTC (permalink / raw)
  To: openembedded-devel

On Mon, Jun 18, 2012 at 9:57 AM, Dallas Clement
<dallas.a.clement@gmail.com> wrote:
> Pardon my ignorance, I am a newb to OE / BitBake.  I've been building
> custom embedded rootfs images the old fashioned way by hand for a long
> time.
>
> Recently I've been experimenting with OE / BitBake to determine if it
> is suitable for my needs.  I want to be able to select exactly which
> packages are included in my custom distro.  I tried to build the
> "helloworld" example, and it seemed to download and build gobs of
> packages, when all I wanted was the most rudimentary rootfs.  In fact,
> for starters I'd like to build a rootfs that simply consists of a
> statically built busybox and have the init process point to the ash
> shell.  Is this even possible with OE?  Once I gain confidence with
> something simple like this, I'd like to continue refining things by
> adding packages that I select.

Depending on if you are using OE-Core or classic OE say you are using OE-Core
then you can use core-image-minimal target that will generate minimal packages
into image thats required to boot.

in classical OE there was base-image, micro-image that you could use
I dont think there is exact image you want but then its not that hard
to create one

>
> Lastly, it is possible to avoid the repeated fetching of source
> packages?  In other words, can the source URI's point to packages in a
> local file system repository?

fetch operation should happen first time thereafter it should always
look in your
DL_DIR before it goes out and fetches stuff

>
> Thanks much,
>
> Dallas
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

* Re: Package selection
  2012-06-18 16:57 Package selection Dallas Clement
  2012-06-18 18:26 ` Mark Hatle
  2012-06-18 18:31 ` Khem Raj
@ 2012-06-19  0:32 ` Ciprian Ciubotariu
  2012-06-19  1:19   ` Dallas Clement
  2012-06-19  4:34   ` j
  2 siblings, 2 replies; 8+ messages in thread
From: Ciprian Ciubotariu @ 2012-06-19  0:32 UTC (permalink / raw)
  To: openembedded-devel

On Monday 18 June 2012 11:57:01 Dallas Clement wrote:
> Lastly, it is possible to avoid the repeated fetching of source
> packages?  In other words, can the source URI's point to packages in a
> local file system repository?

I have extracted some minimal code from the old OE srctree.bbclass file that 
allows us to do minimal rebuilds when developing:

S="/path/to/your/sources/"
SRC_URI=""

def remove_tasks(deltasks, d):
    for task in filter(lambda k: d.getVarFlag(k, "task"), d.keys()):
        deps = d.getVarFlag(task, "deps")
        for preptask in deltasks:
            if preptask in deps:
                deps.remove(preptask)
        d.setVarFlag(task, "deps", deps)

#addtask configure after do_setscene

python () {
    remove_tasks(["do_patch", "do_unpack", "do_fetch"], d)
}


Note that setting S there makes bitbake treat this as the work folder, so 
you'll get oe-core build artifacts there.

Also, you need to bitbake -c cleanall <your-package> to make bitbake forget it 
has already built your package, and next bitbake <your-package> to perform the 
minimal build.

> 
> Thanks much,
> 
> Dallas
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

* Re: Package selection
  2012-06-19  0:32 ` Ciprian Ciubotariu
@ 2012-06-19  1:19   ` Dallas Clement
  2012-06-19  4:34   ` j
  1 sibling, 0 replies; 8+ messages in thread
From: Dallas Clement @ 2012-06-19  1:19 UTC (permalink / raw)
  To: openembedded-devel

Thanks all for the tips!  I got quite a bit further by trying oe-core
instead of the oe-classic I was using.  Was able to build a minimal
system and run in qemu for x86-64.



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

* Re: Package selection
  2012-06-19  0:32 ` Ciprian Ciubotariu
  2012-06-19  1:19   ` Dallas Clement
@ 2012-06-19  4:34   ` j
  2012-06-19  4:40     ` Khem Raj
  1 sibling, 1 reply; 8+ messages in thread
From: j @ 2012-06-19  4:34 UTC (permalink / raw)
  To: openembedded-devel

On 06/18/2012 05:32 PM, Ciprian Ciubotariu wrote:
> On Monday 18 June 2012 11:57:01 Dallas Clement wrote:
>> Lastly, it is possible to avoid the repeated fetching of source
>> packages?  In other words, can the source URI's point to packages in a
>> local file system repository?
> I have extracted some minimal code from the old OE srctree.bbclass file that
> allows us to do minimal rebuilds when developing:
>
> S="/path/to/your/sources/"
> SRC_URI=""
>
> def remove_tasks(deltasks, d):
>      for task in filter(lambda k: d.getVarFlag(k, "task"), d.keys()):
>          deps = d.getVarFlag(task, "deps")
>          for preptask in deltasks:
>              if preptask in deps:
>                  deps.remove(preptask)
>          d.setVarFlag(task, "deps", deps)
>
> #addtask configure after do_setscene
>
> python () {
>      remove_tasks(["do_patch", "do_unpack", "do_fetch"], d)
> }
>
>
> Note that setting S there makes bitbake treat this as the work folder, so
> you'll get oe-core build artifacts there.
>
> Also, you need to bitbake -c cleanall <your-package> to make bitbake forget it

Isnt bitbake -c cleansstate <your-package> a better method of cleaning a 
build you want to do again?

If not does anyone know what the actual difference is?
> has already built your package, and next bitbake <your-package> to perform the
> minimal build.
>
>> Thanks much,
>>
>> Dallas
>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel





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

* Re: Package selection
  2012-06-19  4:34   ` j
@ 2012-06-19  4:40     ` Khem Raj
  2012-06-19  4:46       ` j
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2012-06-19  4:40 UTC (permalink / raw)
  To: openembedded-devel

On Mon, Jun 18, 2012 at 9:34 PM, j <vwyodapink@gmail.com> wrote:
>>
>> Also, you need to bitbake -c cleanall <your-package> to make bitbake
>> forget it
>
>
> Isnt bitbake -c cleansstate <your-package> a better method of cleaning a
> build you want to do again?
>
> If not does anyone know what the actual difference is?

clean - cleans the builddir
cleansstate - cleans builddir as well as shared state copy of this
package if any
cleanall - clean builddir, shared state and the downloaded src tar
file from DL_DIR

you usually only should need clean in general. cleansstate should be seldom used
but its preferred to see why cleansstate is needed and if there is
anything wrong
with sstate we would like to know.



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

* Re: Package selection
  2012-06-19  4:40     ` Khem Raj
@ 2012-06-19  4:46       ` j
  0 siblings, 0 replies; 8+ messages in thread
From: j @ 2012-06-19  4:46 UTC (permalink / raw)
  To: openembedded-devel

On 06/18/2012 09:40 PM, Khem Raj wrote:
> On Mon, Jun 18, 2012 at 9:34 PM, j <vwyodapink@gmail.com> wrote:
>>> Also, you need to bitbake -c cleanall <your-package> to make bitbake
>>> forget it
>>
>> Isnt bitbake -c cleansstate <your-package> a better method of cleaning a
>> build you want to do again?
>>
>> If not does anyone know what the actual difference is?
> clean - cleans the builddir
> cleansstate - cleans builddir as well as shared state copy of this
> package if any
> cleanall - clean builddir, shared state and the downloaded src tar
> file from DL_DIR
>
> you usually only should need clean in general. cleansstate should be seldom used
> but its preferred to see why cleansstate is needed and if there is
> anything wrong
> with sstate we would like to know.
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Thanks Khem, been wondering that info just had not looked into it as of 
yet. Makes perfect sense now.




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

end of thread, other threads:[~2012-06-19  4:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18 16:57 Package selection Dallas Clement
2012-06-18 18:26 ` Mark Hatle
2012-06-18 18:31 ` Khem Raj
2012-06-19  0:32 ` Ciprian Ciubotariu
2012-06-19  1:19   ` Dallas Clement
2012-06-19  4:34   ` j
2012-06-19  4:40     ` Khem Raj
2012-06-19  4:46       ` j

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.