[yocto] Sumo distro problem with dhcp packet?

Zoran Stojsavljevic zoran.stojsavljevic at gmail.com
Thu Oct 18 03:45:57 PDT 2018


Hello Kosta,

> I suggest trying other reference image.
> For example, core-image-minimal.

As said, I have tried instead core-image-base ==>> core-image-minimal
one on the target platform, which is BBB. To my surprise it is in
there (in the minimal initramfs)!

Since the eth0 IP address upon sumo booting is all wrong, I have
tested the BBB dhclient command as:
# ifconfig eth0 down
# dhclient eth0 -v

And it works perfectly, brings eth0 up, sets the correct IP address,
and then goes for lease with dhcpd on the another side.

So, what is here catch 22 (why base image does not have dhclient, and
minimal does)?

Thank you,
Zoran
_______
On Wed, Oct 17, 2018 at 10:44 AM Kosta Zertsekel
<KZertsekel at advaoptical.com> wrote:
>
> I suggest trying other reference image.
>
> For example, core-image-minimal.
>
> If it does not help, then core-image-full-cmdline.
>
> Let's get the working reference first with one of these images.
>
>
> --- Kosta Z.
>
> ________________________________
> From: Zoran Stojsavljevic <zoran.stojsavljevic at gmail.com>
> Sent: Wednesday, 17 October 2018 11:37:38
> To: Kosta Zertsekel; Yocto Project
> Subject: Re: [yocto] Sumo distro problem with dhcp packet?
>
> Hello Kosta and others,
>
> I am a bit behind on a schedule on this one. Albeit I followed the
> advise, This does work for compiling and adding all these packages to
> the ROOTFS. I see that after I added all them, I see the
> initramfs.tar.xz expanded in
> ...poky/build/tmp/deploy/image/beagleboneblack/ directory.
>
> But after I do the testing with initramfs, with all these packages
> added. I do not find anything in the ROOTFS even what it should be
> lookalike DHCP.
>
> After trying # which dhclient, or # which dhcp-client, or # which
> dhcp... It finds nothing!
>
> Then, the next step was to find /etc/dhcp/ or similar. There is
> nothing lookalike dhcp/ or dhcp* in /etc, which shows that these lines
> in dhcp.inc recipe are not executed:
>
> do_install_append () {
>        install -d ${D}${sysconfdir}/init.d
>        install -d ${D}${sysconfdir}/default
>        install -d ${D}${sysconfdir}/dhcp
>        install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
>        install -m 0644 ${WORKDIR}/default-relay
> ${D}${sysconfdir}/default/dhcp-relay
>        install -m 0755 ${WORKDIR}/init-server
> ${D}${sysconfdir}/init.d/dhcp-server
>        install -m 0644 ${WORKDIR}/default-server
> ${D}${sysconfdir}/default/dhcp-server
>
>        rm -f ${D}${sysconfdir}/dhclient.conf*
>        rm -f ${D}${sysconfdir}/dhcpd.conf*
>
> In addition, when I execute: $ bitbake -c cleanall dhcp, it says that
> it executes thee tasks, and none of them are actually executed (0
> executed).
>
> I also recompiled form scratch the whole sumo BBB build, but this did
> NOT solve the problem.
>
> Any hint how I should proceed?
>
> Thank you,
> Zoran
> _______
>
> On Thu, Oct 11, 2018 at 1:40 PM Zoran Stojsavljevic
> <zoran.stojsavljevic at gmail.com> wrote:
> >
> > Hello Kosta,
> >
> > > For example, you can do the below:
> > > CORE_IMAGE_EXTRA_INSTALL_append = "openssh dhcp-client dhcp-server cmake... "
> >
> > I added to this example dhcp-relay, just to test the whole build, and
> > it does work. Actually, I need only dhcp-client for the target (since
> > I have dhcp-server on the ETH interface on the opposite (VM) side).
> >
> > Thank you for the help!
> > Zoran
> > _______
> > On Wed, Oct 10, 2018 at 5:57 PM Kosta Zertsekel
> > <KZertsekel at advaoptical.com> wrote:
> > >
> > > You need to take a look at the available dhcp packages
> > > for dhcp recipe here:
> > > https://git.yoctoproject.org/clean/cgit.cgi/poky/tree/meta/recipes-connectivity/dhcp/dhcp.inc#n100
> > >
> > > PACKAGES += "dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
> > >
> > > For example, you can do the below:
> > > CORE_IMAGE_EXTRA_INSTALL_append = "openssh dhcp-client dhcp-server cmake... "
> > >
> > > Thanks,
> > > --- Kosta Z
> > > ________________________________
> > > From: yocto-bounces at yoctoproject.org <yocto-bounces at yoctoproject.org> on behalf of Zoran Stojsavljevic <zoran.stojsavljevic at gmail.com>
> > > Sent: Wednesday, 10 October 2018 16:29:05
> > > To: Yocto Project
> > > Subject: [yocto] Sumo distro problem with dhcp packet?
> > >
> > > Hello.
> > >
> > > I need on my test initramfs YOCTO image to add dhcp package (both dhcp server and client).
> > >
> > > For the beginning, I traced it, where it is:
> > > .../poky/meta/recipes-connectivity/dchp
> > >
> > > and decided to test it adding it to ...poky/build/conf/local.conf for the starters:
> > > CORE_IMAGE_EXTRA_INSTALL_append = "openssh dhcp cmake... "
> > >
> > > But it produced the following error:
> > > [user at fedora28-ssd conf]$ bitbake -k core-image-base
> > >
> > >    [snap]
> > >
> > > ERROR: Nothing RPROVIDES 'dhcp' (but /home/user/projects2/beaglebone-black/sumo/poky/meta/recipes-core/images/core-image-base.bb RDEPENDS on or otherwise requires it)
> > > NOTE: Runtime target 'dhcp' is unbuildable, removing...
> > > Missing or unbuildable dependency chain was: ['dhcp']
> > > ERROR: Nothing RPROVIDES 'core-image-base'
> > > No eligible RPROVIDERs exist for 'core-image-base'
> > > NOTE: Runtime target 'core-image-base' is unbuildable, removing...
> > > Missing or unbuildable dependency chain was: ['core-image-base']
> > >
> > > I added another package, dhcpcd, which is located in the another layer:
> > > CORE_IMAGE_EXTRA_INSTALL_append = "openssh dhcpcd cmake... "
> > >
> > > so this one worked/was integrated seamlessly.
> > >
> > > What is the catch 22 here?
> > >
> > > Thank you,
> > > Zoran
> > >


More information about the yocto mailing list