From 33ee6195f6c4eff40d5fad18db63c0922eb84c59 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 17 Sep 2024 09:36:44 +0900 Subject: [PATCH 1/7] meta-zephyr-sdk: Pull in Python 3.10 compatibility fixes This commit pulls in the Python 3.10 compatibility fixes for Yocto in order to ensure that Poky can build inside the new sdk-build image with Python 3.10. Signed-off-by: Stephanos Ioannidis --- meta-zephyr-sdk/scripts/meta-zephyr-sdk-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-zephyr-sdk/scripts/meta-zephyr-sdk-clone.sh b/meta-zephyr-sdk/scripts/meta-zephyr-sdk-clone.sh index 3f41d826..3dcf564b 100755 --- a/meta-zephyr-sdk/scripts/meta-zephyr-sdk-clone.sh +++ b/meta-zephyr-sdk/scripts/meta-zephyr-sdk-clone.sh @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -POKY_KNOWN_COMMIT=${POKY_COMMIT:-"92c9c181ff23b41009ef9b3d674ab32b067cc50b"} +POKY_KNOWN_COMMIT=${POKY_COMMIT:-"54488c030cef432c682c2f91b5e3f43dbd560a1c"} META_ZEPHYR_SDK_SOURCE=${SDK_SOURCE:-"meta-zephyr-sdk"} META_POKY_SOURCE=${POKY_SOURCE:-"poky"} META_ZEPHYR_SDK_SOURCE=$(readlink -f $META_ZEPHYR_SDK_SOURCE) From 81eae20b1189db07ebefe0b7358c00f0c7075b00 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 17 Sep 2024 09:34:51 +0900 Subject: [PATCH 2/7] ci: Use sdk-build v1.3.2 This commit updates the CI workflow to use the sdk-build image v1.3.2, which is based on Debian 10 (Buster) and contains Python 3.10, in preparation for linking gdb-py against Python 3.10. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6d8fcc5..78f47eb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -235,7 +235,7 @@ jobs: MATRIX_HOSTS+='{ "name": "linux-x86_64", "runner": "zephyr-runner-v2-linux-x64-4xlarge", - "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.3.1", + "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.3.2", "archive": "tar.xz" },' fi @@ -244,7 +244,7 @@ jobs: MATRIX_HOSTS+='{ "name": "linux-aarch64", "runner": "zephyr-runner-v2-linux-arm64-4xlarge", - "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.3.1", + "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.3.2", "archive": "tar.xz" },' fi @@ -271,7 +271,7 @@ jobs: MATRIX_HOSTS+='{ "name": "windows-x86_64", "runner": "zephyr-runner-v2-linux-x64-4xlarge", - "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.3.1", + "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.3.2", "archive": "7z" },' fi From 646a963181805a4143dc623d1b4ee6e630f258ff Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Sep 2024 21:15:06 +0900 Subject: [PATCH 3/7] ci: Install python@3.10 for macOS This commit updates the CI workflow to install the Python 3.10 package for macOS because the current sdk-build-macos image only contains Python 3.8. This should be reverted once the sdk-build-macos image is updated to include the `python@3.10` package by default. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78f47eb4..5befd160 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -538,6 +538,10 @@ jobs: gnu-sed gnu-tar help2man meson ncurses ninja pkg-config fi + # Install Python 3.10 (temporary until the sdk-build-macos image is + # updated) + brew install python@3.10 + # Install dependencies for cross compilation if [ "${{ matrix.host.name }}" == "macos-x86_64" ]; then # Make crosskit available in PATH From 5f6717c7d75e1fdb82fef8149ba84931865e4437 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 19 Sep 2024 23:42:31 +0900 Subject: [PATCH 4/7] crosskit: Update x86_64-darwin-libpython crosskit for Python 3.10 This commit updates the macOS libpython crosskit for Python 3.10.15 support. Signed-off-by: Stephanos Ioannidis --- crosskit/crosskit-x86_64-darwin-libpython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crosskit/crosskit-x86_64-darwin-libpython b/crosskit/crosskit-x86_64-darwin-libpython index a4e33fa2..30db13af 160000 --- a/crosskit/crosskit-x86_64-darwin-libpython +++ b/crosskit/crosskit-x86_64-darwin-libpython @@ -1 +1 @@ -Subproject commit a4e33fa26373b6bea4147ba4c276af75999f95a1 +Subproject commit 30db13afea097f00e39f22401cb53a04a3bafb59 From 86c3c55d9a265124a505102044f7c1ed4c971f5c Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 19 Sep 2024 23:02:42 +0900 Subject: [PATCH 5/7] crosskit: Update mingw-w64-libpython crosskit for Python 3.10 This commit updates the MinGW w64 libpython crosskit for Python 3.10.11 support. Signed-off-by: Stephanos Ioannidis --- crosskit/crosskit-mingw-w64-libpython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crosskit/crosskit-mingw-w64-libpython b/crosskit/crosskit-mingw-w64-libpython index a602c62e..8239b740 160000 --- a/crosskit/crosskit-mingw-w64-libpython +++ b/crosskit/crosskit-mingw-w64-libpython @@ -1 +1 @@ -Subproject commit a602c62ead5c6a1f32860d287da9938619c2b398 +Subproject commit 8239b7400a983ddfe343c281bbfba0eb9deb2e5d From d4b692f678281c3ef90fa08c6f42c64c0453bd6a Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 17 Sep 2024 11:09:40 +0900 Subject: [PATCH 6/7] ci: Link gdb-py against Python 3.10 This commit updates the CI workflow to link Python-enabled GDB against Python 3.10, which is now the minimum required version by Zephyr. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5befd160..4e274f30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -548,8 +548,8 @@ jobs: echo "${GITHUB_WORKSPACE}/crosskit/crosskit-x86_64-apple-darwin/scripts" >> $GITHUB_PATH fi - # Make Python 3.8 available in PATH - echo "${HOMEBREW_PREFIX}/opt/python@3.8/bin" >> $GITHUB_PATH + # Make Python 3.10 available in PATH + echo "${HOMEBREW_PREFIX}/opt/python@3.10/bin" >> $GITHUB_PATH # Set environment variables echo "TAR=gtar" >> $GITHUB_ENV @@ -696,23 +696,23 @@ jobs: EOF if [ "${{ matrix.host.name }}" == "macos-x86_64" ]; then - # Use Python 3.8.12 - export LIBPYTHON_KIT_ROOT=${GITHUB_WORKSPACE}/crosskit/crosskit-x86_64-darwin-libpython/python-3.8.12 + # Use Python 3.10.15 + export LIBPYTHON_KIT_ROOT=${GITHUB_WORKSPACE}/crosskit/crosskit-x86_64-darwin-libpython/python-3.10.15 # Set Python configuration resolver for GDB cat <> .config CT_GDB_CROSS_PYTHON_BINARY="${LIBPYTHON_KIT_ROOT}/bin/python" EOF elif [ "${{ matrix.host.name }}" == "windows-x86_64" ]; then - # Use Python 3.8.3 - export LIBPYTHON_KIT_ROOT=${GITHUB_WORKSPACE}/crosskit/crosskit-mingw-w64-libpython/python-3.8.3 + # Use Python 3.10.11 + export LIBPYTHON_KIT_ROOT=${GITHUB_WORKSPACE}/crosskit/crosskit-mingw-w64-libpython/python-3.10.11 # Set Python configuration resolver for GDB cat <> .config CT_GDB_CROSS_PYTHON_BINARY="${LIBPYTHON_KIT_ROOT}/bin/python" EOF else - # Use Python 3.8 for non-Canadian Linux and macOS builds + # Use Python 3.10 for non-Canadian Linux and macOS builds cat <> .config - CT_GDB_CROSS_PYTHON_BINARY="python3.8" + CT_GDB_CROSS_PYTHON_BINARY="python3.10" EOF fi From 366126a9abb18e757f60203aa64aa7c5f90825cb Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 17 Sep 2024 11:14:34 +0900 Subject: [PATCH 7/7] contrib: Update Linux build script to use Python 3.10 This commit updates the local Linux build script to link gdb-py against Python 3.10, as done by the CI workflow. Signed-off-by: Stephanos Ioannidis --- contrib/linux_build_toolchain.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/linux_build_toolchain.sh b/contrib/linux_build_toolchain.sh index 85ae352f..d8fdeacf 100644 --- a/contrib/linux_build_toolchain.sh +++ b/contrib/linux_build_toolchain.sh @@ -119,7 +119,7 @@ CT_LOG_EXTRA=y CT_LOG_LEVEL_MAX="EXTRA" CT_GDB_CROSS_PYTHON=y CT_GDB_CROSS_PYTHON_VARIANT=y -CT_GDB_CROSS_PYTHON_BINARY="python3.8" +CT_GDB_CROSS_PYTHON_BINARY="python3.10" CT_EXPERIMENTAL=y CT_ALLOW_BUILD_AS_ROOT=y CT_ALLOW_BUILD_AS_ROOT_SURE=y