Skip to content

Commit

Permalink
[darwin] CI macos-14 : updated toolchains for macOS Apple Silicon
Browse files Browse the repository at this point in the history
added shell script darwin_arm64.sh  for macOS Apple Silicon

updated toolchains for macOS on Apple Silicon
- arm64
- aarch64
- xpack-riscv
- xtensa-esp32
  • Loading branch information
simbit18 authored and xiaoxiang781216 committed Nov 11, 2024
1 parent 8a6e832 commit 2464b32
Show file tree
Hide file tree
Showing 3 changed files with 412 additions and 11 deletions.
7 changes: 6 additions & 1 deletion tools/ci/cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ nuttx=${CIWORKSPACE}/nuttx
apps=${CIWORKSPACE}/apps

os=$(uname -s)
osarch=$(uname -m)
if [ -f /etc/os-release ]; then
osname=$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | tr -d '"')
else
Expand Down Expand Up @@ -69,7 +70,11 @@ function install_tools {
to_do "freebsd"
;;
Darwin)
"${CIPLAT}"/darwin.sh
if [ "X$osarch" == "Xx86_64" ]; then
"${CIPLAT}"/darwin.sh
else
"${CIPLAT}"/darwin_arm64.sh
fi
;;
Linux)
"${CIPLAT}"/linux.sh
Expand Down
15 changes: 5 additions & 10 deletions tools/ci/platforms/darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
#
############################################################################

# Darwin
# NuttX CI Job for macOS, runs on Apple Intel Mac

# Prerequisites for macOS
# - Xcode (cc, etc)
# - homebrew
# - autoconf
# - curl
# - wget
# - cmake

set -e
set -o xtrace
osarch=$(uname -m)

add_path() {
PATH=$1:${PATH}
Expand Down Expand Up @@ -97,13 +97,8 @@ binutils() {
mkdir -p "${NUTTXTOOLS}"/bintools/bin
# It is possible we cached prebuilt but did brew install so recreate
# symlink if it exists
if [ "X$osarch" == "Xarm64" ]; then
rm -f "${NUTTXTOOLS}"/bintools/bin/objcopy
ln -s /opt/homebrew/opt/binutils/bin/objcopy "${NUTTXTOOLS}"/bintools/bin/objcopy
else
rm -f "${NUTTXTOOLS}"/bintools/bin/objcopy
ln -s /usr/local/opt/binutils/bin/objcopy "${NUTTXTOOLS}"/bintools/bin/objcopy
fi
rm -f "${NUTTXTOOLS}"/bintools/bin/objcopy
ln -s /usr/local/opt/binutils/bin/objcopy "${NUTTXTOOLS}"/bintools/bin/objcopy
fi

command objcopy --version
Expand Down
Loading

0 comments on commit 2464b32

Please sign in to comment.