Skip to content

Commit 29e7afa

Browse files
authored
Arm backend: Fix Corstone-300 linker script patch (#8457)
Fix path of patch code of the corstone-300 linker script and auto create the ethos_u folder from from cmake Signed-off-by: Zingo Andersen <[email protected]>
1 parent 6d3bf82 commit 29e7afa

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

backends/arm/scripts/utils.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ function verify_md5() {
3030

3131
function patch_repo() {
3232
# Patch git repo found in $repo_dir, starting from patch $base_rev and applying patches found in $patch_dir/$name.
33-
33+
3434
# Arg 1: Directory of repo to patch
3535
# Arg 2: Rev to start patching at
3636
# Arg 3: Directory 'setup-dir' containing patches in 'setup-dir/$name'
3737
# Exits with return code 1 if the number of arguments is incorrect.
38-
# Does not do any error handling if the base_rev or patch_dir is not found etc.
38+
# Does not do any error handling if the base_rev or patch_dir is not found etc.
3939

4040
[[ $# -ne 3 ]] \
4141
&& { echo "[${FUNCNAME[0]}] Invalid number of args, expecting 3, but got $#"; exit 1; }
@@ -45,7 +45,7 @@ function patch_repo() {
4545
local name="$(basename $repo_dir)"
4646
local patch_dir="${3}/$name"
4747

48-
echo -e "[${FUNCNAME[0]}] Patching ${name}..."
48+
echo -e "[${FUNCNAME[0]}] Patching ${name} repo_dir:${repo_dir} base_rev:${base_rev} patch_dir:${patch_dir}"
4949
cd $repo_dir
5050
git fetch
5151
git reset --hard ${base_rev}

examples/arm/executor_runner/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ set(PYTHON_EXECUTABLE
4545
)
4646

4747
# Download ethos_u dependency if needed.
48+
file(MAKE_DIRECTORY ${ETHOS_SDK_PATH}/../ethos_u)
49+
4850
include(FetchContent)
4951
set(ethos_u_base_rev "24.08")
5052
FetchContent_Declare(
@@ -69,7 +71,7 @@ endif()
6971

7072
# Always patch the core_platform repo since this is fast enough.
7173
set(core_platform_base_rev "b728c774158248ba2cad8e78a515809e1eb9b77f")
72-
set(patch_dir "examples/arm/ethos-u-setup")
74+
set(patch_dir "${ET_DIR_PATH}/examples/arm/ethos-u-setup")
7375
execute_process(COMMAND bash -c "pwd && source backends/arm/scripts/utils.sh && patch_repo ${ETHOS_SDK_PATH}/core_platform ${core_platform_base_rev} ${patch_dir}"
7476
WORKING_DIRECTORY ${ET_DIR_PATH}
7577
COMMAND_ECHO STDOUT

0 commit comments

Comments
 (0)