boards: qemu_arc: Enable networking via SLIP (serial port)

The simplest way of getting networking to work on really tiny embedded
system is to use an extra serial port as an interface to external world
with help of a SLIP,
see https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol.

The catch is on a deeply embedded system we most likely won't see
an Ethernet MAC in the system as it might be as large ans as complex
as the CPU itself so there's no point in adding it. Moreover it will
require support in drivers, which are very hardware specific
(not only IP-block specific, but also need to take care of all the quirks
made in this particular instance and platform).

But with SLIP we may use existing serial port of the board which already
has all the needed support and with a platform-agnotic code of SLIP
we may have usable networking on both simulators & real HW boards.

And that's what we do in Zephyr.

Now we teach ARC's QEMU platform to do so as well.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
This commit is contained in:
Alexey Brodkin 2021-12-26 13:08:44 +03:00 committed by Anas Nashif
commit 231b37049e

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020 Synopsys, Inc. All rights reserved.
# Copyright (c) 2020,2021 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if BOARD_QEMU_ARC
@ -6,4 +6,25 @@ if BOARD_QEMU_ARC
config BOARD
default "qemu_arc"
if NETWORKING
config NET_L2_ETHERNET
default y
# Required to satisfy dependency of networking stack on RNG
config TEST_RANDOM_GENERATOR
default y
endif # NETWORKING
if UART_PIPE
# By fefault "UART_0" is selected, while we'd like
# to keep using "UART_0" as a normal serial port for
# debug prints and possibly interaction with the board.
config UART_PIPE_ON_DEV_NAME
default "UART_1"
endif # UART_PIPE
endif