Set static IP address before build

Moderator: nferre

niokou
Posts: 9
Joined: Sun Dec 13, 2015 8:17 pm

Set static IP address before build

Mon Dec 14, 2015 10:51 am

Hello all,
this is my first post here, I'm just get a xplained board and I had follow the tutorial on Sama5d3XplainedMainPage to compile an image. that's working fine.
I would like to set a static IP address before to build and install u-boot or yocto on the board.
I have looked on the files without success to find where I can modify this.
Where I can modify the IP address ?
thanks.
blue_z
Location: USA
Posts: 2094
Joined: Thu Apr 19, 2007 10:15 pm

Re: Set static IP address before build

Tue Dec 15, 2015 2:26 am

You're not clear as to which programs are going to use this static IP address.
For U-Boot your only choice is to define the environment variable ipaddr, probably as part of the default environment specified in the board's configuration file.
For Linux there are a few choices, such as the file /etc/network/interfaces in the target rootfs.
But for maintainability (i.e. containing the configuration changes to just one file) a static IP address can be assigned in a kernel command line parameter, which is stored in the U-Boot environment variable bootargs. The kernel parameter would have the form "ip=192.168.1.123:::::eth0:on"; details are in Documentation/kernel-parameters.txt and Documentation/filesystems/nfs/nfsroot.txt.

Regards
niokou
Posts: 9
Joined: Sun Dec 13, 2015 8:17 pm

Re: Set static IP address before build

Tue Dec 15, 2015 8:22 pm

Thanks a lot for the answer.
I have already modify the interfaces file to change the ip address.
I'll go through the U-Boot environment variable bootargs it is the best way I gess.

one more question, when I build a kernel image, I have the zimage file and core-image-minimal-sama5d3...tar.gz file but there is no core-image-minimal-sama5d3...ubi file.
I miss something or one option to check to get the ubi file in the tmp/deploy/image directory ?
blue_z
Location: USA
Posts: 2094
Joined: Thu Apr 19, 2007 10:15 pm

Re: Set static IP address before build

Wed Dec 16, 2015 4:14 am

niokou wrote:one more question, when I build a kernel image, I have the zimage file and core-image-minimal-sama5d3...tar.gz file but there is no core-image-minimal-sama5d3...ubi file.
I miss something or one option to check to get the ubi file in the tmp/deploy/image directory ?
I don't use Yocto, so I cannot guess what you did incorrectly.
If you want help, then you probably should at least post your build configuration (from the log file).

Regards.
niokou
Posts: 9
Joined: Sun Dec 13, 2015 8:17 pm

Re: Set static IP address before build

Fri Jan 15, 2016 9:28 am

Sorry to answer very late, but I found out how to fix that problem, I did a mistake, I setup the MACHINE to sama5D2 instead of sama5d3.
I copied as an idiot what is writen on yocto tutorial from at91.com/Sama5d3XplainedMainPage.

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 2 guests