[oe] [PATCH] image.bbclass: remove tmp/rootfs after image creation unless you set a variable
Chris Larson
clarson at kergoth.com
Wed Jun 17 18:08:57 UTC 2009
On Wed, Jun 17, 2009 at 11:01 AM, Richard Purdie<rpurdie at rpsys.net> wrote:
> On Wed, 2009-06-17 at 10:10 -0700, Chris Larson wrote:
>> Set IMAGE_KEEPROOTFS to something other than the empty string to keep
>> tmp/rootfs around after image creation, otherwise it will be removed, as it's
>> not a fully functional filesystem, and causes much confusion among users as a
>> result.
>>
>> Signed-off-by: Chris Larson <clarson at mvista.com>
>> ---
>> classes/image.bbclass | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/classes/image.bbclass b/classes/image.bbclass
>> index f0cc3b3..974e734 100644
>> --- a/classes/image.bbclass
>> +++ b/classes/image.bbclass
>> @@ -133,6 +133,7 @@ fakeroot do_rootfs () {
>> ${IMAGE_POSTPROCESS_COMMAND}
>>
>> ${MACHINE_POSTPROCESS_COMMAND}
>> + ${@['rm -rf ${IMAGE_ROOTFS}', ''][bool(d.getVar("IMAGE_KEEPROOTFS", 1))]}
>> }
>>
>> do_deploy_to[nostamp] = "1"
>
> Something I've been thinking about for a while is moving rootfs into
> ${WORKDIR}/. That way you can have concurrent image generation for a
> start and rm_work could be taught to clean it up...
That's a better way of doing it, indeed. In fact, someone suggested
it on irc, and I promptly went and forgot about it :)
--
Chris Larson
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Software Engineer
MontaVista Software, Inc.
More information about the Openembedded-devel
mailing list