samples: net: move Ethernet samples to folder
Moved current Ethernet samples to folder ethernet, as there will be more samples added in the future. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
This commit is contained in:
@@ -77,7 +77,7 @@ The two switch ports could be verified via :zephyr:code-sample:`dsa` on M33 core
|
||||
or on A55 Core, for example for A55 Core:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/net/dsa
|
||||
:zephyr-app: samples/net/ethernet/dsa
|
||||
:host-os: unix
|
||||
:board: imx943_evk/mimx94398/a55
|
||||
:goals: flash
|
||||
@@ -85,7 +85,7 @@ or on A55 Core, for example for A55 Core:
|
||||
Or for M33 Core:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/net/dsa
|
||||
:zephyr-app: samples/net/ethernet/dsa
|
||||
:host-os: unix
|
||||
:board: imx943_evk/mimx94398/m33/ddr
|
||||
:goals: build
|
||||
|
||||
@@ -39,7 +39,7 @@ the VLAN network interface itself, such as setting the IP address, etc.
|
||||
|
||||
See also the :zephyr:code-sample:`VLAN sample application <vlan>` for API usage
|
||||
example. The source code for that sample application can be found at
|
||||
:zephyr_file:`samples/net/vlan`.
|
||||
:zephyr_file:`samples/net/ethernet/vlan`.
|
||||
|
||||
The net-shell module contains *net vlan add* and *net vlan del* commands
|
||||
that can be used to enable or disable VLAN tags for a given network interface.
|
||||
|
||||
5
samples/net/ethernet/README.rst
Normal file
5
samples/net/ethernet/README.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
.. zephyr:code-sample-category:: ethernet
|
||||
:name: Ethernet
|
||||
:show-listing:
|
||||
|
||||
These samples demonstrate various Ethernet use cases for boards that support it.
|
||||
@@ -10,7 +10,7 @@ Overview
|
||||
Example on testing/debugging Distributed Switch Architecture
|
||||
|
||||
The source code for this sample application can be found at:
|
||||
:zephyr_file:`samples/net/dsa`.
|
||||
:zephyr_file:`samples/net/ethernet/dsa`.
|
||||
|
||||
Requirements
|
||||
************
|
||||
@@ -25,7 +25,7 @@ Host machine with :zephyr:board:`ip_k66f` board from Segger.
|
||||
Follow these steps to build the DSA sample application:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/net/dsa
|
||||
:zephyr-app: samples/net/ethernet/dsa
|
||||
:board: <board to use>
|
||||
:conf: prj.conf
|
||||
:goals: build
|
||||
@@ -13,7 +13,7 @@ queues) and setup VLANs (if enabled). The net-shell is also enabled so that
|
||||
user can monitor gPTP functionality.
|
||||
|
||||
The source code for this sample application can be found at:
|
||||
:zephyr_file:`samples/net/gptp`.
|
||||
:zephyr_file:`samples/net/ethernet/gptp`.
|
||||
|
||||
Requirements
|
||||
************
|
||||
@@ -34,7 +34,7 @@ timestamps for sent and received Ethernet frames.
|
||||
Follow these steps to build the gPTP sample application:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/net/gptp
|
||||
:zephyr-app: samples/net/ethernet/gptp
|
||||
:board: <board to use>
|
||||
:goals: build
|
||||
:compact:
|
||||
@@ -49,7 +49,7 @@ Setting up Linux Host
|
||||
=====================
|
||||
|
||||
If you need VLAN support in your network, then the
|
||||
:zephyr_file:`samples/net/vlan/vlan-setup-linux.sh` provides a script that can be
|
||||
:zephyr_file:`samples/net/ethernet/vlan/vlan-setup-linux.sh` provides a script that can be
|
||||
executed on the Linux host. It creates two VLANs on the Linux host and creates
|
||||
routes to Zephyr. If you are using native_sim board, then
|
||||
the ``net-setup.sh`` will create VLAN setup automatically with this command:
|
||||
@@ -174,7 +174,7 @@ does not work with software clock available in native_sim.
|
||||
Compile Zephyr application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/net/gptp
|
||||
:zephyr-app: samples/net/ethernet/gptp
|
||||
:board: native_sim
|
||||
:goals: build
|
||||
:compact:
|
||||
@@ -11,7 +11,7 @@ The Link Layer Discovery Protocol sample application for Zephyr will enable
|
||||
LLDP support and setup VLANs if needed.
|
||||
|
||||
The source code for this sample application can be found at:
|
||||
:zephyr_file:`samples/net/lldp`.
|
||||
:zephyr_file:`samples/net/ethernet/lldp`.
|
||||
|
||||
Requirements
|
||||
************
|
||||
@@ -29,7 +29,7 @@ port.
|
||||
Follow these steps to build the LLDP sample application:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/net/lldp
|
||||
:zephyr-app: samples/net/ethernet/lldp
|
||||
:board: <board to use>
|
||||
:conf: prj.conf
|
||||
:goals: build
|
||||
@@ -39,6 +39,6 @@ Setting up Linux Host
|
||||
=====================
|
||||
|
||||
If you need VLAN support in your network, then the
|
||||
:zephyr_file:`samples/net/vlan/vlan-setup-linux.sh` provides a script that can be
|
||||
:zephyr_file:`samples/net/ethernet/vlan/vlan-setup-linux.sh` provides a script that can be
|
||||
executed on the Linux host. It creates two VLANs on the Linux host and creates
|
||||
routes to Zephyr.
|
||||
@@ -11,7 +11,7 @@ The VLAN sample application for Zephyr will setup two virtual LAN networks.
|
||||
The application sample enables net-shell and allows users to view VLAN settings.
|
||||
|
||||
The source code for this sample application can be found at:
|
||||
:zephyr_file:`samples/net/vlan`.
|
||||
:zephyr_file:`samples/net/ethernet/vlan`.
|
||||
|
||||
Requirements
|
||||
************
|
||||
@@ -35,13 +35,13 @@ that support USB networking.
|
||||
Follow these steps to build the VLAN sample application:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/net/vlan
|
||||
:zephyr-app: samples/net/ethernet/vlan
|
||||
:board: <board to use>
|
||||
:conf: prj.conf
|
||||
:goals: build
|
||||
:compact:
|
||||
|
||||
The default configuration file :zephyr_file:`samples/net/vlan/prj.conf` creates
|
||||
The default configuration file :zephyr_file:`samples/net/ethernet/vlan/prj.conf` creates
|
||||
two virtual LAN networks with these settings:
|
||||
|
||||
- VLAN tag 100: IPv4 198.51.100.1 and IPv6 2001:db8:100::1
|
||||
@@ -50,7 +50,7 @@ two virtual LAN networks with these settings:
|
||||
Setting up Linux Host
|
||||
=====================
|
||||
|
||||
The :zephyr_file:`samples/net/vlan/vlan-setup-linux.sh` provides a script that
|
||||
The :zephyr_file:`samples/net/ethernet/vlan/vlan-setup-linux.sh` provides a script that
|
||||
can be executed on the Linux host. It creates two VLAN interfaces ``vlan.100``
|
||||
and ``vlan.200`` on the Linux host and creates routes to Zephyr.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -31,14 +31,14 @@ The scripts/net/run-sample-tests.sh shell script can be used in two ways:
|
||||
1. From a Zephyr network sample test directory.
|
||||
Example:
|
||||
|
||||
cd samples/net/gptp
|
||||
cd samples/net/ethernet/gptp
|
||||
$ZEPHYR_BASE/scripts/net/run-sample-tests.sh
|
||||
|
||||
2. By giving the test directories as parameters to the runner script.
|
||||
Example:
|
||||
|
||||
cd $ZEPHYR_BASE
|
||||
./scripts/net/run-sample-tests.sh samples/net/gptp \
|
||||
./scripts/net/run-sample-tests.sh samples/net/ethernet/gptp \
|
||||
samples/net/sockets/echo_server
|
||||
|
||||
User can see what samples are supported like this:
|
||||
|
||||
Reference in New Issue
Block a user