All of lore.kernel.org
 help / color / mirror / Atom feed
* Changing over to systemd (no dhcp)
@ 2017-01-18 15:10 colin.helliwell
  2017-01-18 17:51 ` Rick Altherr
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: colin.helliwell @ 2017-01-18 15:10 UTC (permalink / raw)
  To: yocto

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

We have a configuration for our embedded system which is working via SysV,
but we're investigating moving over to systemd. 

Not sure if this is 'wise' - if anyone has technological arguments
for/against then I'd be interested - but I wanted to investigate it anyway.

 

I've modified local.conf (right or wrong) with

  DISTRO_FEATURES_append = " systemd"

  VIRTUAL-RUNTIME_init_manager = "systemd"

  DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

  VIRTUAL-RUNTIME_initscripts = ""

  KERNEL_ENABLE_CGROUPS = "1"

 

I also found a readme
(https://cgit.freedesktop.org/systemd/systemd/tree/README#n37) about the
kernel requirements for systemd, and it does at least now boot.

However although eth0 is coming up ('ifconfig eth0'), there doesn't seem to
be any dhcp happening - no IP etc.

Previously (under SysV) I had the busybox dhcp client; now it seems that is
missing. There's a symlink /etc/systemd/system/busybox-udhcpc.service to
/dev/null

I'm using 

  Poky Jethro

  Kernel 4.4.0

  Busybox 1.23.2 (with 'CONFIG_FEATURE_SYSTEMD=y')

 

I wondered if this is just a simple switch I'm missing somewhere, or is
there a whole load more modifications I need to dig into and hand-craft?
(Was hoping for something 'out of the box'..)

 

Thanks

 


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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-18 15:10 Changing over to systemd (no dhcp) colin.helliwell
@ 2017-01-18 17:51 ` Rick Altherr
  2017-01-18 21:35 ` Andre McCurdy
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Rick Altherr @ 2017-01-18 17:51 UTC (permalink / raw)
  To: colin.helliwell; +Cc: yocto

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

systemd-networkd is the systemd daemon for setting up the network.  It
looks like the PACKAGECONFIG settings exist for it in
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/systemd/systemd_232.bb
but it isn't enabled by default.  Add that and it should work.

Rick

On Wed, Jan 18, 2017 at 7:10 AM, <colin.helliwell@ln-systems.com> wrote:

> We have a configuration for our embedded system which is working via SysV,
> but we’re investigating moving over to systemd.
>
> Not sure if this is ‘wise’ – if anyone has technological arguments
> for/against then I’d be interested – but I wanted to investigate it anyway.
>
>
>
> I’ve modified local.conf (right or wrong) with
>
>   DISTRO_FEATURES_append = " systemd"
>
>   VIRTUAL-RUNTIME_init_manager = "systemd"
>
>   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
>
>   VIRTUAL-RUNTIME_initscripts = ""
>
>   KERNEL_ENABLE_CGROUPS = "1"
>
>
>
> I also found a readme (https://cgit.freedesktop.org/
> systemd/systemd/tree/README#n37) about the kernel requirements for
> systemd, and it does at least now boot.
>
> However although eth0 is coming up (‘ifconfig eth0’), there doesn’t seem
> to be any dhcp happening – no IP etc.
>
> Previously (under SysV) I had the busybox dhcp client; now it seems that
> is missing. There’s a symlink /etc/systemd/system/busybox-udhcpc.service
> to /dev/null
>
> I’m using
>
>   Poky Jethro
>
>   Kernel 4.4.0
>
>   Busybox 1.23.2 (with ‘CONFIG_FEATURE_SYSTEMD=y’)
>
>
>
> I wondered if this is just a simple switch I’m missing somewhere, or is
> there a whole load more modifications I need to dig into and hand-craft?
> (Was hoping for something ‘out of the box’….)
>
>
>
> Thanks
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-18 15:10 Changing over to systemd (no dhcp) colin.helliwell
  2017-01-18 17:51 ` Rick Altherr
@ 2017-01-18 21:35 ` Andre McCurdy
  2017-01-19  0:21   ` Rick Altherr
  2017-01-19  7:20 ` Kristian Amlie
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 22+ messages in thread
From: Andre McCurdy @ 2017-01-18 21:35 UTC (permalink / raw)
  To: colin.helliwell; +Cc: Yocto discussion list

On Wed, Jan 18, 2017 at 7:10 AM,  <colin.helliwell@ln-systems.com> wrote:
> We have a configuration for our embedded system which is working via SysV,
> but we’re investigating moving over to systemd.
>
> Not sure if this is ‘wise’ – if anyone has technological arguments
> for/against then I’d be interested – but I wanted to investigate it anyway.
>
> I’ve modified local.conf (right or wrong) with
>
>   DISTRO_FEATURES_append = " systemd"
>   VIRTUAL-RUNTIME_init_manager = "systemd"
>   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
>   VIRTUAL-RUNTIME_initscripts = ""
>   KERNEL_ENABLE_CGROUPS = "1"
>
> I also found a readme
> (https://cgit.freedesktop.org/systemd/systemd/tree/README#n37) about the
> kernel requirements for systemd, and it does at least now boot.
>
> However although eth0 is coming up (‘ifconfig eth0’), there doesn’t seem to
> be any dhcp happening – no IP etc.
>
> Previously (under SysV) I had the busybox dhcp client; now it seems that is
> missing. There’s a symlink /etc/systemd/system/busybox-udhcpc.service to
> /dev/null
>
> I’m using
>
>   Poky Jethro
>   Kernel 4.4.0
>   Busybox 1.23.2 (with ‘CONFIG_FEATURE_SYSTEMD=y’)
>
> I wondered if this is just a simple switch I’m missing somewhere, or is
> there a whole load more modifications I need to dig into and hand-craft?
> (Was hoping for something ‘out of the box’….)

Try:

  VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Enabling systemd is somewhat documented by the example in
{meta-poky,openembedded-core/meta}/conf/local.conf.sample.extended,
which is:

#
# Use systemd for system initialization
#
# DISTRO_FEATURES_append = " systemd"
# DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
# VIRTUAL-RUNTIME_init_manager = "systemd"
# VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"


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

* Re: Changing over to systemd (no dhcp)
  2017-01-18 21:35 ` Andre McCurdy
@ 2017-01-19  0:21   ` Rick Altherr
  2017-01-19  7:21     ` colin.helliwell
  0 siblings, 1 reply; 22+ messages in thread
