Skip to content

Commit

Permalink
boards: rename native64 -> native
Browse files Browse the repository at this point in the history
This patch renames the current native board into native32 and replaces
it with the current native64 board.

The changeset is mostly renaming directories and replacing native64 with
native32 within application Makefiles (unless native64) was not
supported.
  • Loading branch information
OlegHahm committed Dec 21, 2024
1 parent 243ca31 commit 06a5511
Show file tree
Hide file tree
Showing 134 changed files with 216 additions and 215 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

"Platform: native":
- "boards/native/**/*"
- "boards/native64/**/*"
- "boards/native32/**/*"
- "cpu/native/**/*"
- "makefiles/arch/native.inc.mk"

Expand Down
8 changes: 4 additions & 4 deletions .murdock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hifive1b
msb-430
msba2
native
native64
native32
nrf52840dk
qn9080dk
samr21-xpro
Expand All @@ -41,7 +41,7 @@ esac
# factor 2, but still have a decent regression test coverage.
# TODO: Consider reusing QUICKBUILD_BOARDS once all those boards are supported
# on LLVM.
: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native native64 nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"}
: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native native32 nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"}

: ${TEST_WITH_CONFIG_SUPPORTED:="examples/suit_update tests/drivers/at86rf2xx_aes"}

Expand Down Expand Up @@ -383,9 +383,9 @@ compile() {
EMULATED=0
fi

if [ $RUN_TESTS -eq 1 -o "$board" = "native" -o "$board" = "native64" -o "$EMULATED" = "1" ]; then
if [ $RUN_TESTS -eq 1 -o "$board" = "native" -o "$board" = "native32" -o "$EMULATED" = "1" ]; then
if [ -f "${BINDIR}/.test" ]; then
if [ "$board" = "native" -o "$board" = "native64" -o "${EMULATED}" = "1" ]; then
if [ "$board" = "native" -o "$board" = "native32" -o "${EMULATED}" = "1" ]; then
# For native, we can run the test on the worker that also
# compiled it (`make -C${appdir} test`).
# "dwq-localjob" allows using some (locally run) command's
Expand Down
4 changes: 2 additions & 2 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ include $(RIOTMAKE)/boards.inc.mk
include $(RIOTMAKE)/dependencies_debug.inc.mk

# Use TOOLCHAIN environment variable to select the toolchain to use.
ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
ifeq ($(OS),Darwin)
$(shell $(COLOR_ECHO) "$(COLOR_RED)"Buildin on macOS is not supported."\
"We recommend vagrant for building:$(COLOR_RESET)"\
Expand Down Expand Up @@ -485,7 +485,7 @@ include $(RIOTMAKE)/toolchain/$(TOOLCHAIN).inc.mk

# Other than on native, RWX segments in ROM are not actually RWX, as regular
# store instructions won't write to flash.
ifeq (,$(filter native native64,$(BOARD)))
ifeq (,$(filter native native32,$(BOARD)))
LINKER_SUPPORTS_NOWARNRWX ?= $(shell LC_ALL=C $(LINK) $(RIOTTOOLS)/testprogs/minimal_linkable.c -o /dev/null -lc -Wall -Wextra -pedantic -Wl,--no-warn-rwx-segments 2> /dev/null && echo 1 || echo 0)
ifeq (1,$(LINKER_SUPPORTS_NOWARNRWX))
LINKFLAGS += -Wl,--no-warn-rwx-segments
Expand Down
4 changes: 2 additions & 2 deletions boards/native/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#

config BOARD
default "native" if BOARD_NATIVE
default "native64" if BOARD_NATIVE64

config BOARD_NATIVE
config BOARD_NATIVE64
bool
default y
select CPU_MODEL_NATIVE
4 changes: 2 additions & 2 deletions boards/native/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CPU = native

FEATURES_PROVIDED += arch_32bit
NATIVE_ARCH_BIT = 32
FEATURES_PROVIDED += arch_64bit
NATIVE_ARCH_BIT = 64

include $(RIOTBOARD)/native/common_features.inc.mk
40 changes: 6 additions & 34 deletions boards/native/doc.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,13 @@
/**
@defgroup boards_native Native Board
@defgroup boards_native64 Native64 Board
@ingroup boards
@brief Support for running RIOT in native
@brief Support for running RIOT in native64

[Family: native](https://github.com/RIOT-OS/RIOT/wiki/Family:-native)

# Overview
![Terminal running RIOT native](https://raw.githubusercontent.com/wiki/RIOT-OS/RIOT/images/Native.jpg)

# Hardware
- CPU: Host CPU
- RAM: Host RAM
- Flash:
- for program execution: Host file system
- for the @ref drivers_periph_flashpage : emulated in RAM
- Network: Tap Interface
- UART: Runtime configurable - `/dev/tty*` are supported
- Timers: Host timer
- LEDs: One red and one green LED - state changes are printed to the UART
- PWM: Dummy PWM
- QDEC: Emulated according to PWM
- SPI: Runtime configurable - `/dev/spidev*` are supported (Linux host only)
- GPIO: Runtime configurable - `/dev/gpiochip*` are supported (Linux host only)

# Required packages

On Debian/Ubuntu you can install the required libraries with

```
sudo apt install gcc-multilib
```

Likewise, for the unittest execution, `libasan5` is needed for 32 bit binaries.
On Debian/Ubuntu you can install the required libraries with

```
sudo apt install lib32asan5
```
Same board as \ref boards_native "native", but compiled for 64-bit instead of 32-bit.
Currently only Linux x86-64 is supported.
Otherwise, everything works the same as for the 32-bit version.
For more information on this board, see the \ref boards_native "native board" documentation.

*/
4 changes: 2 additions & 2 deletions boards/native64/Kconfig → boards/native32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#

config BOARD
default "native64" if BOARD_NATIVE64
default "native" if BOARD_NATIVE

config BOARD_NATIVE64
config BOARD_NATIVE
bool
default y
select CPU_MODEL_NATIVE
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CPU = native

FEATURES_PROVIDED += arch_64bit
NATIVE_ARCH_BIT = 64
FEATURES_PROVIDED += arch_32bit
NATIVE_ARCH_BIT = 32

include $(RIOTBOARD)/native/common_features.inc.mk
File renamed without changes.
41 changes: 41 additions & 0 deletions boards/native32/doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
@defgroup boards_native Native Board
@ingroup boards
@brief Support for running RIOT in native

[Family: native](https://github.com/RIOT-OS/RIOT/wiki/Family:-native)

# Overview
![Terminal running RIOT native](https://raw.githubusercontent.com/wiki/RIOT-OS/RIOT/images/Native.jpg)

# Hardware
- CPU: Host CPU
- RAM: Host RAM
- Flash:
- for program execution: Host file system
- for the @ref drivers_periph_flashpage : emulated in RAM
- Network: Tap Interface
- UART: Runtime configurable - `/dev/tty*` are supported
- Timers: Host timer
- LEDs: One red and one green LED - state changes are printed to the UART
- PWM: Dummy PWM
- QDEC: Emulated according to PWM
- SPI: Runtime configurable - `/dev/spidev*` are supported (Linux host only)
- GPIO: Runtime configurable - `/dev/gpiochip*` are supported (Linux host only)

# Required packages

On Debian/Ubuntu you can install the required libraries with

```
sudo apt install gcc-multilib
```

Likewise, for the unittest execution, `libasan5` is needed for 32 bit binaries.
On Debian/Ubuntu you can install the required libraries with

```
sudo apt install lib32asan5
```

*/
13 changes: 0 additions & 13 deletions boards/native64/doc.txt

This file was deleted.

2 changes: 1 addition & 1 deletion core/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ uintptr_t measure_stack_free_internal(const char *stack, size_t size)
uintptr_t *stackp = (uintptr_t *)(uintptr_t)stack;
uintptr_t end = (uintptr_t)stack + size;

/* HACK: This will affect native/native64 only.
/* HACK: This will affect native/native32 only.
*
* The dark magic used here is frowned upon by valgrind. E.g. valgrind may
* deduce that a specific value was at some point allocated on the stack,
Expand Down
4 changes: 2 additions & 2 deletions dist/tools/ci/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ then

if [ "$BUILDTEST_MCU_GROUP" == "x86" ]
then
make -C ./tests/unittests all test BOARD=native TERMPROG='gdb -batch -ex r -ex bt $(ELF)' || exit
make -C ./tests/unittests all test BOARD=native32 TERMPROG='gdb -batch -ex r -ex bt $(ELF)' || exit
set_result $?
fi

if [ "$BUILDTEST_MCU_GROUP" == "x86_64" ]
then
make -C ./tests/unittests all test BOARD=native64 TERMPROG='gdb -batch -ex r -ex bt $(ELF)' || exit
make -C ./tests/unittests all test BOARD=native TERMPROG='gdb -batch -ex r -ex bt $(ELF)' || exit
set_result $?
fi

Expand Down
2 changes: 1 addition & 1 deletion dist/tools/compile_test/compile_like_murdock.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
'microbit',
'mulle',
'native',
'native64',
'native32',
'nrf52840dk',
'nrf9160dk',
'nucleo-f072rb',
Expand Down
2 changes: 1 addition & 1 deletion examples/ccn-lite-relay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ APPLICATION = ccn-lite-relay
# If no BOARD is found in the environment, use this default:
BOARD ?= native

BOARD_WHITELIST := iotlab-m3 msba2 mulle native native64 nrf52dk nrf52840dk \
BOARD_WHITELIST := iotlab-m3 msba2 mulle native native32 nrf52dk nrf52840dk \
pba-d-01-kw2x samr21-xpro


Expand Down
4 changes: 2 additions & 2 deletions examples/gnrc_border_router/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ endif
# use ethos (ethernet over serial) or SLIP (serial-line IP) for network
# communication and stdio over UART, but not on native, as native has a tap
# interface towards the host.
ifeq (,$(filter native native64,$(BOARD)))
ifeq (,$(filter native native32,$(BOARD)))
ifeq (slip,$(UPLINK))
# SLIP baudrate and UART device can be configured from make command
SLIP_BAUDRATE ?= 115200
Expand Down Expand Up @@ -155,7 +155,7 @@ host-tools:
$(Q)env -u CC -u CFLAGS $(MAKE) -C $(RIOTTOOLS)

# define native specific targets to only run UHCP daemon when required
ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
ifeq (uhcp,$(PREFIX_CONF))
.PHONY: uhcpd-daemon

Expand Down
2 changes: 1 addition & 1 deletion examples/gnrc_border_router/Makefile.board.dep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Put board specific dependencies here
ifeq (,$(filter native native64,$(BOARD)))
ifeq (,$(filter native native32,$(BOARD)))
ifeq (slip,$(UPLINK))
USEMODULE += slipdev_stdio
else ifeq (ethos,$(UPLINK))
Expand Down
2 changes: 1 addition & 1 deletion examples/gnrc_border_router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ To select ethos as the serial driver, be sure that the `Makefile`
has the following:

```make
ifeq (,$(filter native native64,$(BOARD)))
ifeq (,$(filter native native32,$(BOARD)))
USEMODULE += stdio_ethos
CFLAGS += '-DETHOS_UART=UART_DEV(0)' -DETHOS_BAUDRATE=115200
FEATURES_REQUIRED += periph_uart
Expand Down
2 changes: 1 addition & 1 deletion examples/javascript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RIOTBASE ?= $(CURDIR)/../..
# development process:
DEVELHELP ?= 1

ifeq (,$(filter native native64,$(BOARD)))
ifeq (,$(filter native native32,$(BOARD)))
# Set stack size to something (conservatively) enormous
CFLAGS += -DTHREAD_STACKSIZE_MAIN=9092
endif
Expand Down
4 changes: 2 additions & 2 deletions examples/leds_shell/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ QUIET ?= 1
USEMODULE += shell
USEMODULE += periph_gpio

# Prevents native and native64 program from segfault when gpio set/clear are
# Prevents native and native32 program from segfault when gpio set/clear are
# used without a gpiochip
ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
USEMODULE += periph_gpio_mock
endif

Expand Down
2 changes: 1 addition & 1 deletion examples/lua_basic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DEVELHELP ?= 1
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1

ifeq (,$(filter native native64,$(BOARD)))
ifeq (,$(filter native native32,$(BOARD)))
# This stack size is large enough to run Lua print() functions of
# various lengths. Other functions untested.
CFLAGS += -DTHREAD_STACKSIZE_MAIN='(THREAD_STACKSIZE_DEFAULT+2048)'
Expand Down
2 changes: 1 addition & 1 deletion examples/micropython/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ FEATURES_OPTIONAL += periph_spi
TESTRUNNER_RESET_AFTER_TERM ?= 1

# failing on native with floating point exception (#15870)
TEST_ON_CI_BLACKLIST += native native64
TEST_ON_CI_BLACKLIST += native native32

# avoid running Kconfig by default
SHOULD_RUN_KCONFIG ?=
Expand Down
4 changes: 2 additions & 2 deletions examples/nanocoap_server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ifneq (,$(filter $(BOARD),$(LOW_MEMORY_BOARDS)))
endif

# Enable fileserver for boards with plenty of memory
HIGH_MEMORY_BOARDS := native native64 same54-xpro mcb2388
HIGH_MEMORY_BOARDS := native native32 same54-xpro mcb2388

ifneq (,$(filter $(BOARD),$(HIGH_MEMORY_BOARDS)))
# enable separate response
Expand All @@ -58,7 +58,7 @@ ifneq (,$(filter $(BOARD),$(HIGH_MEMORY_BOARDS)))
USEMODULE += vfs_default

# always enable auto-format for native
ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
USEMODULE += vfs_auto_format
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion examples/paho-mqtt/Makefile.board.dep
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ ifneq (,$(filter arch_esp,$(FEATURES_USED)))
USEMODULE += esp_wifi
endif

ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
USEMODULE += netdev_default
endif
2 changes: 1 addition & 1 deletion examples/suit_update/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CFLAGS += -DSUIT_MANIFEST_RESOURCE=\"$(SUIT_COAP_ROOT)/$(SUIT_NOTIFY_MANIFEST)\"
# Enable test_utils_interactive_sync, only used when running automatic test
DEFAULT_MODULE += test_utils_interactive_sync

ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
USE_ETHOS ?= 0
IFACE ?= tapbr0
# Configure two RAM regions with 2K each
Expand Down
2 changes: 1 addition & 1 deletion examples/suit_update/Makefile.board.dep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
USEMODULE += suit_storage_ram
USEMODULE += netdev_default
# Use VFS storage for native
Expand Down
4 changes: 2 additions & 2 deletions examples/suit_update/Makefile.suit.custom
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ EPOCH = $(call memoized,EPOCH,$(shell date +%s))
APP_VER ?= $(EPOCH)

# Default addressing if following README.native.md
ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
SUIT_CLIENT ?= [2001:db8::2]
SUIT_COAP_SERVER ?= [2001:db8::1]
$(call target-export-variables,test-with-config,SUIT_COAP_SERVER)
endif

ifneq (,$(filter native native64,$(BOARD)))
ifneq (,$(filter native native32,$(BOARD)))
# Set settings for publishing fake fw payloads to native
SUIT_NATIVE_PAYLOAD ?= "AABBCCDD"
SUIT_NATIVE_PAYLOAD_BIN ?= $(BINDIR_APP)/fw.$(APP_VER).bin
Expand Down
4 changes: 2 additions & 2 deletions examples/suit_update/tests-with-config/01-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_reachable_addr(child):
# Give some time for the network interface to be configured
time.sleep(1)
# Get address
if BOARD in ["native", "native64"]:
if BOARD in ["native", "native32"]:
iface_addr = get_iface_addr(IFACE)
network = IPv6Network(iface_addr, strict=False)
client_addr = iface_addr
Expand Down Expand Up @@ -212,7 +212,7 @@ def _test_successful_update(child, client, app_ver):
child.expect_exact("Install correct payload")

# Wait for reboot on non-native BOARDs
if BOARD not in ["native", "native64"]:
if BOARD not in ["native", "native32"]:
child.expect_exact(REBOOTING_MSG)
# Verify client is reachable and get address
client = get_reachable_addr(child)
Expand Down
Loading

0 comments on commit 06a5511

Please sign in to comment.