This is an automated email from the ASF dual-hosted git repository.

ivila pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git


The following commit(s) were added to refs/heads/main by this push:
     new 6379136  ci: Add test qemu image builder
6379136 is described below

commit 63791367dc150194609e958fc40da601e595456d
Author: ivila <[email protected]>
AuthorDate: Thu Apr 17 17:18:33 2025 +0800

    ci: Add test qemu image builder
    
    * ci: introduce a pipeline job to automate QEMU image generation.
    * doc: update `expanding-ta-secure-memory-on-qemuv8`.
    
    Signed-off-by: Zehui Chen <[email protected]>
    Acked-by: Yuan Zhuang <[email protected]>
---
 .github/workflows/build_test_qemu_image.yml        |  55 ++++++++++
 .github/workflows/reuse_build_test_qemu_image.yml  | 112 +++++++++++++++++++++
 .patches/test_qemu/README.md                       |  41 ++++++++
 .../test_qemu/arm-atf_expand_secure_memory.patch   |  30 ++++++
 .../test_qemu/optee-build_disable_wd_test.patch    |  29 ++++++
 .patches/test_qemu/optee-build_expand_memory.patch |  29 ++++++
 .patches/test_qemu/optee-build_ipv6_support.patch  |  26 +++++
 .../test_qemu/qemu-qemu_expand_secure_memory.patch |  30 ++++++
 Dockerfile                                         |  60 +----------
 docs/expanding-ta-secure-memory-on-qemuv8.md       |  75 +-------------
 Dockerfile => setup_optee_dependencies.sh          |   9 +-
 11 files changed, 360 insertions(+), 136 deletions(-)

