All of lore.kernel.org
 help / color / mirror / Atom feed
* customizing system configuration files in my image
@ 2016-07-01  9:11 Ottavio Campana
  2016-07-01  9:55 ` Zhenhua Luo
  2016-07-01 13:16 ` Daniel.
  0 siblings, 2 replies; 7+ messages in thread
From: Ottavio Campana @ 2016-07-01  9:11 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 1409 bytes --]

Hello,

I would like to customize an image I am developing based on core image minimal.

Particularly, I'd like to customize the files /etc/network/interfaces and /etc/inittab .

What should I do achieve that?

Thank you

Ottavio

--
[Videotec Logo]<http://www.videotec.com/>

Ottavio Campana
Product Manager - Electronic R&D Department

Office +39.0445.697.411  Fax +39.0445.697.414
Address  VIDEOTEC S.p.A. - Via Friuli, 6 - 36015 Schio (Vicenza) - Italy


Any information herein transmitted only concerns the person or the company named in the address and is deemed to be confidential It is strictly forbidden to transmit, post, forward or otherwise use said information to anyone other than the recipient. If you have received this message by mistake, please contact the sender and delete any relevant information from your computer. This mailbox is only meant for sending and receiving messages pertaining business matters and any other use for personal purposes is forbidden and unauthorized. Therefore, any email sent and received will be handled as ordinary business messages and subject to the company's own rules, and may thus be read also by people other than the user named in the mailbox address.

[Twitter Logo blue]<http://www.videotec.com/twitter>   [Youtube logo red] <http://www.videotec.com/youtube>    [Linkedin logo blue] <http://www.videotec.com/linkedin>




