[OE-core] [PATCH] image_types: Ensure /init exists for cpio rootfs archives

Andrea Adami andrea.adami at gmail.com
Fri Jan 6 01:00:56 UTC 2012


On Fri, Jan 6, 2012 at 12:36 AM, Darren Hart <dvhart at linux.intel.com> wrote:
>
>
> On 01/05/2012 04:30 AM, Richard Purdie wrote:
>> On Thu, 2012-01-05 at 01:05 +0100, Andrea Adami wrote:
>>> I'd say we have to test for the in-existence of the file instead of
>>> blindly touching it.
>>> Smthg like
>>>
>>> if [! -e ${IMAGE_ROOTFS}/init]; then
>>> touch ${IMAGE_ROOTFS}/init
>>> fi
>
> Why? Touch creates it if it doesn't exist and updates the modtime if it
> does. It doesn't modify the content of the file if it exists. What is
> the motivation for testing for it's existence?
>
touch fails with Permission denied because one package in my rootfs
already created the symlink

>>>
>>>
>>> Now, repeating that block for all 4 cpio images is a bit ugly... better ideas?
>>
>> Make it a shell function we call? I'd also check for
>> ${base_sbindir}/init first too?
>
> Why check for that? So we can link to it instead of creating an empty file?

Nonsense, kernel looks for /init
( http://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
)

>
>
> --
> Darren
>
>>
>> Cheers,
>>
>> Richard
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Regards

Andrea




More information about the Openembedded-core mailing list