[yocto] How /etc/passwd packed into my final image

Amit Tomer amittomer25 at gmail.com
Wed Oct 16 04:13:38 PDT 2013


Hi Davide

We have added folder base-passwd to

 meta-xyz/recipes-core/base-passwd

and inside this foler we placed two files one is
base-passwd_3.5.26.bbappend and other is customized passwd file

below is the content of base-passwd_3.5.26.bbappend

FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://passwd"

do_install_append_k2() {
                    install -m 0644 ${WORKDIR}/passwd
${STAGING_DIR_TARGET}${sysconfdir}/passwd
}

But after successful compilation my customized passwd file is not
reflected in /rootfs/etc folder

Any Suggestion where we are doing wrong.

Thanks
Amit

On Wed, Oct 16, 2013 at 4:27 PM, Amit Tomer <amittomer25 at gmail.com> wrote:
> Thanks Paul for your suggestion
> Method of modifying in base-passws is somehow not working for us
> Let us try your suggestion.
>
> On Wed, Oct 16, 2013 at 4:03 PM, Paul Eggleton
> <paul.eggleton at linux.intel.com> wrote:
>> On Wednesday 16 October 2013 10:20:24 Davide Soldan wrote:
>>> In data mercoledì 16 ottobre 2013 00:01:13, Amit Tomer ha scritto:
>>> > I wanted to modify the content of /etc/passwd but don't know how
>>> > /etc/passwd files is packed into final image
>>> >
>>> > After the build process ,passwd file goes to
>>> >
>>> > "tmp/work/k2-poky-linux-gnueabi/image-k2/1.0-r0/rootfs/etc/passwd"
>>> >
>>> > this loaction
>>> >
>>> > Now I see image-k2.bb file but could not find any rule that will pack
>>> > passwd file to
>>> > final image.
>>> >
>>> > Can anybody how it is packed and way to modify it.
>>> >
>>> > Thanks
>>> > Amit
>>> > _______________________________________________
>>> > yocto mailing list
>>> > yocto at yoctoproject.org
>>> > https://lists.yoctoproject.org/listinfo/yocto
>>>
>>> Hi,
>>> I think that the recipe that creates passwd file is under
>>> poky/meta/recipes-core/base-passwd (I'm on dora branch). Maybe with a
>>> bbappend of that recipe you can change the passwd file with yours... Cheers
>>
>> Rather than modifying it in base-passwd, with master or 1.5 I'd recommend
>> using extrausers.bbclass / EXTRA_USERS_PARAMS (see meta-
>> yocto/conf/local.conf.sample.extended for an example of how to use it).
>>
>> Cheers,
>> Paul
>>
>> --
>>
>> Paul Eggleton
>> Intel Open Source Technology Centre



More information about the yocto mailing list