diff --git a/.github/workflows/build_test_qemu_image.yml 
b/.github/workflows/build_test_qemu_image.yml
new file mode 100644
index 0000000..d67febc
--- /dev/null
+++ b/.github/workflows/build_test_qemu_image.yml
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This action provides a standardized and reproducible way to build QEMU images
+# for future use.
+#
+# It's particularly valuable for maintainers to regenerate images and keep them
+# synchronized with OP-TEE changes.
+
+name: Build Test Qemu Image
+
+on: [workflow_dispatch]
+
+defaults:
+  run:
+    shell: bash
+
+jobs:
+  amd64-ubuntu24-expand-ta-memory:
+    uses: ./.github/workflows/reuse_build_test_qemu_image.yml
+    with:
+      runs-on: ubuntu-latest
+      expand-memory: true
+
+  amd64-ubuntu24:
+    uses: ./.github/workflows/reuse_build_test_qemu_image.yml
+    with:
+      runs-on: ubuntu-latest
+      expand-memory: false
+
+  arm64-ubuntu24-expand-ta-memory:
+    uses: ./.github/workflows/reuse_build_test_qemu_image.yml
+    with:
+      runs-on: ubuntu-24.04-arm
+      expand-memory: true
+
+  arm64-ubuntu24:
+    uses: ./.github/workflows/reuse_build_test_qemu_image.yml
+    with:
+      runs-on: ubuntu-24.04-arm
+      expand-memory: false
diff --git a/.github/workflows/reuse_build_test_qemu_image.yml 
b/.github/workflows/reuse_build_test_qemu_image.yml
new file mode 100644
index 0000000..57d115f
--- /dev/null
+++ b/.github/workflows/reuse_build_test_qemu_image.yml
@@ -0,0 +1,112 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+on:
+  workflow_call:
+    inputs:
+      runs-on:
+        required: true
+        type: string
+      expand-memory:
+        required: true
+        type: boolean
+        default: false
+
+defaults:
+  run:
+    shell: bash
+
+env:
+  QEMUV8_BUILD_FOLDER: /tmp/qemuv8
+
+jobs:
+  build:
+    runs-on: ${{ inputs.runs-on }}
+    container: ubuntu:24.04
+    steps:
+      - name: Restore build cache
+        uses: actions/cache@v4
+        with:
+          path: |
+            ~/.cache/ccache
+            # cache build tool cache, helpful on arm64 host
+            ${{ env.QEMUV8_BUILD_FOLDER }}/out-aarch64-sdk
+            ${{ env.QEMUV8_BUILD_FOLDER }}/toolchains
+          key: builds-cache-${{ runner.arch }}${{ inputs.expand-memory && 
'-expand-ta-memory' || ''}}-${{ github.sha }}
+          restore-keys: |
+            builds-cache-${{ runner.arch }}
+
+      - name: Checkout repository
+        uses: actions/checkout@v4
+
+      - name: Get Output Name
+        id: output_name
+        run: echo "name=$(uname -m)-optee-qemuv8-ubuntu-24.04${{ 
inputs.expand-memory && '-expand-ta-memory' || ''}}" > $GITHUB_OUTPUT
+
+      - name: Install OP-TEE dependencies
+        run: |
+          ./setup_optee_dependencies.sh
+          
+      - name: Checkout OP-TEE repository
+        run: |
+          mkdir -p ${{ env.QEMUV8_BUILD_FOLDER }} && 
+          cd ${{ env.QEMUV8_BUILD_FOLDER }} &&
+          repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml &&
+          repo sync -j4 --no-clone-bundle
+
+      - name: Apply patches for Disabling WatchDog Test
+        run: |
+          (cd ${{ env.QEMUV8_BUILD_FOLDER }}/build && git apply 
$GITHUB_WORKSPACE/.patches/test_qemu/optee-build_disable_wd_test.patch)
+
+      - name: Apply patches for IPV6 support
+        run: |
+          (cd ${{ env.QEMUV8_BUILD_FOLDER }}/build && git apply 
$GITHUB_WORKSPACE/.patches/test_qemu/optee-build_ipv6_support.patch)
+
+      - name: Apply patches to expand memory
+        if: ${{ inputs.expand-memory == true }}
+        run: |
+          (cd ${{ env.QEMUV8_BUILD_FOLDER }}/build && git apply 
$GITHUB_WORKSPACE/.patches/test_qemu/optee-build_expand_memory.patch)
+          (cd ${{ env.QEMUV8_BUILD_FOLDER }}/qemu && git apply 
$GITHUB_WORKSPACE/.patches/test_qemu/qemu-qemu_expand_secure_memory.patch)
+          (cd ${{ env.QEMUV8_BUILD_FOLDER }}/trusted-firmware-a && git apply 
$GITHUB_WORKSPACE/.patches/test_qemu/arm-atf_expand_secure_memory.patch)
+
+      # cd to the output folder first to avoid extra path in the tar file.
+      - name: Build And Pack
+        env:
+          OUTPUT_NAME: ${{ steps.output_name.outputs.name }}
+          OUTPUT_FOLDER: /tmp/${{ steps.output_name.outputs.name }}
+        run: |
+          cd ${{ env.QEMUV8_BUILD_FOLDER }} &&
+          cd build &&
+          make toolchains -j$(nproc) &&
+          make all -j$(nproc) &&
+
+          mkdir -p ${{ env.OUTPUT_FOLDER }} &&
+          cp ${{ env.QEMUV8_BUILD_FOLDER }}/out/bin/* ${{ env.OUTPUT_FOLDER }} 
&&
+          cp ${{ env.QEMUV8_BUILD_FOLDER }}/qemu/build/qemu-system-aarch64 ${{ 
env.OUTPUT_FOLDER }} &&
+
+          mkdir -p $GITHUB_WORKSPACE/out &&
+          cd ${{ env.OUTPUT_FOLDER }} &&
+          cd .. &&
+          tar -czvf $GITHUB_WORKSPACE/out/${{ env.OUTPUT_NAME }}.tar.gz ${{ 
env.OUTPUT_NAME }}
+
+      - name: Upload
+        uses: actions/upload-artifact@v4
+        with:
+          name: ${{ steps.output_name.outputs.name }}
+          path: |
+            out/*
+          if-no-files-found: error
diff --git a/.patches/test_qemu/README.md b/.patches/test_qemu/README.md
new file mode 100644
index 0000000..8a49e93
--- /dev/null
+++ b/.patches/test_qemu/README.md
@@ -0,0 +1,41 @@
+# Patches to Customize Our Test QEMU Image
+
+This folder contains patch files used to build our custom QEMU test image.
+
+## Patches for disabling watch dog test
+
+The watchdog test significantly impacts OP-TEE OS and tee-supplicant
+initialization performance, particularly on AMD64 hosts. Disabling it can
+improve boot time and runtime efficiency.
+
+Relevant Patch File:
+
+1. optee-build_disable_wd_test.patch: Updates build configurations to disable
+    the watch dog test.
+
+## Patches for IPV6 Support
+
+The official QEMUv8 configuration in OP-TEE does not currently support IPv6,
+which is required for our IPv6 tests.
+
+We temporarily use a patch to enable IPv6 support.
+This patch can be removed once Issue 
[#174](https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/174)
+is resolved.
+
+Relevant Patch File:
+
+1. optee-build_ipv6_support.patch: Enables IPv6 support in the Linux kernel.
+
+## Patches for Expand Memory
+
+Some of our tests require more Trusted Application (TA) memory than the default
+OP-TEE configuration provides.
+
+Relevant Patch File:
+
+1. qemu-qemu_expand_secure_memory.patch: Increases the size of VIRT_SECURE_MEM
+    in QEMU.
+2. arm-atf_expand_secure_memory.patch: Updates ARM Trusted Firmware definitions
+    to match the QEMU memory expansion.
+3. optee-build_expand_memory.patch: Updates build configurations to reflect the
+    expanded memory setup.
diff --git a/.patches/test_qemu/arm-atf_expand_secure_memory.patch 
b/.patches/test_qemu/arm-atf_expand_secure_memory.patch
new file mode 100644
index 0000000..d6c72d7
--- /dev/null
+++ b/.patches/test_qemu/arm-atf_expand_secure_memory.patch
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+diff --git a/plat/qemu/qemu/include/platform_def.h 
b/plat/qemu/qemu/include/platform_def.h
+index 0c85b1e..0a35ffb 100644
+--- a/plat/qemu/qemu/include/platform_def.h
++++ b/plat/qemu/qemu/include/platform_def.h
+@@ -86,7 +86,7 @@
+ #define SEC_SRAM_SIZE                 0x00100000
+ 
+ #define SEC_DRAM_BASE                 0x0e100000
+-#define SEC_DRAM_SIZE                 0x00f00000
++#define SEC_DRAM_SIZE                 0x02f00000
+ 
+ #define SECURE_GPIO_BASE              0x090b0000
+ #define SECURE_GPIO_SIZE              0x00001000
diff --git a/.patches/test_qemu/optee-build_disable_wd_test.patch 
b/.patches/test_qemu/optee-build_disable_wd_test.patch
new file mode 100644
index 0000000..769213d
--- /dev/null
+++ b/.patches/test_qemu/optee-build_disable_wd_test.patch
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+diff --git a/qemu_v8.mk b/qemu_v8.mk
+index 91370b5..c98dcb7 100644
+--- a/qemu_v8.mk
++++ b/qemu_v8.mk
+@@ -387,6 +387,7 @@ endif
+ # OP-TEE
+ 
################################################################################
+ OPTEE_OS_COMMON_FLAGS += DEBUG=$(DEBUG) CFG_ARM_GICV3=$(GICV3)
++OPTEE_OS_COMMON_FLAGS += CFG_NOTIF_TEST_WD=n
+ OPTEE_OS_COMMON_FLAGS_SPMC_AT_EL_1 = CFG_CORE_SEL1_SPMC=y
+ OPTEE_OS_COMMON_FLAGS_SPMC_AT_EL_2 = CFG_CORE_SEL2_SPMC=y
+ OPTEE_OS_COMMON_FLAGS_SPMC_AT_EL_2 += CFG_ARM_GICV3=n CFG_CORE_HAFNIUM_INTC=y
diff --git a/.patches/test_qemu/optee-build_expand_memory.patch 
b/.patches/test_qemu/optee-build_expand_memory.patch
new file mode 100644
index 0000000..c0c3305
--- /dev/null
+++ b/.patches/test_qemu/optee-build_expand_memory.patch
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+diff --git a/qemu_v8.mk b/qemu_v8.mk
+index 91370b5..cb7d6ee 100644
+--- a/qemu_v8.mk
++++ b/qemu_v8.mk
+@@ -103,6 +103,7 @@ KERNEL_ENTRY               ?= 0x42200000
+ KERNEL_LOADADDR               ?= 0x42200000
+ ROOTFS_ENTRY          ?= 0x45000000
+ ROOTFS_LOADADDR               ?= 0x45000000
++OPTEE_OS_COMMON_EXTRA_FLAGS     += CFG_TZDRAM_SIZE=0x01f00000 
CFG_PGT_CACHE_ENTRIES=32 CFG_WITH_LPAE=y CFG_CORE_PREALLOC_EL0_TBLS=y
+ 
+ ifeq ($(SPMC_AT_EL),2)
+ BL32_DEPS             ?= hafnium optee-os
diff --git a/.patches/test_qemu/optee-build_ipv6_support.patch 
b/.patches/test_qemu/optee-build_ipv6_support.patch
new file mode 100644
index 0000000..ef0b5e6
--- /dev/null
+++ b/.patches/test_qemu/optee-build_ipv6_support.patch
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+diff --git a/kconfigs/qemu.conf b/kconfigs/qemu.conf
+index f8373ee..bd1d256 100644
+--- a/kconfigs/qemu.conf
++++ b/kconfigs/qemu.conf
+@@ -15,3 +15,4 @@ CONFIG_ENCRYPTED_KEYS=y
+ CONFIG_ARM_FFA_TRANSPORT=y
+ CONFIG_TCG_TPM=y
+ CONFIG_TCG_FTPM_TEE=y
++CONFIG_IPV6=y
diff --git a/.patches/test_qemu/qemu-qemu_expand_secure_memory.patch 
b/.patches/test_qemu/qemu-qemu_expand_secure_memory.patch
new file mode 100644
index 0000000..29f8a78
--- /dev/null
+++ b/.patches/test_qemu/qemu-qemu_expand_secure_memory.patch
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+diff --git a/hw/arm/virt.c b/hw/arm/virt.c
+index 1a381e9..7062583 100644
+--- a/hw/arm/virt.c
++++ b/hw/arm/virt.c
+@@ -184,7 +184,7 @@ static const MemMapEntry base_memmap[] = {
+     [VIRT_MMIO] =               { 0x0a000000, 0x00000200 },
+     /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that size */
+     [VIRT_PLATFORM_BUS] =       { 0x0c000000, 0x02000000 },
+-    [VIRT_SECURE_MEM] =         { 0x0e000000, 0x01000000 },
++    [VIRT_SECURE_MEM] =         { 0x0e000000, 0x02000000 },
+     [VIRT_PCIE_MMIO] =          { 0x10000000, 0x2eff0000 },
+     [VIRT_PCIE_PIO] =           { 0x3eff0000, 0x00010000 },
+     [VIRT_PCIE_ECAM] =          { 0x3f000000, 0x01000000 },
diff --git a/Dockerfile b/Dockerfile
index d1ab520..edd7baa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,61 +21,5 @@ LABEL org.opencontainers.image.description "Github CI Runner"
 ENV DEBIAN_FRONTEND=noninteractive
 
 # Install dependencies for building OP-TEE
