[Zedboard] Where is the setup of network interfaces?

tl,dr: How do I keep ip configurations on Zedboards survive a reboot automatically?

sbruno@desk:~/opencpi$ env|grep OCPI
OCPI_CDK_DIR=/home/sbruno/opencpi/cdk
OCPI_TOOL_OS=linux
OCPI_TOOL_PLATFORM=ubuntu22_04
OCPI_SERVER_ADDRESSES=zed2:12345,zed3:12345
OCPI_ROOT_DIR=/home/sbruno/opencpi
OCPI_TOOL_ARCH=x86_64
OCPI_TOOL_DIR=ubuntu22_04
OCPI_TOOL_OS_VERSION=u22_04
OCPI_TOOL_PLATFORM_DIR=/home/sbruno/opencpi/project-registry/ocpi.core/exports/rcc/platforms/ubuntu22_04
OCPI_PREREQUISITES_DIR=/home/sbruno/opencpi/prerequisites
sbruno@desk:~/opencpi$ ocpirun -C
Available containers:
 #  Model Platform            OS     OS-Version  Arch     Name
 0  hdl   zed                                             zed2:12345/PL:0
 1  rcc   xilinx24_1_aarch32  linux  24_1        aarch32  zed2:12345/rcc0
 2  hdl   zed                                             zed3:12345/PL:0
 3  rcc   xilinx24_1_aarch32  linux  24_1        aarch32  zed3:12345/rcc0
 4  rcc   ubuntu22_04         linux  u22_04      x86_64   rcc0

I’ve been able to kind of see how to setup multiple boards for my use and had a couple of questions about customization. I’m pretty familiar with PetaLinux builds, so I’m trying to hunt down the customization bits for building my own SD card images.

As far as I can tell, there’s no connectivity between the bootup of a Zedboard and the OCPI scripts. It appears that one is expected to login on the serial console each time one reboots and run a modified version of /run/media/mmcblk0p1/opencpi/mysetup.sh to do things like change the MAC address to get different IP addresses for different boards.

If I want to manage more than 1 or 2 boards, I’d like to keep make the boards have independent configurations like ip addresses on reboot.

What we have done in the past in order to setup device’s network with a persistent IP address is modify the root file system (rootfs).

A fellow user of the framework has written up a guide that covers the modification. It can be found here: Modify the Root Filesystem - OpenCPI Examples

1 Like

Thank you. This is what I was looking for.

Is there any danger in having an init script invoke “mysetup.sh” so that OpenCPI is autostarted on reboot?

You’re welcome.

You should be fine to invoke mysetup.sh. It’s a user preference on how you want to execute OpenCPI applications. “mysetup.sh” is for running in standalone mode.