[yocto] When to create a new build directory for yocto?

Qiang Yu yuq825 at gmail.com
Sun Nov 30 17:37:23 PST 2014


Now after study share state cache in yocto document, I know it can be used
by multi build dir
to share IPK files. But if all the build dir share the same sstate_cache,
why don't they just use
the same build dir? I can only think one reason: needn't change conf/ files
when switching output.
But when in the same SOC, the conf/ also need not be changed, just switch
output recipes.

And if every output has its own build dir with the same sstate_cache, the
build stage is ignored,
but the IPK will have multi copy in multi build dir. This will wast disk
space. So may be this is
not the best way?

Regards,
Qiang


On Sun, Nov 30, 2014 at 10:28 PM, Qiang Yu <yuq825 at gmail.com> wrote:

> Why share the sstate? Does it contain previously build ipk packages in
> other build directories for reuse?
>
> Regards,
> Qiang
>
> On Sun, Nov 30, 2014 at 4:03 PM, ChenQi <Qi.Chen at windriver.com> wrote:
>
>>  I would suggest to use separate build directories but let these builds
>> to share downloads and sstate.
>>
>> Regards,
>> Chen Qi
>>
>>
>> On 11/30/2014 12:49 PM, Qiang Yu wrote:
>>
>> Hi all,
>>
>> I'm maintaining a Yocto build system to produce these outputs:
>>
>> 1. ARM SOC 1
>>   1). board 1 image
>>   2). board 2 image
>>   3). SDK for i686
>>   4). SDK for x86_64
>> 2. ARM SOC 2
>>   1). board 3 image
>>   2). board 4 image
>>   3). SDK for i686
>>   4). SDK for x86_64
>>
>> Now I don't know the right way to create build directories for these
>> builds. The simplest way
>> I think is creating one build directory for each of these builds. But it
>> wast resource for boards
>> with the same SOC which can share cross toolchain. And ARM SOC 1 and ARM
>> SOC 2 use
>> different conf/bblayers.conf to add different BSP layer, I need to modify
>> it when switch SOC.
>> So the right way is creating one build directory for each SOC, then
>> bitbake each output's recipe,
>> right?
>>
>> I am also not sure if I can put the SDK and board image in the same build
>> directory. Because
>> once I build a board's image after creating its SDK, I add gdbserver to
>> it, but the build fail without
>> really building the gdbserver package. So I guess the board image build
>> is confused by the SDK
>> build state.
>>
>>  So the conclusion is I need a recommended way to separate output into
>> different build directories:
>> 1. minimize rebuild shared packages
>> 2. no build state corruption
>> 3. if multi output in the same build dir, no change to conf/ files or an
>> easy way to switch between
>>
>>  Regards,
>> Qiang
>>
>>
>>
>>
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20141201/098c859b/attachment.html>


More information about the yocto mailing list