-RUN apt-get update && \
-    apt-get install -y \
-    git \
-    android-tools-adb \
-    android-tools-fastboot \
-    autoconf \
-    automake \
-    bc \
-    bison \
-    build-essential \
-    ccache \
-    cscope \
-    curl \
-    device-tree-compiler \
-    expect \
-    flex \
-    ftp-upload \
-    gdisk \
-    iasl \
-    libattr1-dev \
-    libcap-dev \
-    libfdt-dev \
-    libftdi-dev \
-    libglib2.0-dev \
-    libgmp-dev \
-    libhidapi-dev \
-    libmpc-dev \
-    libncurses5-dev \
-    libpixman-1-dev \
-    libssl-dev \
-    libtool \
-    make \
-    mtools \
-    ninja-build \
-    python3 \
-    python3-pycryptodome \
-    python3-pyelftools \
-    python3-serial \
-    python3-cryptography \
-    python3-tomli \
-    rsync \
-    repo \
-    unzip \
-    uuid-dev \
-    xdg-utils \
-    xterm \
-    xz-utils \
-    zlib1g-dev \
-    wget \
-    cpio \
-    libcap-ng-dev \
-    libslirp-dev \
-    screen \
-    libvdeplug-dev \
-    libsdl2-dev \
-    pip \
-    ca-certificates \
-    libgnutls28-dev
+COPY setup_optee_dependencies.sh /tmp/setup_optee_dependencies.sh
+RUN /tmp/setup_optee_dependencies.sh
diff --git a/docs/expanding-ta-secure-memory-on-qemuv8.md 
b/docs/expanding-ta-secure-memory-on-qemuv8.md
index 2c46a41..96acbf7 100644
--- a/docs/expanding-ta-secure-memory-on-qemuv8.md
+++ b/docs/expanding-ta-secure-memory-on-qemuv8.md
@@ -14,79 +14,8 @@ download the pre-built image from
 https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/ or patch the code
 and build the images by yourself.
 
