element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
MiniZed Hardware Design Ethernet adress in startup script
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Avnet Boards Forums requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 300 subscribers
  • Views 551 views
  • Users 0 members are here
Related

Ethernet adress in startup script

anttiw
anttiw over 5 years ago

Hi,

 

in which file should I enter the ethernet adress that eth0 goes up and running?

 

I tried /mnt/emmc/init.sh but I think that some other task will force it down. I can see that wifi.sh will work perfectly and the board goes to wlan.

 

But I would like to use eth0 instead than wlan. I'm not sure which is correct place to put ifconfig configuration lines. Any idea?

 

-antti

  • Sign in to reply
  • Cancel
  • clem57
    0 clem57 over 5 years ago

    If you have it defined, use this for the command. Could you provide more information of what you wish to do?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • anttiw
    0 anttiw over 5 years ago in reply to clem57

    Hi,

     

    ifconfig is the command, but in where you should enter this to get board boot with this argument every time?

     

    I did followed instructions from https://se.mathworks.com/matlabcentral/fileexchange/66004-avnet-minized-support-package-for-simulink

     

    There are advised how to connect wlan or eth0. The wlan will be started every time when board is rebooted. But problem is where to declare eth0 (usb ethernet) parameters. If I reboot the minized, all the typical configuration files are re-written.

     

    Hera is the snapshot from boot scripts

    "...

    Ceate symbolic links for libboost libraries

    DONE!

    Running Minized Startup Script ...

     

    Mounting /dev/mmcblk1p1 on /mnt/emmc

    FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

     

    Mounting /dev/sda1 on /mnt/usb

    mount: mounting /dev/sda1 on /mnt/usb failed: No such file or directory

    MiniZed Boot Script DONE!

     

    Running user script @ /mnt/emmc/init.sh

    ------------------------------

    Starting MiniZed WiFi services

    ------------------------------

    ifdown: interface eth0 not configured

    Successfully initialized wpa_supplicant

    Long line in configuration file truncated

    rfkill: Cannot open RFKILL control device

    IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

    IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

    udhcpc (v1.24.1) started

    Sending discover...

    Sending select for 192.168.0.13...

    Lease of 192.168.0.13 obtained, lease time 599940

    /etc/udhcpc.d/50default: Adding DNS 193.210.19.19

    /etc/udhcpc.d/50default: Adding DNS 193.210.18.18

    ------------------------------

    --> starup scripts to bring eht0 up and ip adress

    ------------------------------

     

    MiniZed Startup Script DONE!

     

    Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...

    update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)

    Removing any system startup links for run-postinsts ...

      /etc/rcS.d/S99run-postinsts

    INIT: Entering runlevel: 5

    Configuring network interfaces... udhcpc (v1.24.1) started

    Sending discover...

    Sending discover...

    Sending discover...

    No lease, forking to background

    done.

    Starting system message bus: dbus.

    Starting Dropbear SSH server: Generating key, this may take a while...

    Public key portion is:

    ssh-rsa .. root@minized-mw

    Fingerprint: md5 df:77:cc:e7:d2:b2:03:57:7d:4e:59:37:5d:66:6f:67

    dropbear.

    hwclock: can't open '/dev/misc/rtc': No such file or directory

    Starting syslogd/klogd: done

    Starting tcf-agent: OK"

     

    It seem like most of all the files and directories are rewritten during boot up process. But is there a way to add own custom script for example to bring usb ethernet up?

     

    This mathworks example works if you dont boot the board again, but normally with this process you will boot the board again each time when you download new software/hardware. So this example is not very handy. But how to make usb ethernet adress permanent?

     

    BR Antti

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 5 years ago in reply to anttiw

    A cron script could reconfigure as you wish. Check out this where it says @reboot.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube