Can't get 'ifup eth0' to work

I added 'eth0' to my buildroot menuconfig's "System configuration ---> "Network interface to configure through DHCP" but that didn't seem to do anything after a rebuild. So, I added "auto eth0" and "iface eth0 inet dhcp" to /etc/network/interfaces, but that just seems to have added a "ifup: don't seem to have all the variables for eth0/inet" error to the end of the boot process. 

...

Starting network...
/bin/sh: run-parts: not found                                 <--- why has this always appeared since very first time booted?
ifup: don't seem to have all the variables for eth0/inet
ssh-keygen: generating new host keys: RSA1 ED25519
Starting sshd: OK
Starting inetd: OK

Welcome to Buildroot
mySC573_EZ-Kit login: root
Password:

<<<< Tux logo here >>>>>

Have a lot of fun...
# ifup eth0
ifup: don't seem to have all the variables for eth0/inet

#
# cat /etc/network/interfaces
# interface file auto-generated by buildroot

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Could it have anything to do with the /bin/sh: run-parts: not found error that seems to have been there since the very first time I booted Linux?  Keep in mind that U-Boot successfully uses eth0 to TFTP-boot from the Linux host. 

Shouldn't adding 'eth0' to the "Network interface to configure through DHCP" menuconfig entry be sufficient?

Parents
  • >>> Could you confirm the BOM version of the EZ-KIT that you are developing with. The BOM version is located on a white sticker on the bottom of the EZ-KIT board.

    White sticker says 1.7  See Hardware Platform and Version, below:

     

    Setup related information:-

    Processor and Revision (for example, ADSP-SC589 rev 1.0) == ADSP-SC573F-CBCZ-ENG 3475816.1-0.0 #1619

    Complete Part Number as per Datasheet (for example, ADSP-SC583KBCZ-3A) == see above

    Hardware Platform and Version (for example, SC589-EZ-Lite rev 1.2A OR Own Board etc) == ADZS-SC573 EZLITE Kit Update 1741 (BOM rev 1.7)

    Target Software and Version (for example , uC/OS-3 OR ADI Drivers OR Own Software etc) == ADI embedded Linux 4.0 distro & examples

    Development Software and Version (for example, CCES 1.2.0) == CCES v2.8.0 for Linux w/ Linux Add-In v1.2.0,  CCES v2.7.0 for Windows

    Host Operating System and Version (for example, Windows 7 ) == Ubuntu 16.04 (for core0 Linux on ARM Cortex-A5), Windows 10 (for bare metal core1 & core2 SHARCs)

    Emulator Device (for example, ICE 1000) == ICE 1000

    BTW, I manually confgure the IP address & mask previously obtained by U-Boot and it immediately becomes usable, so I don't know why U-Boot can get it from the DHCP server & Linux can't:

    U-Boot 2015.01 ADI-1.2.0 (Aug 16 2018 - 15:17:48)

    CPU: ADSP ADSP-SC573-0.0 (Detected Rev: 1.1) (spi flash boot)
    VCO: 450 MHz, Cclk0: 450 MHz, Sclk0: 112.500 MHz, Sclk1: 112.500 MHz, DCLK: 225 MHz
    OCLK: 150 MHz
    I2C: ready
    DRAM: 224 MiB
    MMC: SC5XX SDH: 0
    SF: Detected W25Q128BV with page size 256 Bytes, erase size 4 KiB, total 16 MiB
    In: serial
    Out: serial
    Err: serial
    other init
    Net: dwmac.3100c000
    Hit any key to stop autoboot: 0
    Speed: 100, full duplex
    BOOTP broadcast 1
    DHCP client bound to address 10.5.26.94 (61 ms)
    Speed: 100, full duplex
    Using dwmac.3100c000 device
    TFTP from server 10.5.26.35; our IP address is 10.5.26.94
    Filename 'fitImage.itb'.
    Load address: 0x88000000
    Loading: ###...

    ...

    Have a lot of fun...
    # ifconfig eth0 10.5.26.94 netmask 255.255.254.0 up
    # stmmaceth 3100c000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 02:80:AD:20:31:E8
    inet addr:10.5.26.94 Bcast:10.5.27.255 Mask:255.255.254.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:20 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1427 (1.3 KiB) TX bytes:0 (0.0 B)
    Interrupt:42 Base address:0xc000

    # ping 10.5.26.35
    PING 10.5.26.35 (10.5.26.35): 56 data bytes
    64 bytes from 10.5.26.35: seq=0 ttl=64 time=2.709 ms
    64 bytes from 10.5.26.35: seq=1 ttl=64 time=1.211 ms
    ^C
    --- 10.5.26.35 ping statistics ---
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip min/avg/max = 1.211/1.960/2.709 ms

  • +1
    •  Analog Employees 
    on Aug 29, 2018 7:28 AM over 2 years ago in reply to jb@hme

    Hi jb@hme, 

    Sorry for the late reply. I have investigated your question recently and i found that your problem may be caused by the lower version of ifupdown and dhcp. If we updated the ifupdown and dhcp version in the buildroot/package, the ifup/ifdown command can be effective. Below i attach my operation.

    1. Add "eth0" to Network interface to configure through DHCP as you said in buildroot.

    2. Enable "Show packages that are also provided by busybox" in buildroot/Target packages

    3. Enable "ifupdown" and "dhcp client" in Networking applications in buildroot. Note this step we should use new version ifupdown and dhcp package. I attach the packages below, just replace them in buildroot/package directory

    4. Enable "run-parts" in busybox-menuconfig

    Then you could use dhcp to get your ipaddr.

    Thanks for this question, we will update this parts in our later linux release.

    HuanhuanFeng

    attach.tar.gz