-The modifications are:
-
-1. QEMU patch in `optee-repo/qemu`:
-
-```
-diff --git a/hw/arm/virt.c b/hw/arm/virt.c
-index d2e5ecd..e1070a0 100644
---- a/hw/arm/virt.c
-+++ b/hw/arm/virt.c
-@@ -157,7 +157,7 @@ static const MemMapEntry base_memmap[] = {
-     [VIRT_MMIO] =               { 0x0a000000, 0x00000200 },
-     /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that size */
-     [VIRT_PLATFORM_BUS] =       { 0x0c000000, 0x02000000 },
--    [VIRT_SECURE_MEM] =         { 0x0e000000, 0x01000000 },
-+    [VIRT_SECURE_MEM] =         { 0x0e000000, 0x02000000 },
-     [VIRT_PCIE_MMIO] =          { 0x10000000, 0x2eff0000 },
-     [VIRT_PCIE_PIO] =           { 0x3eff0000, 0x00010000 },
-     [VIRT_PCIE_ECAM] =          { 0x3f000000, 0x01000000 },
-```
-
-2. ATF patch in `optee-repo/trusted-firmware-a`:
-
-```
-diff --git a/plat/qemu/qemu/include/platform_def.h 
b/plat/qemu/qemu/include/platform_def.h
-index c02eff9..ded0660 100644
---- a/plat/qemu/qemu/include/platform_def.h
-+++ b/plat/qemu/qemu/include/platform_def.h
-@@ -87,7 +87,7 @@
- #define SEC_SRAM_SIZE                  0x00060000
-
- #define SEC_DRAM_BASE                  0x0e100000
--#define SEC_DRAM_SIZE                  0x00f00000
-+#define SEC_DRAM_SIZE                  0x01f00000
-
- #define SECURE_GPIO_BASE               0x090b0000
- #define SECURE_GPIO_SIZE               0x00001000
-```
-
-3. Add configurations in `optee-repo/optee_os`:
-
-```
-diff --git a/mk/config.mk b/mk/config.mk
-index f2822df..8148cc5 100644
---- a/mk/config.mk
-+++ b/mk/config.mk
-@@ -904,3 +904,7 @@ CFG_DRIVERS_TPM2_MMIO ?= n
- ifeq ($(CFG_CORE_TPM_EVENT_LOG),y)
- CFG_CORE_TCG_PROVIDER ?= $(CFG_DRIVERS_TPM2)
- endif
-+
-+# expand TA secure memory
-+CFG_TZDRAM_START = 0x0e100000
-+CFG_TZDRAM_SIZE = 0x01f00000
-```
-
-4. Patch for OP-TEE core pagetable:
-
-```
-diff --git a/core/include/mm/pgt_cache.h b/core/include/mm/pgt_cache.h
-index 0e72e17..28c58ad 100644
---- a/core/include/mm/pgt_cache.h
-+++ b/core/include/mm/pgt_cache.h
-@@ -45,9 +45,9 @@ struct pgt {
- #if CFG_NUM_THREADS < 2
- #define PGT_CACHE_SIZE 4
- #elif (CFG_NUM_THREADS == 2 && !defined(CFG_WITH_LPAE))
--#define PGT_CACHE_SIZE 8
-+#define PGT_CACHE_SIZE 32
- #else
--#define PGT_CACHE_SIZE ROUNDUP(CFG_NUM_THREADS * 2, PGT_NUM_PGT_PER_PAGE)
-+#define PGT_CACHE_SIZE 32
- #endif
-```
+For details on the modifications, please refer to the 
+[Patches](https://github.com/apache/incubator-teaclave-trustzone-sdk/.patches/test_qemu/README.md)
 
 Finally, build images:
 
diff --git a/Dockerfile b/setup_optee_dependencies.sh
old mode 100644
new mode 100755
similarity index 90%
copy from Dockerfile
copy to setup_optee_dependencies.sh
index d1ab520..ae2cda8
--- a/Dockerfile
+++ b/setup_optee_dependencies.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -15,13 +17,10 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM ubuntu:24.04
-MAINTAINER Teaclave Contributors <[email protected]>
-LABEL org.opencontainers.image.description "Github CI Runner"
-ENV DEBIAN_FRONTEND=noninteractive
+set -xe
 
 # Install dependencies for building OP-TEE
-RUN apt-get update && \
+apt-get update && \
     apt-get install -y \
     git \
     android-tools-adb \


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to