All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com>
To: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Cc: Yocto Project <yocto@yoctoproject.org>
Subject: Re: Systemd service recipe fails while booting from initramfs
Date: Tue, 22 Jan 2019 17:38:39 +0100	[thread overview]
Message-ID: <CAGAf8LyfbCqc5AeaDhxOAEwhL_KOe7mkE68d3afgv4DFJPVPmg@mail.gmail.com> (raw)
In-Reply-To: <CAP71WjzTkMxPmgDTK36zTcDfOoTBFBWBgTQ=D=EK4JwinJCMrg@mail.gmail.com>

Hello Nicolas,

I build ONLY initramfs to be used on BBB DUT in order to test VMs. I
do not use mtd neither flash rootfs (as mounted on flash), although in
the BBB DUT's flash I have embedded Debian stretch. I use different
ash scripts in U-Boot to bring only ramboot.

Here is the proof:
root@beaglebone:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs                213596         0    213596   0% /dev
tmpfs                   251260         0    251260   0% /dev/shm
tmpfs                   251260      8428    242832   3% /run
tmpfs                   251260         0    251260   0% /sys/fs/cgroup
tmpfs                   251260         0    251260   0% /tmp
tmpfs                   251260       116    251144   0% /var/volatile

But this email thread, my best guess, addresses your concerns:
https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html

There is also how to build image with initramfs ONLY, in this thread,
written by me:
https://lists.yoctoproject.org/pipermail/yocto/2018-July/041696.html

I hope this helps.

Zoran
_______


On Tue, Jan 22, 2019 at 4:49 PM Nicolas Dechesne
<nicolas.dechesne@linaro.org> wrote:
>
> hi,
>
> On Tue, Jan 22, 2019 at 4:42 PM Zoran Stojsavljevic
> <zoran.stojsavljevic@gmail.com> wrote:
> >
> > Hello Lukasz,
> >
> > Thank you very much for the advises. I did what you have suggested, and this does work.
> >
> > And it solves my basic problem (NO GO for some reason when I had network manager).
> >
> > I use DUT (BBB) with YOCTO initramfs linux as testing vehicle for my various pass-through VBox VMs (several designs) via my notebook host to test them, how different designs VMs connect and interact with DUT.
>
> can you share how you built your initramfs?  Are you saying that you
> are booting an initramfs which then mounts the rootfs where you have
> core-image-minimal?
>
> >
> > Lukasz and Peter,
> >
> > I also will investigate more about systemd service in order to get more inside info about how to properly configure the service.
> >
> > Thank you,
> > Zoran
> > _______
> >
> > Here is the transcript after I built new YOCTO BBB DUT initramfs build:
> >
> > root@beaglebone:~# uname -a
> > Linux beaglebone 4.19.7-jumpnow #1 Tue Jan 22 10:36:57 UTC 2019 armv7l GNU/Linux
> > root@beaglebone:~# systemctl restart systemd-networkd
> > root@beaglebone:~# ps -elf | grep dhc
> > 0 S root      1521  1328  0  80   0 -   745 pipe_w 19:14 ttyO0    00:00:00 grep dhc
> > root@beaglebone:~# ifconfig eth0 down
> > root@beaglebone:~# dhclient -4 eth0 -v
> > Internet Systems Consortium DHCP Client 4.4.1
> > Copyright 2004-2018 Internet Systems Consortium.
> > All rights reserved.
> > For info, please visit https://www.isc.org/software/dhcp/
> >
> > [11982.445947] net eth0: initializing cpsw version 1.12 (0)
> > [11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
> > Listening on LPF/eth0/64:cf:d9:ff:67:05
> > Sending on   LPF/eth0/64:cf:d9:ff:67:05
> > Sending on   Socket/fallback
> > DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
> > [11984.640851] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
> > DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
> > DHCPOFFER of 192.168.15.95 from 192.168.15.2
> > DHCPREQUEST for 192.168.15.95 on eth0 to 255.255.255.255 port 67
> > DHCPACK of 192.168.15.95 from 192.168.15.2
> > suspect value in domain_name option - discarded
> > chown: unrecognized option '--reference=/etc/resolv.conf'
> > BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
> >
> > Usage: chown [-Rh]... USER[:[GRP]] FILE...
> > chmod: unrecognized option '--reference=/etc/resolv.conf'
> > BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
> >
> > Usage: chmod [-R] MODE[,MODE]... FILE...
> > bound to 192.168.15.95 -- renewal in 40023 seconds.
> > root@beaglebone:~#
> >
> > On Mon, Jan 21, 2019 at 9:07 AM Lukasz Zemla <Lukasz.Zemla@woodward.com> wrote:
> >>
> >> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Zoran Stojsavljevic
> >> Sent: Monday, January 21, 2019 7:56 AM
> >>
> >> [...]
> >>
> >> > While downloading initramfs on the target system, while bringing kernel up, the following
> >> > happened (actual log):
> >> > [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 ip=dhcp
> >> > ... [snap]...
> >> > [  114.064032] Sending DHCP requests ...... timed out!
> >> > [  190.652571] IP-Config: Auto-configuration of network failed
> >> > [  190.663158] Freeing unused kernel memory: 1024K
> >> > [  190.668661] Run /init as init process
> >> > System time before build time, advancing clock.
> >> > Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
> >> > Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory
> >> > [!!!!!!] Failed to mount API filesystems, freezing.
> >> > Freezing execution.
> >> > [  192.984442] random: crng init done
> >> > I have two questions (please, could you provide to me some help here):
> >> > [1] How to fix this run-time bug (what I should do in the configuration)?
> >> >     I found some interesting explanation about possible solution (PACKAGECONFIG):
> >> >     https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
> >>
> >> Probably you are missing CONFIG_CGROUPS in your kernel configuration.
> >> Please read README file in the systemd sources folder - it describes all options
> >> required to be enabled in kernel configuration.
> >>
> >> > [2] I would like also to include networkctl service (should I do something specific to
> >> >     enable it, or this is done by default enabling systemd)?
> >>
> >> Please add following to your conf/local.conf file:
> >> PACKAGECONFIG_append_pn-systemd = " networkd"
> >>
> >> Best regards,
> >> Lukasz Zemla
> >>
> >> ***
> >> The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
> >> ***
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto


  reply	other threads:[~2019-01-22 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21  8:07 Systemd service recipe fails while booting from initramfs Lukasz Zemla
2019-01-22 15:41 ` Zoran Stojsavljevic
2019-01-22 15:48   ` Nicolas Dechesne
2019-01-22 16:38     ` Zoran Stojsavljevic [this message]
2019-01-22 16:45       ` Nicolas Dechesne
2019-01-22 21:08         ` Peter Bergin
2019-01-23  5:01           ` Zoran Stojsavljevic
  -- strict thread matches above, loose matches on Subject: below --
2019-01-21  6:56 Zoran Stojsavljevic
2019-01-21  8:34 ` Peter Bergin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGAf8LyfbCqc5AeaDhxOAEwhL_KOe7mkE68d3afgv4DFJPVPmg@mail.gmail.com \
    --to=zoran.stojsavljevic@gmail.com \
    --cc=nicolas.dechesne@linaro.org \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.