Main Content

Petalinux Build, new app definition and Dynamic-Static IP

Build a simple image and enable a Dynamic-Static IP via power up script (put aside Paw Patrol Zuma my son decided to place on the uZed).

In the following blog I will cover a use case of defining a dynamic static ethernet IP address in Petalinux.

For this I’ll walk through the following stages:

I’ll start by going over the basic steps for building a Petalinux Image.
I will then create a simple script to run at power up.
Adding and mounting a “STUFF” partition in the SD card.
Lastly, defining a dynamic static IP.
What does it mean a dynamic static IP? if an IP is static how can it be dynamic?

Well, The only difference here is that I want the user to be able to change this address whenever he wants, i.e., it will not be hard-coded in Petalinux image, and it can be dynamically changed, where only reboot is needed to take the new IP under account.

I’ve used the good old MicroZed as the target board, connected to IOCC. IOCC is actually not a must for this tutorial, yet it is used in one of my projects, so it is already installed. Basically it is a kind of breadboard, used to connect all MicroZed IO’s to external connectors. It is a very convenient board with added functionality of push buttons and dip-switches.

In my system I have a few identical boards (few MicroZeds for this matter) in which I want to connect them all to the same network, so each one must have its own static IP, a different one. Furthermore, as stated, I want the user to define this static IP (any IP he/she wants, for that matter). How would one do that with Petalinux?”

Link to article