Reply
  • +1
    •  Analog Employees 
    on Aug 29, 2018 7:28 AM over 2 years ago in reply to jb@hme

    Hi jb@hme, 

    Sorry for the late reply. I have investigated your question recently and i found that your problem may be caused by the lower version of ifupdown and dhcp. If we updated the ifupdown and dhcp version in the buildroot/package, the ifup/ifdown command can be effective. Below i attach my operation.

    1. Add "eth0" to Network interface to configure through DHCP as you said in buildroot.

    2. Enable "Show packages that are also provided by busybox" in buildroot/Target packages

    3. Enable "ifupdown" and "dhcp client" in Networking applications in buildroot. Note this step we should use new version ifupdown and dhcp package. I attach the packages below, just replace them in buildroot/package directory

    4. Enable "run-parts" in busybox-menuconfig

    Then you could use dhcp to get your ipaddr.

    Thanks for this question, we will update this parts in our later linux release.

    HuanhuanFeng

    attach.tar.gz

Children
  • Thanks. I'll give that a try and get back to you to confirm that it works ASAP.

    Any idea when the next release with these updates will become available?

  • Those 2 patches in the attached.tar.gz corrected my problem. Thanks, HuanhuanFeng

    ...
    Starting network...
    Internet Systems Consortium DHCP Client 4.3.6
    Copyright 2004-2017 Internet Systems Consortium.
    All rights reserved.
    For info, please visit www.isc.org/.../

    Listening on LPF/eth0/02:80:ad:20:31:e8
    Sending on LPF/eth0/02:80:ad:20:31:e8
    Sending on Socket/fallback
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
    stmmaceth 3100c000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
    DHCPREQUEST on eth0 to 255.255.255.255 port 67
    DHCPOFFER from 10.5.26.1
    DHCPACK from 10.5.26.1
    bound to 10.5.26.36 -- renewal in 33459 seconds.
    ssh-keygen: generating new host keys: RSA1 ED25519
    Starting sshd: OK
    Starting inetd: OK

    Welcome to my ADSP-SC573 EZ-Kit
    mySC573_EZ-Kit login: root
    Password: random: nonblocking pool is initialized

    <<<< Tux banner here >>>>

    Have a lot of fun...
    # ifconfig eth0
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 10.5.26.36 netmask 255.255.254.0 broadcast 10.5.27.255
    ether 02:80:ad:20:31:e8 txqueuelen 1000 (Ethernet)
    RX packets 109 bytes 25292 (24.6 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 3 bytes 1026 (1.0 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 42 base 0xc000

    # ping 10.5.26.30
    PING 10.5.26.30 (10.5.26.30): 56 data bytes
    64 bytes from 10.5.26.30: seq=0 ttl=64 time=2.698 ms
    64 bytes from 10.5.26.30: seq=1 ttl=64 time=1.227 ms
    ^C
    --- 10.5.26.30 ping statistics ---
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip min/avg/max = 1.227/1.962/2.698 ms
    #

    Any idea when the next Linux Add-In for CCES release/update that will contain this fix will be available?

  • 0
    •  Analog Employees 
    on Sep 3, 2018 11:10 AM over 2 years ago in reply to jb@hme

    Hi , We may update this parts in release-1.4.0 at Q1-2019, since we have already frozen the release-1.3.0 right now.

    HuanF