From: Rick Altherr @ 2017-01-19  0:21 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Yocto discussion list

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

I was wondering about this recently.  Why are these snippets put in
local.conf.sample.extended instead of separate, well-named .inc files that
can be shared by multiple distros?  The current model seems to encourage
putting lots of configuration in local.conf that probably should be in the
distro or machine conf.

Rick

On Wed, Jan 18, 2017 at 1:35 PM, Andre McCurdy <armccurdy@gmail.com> wrote:

> On Wed, Jan 18, 2017 at 7:10 AM,  <colin.helliwell@ln-systems.com> wrote:
> > We have a configuration for our embedded system which is working via
> SysV,
> > but we’re investigating moving over to systemd.
> >
> > Not sure if this is ‘wise’ – if anyone has technological arguments
> > for/against then I’d be interested – but I wanted to investigate it
> anyway.
> >
> > I’ve modified local.conf (right or wrong) with
> >
> >   DISTRO_FEATURES_append = " systemd"
> >   VIRTUAL-RUNTIME_init_manager = "systemd"
> >   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
> >   VIRTUAL-RUNTIME_initscripts = ""
> >   KERNEL_ENABLE_CGROUPS = "1"
> >
> > I also found a readme
> > (https://cgit.freedesktop.org/systemd/systemd/tree/README#n37) about the
> > kernel requirements for systemd, and it does at least now boot.
> >
> > However although eth0 is coming up (‘ifconfig eth0’), there doesn’t seem
> to
> > be any dhcp happening – no IP etc.
> >
> > Previously (under SysV) I had the busybox dhcp client; now it seems that
> is
> > missing. There’s a symlink /etc/systemd/system/busybox-udhcpc.service to
> > /dev/null
> >
> > I’m using
> >
> >   Poky Jethro
> >   Kernel 4.4.0
> >   Busybox 1.23.2 (with ‘CONFIG_FEATURE_SYSTEMD=y’)
> >
> > I wondered if this is just a simple switch I’m missing somewhere, or is
> > there a whole load more modifications I need to dig into and hand-craft?
> > (Was hoping for something ‘out of the box’….)
>
> Try:
>
>   VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
>
> Enabling systemd is somewhat documented by the example in
> {meta-poky,openembedded-core/meta}/conf/local.conf.sample.extended,
> which is:
>
> #
> # Use systemd for system initialization
> #
> # DISTRO_FEATURES_append = " systemd"
> # DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
> # VIRTUAL-RUNTIME_init_manager = "systemd"
> # VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-18 15:10 Changing over to systemd (no dhcp) colin.helliwell
  2017-01-18 17:51 ` Rick Altherr
  2017-01-18 21:35 ` Andre McCurdy
@ 2017-01-19  7:20 ` Kristian Amlie
  2017-01-19  9:18 ` Mike Looijmans
  2017-01-20  6:33 ` Khem Raj
  4 siblings, 0 replies; 22+ messages in thread
From: Kristian Amlie @ 2017-01-19  7:20 UTC (permalink / raw)
  To: colin.helliwell, yocto

On 18/01/17 16:10, colin.helliwell@ln-systems.com wrote:
> We have a configuration for our embedded system which is working via
> SysV, but we’re investigating moving over to systemd.
> 
> Not sure if this is ‘wise’ – if anyone has technological arguments
> for/against then I’d be interested – but I wanted to investigate it anyway.

Not really a technical argument, but I thought I'd just report that we
are running with systemd just fine in Mender, and has been doing so for
a good year now. The road hasn't been completely bump-free, but all
issues so far have been resolved, and lately it's been quite stable for
us. I should point out that since we are a software vendor we don't have
devices in production though, only testing/integration.

-- 
Kristian


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

* Re: Changing over to systemd (no dhcp)
  2017-01-19  0:21   ` Rick Altherr
@ 2017-01-19  7:21     ` colin.helliwell
  2017-01-19  8:31       ` ChenQi
  0 siblings, 1 reply; 22+ messages in thread
From: colin.helliwell @ 2017-01-19  7:21 UTC (permalink / raw)
  To: 'Rick Altherr', 'Andre McCurdy'
  Cc: 'Yocto discussion list'

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

Yes, I’d agree with that, Rick.

We run automated regression builds from a fresh version control checkout – but because local.conf is generated when the build environment is set up, it isn’t suitable for version control. So any mods to it found during development have to be (remembered to be) put into local.conf.sample, so that the same build is assured for anyone anywhere.

I’ve long felt/assumed that local.conf was for truly local mods, for that user and/or for their temporary try-outs.

Similarly – and this is going even more off-topic so I’ll save the detail for a separate thread – I’ve still not yet got to grips with whether, when I want to add a particular package, I should be modifying my image recipe or set up a custom distro)

 

From: Rick Altherr [mailto:raltherr@google.com] 
Sent: 19 January 2017 00:22
To: Andre McCurdy <armccurdy@gmail.com>
Cc: colin.helliwell@ln-systems.com; Yocto discussion list <yocto@yoctoproject.org>
Subject: Re: [yocto] Changing over to systemd (no dhcp)

 

I was wondering about this recently.  Why are these snippets put in local.conf.sample.extended instead of separate, well-named .inc files that can be shared by multiple distros?  The current model seems to encourage putting lots of configuration in local.conf that probably should be in the distro or machine conf.

 

Rick

 

On Wed, Jan 18, 2017 at 1:35 PM, Andre McCurdy <armccurdy@gmail.com <mailto:armccurdy@gmail.com> > wrote:

On Wed, Jan 18, 2017 at 7:10 AM,  <colin.helliwell@ln-systems.com <mailto:colin.helliwell@ln-systems.com> > wrote:

