Commit 1ae558f5 authored by Huifeng Zhang's avatar Huifeng Zhang Committed by Carles Cufi
Browse files

samples: dhcpv4_client: enable it on the fvp_baser_aemv8r board



Add config file and devicetree overlay for the fvp_baser_aemv8r board,
so that this sample can run on this board.

Signed-off-by: default avatarHuifeng Zhang <Huifeng.Zhang@arm.com>
parent 49ca47e5
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
@@ -145,3 +145,41 @@ an ip address by typing:
.. code-block:: console

    $ ping -I eth1 192.0.2.10


Arm FVP
========

* :ref:`fvp_baser_aemv8r`

This sample application running on Arm FVP board can negotiate IP
address from DHCPv4 server running on Arm FVP, so there is no extra
configuration that needed to do. It can be build and run directly.

Build Zephyr samples/net/dhcpv4_client application:

.. zephyr-app-commands::
   :zephyr-app: samples/net/dhcpv4_client
   :host-os: unix
   :board: fvp_baser_aemv8r
   :goals: build run
   :compact:

Once DHCPv4 client address negotiation completed with server, details
are shown like this:

.. code-block:: console

    uart:~$
    [00:00:00.060,000] <inf> phy_mii: PHY (0) ID 16F840

    [00:00:00.170,000] <inf> phy_mii: PHY (0) Link speed 10 Mb, half duplex

    [00:00:00.170,000] <inf> eth_smsc91x: MAC 00:02:f7:ef:37:16
    *** Booting Zephyr OS build zephyr-v3.2.0-4300-g3e6505dba29e ***
    [00:00:00.170,000] <inf> net_dhcpv4_client_sample: Run dhcpv4 client
    [00:00:07.180,000] <inf> net_dhcpv4: Received: 172.20.51.1
    [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Your address: 172.20.51.1
    [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Lease time: 86400 seconds
    [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Subnet: 255.255.255.0
    [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Router: 172.20.51.254
+6 −0
Original line number Diff line number Diff line
CONFIG_NET_L2_ETHERNET=y
CONFIG_MDIO=y
CONFIG_MDIO_SHELL=n

CONFIG_MDIO_INIT_PRIORITY=81
CONFIG_PHY_INIT_PRIORITY=82
+11 −0
Original line number Diff line number Diff line
&eth {
	status = "okay";
};

&phy {
	status = "okay";
};

&mdio {
	status = "okay";
};