Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
freakishness authored Sep 26, 2023
2 parents da074db + f02ad03 commit a150fd8
Show file tree
Hide file tree
Showing 4,313 changed files with 301,495 additions and 77,039 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
pull_request:
paths-ignore:
- 'Documentation/**'
- 'tools/ci/docker/linux/**'
push:
paths-ignore:
- 'Documentation/**'
Expand Down Expand Up @@ -88,7 +89,7 @@ jobs:
echo "app_ref=$APPS_REF" >> $GITHUB_OUTPUT
- name: Checkout nuttx repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: apache/nuttx
ref: ${{ steps.gittargets.outputs.os_ref }}
Expand All @@ -98,7 +99,7 @@ jobs:
run: git -C sources/nuttx fetch --tags

- name: Checkout apps repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: apache/nuttx-apps
ref: ${{ steps.gittargets.outputs.apps_ref }}
Expand Down Expand Up @@ -135,7 +136,7 @@ jobs:
run: tar zxf sources.tar.gz

- name: Docker Login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout nuttx repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: apache/nuttx
path: nuttx
Expand All @@ -39,6 +39,7 @@ jobs:
- name: Check Pull Request
run: |
echo "::add-matcher::nuttx/.github/nxstyle.json"
pip install cmake-format
cd nuttx
commits="${{ github.event.pull_request.base.sha }}..HEAD"
git log --oneline $commits
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
build-html:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.8'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
IMAGE_TAG: ghcr.io/${{ github.repository }}/apache-nuttx-ci-linux
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Log into registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -66,7 +66,7 @@ jobs:
run: |
df -h
- name: Push Linux image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: tools/ci/docker/linux
platforms: linux/amd64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: mkdir super-linter.report
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ uImage
.vscode
.DS_Store
tools/gdb/__pycache__
/build
54 changes: 49 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ if(POLICY CMP0115)
cmake_policy(SET CMP0115 NEW)
endif()

# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:

if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()

# Basic CMake configuration ##################################################

set(CMAKE_CXX_STANDARD 14)
Expand Down Expand Up @@ -115,11 +121,6 @@ else()
LIST_DIRECTORIES true
"${NUTTX_DIR}/boards/*/*/${NUTTX_BOARD}")

file(
GLOB NUTTX_COMMON_DIR
LIST_DIRECTORIES true
"${NUTTX_DIR}/boards/*/*/common")

if(EXISTS ${NUTTX_BOARD_DIR}/configs/${NUTTX_CONFIG}/defconfig)
set(NUTTX_DEFCONFIG ${NUTTX_BOARD_DIR}/configs/${NUTTX_CONFIG}/defconfig)
endif()
Expand Down Expand Up @@ -255,6 +256,15 @@ else()
file(TOUCH ${CMAKE_BINARY_DIR}/drivers/platform/Kconfig)
endif()

# board common directory

if(CONFIG_ARCH_BOARD_COMMON)
file(
GLOB NUTTX_COMMON_DIR
LIST_DIRECTORIES true
"${NUTTX_DIR}/boards/${CONFIG_ARCH}/${CONFIG_ARCH_CHIP}/common")
endif()

# Custom chip ###################################################

if(CONFIG_ARCH_CHIP_CUSTOM)
Expand Down Expand Up @@ -311,6 +321,7 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/.config OR NOT "${NUTTX_DEFCONFIG}" STREQUAL
# Do olddefconfig step to expand the abbreviated defconfig into normal config
execute_process(
COMMAND olddefconfig
ERROR_VARIABLE KCONFIG_ERROR
OUTPUT_VARIABLE KCONFIG_OUTPUT
RESULT_VARIABLE KCONFIG_STATUS
WORKING_DIRECTORY ${NUTTX_DIR})
Expand All @@ -323,6 +334,15 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/.config OR NOT "${NUTTX_DEFCONFIG}" STREQUAL
configure_file(${CMAKE_BINARY_DIR}/.config ${CMAKE_BINARY_DIR}/.config.orig
COPYONLY)

string(REPLACE "\n" ";" KCONFIG_ESTRING ${KCONFIG_ERROR})
foreach(estring ${KCONFIG_ESTRING})
string(REGEX MATCH "the 'modules' option is not supported" result
${estring})
if(NOT result)
message(WARNING "Kconfig Configuration Error: ${estring}")
endif()
endforeach()

if(KCONFIG_STATUS AND NOT KCONFIG_STATUS EQUAL 0)
message(
FATAL_ERROR
Expand Down Expand Up @@ -353,6 +373,8 @@ include(nuttx_add_application)
include(nuttx_add_romfs)
include(nuttx_add_symtab)
include(nuttx_add_module)
include(nuttx_add_dependencies)
include(nuttx_export_header)
include(menuconfig)

include(ExternalProject)
Expand Down Expand Up @@ -526,6 +548,24 @@ endif()
# Get linker script to use
get_property(ldscript GLOBAL PROPERTY LD_SCRIPT)

# Pre-compile linker script
if(DEFINED PREPROCES)
get_filename_component(LD_SCRIPT_NAME ${ldscript} NAME)
set(LD_SCRIPT_TMP "${CMAKE_BINARY_DIR}/${LD_SCRIPT_NAME}.tmp")

add_custom_command(
OUTPUT ${LD_SCRIPT_TMP}
DEPENDS ${ldscript}
COMMAND ${PREPROCES} -I${CMAKE_BINARY_DIR}/include -I${NUTTX_CHIP_ABS_DIR}
${ldscript} > ${LD_SCRIPT_TMP}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

add_custom_target(ldscript_tmp DEPENDS ${LD_SCRIPT_TMP})
add_dependencies(nuttx ldscript_tmp)

set(ldscript ${LD_SCRIPT_TMP})
endif()

# Perform link

# Add empty source file to nuttx target since cmake requires at least one file
Expand Down Expand Up @@ -577,6 +617,10 @@ if(NOT CONFIG_ARCH_SIM)
endif()
elseif(WIN32)
target_link_options(nuttx PUBLIC /SAFESEH:NO)
math(EXPR LINK_STACKSIZE
"${CONFIG_SIM_STACKSIZE_ADJUSTMENT} + ${CONFIG_IDLETHREAD_STACKSIZE}"
OUTPUT_FORMAT DECIMAL)
target_link_options(nuttx PUBLIC /STACK:${LINK_STACKSIZE},${LINK_STACKSIZE})
set(nuttx_libs_paths)
foreach(lib ${nuttx_libs})
list(APPEND nuttx_libs_paths $<TARGET_FILE:${lib}>)
Expand Down
Loading

0 comments on commit a150fd8

Please sign in to comment.