> We have a configuration for our embedded system which is working via SysV,
> but we’re investigating moving over to systemd.
>
> Not sure if this is ‘wise’ – if anyone has technological arguments
> for/against then I’d be interested – but I wanted to investigate it anyway.
>
> I’ve modified local.conf (right or wrong) with
>
>   DISTRO_FEATURES_append = " systemd"
>   VIRTUAL-RUNTIME_init_manager = "systemd"
>   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
>   VIRTUAL-RUNTIME_initscripts = ""
>   KERNEL_ENABLE_CGROUPS = "1"
>
> I also found a readme
> (https://cgit.freedesktop.org/systemd/systemd/tree/README#n37) about the
> kernel requirements for systemd, and it does at least now boot.
>
> However although eth0 is coming up (‘ifconfig eth0’), there doesn’t seem to
> be any dhcp happening – no IP etc.
>
> Previously (under SysV) I had the busybox dhcp client; now it seems that is
> missing. There’s a symlink /etc/systemd/system/busybox-udhcpc.service to
> /dev/null
>
> I’m using
>
>   Poky Jethro
>   Kernel 4.4.0
>   Busybox 1.23.2 (with ‘CONFIG_FEATURE_SYSTEMD=y’)
>
> I wondered if this is just a simple switch I’m missing somewhere, or is
> there a whole load more modifications I need to dig into and hand-craft?
> (Was hoping for something ‘out of the box’….)

Try:

  VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Enabling systemd is somewhat documented by the example in
{meta-poky,openembedded-core/meta}/conf/local.conf.sample.extended,
which is:

#
# Use systemd for system initialization
#
# DISTRO_FEATURES_append = " systemd"
# DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
# VIRTUAL-RUNTIME_init_manager = "systemd"
# VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org <mailto:yocto@yoctoproject.org> 
https://lists.yoctoproject.org/listinfo/yocto

 


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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-19  7:21     ` colin.helliwell
@ 2017-01-19  8:31       ` ChenQi
  2017-01-19 10:06         ` colin.helliwell
  0 siblings, 1 reply; 22+ messages in thread
From: ChenQi @ 2017-01-19  8:31 UTC (permalink / raw)
  To: colin.helliwell, 'Rick Altherr', 'Andre McCurdy'
  Cc: 'Yocto discussion list'

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

Hi Colin,

For the dhcp problem, what you need is a network manager. Any network 
manager that supports dhcp would do the job. systemd-networkd might be 
sufficient in your case.

For the local.conf problem, you could use a layer to manage all common 
things shared by the team.

For the package adding problem, it depends on the purpose.
1) if adding the package is only for local work (dev or test), do it in 
local.conf
2) otherwise, do it in image recipe
Distro conf files are not suitable for such kinds of modification.

Best Regards,
Chen Qi

On 01/19/2017 03:21 PM, colin.helliwell@ln-systems.com wrote:
>
> Yes, I’d agree with that, Rick.
>
> We run automated regression builds from a fresh version control 
> checkout – but because local.conf is generated when the build 
> environment is set up, it isn’t suitable for version control. So any 
> mods to it found during development have to be (remembered to be) put 
> into local.conf.sample, so that the same build is assured for anyone 
> anywhere.
>
> I’ve long felt/assumed that local.conf was for truly local mods, for 
> that user and/or for their temporary try-outs.
>
> Similarly – and this is going even more off-topic so I’ll save the 
> detail for a separate thread – I’ve still not yet got to grips with 
> whether, when I want to add a particular package, I should be 
> modifying my image recipe or set up a custom distro)
>
> *From:*Rick Altherr [mailto:raltherr@google.com]
> *Sent:* 19 January 2017 00:22
> *To:* Andre McCurdy <armccurdy@gmail.com>
> *Cc:* colin.helliwell@ln-systems.com; Yocto discussion list 
> <yocto@yoctoproject.org>
> *Subject:* Re: [yocto] Changing over to systemd (no dhcp)
>
> I was wondering about this recently.  Why are these snippets put in 
> local.conf.sample.extended instead of separate, well-named .inc files 
> that can be shared by multiple distros?  The current model seems to 
> encourage putting lots of configuration in local.conf that probably 
> should be in the distro or machine conf.
>
> Rick
>
> On Wed, Jan 18, 2017 at 1:35 PM, Andre McCurdy <armccurdy@gmail.com 
> <mailto:armccurdy@gmail.com>> wrote:
>
>     On Wed, Jan 18, 2017 at 7:10 AM, <colin.helliwell@ln-systems.com
>     <mailto:colin.helliwell@ln-systems.com>> wrote:
>
>     > We have a configuration for our embedded system which is working
>     via SysV,
>     > but we’re investigating moving over to systemd.
>     >
>     > Not sure if this is ‘wise’ – if anyone has technological arguments
>     > for/against then I’d be interested – but I wanted to investigate
>     it anyway.
>     >
>     > I’ve modified local.conf (right or wrong) with
>     >
>     >   DISTRO_FEATURES_append = " systemd"
>     >   VIRTUAL-RUNTIME_init_manager = "systemd"
>     >   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
>     >   VIRTUAL-RUNTIME_initscripts = ""
>     >   KERNEL_ENABLE_CGROUPS = "1"
>     >
>     > I also found a readme
>     > (https://cgit.freedesktop.org/systemd/systemd/tree/README#n37)
>     about the
>     > kernel requirements for systemd, and it does at least now boot.
>     >
>     > However although eth0 is coming up (‘ifconfig eth0’), there
>     doesn’t seem to
>     > be any dhcp happening – no IP etc.
>     >
>     > Previously (under SysV) I had the busybox dhcp client; now it
>     seems that is
>     > missing. There’s a symlink
>     /etc/systemd/system/busybox-udhcpc.service to
>     > /dev/null
>     >
>     > I’m using
>     >
>     >   Poky Jethro
>     >   Kernel 4.4.0
>     >   Busybox 1.23.2 (with ‘CONFIG_FEATURE_SYSTEMD=y’)
>     >
>     > I wondered if this is just a simple switch I’m missing
>     somewhere, or is
>     > there a whole load more modifications I need to dig into and
>     hand-craft?
>     > (Was hoping for something ‘out of the box’….)
>
>     Try:
>
>       VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
>
>     Enabling systemd is somewhat documented by the example in
>     {meta-poky,openembedded-core/meta}/conf/local.conf.sample.extended,
>     which is:
>
>     #
>     # Use systemd for system initialization
>     #
>     # DISTRO_FEATURES_append = " systemd"
>     # DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
>     # VIRTUAL-RUNTIME_init_manager = "systemd"
>     # VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
>
>     --
>     _______________________________________________
>     yocto mailing list
>     yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
>     https://lists.yoctoproject.org/listinfo/yocto
>
>
>


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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-18 15:10 Changing over to systemd (no dhcp) colin.helliwell
                   ` (2 preceding siblings ...)
  2017-01-19  7:20 ` Kristian Amlie
@ 2017-01-19  9:18 ` Mike Looijmans
  2017-01-20  6:15   ` Michael Gloff
  2017-01-20  6:33 ` Khem Raj
  4 siblings, 1 reply; 22+ messages in thread
From: Mike Looijmans @ 2017-01-19  9:18 UTC (permalink / raw)
  To: yocto

On 18-01-17 16:10, colin.helliwell@ln-systems.com wrote:
> We have a configuration for our embedded system which is working via SysV, but
> we’re investigating moving over to systemd.
>
> Not sure if this is ‘wise’ – if anyone has technological arguments for/against
> then I’d be interested – but I wanted to investigate it anyway.

Just one. systemd is a bit larger. So it will increase the boot time if your 
platform is I/O limited (many embedded systems are).

The good thing I noticed is that it shuts down a lot faster than initscripts. 
(I don't understand why I can boot my system in 2 seconds, but shutdown takes 
over 5 seconds...)


Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail







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

* Re: Changing over to systemd (no dhcp)
  2017-01-19  8:31       ` ChenQi
@ 2017-01-19 10:06         ` colin.helliwell
  2017-01-20  2:11           ` ChenQi
  0 siblings, 1 reply; 22+ messages in thread
From: colin.helliwell @ 2017-01-19 10:06 UTC (permalink / raw)
  To: 'ChenQi'; +Cc: 'Yocto discussion list'

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

Thanks Chen.

Currently looking into getting networkd hooked in. (no luck yet!)

I'll also look into moving stuff from local.conf to elsewhere, but where you
say "Distro conf files are not suitable for such kinds of modification", I'm
wondering what sort of modifications they *are* suitable/intended for? (i.e.
the purpose of a distro as opposed to an image recipe)

 

From: ChenQi [mailto:Qi.Chen@windriver.com] 
Sent: 19 January 2017 08:32
To: colin.helliwell@ln-systems.com; 'Rick Altherr' <raltherr@google.com>;
'Andre McCurdy' <armccurdy@gmail.com>
Cc: 'Yocto discussion list' <yocto@yoctoproject.org>
Subject: Re: [yocto] Changing over to systemd (no dhcp)

 

Hi Colin,

For the dhcp problem, what you need is a network manager. Any network
manager that supports dhcp would do the job. systemd-networkd might be
sufficient in your case.

For the local.conf problem, you could use a layer to manage all common
things shared by the team.

For the package adding problem, it depends on the purpose.
1) if adding the package is only for local work (dev or test), do it in
local.conf
2) otherwise, do it in image recipe
Distro conf files are not suitable for such kinds of modification.

Best Regards,
Chen Qi

On 01/19/2017 03:21 PM, colin.helliwell@ln-systems.com
<mailto:colin.helliwell@ln-systems.com>  wrote:

Yes, I'd agree with that, Rick.

We run automated regression builds from a fresh version control checkout -
but because local.conf is generated when the build environment is set up, it
isn't suitable for version control. So any mods to it found during
development have to be (remembered to be) put into local.conf.sample, so
that the same build is assured for anyone anywhere.

I've long felt/assumed that local.conf was for truly local mods, for that
user and/or for their temporary try-outs.

Similarly - and this is going even more off-topic so I'll save the detail
for a separate thread - I've still not yet got to grips with whether, when I
want to add a particular package, I should be modifying my image recipe or
set up a custom distro)

 

From: Rick Altherr [mailto:raltherr@google.com] 
Sent: 19 January 2017 00:22
To: Andre McCurdy  <mailto:armccurdy@gmail.com> <armccurdy@gmail.com>
Cc: colin.helliwell@ln-systems.com <mailto:colin.helliwell@ln-systems.com> ;
Yocto discussion list  <mailto:yocto@yoctoproject.org>
<yocto@yoctoproject.org>
Subject: Re: [yocto] Changing over to systemd (no dhcp)

 

I was wondering about this recently.  Why are these snippets put in
local.conf.sample.extended instead of separate, well-named .inc files that
can be shared by multiple distros?  The current model seems to encourage
putting lots of configuration in local.conf that probably should be in the
distro or machine conf.

 

Rick

 

On Wed, Jan 18, 2017 at 1:35 PM, Andre McCurdy <armccurdy@gmail.com
<mailto:armccurdy@gmail.com> > wrote:

On Wed, Jan 18, 2017 at 7:10 AM,  <colin.helliwell@ln-systems.com
<mailto:colin.helliwell@ln-systems.com> > wrote:

> We have a configuration for our embedded system which is working via SysV,
> but we're investigating moving over to systemd.
>
> Not sure if this is 'wise' - if anyone has technological arguments
> for/against then I'd be interested - but I wanted to investigate it
anyway.
>
> I've modified local.conf (right or wrong) with
>
>   DISTRO_FEATURES_append = " systemd"
>   VIRTUAL-RUNTIME_init_manager = "systemd"
>   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
>   VIRTUAL-RUNTIME_initscripts = ""
>   KERNEL_ENABLE_CGROUPS = "1"
>
> I also found a readme
> (https://cgit.freedesktop.org/systemd/systemd/tree/README#n37) about the
> kernel requirements for systemd, and it does at least now boot.
>
> However although eth0 is coming up ('ifconfig eth0'), there doesn't seem
to
> be any dhcp happening - no IP etc.
>
> Previously (under SysV) I had the busybox dhcp client; now it seems that
is
> missing. There's a symlink /etc/systemd/system/busybox-udhcpc.service to
> /dev/null
>
> I'm using
>
>   Poky Jethro
>   Kernel 4.4.0
>   Busybox 1.23.2 (with 'CONFIG_FEATURE_SYSTEMD=y')
>
> I wondered if this is just a simple switch I'm missing somewhere, or is
> there a whole load more modifications I need to dig into and hand-craft?
> (Was hoping for something 'out of the box'..)

Try:

  VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Enabling systemd is somewhat documented by the example in
{meta-poky,openembedded-core/meta}/conf/local.conf.sample.extended,
which is:

#
# Use systemd for system initialization
#
# DISTRO_FEATURES_append = " systemd"
# DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
# VIRTUAL-RUNTIME_init_manager = "systemd"
# VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org <mailto:yocto@yoctoproject.org> 
https://lists.yoctoproject.org/listinfo/yocto

 





 


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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-19 10:06         ` colin.helliwell
@ 2017-01-20  2:11           ` ChenQi
  2017-01-20 13:59             ` colin.helliwell
  0 siblings, 1 reply; 22+ messages in thread
From: ChenQi @ 2017-01-20  2:11 UTC (permalink / raw)
  To: colin.helliwell; +Cc: 'Yocto discussion list'

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

On 01/19/2017 06:06 PM, colin.helliwell@ln-systems.com wrote:
>
> Thanks Chen.
>
> Currently looking into getting networkd hooked in. (no luck yet!)
>
> I’ll also look into moving stuff from local.conf to elsewhere, but 
> where you say “Distro conf files are not suitable for such kinds of 
> modification”, I’m wondering what sort of modifications they *are* 
> suitable/intended for? (i.e. the purpose of a distro as opposed to an 
> image recipe)
>

Hi Colin,

 From my understanding, 'image' is an item related to components in 
rootfs while 'distro' is an item related to the functionality of the 
components. So in Yocto, variables related to image, e.g. IMAGE_INSTALL, 
IMAGE_FEATURE, etc, control what should be in rootfs; and variables 
related to distro, e.g. DISTRO_FEATURES, control the behavior of the 
program, whether to support 'x11', whether to support 'pam', etc.

You can look at poky.conf in meta-poky for more info on the concept of 
distro. And you can look at IMAGE_FEATURES for more info on the concept 
of image.

Best Regards,
Chen Qi

> *From:*ChenQi [mailto:Qi.Chen@windriver.com]
> *Sent:* 19 January 2017 08:32
> *To:* colin.helliwell@ln-systems.com; 'Rick Altherr' 
> <raltherr@google.com>; 'Andre McCurdy' <armccurdy@gmail.com>
> *Cc:* 'Yocto discussion list' <yocto@yoctoproject.org>
> *Subject:* Re: [yocto] Changing over to systemd (no dhcp)
>
> Hi Colin,
>
> For the dhcp problem, what you need is a network manager. Any network 
> manager that supports dhcp would do the job. systemd-networkd might be 
> sufficient in your case.
>
> For the local.conf problem, you could use a layer to manage all common 
> things shared by the team.
>
> For the package adding problem, it depends on the purpose.
> 1) if adding the package is only for local work (dev or test), do it 
> in local.conf
> 2) otherwise, do it in image recipe
> Distro conf files are not suitable for such kinds of modification.
>
> Best Regards,
> Chen Qi
>
> On 01/19/2017 03:21 PM, colin.helliwell@ln-systems.com 
> <mailto:colin.helliwell@ln-systems.com> wrote:
>
>     Yes, I’d agree with that, Rick.
>
>     We run automated regression builds from a fresh version control
>     checkout – but because local.conf is generated when the build
>     environment is set up, it isn’t suitable for version control. So
>     any mods to it found during development have to be (remembered to
>     be) put into local.conf.sample, so that the same build is assured
>     for anyone anywhere.
>
>     I’ve long felt/assumed that local.conf was for truly local mods,
>     for that user and/or for their temporary try-outs.
>
>     Similarly – and this is going even more off-topic so I’ll save the
>     detail for a separate thread – I’ve still not yet got to grips
>     with whether, when I want to add a particular package, I should be
>     modifying my image recipe or set up a custom distro)
>
>     *From:*Rick Altherr [mailto:raltherr@google.com]
>     *Sent:* 19 January 2017 00:22
>     *To:* Andre McCurdy <armccurdy@gmail.com> <mailto:armccurdy@gmail.com>
>     *Cc:* colin.helliwell@ln-systems.com
>     <mailto:colin.helliwell@ln-systems.com>; Yocto discussion list
>     <yocto@yoctoproject.org> <mailto:yocto@yoctoproject.org>
>     *Subject:* Re: [yocto] Changing over to systemd (no dhcp)
>
>     I was wondering about this recently. Why are these snippets put in
>     local.conf.sample.extended instead of separate, well-named .inc
>     files that can be shared by multiple distros?  The current model
>     seems to encourage putting lots of configuration in local.conf
>     that probably should be in the distro or machine conf.
>
>     Rick
>
>     On Wed, Jan 18, 2017 at 1:35 PM, Andre McCurdy
>     <armccurdy@gmail.com <mailto:armccurdy@gmail.com>> wrote:
>
>         On Wed, Jan 18, 2017 at 7:10 AM,
>         <colin.helliwell@ln-systems.com
>         <mailto:colin.helliwell@ln-systems.com>> wrote:
>
>         > We have a configuration for our embedded system which is
>         working via SysV,
>         > but we’re investigating moving over to systemd.
>         >
>         > Not sure if this is ‘wise’ – if anyone has technological
>         arguments
>         > for/against then I’d be interested – but I wanted to
>         investigate it anyway.
>         >
>         > I’ve modified local.conf (right or wrong) with
>         >
>         >   DISTRO_FEATURES_append = " systemd"
>         >   VIRTUAL-RUNTIME_init_manager = "systemd"
>         >   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
>         >   VIRTUAL-RUNTIME_initscripts = ""
>         >   KERNEL_ENABLE_CGROUPS = "1"
>         >
>         > I also found a readme
>         >
>         (https://cgit.freedesktop.org/systemd/systemd/tree/README#n37)
>         about the
>         > kernel requirements for systemd, and it does at least now boot.
>         >
>         > However although eth0 is coming up (‘ifconfig eth0’), there
>         doesn’t seem to
>         > be any dhcp happening – no IP etc.
>         >
>         > Previously (under SysV) I had the busybox dhcp client; now
>         it seems that is
>         > missing. There’s a symlink
>         /etc/systemd/system/busybox-udhcpc.service to
>         > /dev/null
>         >
>         > I’m using
>         >
>         >   Poky Jethro
>         >   Kernel 4.4.0
>         >   Busybox 1.23.2 (with ‘CONFIG_FEATURE_SYSTEMD=y’)
>         >
>         > I wondered if this is just a simple switch I’m missing
>         somewhere, or is
>         > there a whole load more modifications I need to dig into and
>         hand-craft?
>         > (Was hoping for something ‘out of the box’….)
>
>         Try:
>
>           VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
>
>         Enabling systemd is somewhat documented by the example in
>         {meta-poky,openembedded-core/meta}/conf/local.conf.sample.extended,
>         which is:
>
>         #
>         # Use systemd for system initialization
>         #
>         # DISTRO_FEATURES_append = " systemd"
>         # DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
>         # VIRTUAL-RUNTIME_init_manager = "systemd"
>         # VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
>
>         --
>         _______________________________________________
>         yocto mailing list
>         yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
>         https://lists.yoctoproject.org/listinfo/yocto
>
>
>


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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-19  9:18 ` Mike Looijmans
@ 2017-01-20  6:15   ` Michael Gloff
  2017-01-20 14:27     ` Mike Looijmans
  0 siblings, 1 reply; 22+ messages in thread
From: Michael Gloff @ 2017-01-20  6:15 UTC (permalink / raw)
  To: Mike Looijmans; +Cc: Yocto discussion list

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

Mike,

On Thu, Jan 19, 2017 at 3:18 AM, Mike Looijmans <mike.looijmans@topic.nl>
wrote:

> On 18-01-17 16:10, colin.helliwell@ln-systems.com wrote:
>
>> We have a configuration for our embedded system which is working via
>> SysV, but
>> we’re investigating moving over to systemd.
>>
>> Not sure if this is ‘wise’ – if anyone has technological arguments
>> for/against
>> then I’d be interested – but I wanted to investigate it anyway.
>>
>
> Just one. systemd is a bit larger. So it will increase the boot time if
> your platform is I/O limited (many embedded systems are).
>
> The good thing I noticed is that it shuts down a lot faster than
> initscripts. (I don't understand why I can boot my system in 2 seconds, but
> shutdown takes over 5 seconds...)
>

The 5+ seconds may be from sendsigs on shutdown or reboot:
     echo "Sending all processes the TERM signal..."
     killall5 -15
     sleep 5
     echo "Sending all processes the KILL signal..."
     killall5 -9

Reducing to 1 or 2 seconds should be sufficient.

Michael Gloff



>
>
> Kind regards,
>
> Mike Looijmans
> System Expert
>
> TOPIC Products
> Materiaalweg 4, NL-5681 RJ Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79
> E-mail: mike.looijmans@topicproducts.com
> Website: www.topicproducts.com
>
> Please consider the environment before printing this e-mail
>
>
>
>

> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-18 15:10 Changing over to systemd (no dhcp) colin.helliwell
                   ` (3 preceding siblings ...)
  2017-01-19  9:18 ` Mike Looijmans
@ 2017-01-20  6:33 ` Khem Raj
  4 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2017-01-20  6:33 UTC (permalink / raw)
  To: colin.helliwell; +Cc: yocto

On Wed, Jan 18, 2017 at 7:10 AM,  <colin.helliwell@ln-systems.com> wrote:
> We have a configuration for our embedded system which is working via SysV,
> but we’re investigating moving over to systemd.
>
> Not sure if this is ‘wise’ – if anyone has technological arguments
> for/against then I’d be interested – but I wanted to investigate it anyway.
>
>
>
> I’ve modified local.conf (right or wrong) with
>
>   DISTRO_FEATURES_append = " systemd"
>
>   VIRTUAL-RUNTIME_init_manager = "systemd"
>
>   DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
>
>   VIRTUAL-RUNTIME_initscripts = ""
>
>   KERNEL_ENABLE_CGROUPS = "1"
>
>
>
> I also found a readme
> (https://cgit.freedesktop.org/systemd/systemd/tree/README#n37) about the
> kernel requirements for systemd, and it does at least now boot.
>
> However although eth0 is coming up (‘ifconfig eth0’), there doesn’t seem to
> be any dhcp happening – no IP etc.
>
> Previously (under SysV) I had the busybox dhcp client; now it seems that is
> missing. There’s a symlink /etc/systemd/system/busybox-udhcpc.service to
> /dev/null
>
> I’m using
>
>   Poky Jethro
>
>   Kernel 4.4.0
>
>   Busybox 1.23.2 (with ‘CONFIG_FEATURE_SYSTEMD=y’)
>
>
>
> I wondered if this is just a simple switch I’m missing somewhere, or is
> there a whole load more modifications I need to dig into and hand-craft?
> (Was hoping for something ‘out of the box’….)

you need to enable right packageconfigs for systemd e.g. see
https://github.com/kraj/meta-himvis/tree/master/recipes-core/systemd

>
>
>
> Thanks
>
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


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

* Re: Changing over to systemd (no dhcp)
  2017-01-20  2:11           ` ChenQi
@ 2017-01-20 13:59             ` colin.helliwell
  2017-01-21 13:08               ` Leon Woestenberg
  2017-01-23 11:02               ` Mike Looijmans
  0 siblings, 2 replies; 22+ messages in thread
From: colin.helliwell @ 2017-01-20 13:59 UTC (permalink / raw)
  To: 'Yocto discussion list'

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

Thanks for all the pointers everyone. I've now got (in my distro conf):

DISTRO_FEATURES_append = " systemd"

DISTRO_FEATURES_remove = " sysvinit"

VIRTUAL-RUNTIME_init_manager = "systemd"

PREFERRED_PROVIDER_udev = "systemd"

PACKAGECONFIG_append_pn-systemd = " resolved networkd"

 

It's booting fine (if 'noisily'!) and starting up dhcp. 

I suspect there's also some de-cluttering needed e.g. init.d scripts still
being installed as well as a .service.  On that subject, is there some
clever syntax for a do_install() and/or recipe in order to control which
type of file is installed into rootfs?

 


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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-20  6:15   ` Michael Gloff
@ 2017-01-20 14:27     ` Mike Looijmans
  2017-01-21 12:41       ` Leon Woestenberg
  0 siblings, 1 reply; 22+ messages in thread
From: Mike Looijmans @ 2017-01-20 14:27 UTC (permalink / raw)
  To: Michael Gloff; +Cc: Yocto discussion list

On 20-01-17 07:15, Michael Gloff wrote:
> Mike,
>
> On Thu, Jan 19, 2017 at 3:18 AM, Mike Looijmans <mike.looijmans@topic.nl
> <mailto:mike.looijmans@topic.nl>> wrote:
>
>     On 18-01-17 16:10, colin.helliwell@ln-systems.com
>     <mailto:colin.helliwell@ln-systems.com> wrote:
>
>         We have a configuration for our embedded system which is working via
>         SysV, but
>         we’re investigating moving over to systemd.
>
>         Not sure if this is ‘wise’ – if anyone has technological arguments
>         for/against
>         then I’d be interested – but I wanted to investigate it anyway.
>
>
>     Just one. systemd is a bit larger. So it will increase the boot time if
>     your platform is I/O limited (many embedded systems are).
>
>     The good thing I noticed is that it shuts down a lot faster than
>     initscripts. (I don't understand why I can boot my system in 2 seconds,
>     but shutdown takes over 5 seconds...)
>
>
> The 5+ seconds may be from sendsigs on shutdown or reboot:
>      echo "Sending all processes the TERM signal..."
>      killall5 -15
>     sleep 5
>      echo "Sending all processes the KILL signal..."
>      killall5 -9

OMG, indeed, this is utterly braindead!

An no one (except one of the systemd folks) has come up with a program that 
just waits for the the processes to finish (with a timeout) and only uses the 
"-9" double barrel shotgun to finish only the ones that didn't respond?
(though doing that is rather pointless if the system power is about to be cut 
anyway...)



Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail







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

* Re: Changing over to systemd (no dhcp)
  2017-01-20 14:27     ` Mike Looijmans
@ 2017-01-21 12:41       ` Leon Woestenberg
  2017-01-23  7:15         ` Mike Looijmans
  0 siblings, 1 reply; 22+ messages in thread
From: Leon Woestenberg @ 2017-01-21 12:41 UTC (permalink / raw)
  To: Mike Looijmans; +Cc: Yocto discussion list

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

Hello Mike,

On Fri, Jan 20, 2017 at 3:27 PM, Mike Looijmans <mike.looijmans@topic.nl>
wrote:

> An no one (except one of the systemd folks) has come up with a program
> that just waits for the the processes to finish (with a timeout) and only
> uses the "-9" double barrel shotgun to finish only the ones that didn't
> respond?
> (though doing that is rather pointless if the system power is about to be
> cut anyway...)
>
> What lesser-brain-dead "one of the systemd folks" solution is that?

Regards,

Leon.

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

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

* Re: Changing over to systemd (no dhcp)
  2017-01-20 13:59             ` colin.helliwell
@ 2017-01-21 13:08               ` Leon Woestenberg
  2017-01-23  7:47                 ` colin.helliwell
  2017-01-23 11:02               ` Mike Looijmans
  1 sibling, 1 reply; 22+ messages in thread
From: Leon Woestenberg @ 2017-01-21 13:08 UTC (permalink / raw)
  To: colin.helliwell; +Cc: Yocto discussion list

Hi Colin,

On Fri, Jan 20, 2017 at 2:59 PM, <colin.helliwell@ln-systems.com> wrote:
>
> DISTRO_FEATURES_remove = " sysvinit"
>
> I suspect there’s also some de-cluttering needed e.g. init.d scripts still being installed as well as a .service.
>
I wouldn't expect these to be installed.  Which ones specifically?

Regards,

Leon.


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

* Re: Changing over to systemd (no dhcp)
  2017-01-21 12:41       ` Leon Woestenberg
@ 2017-01-23  7:15         ` Mike Looijmans
  0 siblings, 0 replies; 22+ messages in thread
From: Mike Looijmans @ 2017-01-23  7:15 UTC (permalink / raw)
  To: Leon Woestenberg; +Cc: Yocto discussion list

On 21-01-17 13:41, Leon Woestenberg wrote:
> Hello Mike,
>
> On Fri, Jan 20, 2017 at 3:27 PM, Mike Looijmans <mike.looijmans@topic.nl
> <mailto:mike.looijmans@topic.nl>> wrote:
>
>     An no one (except one of the systemd folks) has come up with a program
>     that just waits for the the processes to finish (with a timeout) and only
>     uses the "-9" double barrel shotgun to finish only the ones that didn't
>     respond?
>     (though doing that is rather pointless if the system power is about to be
>     cut anyway...)
>
> What lesser-brain-dead "one of the systemd folks" solution is that?

Sorry if I wasn't clear. The systemd folk seems to have gotten it right.

The problem with the "sleep" is that 5 seconds is way too long, since most 
processes will finish in mere milliseconds. But 5 seconds is also way too 
short, because if a program needs to spin up a harddisk to write out its final 
state, it'll need about 7 seconds to do so on the average 3.5" disk...



Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail







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

* Re: Changing over to systemd (no dhcp)
  2017-01-21 13:08               ` Leon Woestenberg
@ 2017-01-23  7:47                 ` colin.helliwell
  2017-01-23  7:57                   ` Mike Looijmans
  2017-01-23  9:19                   ` Patrick Ohly
  0 siblings, 2 replies; 22+ messages in thread
From: colin.helliwell @ 2017-01-23  7:47 UTC (permalink / raw)
  To: 'Leon Woestenberg'; +Cc: 'Yocto discussion list'

Looking at it in more detail, it's perhaps more that not everything is taken up by systemd i.e. I have lots of symlinks to /dev/null in etc/systemd/system, with the corresponding/original SysV script still in /etc/init.d.  Things like banner, sysfs, urandom, dmesg (to name just a few).
Maybe these don't matter but, as I say, it just seems like a bit of 'clutter'

Looking at one which does seem to switch over cleanly - dropbear - I'm puzzled how the recipe [dropbear.inc, in poky/meta/recipes-core] appears to install both init.d script and .service in its do_install, yet only one or the other ultimately shows up in the rootfs..? (Relates to my other question about how to determine the init type in do_install)

-----Original Message-----
From: Leon Woestenberg [mailto:leon@sidebranch.com] 
Sent: 21 January 2017 13:09
To: colin.helliwell@ln-systems.com
Cc: Yocto discussion list <yocto@yoctoproject.org>
Subject: Re: [yocto] Changing over to systemd (no dhcp)

Hi Colin,

On Fri, Jan 20, 2017 at 2:59 PM, <colin.helliwell@ln-systems.com> wrote:
>
> DISTRO_FEATURES_remove = " sysvinit"
>
> I suspect there’s also some de-cluttering needed e.g. init.d scripts still being installed as well as a .service.
>
I wouldn't expect these to be installed.  Which ones specifically?

Regards,

Leon.



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

* Re: Changing over to systemd (no dhcp)
  2017-01-23  7:47                 ` colin.helliwell
@ 2017-01-23  7:57                   ` Mike Looijmans
  2017-01-23  9:19                   ` Patrick Ohly
  1 sibling, 0 replies; 22+ messages in thread
From: Mike Looijmans @ 2017-01-23  7:57 UTC (permalink / raw)
  To: yocto

On 23-01-17 08:47, colin.helliwell@ln-systems.com wrote:
> Looking at it in more detail, it's perhaps more that not everything is taken up by systemd i.e. I have lots of symlinks to /dev/null in etc/systemd/system, with the corresponding/original SysV script still in /etc/init.d.  Things like banner, sysfs, urandom, dmesg (to name just a few).
> Maybe these don't matter but, as I say, it just seems like a bit of 'clutter'
>
> Looking at one which does seem to switch over cleanly - dropbear - I'm puzzled how the recipe [dropbear.inc, in poky/meta/recipes-core] appears to install both init.d script and .service in its do_install, yet only one or the other ultimately shows up in the rootfs..? (Relates to my other question about how to determine the init type in do_install)

I suspect that "inherit systemd" is taking care of that.


>
> 

Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





-----Original Message-----
> From: Leon Woestenberg [mailto:leon@sidebranch.com]
> Sent: 21 January 2017 13:09
> To: colin.helliwell@ln-systems.com
> Cc: Yocto discussion list <yocto@yoctoproject.org>
> Subject: Re: [yocto] Changing over to systemd (no dhcp)
>
> Hi Colin,
>
> On Fri, Jan 20, 2017 at 2:59 PM, <colin.helliwell@ln-systems.com> wrote:
>>
>> DISTRO_FEATURES_remove = " sysvinit"
>>
>> I suspect there’s also some de-cluttering needed e.g. init.d scripts still being installed as well as a .service.
>>
> I wouldn't expect these to be installed.  Which ones specifically?
>
> Regards,
>
> Leon.
>



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

* Re: Changing over to systemd (no dhcp)
  2017-01-23  7:47                 ` colin.helliwell
  2017-01-23  7:57                   ` Mike Looijmans
@ 2017-01-23  9:19                   ` Patrick Ohly
  1 sibling, 0 replies; 22+ messages in thread
From: Patrick Ohly @ 2017-01-23  9:19 UTC (permalink / raw)
  To: colin.helliwell; +Cc: 'Yocto discussion list'

On Mon, 2017-01-23 at 07:47 +0000, colin.helliwell@ln-systems.com wrote:
> Looking at one which does seem to switch over cleanly - dropbear - I'm
> puzzled how the recipe [dropbear.inc, in poky/meta/recipes-core]
> appears to install both init.d script and .service in its do_install,
> yet only one or the other ultimately shows up in the rootfs..?
> (Relates to my other question about how to determine the init type in
> do_install)

systemd.bbclass has a rm_sysvinit_initddir postfunc for do_install which
removes sysvinit config files if the DISTRO_FEATURES enable systemd and
do not enable sysvinit.

rm_systemd_unitdir does the opposite when systemd is disabled and only
sysvinit is enabled.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

* Re: Changing over to systemd (no dhcp)
  2017-01-20 13:59             ` colin.helliwell
  2017-01-21 13:08               ` Leon Woestenberg
@ 2017-01-23 11:02               ` Mike Looijmans
  2017-01-23 11:19                 ` Maciej Borzęcki
  1 sibling, 1 reply; 22+ messages in thread
From: Mike Looijmans @ 2017-01-23 11:02 UTC (permalink / raw)
  To: yocto

On 20-01-17 14:59, colin.helliwell@ln-systems.com wrote:
> Thanks for all the pointers everyone. I’ve now got (in my distro conf):
>
> DISTRO_FEATURES_append = " systemd"
>
> DISTRO_FEATURES_remove = " sysvinit"
>
> VIRTUAL-RUNTIME_init_manager = "systemd"
>
> PREFERRED_PROVIDER_udev = "systemd"
>
> PACKAGECONFIG_append_pn-systemd = " resolved networkd"

Thanks for the tip, I was also wondering why network didn't work with systemd.

Is there a reason why this has been disabled by default? It's strange to have 
a system without network as the default setup.

I would at least have expected network support to be enabled for any machine 
that has some networking features.




Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail







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

* Re: Changing over to systemd (no dhcp)
  2017-01-23 11:02               ` Mike Looijmans
@ 2017-01-23 11:19                 ` Maciej Borzęcki
  0 siblings, 0 replies; 22+ messages in thread
From: Maciej Borzęcki @ 2017-01-23 11:19 UTC (permalink / raw)
  To: Mike Looijmans; +Cc: yocto

On Mon, Jan 23, 2017 at 12:02 PM, Mike Looijmans
<mike.looijmans@topic.nl> wrote:
> On 20-01-17 14:59, colin.helliwell@ln-systems.com wrote:
>>
>> Thanks for all the pointers everyone. I’ve now got (in my distro conf):
>>
>> DISTRO_FEATURES_append = " systemd"
>>
>> DISTRO_FEATURES_remove = " sysvinit"
>>
>> VIRTUAL-RUNTIME_init_manager = "systemd"
>>
>> PREFERRED_PROVIDER_udev = "systemd"
>>
>> PACKAGECONFIG_append_pn-systemd = " resolved networkd"
>
>
> Thanks for the tip, I was also wondering why network didn't work with
> systemd.
>
> Is there a reason why this has been disabled by default? It's strange to
> have a system without network as the default setup.
>
> I would at least have expected network support to be enabled for any machine
> that has some networking features.

Pick an choose, most features are opt-in to avoid bloating the final image.

Some people are not interested in networkd and prefer to use connman,
NetworkManager or other tool.
Note that networkd is not wifi aware, but does observe interface state
changes. For wifi you'll need wpa_supplicant to actually drive the
process of joining networks, while networkd will handle DHCP part.

resolved is not enabled by default either. Even when enabled, it's not
really useful without the nss-resolved piece. I've posted a patch to
OE-core [1] that would set up /etc/nsswitch.conf properly but I wasn't
merged.

[1]. http://lists.openembedded.org/pipermail/openembedded-core/2016-September/126738.html

-- 
Maciej Borzecki
RnDity


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

end of thread, other threads:[~2017-01-23 11:19 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 15:10 Changing over to systemd (no dhcp) colin.helliwell
2017-01-18 17:51 ` Rick Altherr
2017-01-18 21:35 ` Andre McCurdy
2017-01-19  0:21   ` Rick Altherr
2017-01-19  7:21     ` colin.helliwell
2017-01-19  8:31       ` ChenQi
2017-01-19 10:06         ` colin.helliwell
2017-01-20  2:11           ` ChenQi
2017-01-20 13:59             ` colin.helliwell
2017-01-21 13:08               ` Leon Woestenberg
2017-01-23  7:47                 ` colin.helliwell
2017-01-23  7:57                   ` Mike Looijmans
2017-01-23  9:19                   ` Patrick Ohly
2017-01-23 11:02               ` Mike Looijmans
2017-01-23 11:19                 ` Maciej Borzęcki
2017-01-19  7:20 ` Kristian Amlie
2017-01-19  9:18 ` Mike Looijmans
2017-01-20  6:15   ` Michael Gloff
2017-01-20 14:27     ` Mike Looijmans
2017-01-21 12:41       ` Leon Woestenberg
2017-01-23  7:15         ` Mike Looijmans
2017-01-20  6:33 ` Khem Raj

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.