From 15a20b3fcd2702ac2ecd2e7c4f7751783c294794 Mon Sep 17 00:00:00 2001 From: Ivan-Velickovic Date: Fri, 5 May 2023 12:35:13 +1000 Subject: [PATCH 1/7] Add ability to build SDK for macOS hosts The Microkit tool can now be built for x64 macOS as well as ARM64 macOS, allowing the use of the Microkit SDK in macOS environments. Note that unlike the Linux Microkit tool, the macOS one will be dynamically linked due to macOS not supporting statically linked binaries. Signed-off-by: Ivan Velickovic --- build_sdk.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build_sdk.py b/build_sdk.py index 597384590..b274b50a0 100644 --- a/build_sdk.py +++ b/build_sdk.py @@ -19,6 +19,7 @@ from dataclasses import dataclass from sys import executable from tarfile import open as tar_open, TarInfo +import platform as host_platform from typing import Dict, Union, List, Tuple @@ -175,12 +176,27 @@ def build_tool(tool_target: Path) -> None: pyoxidizer = ENV_BIN_DIR / "pyoxidizer" if not pyoxidizer.exists(): raise Exception("pyoxidizer does not appear to be installed in your Python environment") + + host_system = host_platform.system() + if host_system == "Linux": + target_triple = "x86_64-unknown-linux-musl" + elif host_system == "Darwin": + host_arch = host_platform.machine() + if host_arch == "x86_64": + target_triple = "x86_64-apple-darwin" + elif host_arch == "arm64": + target_triple = "aarch64-apple-darwin" + else: + raise Exception(f"Unexpected Darwin architecture: {host_arch}") + else: + raise Exception(f"The platform \"{host_system}\" is not supported") + r = system( - f"{pyoxidizer} build --release --path tool --target-triple x86_64-unknown-linux-musl" + f"{pyoxidizer} build --release --path tool --target-triple {target_triple}" ) assert r == 0 - tool_output = "./tool/build/x86_64-unknown-linux-musl/release/install/microkit" + tool_output = f"./tool/build/{target_triple}/release/install/microkit" r = system(f"strip {tool_output}") assert r == 0 From 68876de7700f109a290b2aa854ba3b048c9ca2d6 Mon Sep 17 00:00:00 2001 From: Ivan-Velickovic Date: Sat, 10 Jun 2023 14:34:43 +1000 Subject: [PATCH 2/7] Add ability to specify target for Microkit tool Add the `--tool-target-triple` option to specify which target to build the tool for. Unfortunately Rust does not allow you to cross-compile from Linux to macOS, however this will allow x64 macOS hosts to cross-compile to ARM64 macOS. In theory the reverse would work as well but I have not tried it. Signed-off-by: Ivan Velickovic --- build_sdk.py | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/build_sdk.py b/build_sdk.py index b274b50a0..8bd131857 100644 --- a/build_sdk.py +++ b/build_sdk.py @@ -165,32 +165,34 @@ def tar_filter(tarinfo: TarInfo) -> TarInfo: return tarinfo -def test_tool() -> None: - r = system( - f"{executable} -m unittest discover -s tool -v" - ) - assert r == 0 - - -def build_tool(tool_target: Path) -> None: - pyoxidizer = ENV_BIN_DIR / "pyoxidizer" - if not pyoxidizer.exists(): - raise Exception("pyoxidizer does not appear to be installed in your Python environment") - +def get_tool_target_triple() -> str: host_system = host_platform.system() if host_system == "Linux": - target_triple = "x86_64-unknown-linux-musl" + return "x86_64-unknown-linux-musl" elif host_system == "Darwin": host_arch = host_platform.machine() if host_arch == "x86_64": - target_triple = "x86_64-apple-darwin" + return "x86_64-apple-darwin" elif host_arch == "arm64": - target_triple = "aarch64-apple-darwin" + return "aarch64-apple-darwin" else: raise Exception(f"Unexpected Darwin architecture: {host_arch}") else: raise Exception(f"The platform \"{host_system}\" is not supported") + +def test_tool() -> None: + r = system( + f"{executable} -m unittest discover -s tool -v" + ) + assert r == 0 + + +def build_tool(tool_target: Path, target_triple: str) -> None: + pyoxidizer = ENV_BIN_DIR / "pyoxidizer" + if not pyoxidizer.exists(): + raise Exception("pyoxidizer does not appear to be installed in your Python environment") + r = system( f"{pyoxidizer} build --release --path tool --target-triple {target_triple}" ) @@ -370,6 +372,7 @@ def build_lib_component( def main() -> None: parser = ArgumentParser() parser.add_argument("--sel4", type=Path, required=True) + parser.add_argument("--tool-target-triple", default=get_tool_target_triple(), help="Compile the Microkit tool for this target triple") args = parser.parse_args() sel4_dir = args.sel4.expanduser() if not sel4_dir.exists(): @@ -415,7 +418,7 @@ def main() -> None: if not tool_target.exists(): test_tool() - build_tool(tool_target) + build_tool(tool_target, args.tool_target_triple) build_doc(root_dir) From 0ff9c1990ce22b8c0b4df3f7ef41dec098505a50 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Sat, 27 Jan 2024 17:51:21 +1100 Subject: [PATCH 3/7] ci: build SDK for macOS x64 and ARM64 Signed-off-by: Ivan Velickovic --- .github/workflows/sdk.yaml | 52 +++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdk.yaml b/.github/workflows/sdk.yaml index 07ed43fa6..778b97b47 100644 --- a/.github/workflows/sdk.yaml +++ b/.github/workflows/sdk.yaml @@ -16,7 +16,7 @@ on: branches: [ "main" ] jobs: - build: + build_linux_x64: name: Build SDK (Linux x86-64) runs-on: ubuntu-20.04 steps: @@ -46,3 +46,53 @@ jobs: ./pyenv/bin/pip install --upgrade pip setuptools wheel ./pyenv/bin/pip install -r requirements.txt ./pyenv/bin/python build_sdk.py --sel4=seL4 + build_macos_x64: + name: Build SDK (macOS x86-64) + runs-on: macos-12 + steps: + - name: Checkout Microkit repository + uses: actions/checkout@v3 + - name: Checkout seL4 repository + uses: actions/checkout@v3 + with: + repository: seL4/seL4 + ref: microkit + path: seL4 + - name: Install SDK dependencies + run: brew install pandoc cmake dtc ninja qemu libxml2 python@3.9 coreutils texlive + - name: Install AArch64 GCC toolchain + run: | + wget -O aarch64-toolchain.tar.gz https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf.tar.xz?rev=51c39c753f8c4a54875b7c5dccfb84ef&hash=DB5BC5D16E3FE6AB60E8F51B97CE5777 + tar xf aarch64-toolchain.tar.gz + echo "$(pwd)/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH + - name: Build SDK + run: | + python3.9 -m venv pyenv + ./pyenv/bin/pip install --upgrade pip setuptools wheel + ./pyenv/bin/pip install -r requirements.txt + ./pyenv/bin/python build_sdk.py --sel4=seL4 + build_macos_arm64: + name: Build SDK (macOS ARM64) + runs-on: macos-12 + steps: + - name: Checkout Microkit repository + uses: actions/checkout@v3 + - name: Checkout seL4 repository + uses: actions/checkout@v3 + with: + repository: seL4/seL4 + ref: microkit + path: seL4 + - name: Install SDK dependencies + run: brew install pandoc cmake dtc ninja qemu libxml2 python@3.9 coreutils texlive + - name: Install AArch64 GCC toolchain + run: | + wget -O aarch64-toolchain.tar.gz https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf.tar.xz?rev=51c39c753f8c4a54875b7c5dccfb84ef&hash=DB5BC5D16E3FE6AB60E8F51B97CE5777 + tar xf aarch64-toolchain.tar.gz + echo "$(pwd)/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH + - name: Build SDK + run: | + python3.9 -m venv pyenv + ./pyenv/bin/pip install --upgrade pip setuptools wheel + ./pyenv/bin/pip install -r requirements.txt + ./pyenv/bin/python build_sdk.py --sel4=seL4 --tool-target-triple=aarch64-apple-darwin From 75221845e54b9c1130b01544fd498c358f217132 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Mon, 29 Jan 2024 17:06:09 +1100 Subject: [PATCH 4/7] Update code for GCC version 12 The only change necessary to update from GCC 10 to GCC 12 is that the option `-g3` needs to be `-g` instead. Why do we have to update to GCC 12? The main motivation is to have the toolchain available for macOS Apple Silicon hosts that want to build the Microkit SDK from source. The toolchain for Apple Silicon hosts is only available from GCC 12 and above. Signed-off-by: Ivan Velickovic --- example/imx8mm_evk/passive_server/Makefile | 4 ++-- example/maaxboard/hello/Makefile | 4 ++-- example/tqma8xqp1gb/ethernet/Makefile | 4 ++-- example/zcu102/hello/Makefile | 4 ++-- libmicrokit/Makefile | 4 ++-- loader/Makefile | 4 ++-- monitor/Makefile | 4 ++-- tests/capfault/Makefile | 4 ++-- tests/overlapping_pages/Makefile | 4 ++-- tests/simplemrs/Makefile | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/example/imx8mm_evk/passive_server/Makefile b/example/imx8mm_evk/passive_server/Makefile index a78ba316f..d1a0a486b 100644 --- a/example/imx8mm_evk/passive_server/Makefile +++ b/example/imx8mm_evk/passive_server/Makefile @@ -34,7 +34,7 @@ CLIENT_OBJS := client.o BOARD_DIR := $(MICROKIT_SDK)/board/$(MICROKIT_BOARD)/$(MICROKIT_CONFIG) IMAGES := server.elf client.elf -CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g3 -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include +CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include LDFLAGS := -L$(BOARD_DIR)/lib LIBS := -lmicrokit -Tmicrokit.ld @@ -47,7 +47,7 @@ $(BUILD_DIR)/%.o: %.c Makefile $(CC) -c $(CFLAGS) $< -o $@ $(BUILD_DIR)/%.o: %.s Makefile - $(AS) -g3 -mcpu=$(CPU) $< -o $@ + $(AS) -g -mcpu=$(CPU) $< -o $@ $(BUILD_DIR)/server.elf: $(addprefix $(BUILD_DIR)/, $(SERVER_OBJS)) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ diff --git a/example/maaxboard/hello/Makefile b/example/maaxboard/hello/Makefile index b78ab030f..e7bdffb04 100644 --- a/example/maaxboard/hello/Makefile +++ b/example/maaxboard/hello/Makefile @@ -33,7 +33,7 @@ HELLO_OBJS := hello.o BOARD_DIR := $(MICROKIT_SDK)/board/$(MICROKIT_BOARD)/$(MICROKIT_CONFIG) IMAGES := hello.elf -CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g3 -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include +CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include LDFLAGS := -L$(BOARD_DIR)/lib LIBS := -lmicrokit -Tmicrokit.ld @@ -46,7 +46,7 @@ $(BUILD_DIR)/%.o: %.c Makefile $(CC) -c $(CFLAGS) $< -o $@ $(BUILD_DIR)/%.o: %.s Makefile - $(AS) -g3 -mcpu=$(CPU) $< -o $@ + $(AS) -g -mcpu=$(CPU) $< -o $@ $(BUILD_DIR)/hello.elf: $(addprefix $(BUILD_DIR)/, $(HELLO_OBJS)) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ diff --git a/example/tqma8xqp1gb/ethernet/Makefile b/example/tqma8xqp1gb/ethernet/Makefile index f87b3358f..2e8ebbf55 100644 --- a/example/tqma8xqp1gb/ethernet/Makefile +++ b/example/tqma8xqp1gb/ethernet/Makefile @@ -35,7 +35,7 @@ GPT_OBJS := gpt.o BOARD_DIR := $(MICROKIT_SDK)/board/$(MICROKIT_BOARD)/$(MICROKIT_CONFIG) IMAGES := eth.elf pass.elf gpt.elf -CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g3 -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include +CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include LDFLAGS := -L$(BOARD_DIR)/lib LIBS := -lmicrokit -Tmicrokit.ld @@ -48,7 +48,7 @@ $(BUILD_DIR)/%.o: %.c Makefile $(CC) -c $(CFLAGS) $< -o $@ $(BUILD_DIR)/%.o: %.s Makefile - $(AS) -g3 -mcpu=$(CPU) $< -o $@ + $(AS) -g -mcpu=$(CPU) $< -o $@ $(BUILD_DIR)/eth.elf: $(addprefix $(BUILD_DIR)/, $(ETH_OBJS)) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ diff --git a/example/zcu102/hello/Makefile b/example/zcu102/hello/Makefile index b78ab030f..e7bdffb04 100644 --- a/example/zcu102/hello/Makefile +++ b/example/zcu102/hello/Makefile @@ -33,7 +33,7 @@ HELLO_OBJS := hello.o BOARD_DIR := $(MICROKIT_SDK)/board/$(MICROKIT_BOARD)/$(MICROKIT_CONFIG) IMAGES := hello.elf -CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g3 -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include +CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g -O3 -Wall -Wno-unused-function -Werror -I$(BOARD_DIR)/include LDFLAGS := -L$(BOARD_DIR)/lib LIBS := -lmicrokit -Tmicrokit.ld @@ -46,7 +46,7 @@ $(BUILD_DIR)/%.o: %.c Makefile $(CC) -c $(CFLAGS) $< -o $@ $(BUILD_DIR)/%.o: %.s Makefile - $(AS) -g3 -mcpu=$(CPU) $< -o $@ + $(AS) -g -mcpu=$(CPU) $< -o $@ $(BUILD_DIR)/hello.elf: $(addprefix $(BUILD_DIR)/, $(HELLO_OBJS)) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ diff --git a/libmicrokit/Makefile b/libmicrokit/Makefile index 7d0a9f287..3dd5f0b76 100644 --- a/libmicrokit/Makefile +++ b/libmicrokit/Makefile @@ -12,13 +12,13 @@ $(error GCC_CPU must be specified) endif TOOLCHAIN := aarch64-none-elf- -CFLAGS := -std=gnu11 -g3 -O3 -nostdlib -ffreestanding -mcpu=$(GCC_CPU) -Wall -Wno-maybe-uninitialized -Wno-unused-function -Werror -Iinclude -I$(SEL4_SDK)/include +CFLAGS := -std=gnu11 -g -O3 -nostdlib -ffreestanding -mcpu=$(GCC_CPU) -Wall -Wno-maybe-uninitialized -Wno-unused-function -Werror -Iinclude -I$(SEL4_SDK)/include LIBS := libmicrokit.a OBJS := main.o crt0.o dbg.o $(BUILD_DIR)/%.o : src/%.S - $(TOOLCHAIN)gcc -x assembler-with-cpp -c -g3 -mcpu=$(GCC_CPU) $< -o $@ + $(TOOLCHAIN)gcc -x assembler-with-cpp -c -g -mcpu=$(GCC_CPU) $< -o $@ $(BUILD_DIR)/%.o : src/%.s $(TOOLCHAIN)as -g -mcpu=$(GCC_CPU) $< -o $@ diff --git a/loader/Makefile b/loader/Makefile index 8c431014f..cbcc261f3 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -21,7 +21,7 @@ endif TOOLCHAIN := aarch64-none-elf- -CFLAGS := -std=gnu11 -g3 -O3 -nostdlib -ffreestanding -mcpu=$(GCC_CPU) -DBOARD_$(BOARD) -Wall -Werror +CFLAGS := -std=gnu11 -g -O3 -nostdlib -ffreestanding -mcpu=$(GCC_CPU) -DBOARD_$(BOARD) -Wall -Werror PROGS := loader.elf OBJECTS := loader.o crt0.o util64.o @@ -29,7 +29,7 @@ LINKSCRIPT_INPUT := loader.ld LINKSCRIPT := $(BUILD_DIR)/link.ld $(BUILD_DIR)/%.o : src/%.S - $(TOOLCHAIN)gcc -x assembler-with-cpp -c -g3 -mcpu=$(GCC_CPU) $< -o $@ + $(TOOLCHAIN)gcc -x assembler-with-cpp -c -g -mcpu=$(GCC_CPU) $< -o $@ $(BUILD_DIR)/%.o : src/%.s $(TOOLCHAIN)as -g -mcpu=$(GCC_CPU) $< -o $@ diff --git a/monitor/Makefile b/monitor/Makefile index 569f4d2be..194c96010 100644 --- a/monitor/Makefile +++ b/monitor/Makefile @@ -12,14 +12,14 @@ $(error GCC_CPU must be specified) endif TOOLCHAIN := aarch64-none-elf- -CFLAGS := -std=gnu11 -g3 -O3 -nostdlib -ffreestanding -mcpu=$(GCC_CPU) -Wall -Wno-maybe-uninitialized -Werror -I$(SEL4_SDK)/include +CFLAGS := -std=gnu11 -g -O3 -nostdlib -ffreestanding -mcpu=$(GCC_CPU) -Wall -Wno-maybe-uninitialized -Werror -I$(SEL4_SDK)/include PROGS := monitor.elf OBJECTS := main.o crt0.o debug.o util.o LINKSCRIPT := monitor.ld $(BUILD_DIR)/%.o : src/%.S - $(TOOLCHAIN)gcc -x assembler-with-cpp -c -g3 -mcpu=$(GCC_CPU) $< -o $@ + $(TOOLCHAIN)gcc -x assembler-with-cpp -c -g -mcpu=$(GCC_CPU) $< -o $@ $(BUILD_DIR)/%.o : src/%.s $(TOOLCHAIN)as -g -mcpu=$(GCC_CPU) $< -o $@ diff --git a/tests/capfault/Makefile b/tests/capfault/Makefile index 68f2735db..3a182f407 100644 --- a/tests/capfault/Makefile +++ b/tests/capfault/Makefile @@ -16,7 +16,7 @@ AS := $(TOOLCHAIN)-as CAPFAULT_OBJS := capfault.o IMAGES := capfault.elf -CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g3 -O3 -Wall -Wno-unused-function -Werror -I$(SEL4_SDK)/include -I$(LIBMICROKIT)/include +CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g -O3 -Wall -Wno-unused-function -Werror -I$(SEL4_SDK)/include -I$(LIBMICROKIT)/include LDFLAGS := -L$(LIBMICROKIT) -Tmicrokit.ld LIBS := -lmicrokit @@ -27,7 +27,7 @@ all: $(IMAGES) $(CC) -c $(CFLAGS) $< -o $@ %.o: %.s Makefile - $(AS) -g3 -mcpu=$(CPU) $< -o $@ + $(AS) -g -mcpu=$(CPU) $< -o $@ capfault.elf: $(CAPFAULT_OBJS) $(LD) $(LDFLAGS) $(CAPFAULT_OBJS) $(LIBS) -o $@ diff --git a/tests/overlapping_pages/Makefile b/tests/overlapping_pages/Makefile index c2e6510dd..6a8e3f8f6 100644 --- a/tests/overlapping_pages/Makefile +++ b/tests/overlapping_pages/Makefile @@ -16,7 +16,7 @@ AS := $(TOOLCHAIN)-as OVERLAPPING_PAGES_OBJS := overlapping_pages.o IMAGES := overlapping_pages.elf -CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g3 -O3 -Wall -Wno-unused-function -Werror -I$(SEL4_SDK)/include -I$(LIBMICROKIT)/include +CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g -O3 -Wall -Wno-unused-function -Werror -I$(SEL4_SDK)/include -I$(LIBMICROKIT)/include LDFLAGS := -L$(LIBMICROKIT) -Tmicrokit.ld LIBS := -lmicrokit @@ -27,7 +27,7 @@ all: $(IMAGES) $(CC) -c $(CFLAGS) $< -o $@ %.o: %.s Makefile - $(AS) -g3 -mcpu=$(CPU) $< -o $@ + $(AS) -g -mcpu=$(CPU) $< -o $@ overlapping_pages.elf: $(OVERLAPPING_PAGES_OBJS) $(LD) $(LDFLAGS) $(OVERLAPPING_PAGES_OBJS) $(LIBS) -o $@ diff --git a/tests/simplemrs/Makefile b/tests/simplemrs/Makefile index 92f568f8b..3ac8f4f74 100644 --- a/tests/simplemrs/Makefile +++ b/tests/simplemrs/Makefile @@ -16,7 +16,7 @@ AS := $(TOOLCHAIN)-as SIMPLEMRS_OBJS := simplemrs.o IMAGES := simplemrs.elf -CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g3 -O3 -Wall -Wno-unused-function -Werror -I$(SEL4_SDK)/include -I$(LIBMICROKIT)/include +CFLAGS := -mcpu=$(CPU) -mstrict-align -nostdlib -ffreestanding -g -O3 -Wall -Wno-unused-function -Werror -I$(SEL4_SDK)/include -I$(LIBMICROKIT)/include LDFLAGS := -L$(LIBMICROKIT) -Tmicrokit.ld LIBS := -lmicrokit @@ -27,7 +27,7 @@ all: $(IMAGES) $(CC) -c $(CFLAGS) $< -o $@ %.o: %.s Makefile - $(AS) -g3 -mcpu=$(CPU) $< -o $@ + $(AS) -g -mcpu=$(CPU) $< -o $@ simplemrs.elf: $(SIMPLEMRS_OBJS) $(LD) $(LDFLAGS) $(SIMPLEMRS_OBJS) $(LIBS) -o $@ From 98e035c889a8ab2a92fc4f8ce08654c15c8068fd Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Mon, 29 Jan 2024 17:09:04 +1100 Subject: [PATCH 5/7] Use GCC 12 Signed-off-by: Ivan Velickovic --- .github/workflows/sdk.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sdk.yaml b/.github/workflows/sdk.yaml index 778b97b47..a1c586245 100644 --- a/.github/workflows/sdk.yaml +++ b/.github/workflows/sdk.yaml @@ -37,9 +37,9 @@ jobs: python3.9 python3-pip python3.9-venv musl-tools - name: Install AArch64 GCC toolchain run: | - wget -O aarch64-toolchain.tar.gz https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz\?revision\=79f65c42-1a1b-43f2-acb7-a795c8427085\&hash\=61BBFB526E785D234C5D8718D9BA8E61 + wget -O aarch64-toolchain.tar.gz https://sel4-toolchains.s3.us-east-2.amazonaws.com/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf.tar.xz%3Frev%3D28d5199f6db34e5980aae1062e5a6703%26hash%3DF6F5604BC1A2BBAAEAC4F6E98D8DC35B tar xf aarch64-toolchain.tar.gz - echo "$(pwd)/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH + echo "$(pwd)/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH - name: Build SDK run: | python3.9 -m venv pyenv @@ -62,9 +62,9 @@ jobs: run: brew install pandoc cmake dtc ninja qemu libxml2 python@3.9 coreutils texlive - name: Install AArch64 GCC toolchain run: | - wget -O aarch64-toolchain.tar.gz https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf.tar.xz?rev=51c39c753f8c4a54875b7c5dccfb84ef&hash=DB5BC5D16E3FE6AB60E8F51B97CE5777 + wget -O aarch64-toolchain.tar.gz https://sel4-toolchains.s3.us-east-2.amazonaws.com/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf.tar.xz%3Frev%3D09b11f159fc24fdda01e05bb32695dd5%26hash%3D6AAF4239F28AE17389AB3E611DFFE0A6 tar xf aarch64-toolchain.tar.gz - echo "$(pwd)/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH + echo "$(pwd)/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH - name: Build SDK run: | python3.9 -m venv pyenv @@ -87,9 +87,9 @@ jobs: run: brew install pandoc cmake dtc ninja qemu libxml2 python@3.9 coreutils texlive - name: Install AArch64 GCC toolchain run: | - wget -O aarch64-toolchain.tar.gz https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf.tar.xz?rev=51c39c753f8c4a54875b7c5dccfb84ef&hash=DB5BC5D16E3FE6AB60E8F51B97CE5777 + wget -O aarch64-toolchain.tar.gz https://sel4-toolchains.s3.us-east-2.amazonaws.com/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf.tar.xz%3Frev%3D09b11f159fc24fdda01e05bb32695dd5%26hash%3D6AAF4239F28AE17389AB3E611DFFE0A6 tar xf aarch64-toolchain.tar.gz - echo "$(pwd)/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH + echo "$(pwd)/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH - name: Build SDK run: | python3.9 -m venv pyenv From fb2c3e4da6185ef2be9f5f4d55dbf258f9f7cee6 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Mon, 29 Jan 2024 18:44:26 +1100 Subject: [PATCH 6/7] Update pyoxidizer dependency This patch updates the pyoxidizer dependency to the latest current version. The main motivation for this is that it fixes an issue with cross-compiling from x86-64 macOS to AArch64 macOS. Signed-off-by: Ivan Velickovic --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6599107cf..4ae83ebfe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -pyoxidizer==0.17.0 +pyoxidizer==0.24.0 mypy==0.910 black==21.7b0 flake8==3.9.2 From c1d9232be04ff4327c4603c6008b9acf8e1ace42 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Tue, 13 Feb 2024 20:08:02 +1100 Subject: [PATCH 7/7] Update README for macOS support Signed-off-by: Ivan Velickovic --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7542aa330..11fca0699 100644 --- a/README.md +++ b/README.md @@ -62,13 +62,18 @@ At this point in time this is not fully realised, however it is a high priority The ARM toolchain is available from: -https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/10-2-2020-11 +https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads. -The specific version used for development is the x86_64-aarch64-none-elf version: +Development is done with the aarch64-none-elf- toolchain. -https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz?revision=79f65c42-1a1b-43f2-acb7-a795c8427085&hash=61BBFB526E785D234C5D8718D9BA8E61 +On Linux x86-64 the following version is used: +https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf.tar.xz?rev=28d5199f6db34e5980aae1062e5a6703&hash=F6F5604BC1A2BBAAEAC4F6E98D8DC35B -Note: There are no plans to support development of Microkit on any platforms other than Linux x86_64. +On macOS Apple Silicon/AArch64 the following version is used: +https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-darwin-arm64-aarch64-none-elf.tar.xz?rev=c5523a33dc7e49278f2a943a6a9822c4&hash=6DC6989BB1E6A9C7F8CBFEAA84842FA1 + +On macOS Intel/x86-64 the following version is used: +https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf.tar.xz?rev=09b11f159fc24fdda01e05bb32695dd5&hash=6AAF4239F28AE17389AB3E611DFFE0A6 ## seL4 Version