[-- Attachment #1.2: Type: text/html, Size: 6909 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 3602 bytes --]

[-- Attachment #3: image002.gif --]
[-- Type: image/gif, Size: 1393 bytes --]

[-- Attachment #4: image003.gif --]
[-- Type: image/gif, Size: 1385 bytes --]

[-- Attachment #5: image004.png --]
[-- Type: image/png, Size: 1161 bytes --]

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

* Re: customizing system configuration files in my image
  2016-07-01  9:11 customizing system configuration files in my image Ottavio Campana
@ 2016-07-01  9:55 ` Zhenhua Luo
  2016-07-07  3:41   ` Paul Eggleton
  2016-07-01 13:16 ` Daniel.
  1 sibling, 1 reply; 7+ messages in thread
From: Zhenhua Luo @ 2016-07-01  9:55 UTC (permalink / raw)
  To: Ottavio Campana; +Cc: yocto


[-- Attachment #1.1: Type: text/plain, Size: 1966 bytes --]

Usually I do it by adding bbappend of corresponding packages to override original files, the interfaces is provided by init-ifupdown, the inittab is provided by sysvinit-inittab.

An example: http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-ppc/tree/recipes-core/init-ifupdown


Best Regards,

Zhenhua

From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Ottavio Campana
Sent: Friday, July 01, 2016 5:12 PM
To: yocto@yoctoproject.org
Subject: [yocto] customizing system configuration files in my image

Hello,

I would like to customize an image I am developing based on core image minimal.

Particularly, I'd like to customize the files /etc/network/interfaces and /etc/inittab .

What should I do achieve that?

Thank you

Ottavio

--
[Videotec Logo]<http://www.videotec.com/>

Ottavio Campana
Product Manager - Electronic R&D Department

Office +39.0445.697.411  Fax +39.0445.697.414
Address  VIDEOTEC S.p.A. - Via Friuli, 6 - 36015 Schio (Vicenza) - Italy


Any information herein transmitted only concerns the person or the company named in the address and is deemed to be confidential It is strictly forbidden to transmit, post, forward or otherwise use said information to anyone other than the recipient. If you have received this message by mistake, please contact the sender and delete any relevant information from your computer. This mailbox is only meant for sending and receiving messages pertaining business matters and any other use for personal purposes is forbidden and unauthorized. Therefore, any email sent and received will be handled as ordinary business messages and subject to the company's own rules, and may thus be read also by people other than the user named in the mailbox address.

[Twitter Logo blue]<http://www.videotec.com/twitter>   [Youtube logo red] <http://www.videotec.com/youtube>    [Linkedin logo blue] <http://www.videotec.com/linkedin>




[-- Attachment #1.2: Type: text/html, Size: 8875 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 3602 bytes --]

[-- Attachment #3: image002.gif --]
[-- Type: image/gif, Size: 1393 bytes --]

[-- Attachment #4: image003.gif --]
[-- Type: image/gif, Size: 1385 bytes --]

[-- Attachment #5: image004.png --]
[-- Type: image/png, Size: 1161 bytes --]

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

* Re: customizing system configuration files in my image
  2016-07-01  9:11 customizing system configuration files in my image Ottavio Campana
  2016-07-01  9:55 ` Zhenhua Luo
@ 2016-07-01 13:16 ` Daniel.
  2016-07-01 13:19   ` Daniel.
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel. @ 2016-07-01 13:16 UTC (permalink / raw)
  To: Ottavio Campana; +Cc: yocto


[-- Attachment #1.1: Type: text/plain, Size: 2328 bytes --]

Hi Ottavio,

There is more than way to do it. In your case I would use
ROOTFS_POSTPROCESS_COMMAND to modify files prior the creation of the rootfs.

You may:
- Create a .bbclass for your image inheriting core-image for example.
- Create a shell function to do some sed magic.
- Setup that function to run at rootfs creation.

Here is a example, I hope this helps :)
https://gist.github.com/gkos/4e981dffb929886cd8a6c5ed738b7b08

Regards,

2016-07-01 6:11 GMT-03:00 Ottavio Campana <o.campana@videotec.com>:

> Hello,
>
>
>
> I would like to customize an image I am developing based on core image
> minimal.
>
>
>
> Particularly, I’d like to customize the files /etc/network/interfaces and
> /etc/inittab .
>
>
>
> What should I do achieve that?
>
>
>
> Thank you
>
>
>
> Ottavio
>
>
>
> --
>
> [image: Videotec Logo] <http://www.videotec.com/>
>
> *Ottavio Campana*
> *Product Manager - Electronic R&D Department*
>
> Office +39.0445.697.411  Fax +39.0445.697.414
> Address  VIDEOTEC S.p.A. - Via Friuli, 6 - 36015 Schio (Vicenza) - Italy
>
>
>
>
> *Any information herein transmitted only concerns the person or the
> company named in the address and is deemed to be confidential It is
> strictly forbidden to transmit, post, forward or otherwise use said
> information to anyone other than the recipient. If you have received this
> message by mistake, please contact the sender and delete any relevant
> information from your computer. This mailbox is only meant for sending and
> receiving messages pertaining business matters and any other use for
> personal purposes is forbidden and unauthorized. Therefore, any email sent
> and received will be handled as ordinary business messages and subject to
> the company's own rules, and may thus be read also by people other than the
> user named in the mailbox address. *
>
> [image: Twitter Logo blue] <http://www.videotec.com/twitter>   [image:
> Youtube logo red] <http://www.videotec.com/youtube>   [image: Linkedin
> logo blue] <http://www.videotec.com/linkedin>
>
>
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>


-- 
*"Do or do not. There is no try"*
  *Yoda Master*

[-- Attachment #1.2: Type: text/html, Size: 6201 bytes --]

[-- Attachment #2: image003.gif --]
[-- Type: image/gif, Size: 1385 bytes --]

[-- Attachment #3: image004.png --]
[-- Type: image/png, Size: 1161 bytes --]

[-- Attachment #4: image002.gif --]
[-- Type: image/gif, Size: 1393 bytes --]

[-- Attachment #5: image001.png --]
[-- Type: image/png, Size: 3602 bytes --]

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

* Re: customizing system configuration files in my image
  2016-07-01 13:16 ` Daniel.
@ 2016-07-01 13:19   ` Daniel.
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel. @ 2016-07-01 13:19 UTC (permalink / raw)
  To: Ottavio Campana; +Cc: yocto


[-- Attachment #1.1: Type: text/plain, Size: 2750 bytes --]

After that you can create a image recipe and inherit from that .bbclass. If
you don't want to create a .bbclass you can use this same aproach directly
on your image recipe :)

Regards,

2016-07-01 10:16 GMT-03:00 Daniel. <danielhilst@gmail.com>:

> Hi Ottavio,
>
> There is more than way to do it. In your case I would use
> ROOTFS_POSTPROCESS_COMMAND to modify files prior the creation of the rootfs.
>
> You may:
> - Create a .bbclass for your image inheriting core-image for example.
> - Create a shell function to do some sed magic.
> - Setup that function to run at rootfs creation.
>
> Here is a example, I hope this helps :)
> https://gist.github.com/gkos/4e981dffb929886cd8a6c5ed738b7b08
>
> Regards,
>
> 2016-07-01 6:11 GMT-03:00 Ottavio Campana <o.campana@videotec.com>:
>
>> Hello,
>>
>>
>>
>> I would like to customize an image I am developing based on core image
>> minimal.
>>
>>
>>
>> Particularly, I’d like to customize the files /etc/network/interfaces and
>> /etc/inittab .
>>
>>
>>
>> What should I do achieve that?
>>
>>
>>
>> Thank you
>>
>>
>>
>> Ottavio
>>
>>
>>
>> --
>>
>> [image: Videotec Logo] <http://www.videotec.com/>
>>
>> *Ottavio Campana*
>> *Product Manager - Electronic R&D Department*
>>
>> Office +39.0445.697.411  Fax +39.0445.697.414
>> Address  VIDEOTEC S.p.A. - Via Friuli, 6 - 36015 Schio (Vicenza) - Italy
>>
>>
>>
>>
>> *Any information herein transmitted only concerns the person or the
>> company named in the address and is deemed to be confidential It is
>> strictly forbidden to transmit, post, forward or otherwise use said
>> information to anyone other than the recipient. If you have received this
>> message by mistake, please contact the sender and delete any relevant
>> information from your computer. This mailbox is only meant for sending and
>> receiving messages pertaining business matters and any other use for
>> personal purposes is forbidden and unauthorized. Therefore, any email sent
>> and received will be handled as ordinary business messages and subject to
>> the company's own rules, and may thus be read also by people other than the
>> user named in the mailbox address. *
>>
>> [image: Twitter Logo blue] <http://www.videotec.com/twitter>   [image:
>> Youtube logo red] <http://www.videotec.com/youtube>   [image: Linkedin
>> logo blue] <http://www.videotec.com/linkedin>
>>
>>
>>
>>
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>
>
> --
> *"Do or do not. There is no try"*
>   *Yoda Master*
>



-- 
*"Do or do not. There is no try"*
  *Yoda Master*

[-- Attachment #1.2: Type: text/html, Size: 7181 bytes --]

[-- Attachment #2: image003.gif --]
[-- Type: image/gif, Size: 1385 bytes --]

[-- Attachment #3: image004.png --]
[-- Type: image/png, Size: 1161 bytes --]

[-- Attachment #4: image002.gif --]
[-- Type: image/gif, Size: 1393 bytes --]

[-- Attachment #5: image001.png --]
[-- Type: image/png, Size: 3602 bytes --]

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

* Re: customizing system configuration files in my image
  2016-07-01  9:55 ` Zhenhua Luo
@ 2016-07-07  3:41   ` Paul Eggleton
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2016-07-07  3:41 UTC (permalink / raw)
  To: yocto, Ottavio Campana

On Fri, 01 Jul 2016 09:55:38 Zhenhua Luo wrote:
> On Fri, 01 Jul 2016 09:11:47 Ottavio Campana wrote:
> > I would like to customize an image I am developing based on core image
> > minimal.
> > 
> > Particularly, I'd like to customize the files /etc/network/interfaces and
> > /etc/inittab .
>
> Usually I do it by adding bbappend of corresponding packages to override
> original files, the interfaces is provided by init-ifupdown, the inittab is
> provided by sysvinit-inittab.
> 
> An example:
> http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-ppc/tree/recipes-core/in
> it-ifupdown

FYI there is a shortcut to creating these - the "recipetool appendfile" 
command. For example, say you have your desired custom inittab file locally as 
"myinittab" and you want the bbappend to be created in meta-mylayer then you 
would run:

recipetool appendfile meta-mylayer /etc/inittab myinittab

This will automatically determine which recipe is providing the file and how 
to overwrite it with your version. You do need to have built that recipe for 
this to work, but then that will already be the case if you have built the 
image beforehand.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: customizing system configuration files in my image
  2016-07-20 11:41 Jörg Wittenberger
@ 2016-07-20 13:10 ` piotr.lewicki
  0 siblings, 0 replies; 7+ messages in thread
From: piotr.lewicki @ 2016-07-20 13:10 UTC (permalink / raw)
  To: Jörg Wittenberger, yocto

[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]

It's always helpful to first check here: 
http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html

and here: 
https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html

But find an answer attached..


On 20.07.2016 13:41, Jörg Wittenberger wrote:
>
> Hi all,
>
> yet another newbie here stumbling around…
>
> I’m not trying to find „any way“ to do what I need.  I’m trying to 
> learn how these thing sould be done in yocto.  Looks to mea s if I’m 
> missing something basic.
>
> Zhenhua Lu wrote:
>
> > Usually I do it by adding bbappend of corresponding packages to 
> override original files, the interfaces is provided by init-ifupdown, 
> the inittab is provided by sysvinit-inittab.
>
> >
>
> > An example: 
> http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-ppc/tree/recipes-core/init-ifupdown
>
> I failed trying to follow this example.
>
> I  have this samba_4.%.bbappend :
>
> ----
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/iris:"
>
You should add a line
SRC_URI += "file://smb.conf"
that will copy a file from your "${THISDIR}/iris:" to ${WORKDIR}
and then..

> do_install_append() {
>
>     install -m644 iris/smb.conf ${D}${sysconfdir}/samba/smb.conf
>
> }
>
..install this with "install -m 0644 ${WORKDIR}/smb.conf 
${D}${sysconfdir}/samba/smb.conf"

Also make sure that you have a directory ${D}${sysconfdir}/samba by 
adding the line:
install -d ${D}${sysconfdir}/samba
>
> And in the same directory a subdirectory „iris“ which contrains the 
> „smb.conf“ I want to install.
>
> Does not work.  Using `bitbake -c devshell samba` I found no copy of 
> my „iris“ directory.
>
> Thanks so much.
>
> /Jörg
>

BR,
Piotr
>
>
>


[-- Attachment #2: Type: text/html, Size: 6806 bytes --]

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

* Re: customizing system configuration files in my image
@ 2016-07-20 11:41 Jörg Wittenberger
  2016-07-20 13:10 ` piotr.lewicki
  0 siblings, 1 reply; 7+ messages in thread
From: Jörg Wittenberger @ 2016-07-20 11:41 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

Hi all,

yet another newbie here stumbling around...

I'm not trying to find "any way" to do what I need.  I'm trying to learn how these thing sould be done in yocto.  Looks to mea s if I'm missing something basic.

Zhenhua Lu wrote:

> Usually I do it by adding bbappend of corresponding packages to override original files, the interfaces is provided by init-ifupdown, the inittab is provided by sysvinit-inittab.
>
> An example: http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-ppc/tree/recipes-core/init-ifupdown

I failed trying to follow this example.

I  have this samba_4.%.bbappend :
----
FILESEXTRAPATHS_prepend := "${THISDIR}/iris:"

do_install_append() {
    install -m644 iris/smb.conf ${D}${sysconfdir}/samba/smb.conf
}

And in the same directory a subdirectory "iris" which contrains the "smb.conf" I want to install.

Does not work.  Using `bitbake -c devshell samba` I found no copy of my "iris" directory.

Thanks so much.

/Jörg


[-- Attachment #2: Type: text/html, Size: 4493 bytes --]

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

end of thread, other threads:[~2016-07-20 13:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01  9:11 customizing system configuration files in my image Ottavio Campana
2016-07-01  9:55 ` Zhenhua Luo
2016-07-07  3:41   ` Paul Eggleton
2016-07-01 13:16 ` Daniel.
2016-07-01 13:19   ` Daniel.
2016-07-20 11:41 Jörg Wittenberger
2016-07-20 13:10 ` piotr.lewicki

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.