native_posix: introduce a native_posix_64 board configuration
Because the only difference between native_posix and native_posix_64 should be 32-bit vs 64-bit compilation, the NATIVE_POSIX menu option is turned into NATIVE_POSIX_32 and the NATIVE_POSIX_64 is added, with both selecting NATIVE_POSIX. This way nothing changes for the existing native_posix target, allowing it to share almost everything with the 64-bit version. Both flavors are made available for CI tests to pick them. This assumes both 32-bit and 64-bit build environments are available. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
1f783d9256
commit
8c5c5a9452
8 changed files with 53 additions and 8 deletions
|
@ -1,5 +1,11 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config BOARD_NATIVE_POSIX
|
||||||
|
bool
|
||||||
|
select HAS_DTS
|
||||||
|
select NATIVE_POSIX_TIMER
|
||||||
|
select NATIVE_POSIX_CONSOLE
|
||||||
|
|
||||||
if BOARD_NATIVE_POSIX
|
if BOARD_NATIVE_POSIX
|
||||||
|
|
||||||
comment "Native POSIX options"
|
comment "Native POSIX options"
|
||||||
|
|
|
@ -1,13 +1,24 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
config BOARD_NATIVE_POSIX
|
config BOARD_NATIVE_POSIX_32BIT
|
||||||
bool "Native POSIX"
|
bool "Native POSIX for 32-bit host"
|
||||||
depends on SOC_POSIX
|
depends on SOC_POSIX
|
||||||
select HAS_DTS
|
select BOARD_NATIVE_POSIX
|
||||||
select NATIVE_POSIX_TIMER
|
|
||||||
select NATIVE_POSIX_CONSOLE
|
|
||||||
help
|
help
|
||||||
Will produce a console Linux process which can be executed natively.
|
Will produce a console Linux process which can be executed natively
|
||||||
|
as a 32-bit executable.
|
||||||
|
It provides some minimal needed models:
|
||||||
|
An interrupt controller, timer (system tick), and redirects kernel prints to
|
||||||
|
stdout.
|
||||||
|
|
||||||
|
config BOARD_NATIVE_POSIX_64BIT
|
||||||
|
bool "Native POSIX for 64-bit host"
|
||||||
|
depends on SOC_POSIX
|
||||||
|
select BOARD_NATIVE_POSIX
|
||||||
|
select 64BIT
|
||||||
|
help
|
||||||
|
Will produce a console Linux process which can be executed natively
|
||||||
|
as a 64-bit executable.
|
||||||
It provides some minimal needed models:
|
It provides some minimal needed models:
|
||||||
An interrupt controller, timer (system tick), and redirects kernel prints to
|
An interrupt controller, timer (system tick), and redirects kernel prints to
|
||||||
stdout.
|
stdout.
|
||||||
|
|
|
@ -12,6 +12,7 @@ config OUTPUT_PRINT_MEMORY_USAGE
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BOARD
|
config BOARD
|
||||||
|
default "native_posix_64" if BOARD_NATIVE_POSIX_64BIT
|
||||||
default "native_posix"
|
default "native_posix"
|
||||||
|
|
||||||
if NETWORKING
|
if NETWORKING
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
identifier: native_posix
|
identifier: native_posix
|
||||||
name: Native POSIX port
|
name: Native 32-bit POSIX port
|
||||||
type: native
|
type: native
|
||||||
arch: posix
|
arch: posix
|
||||||
toolchain:
|
toolchain:
|
||||||
|
|
8
boards/posix/native_posix/native_posix_64.dts
Normal file
8
boards/posix/native_posix/native_posix_64.dts
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 BayLibre SAS
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include "native_posix.dts"
|
12
boards/posix/native_posix/native_posix_64.yaml
Normal file
12
boards/posix/native_posix/native_posix_64.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
identifier: native_posix_64
|
||||||
|
name: Native 64-bit POSIX port
|
||||||
|
type: native
|
||||||
|
arch: posix
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- llvm
|
||||||
|
supported:
|
||||||
|
- netif:eth
|
||||||
|
- usb_device
|
||||||
|
testing:
|
||||||
|
default: true
|
7
boards/posix/native_posix/native_posix_64_defconfig
Normal file
7
boards/posix/native_posix/native_posix_64_defconfig
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
CONFIG_ARCH_POSIX=y
|
||||||
|
CONFIG_SOC_POSIX=y
|
||||||
|
CONFIG_BOARD_NATIVE_POSIX_64BIT=y
|
||||||
|
CONFIG_CONSOLE=y
|
||||||
|
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
CONFIG_ARCH_POSIX=y
|
CONFIG_ARCH_POSIX=y
|
||||||
CONFIG_SOC_POSIX=y
|
CONFIG_SOC_POSIX=y
|
||||||
CONFIG_BOARD_NATIVE_POSIX=y
|
CONFIG_BOARD_NATIVE_POSIX_32BIT=y
|
||||||
CONFIG_CONSOLE=y
|
CONFIG_CONSOLE=y
|
||||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000
|
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue