This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: Static IP Address

Part Number: PROCESSOR-SDK-AM335X

Hi,

I would like to know how to modify the file during SDK building then I don't have to modify the file by typing through UART console.

It means the modified file would  build-in into flash images.

$ vi /etc/systemd/network/10-eth.network

[Match]
Name=eth0
KernelCommandLine=!root=/dev/nfs

[Network]
#DHCP=yes
Address=192.168.1.5/24
Broadcast=192.168.1.255
Netmask=255.255.255.0
Gateway=192.168.1.1

Here is building SDK environment.

SDK: ti-processor-sdk-linux-rt-am335x-evm-08.02.00.24

Hardware : TI AM335x EVM-SK

Thanks.

  • Hi!

    the easiest/quickest way for such changes esp. during experimentation is to just recursively search through the Yocto 'sources' folder for either a filename pattern using the 'find' command (which is appropriate here, as from the initial look at your question it appears that you are trying to modify an existing file), or looking through the actual source files themselves by using the recursive grep command 'grep -r' to see if this turns up any leads.

    Sure enough, this quick research turns up the very file you are trying to modify:

    ~/tisdk/am335x-evm/sources (dev)
    $ find . -name 10-eth.network
    ./meta-arago/meta-arago-distro/recipes-core/systemd/systemd/10-eth.network
    
    ~/tisdk/am335x-evm/sources (dev)
    $ cat ./meta-arago/meta-arago-distro/recipes-core/systemd/systemd/10-eth.network
    [Match]
    Name=eth0
    KernelCommandLine=!root=/dev/nfs
    
    [Network]
    DHCP=yes

    From the path name you can further see that the file sits in the distribution layer of the layer hierarchy/

    So if you make your modifications in that file they should propagate right through to the filesystem images you are building.

    Of course when trying to create production images there are additional considerations, you'd like not want to modify the existing layers directly, but rather extend or replace layers or recipes in the hierarchy, as per usual Yocto way.

    Regards, Andreas