Home/Support/Support Forum/How do I connect to internet using ethernet before booting from a SD card in yocto?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How do I connect to internet using ethernet before booting from a SD card in yocto?

0 votes
Hi!

I want to be connected to internet through ethernet cable before I finish the boot.
I run a .sh script when the boot finishes which uses internet. When I boot via tftp this script works but when I boot from a sd card doesnt work. I have tried to do: setenv ipaddr 192.168.xxx.xxx and then saveenv but didnt work.

What could I do to configure the internet before booting automatically?
asked Apr 20 in Linux by pablovi96 New to the Community (25 points)

Please log in or register to answer this question.

1 Answer

+1 vote
 
Best answer
ethernet driver loads during kernel boot as any other driver. Once the driver is loaded network manager starts and configures interfaces. You need to call your script after the network manager init.
You can try calling in your script something like:
ifconfig eth0 up
ifconfig eth0 192.168.1.7 netmask 255.255.255.0
or something like that to have network temporarily until network-manager starts
answered Apr 20 by LeonidM Veteran of the Digi Community (3,657 points)
selected Apr 21 by pablovi96
...