Skip to content

Arm backend: Fix Corstone-300 linker script patch #8457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backends/arm/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ function verify_md5() {

function patch_repo() {
# Patch git repo found in $repo_dir, starting from patch $base_rev and applying patches found in $patch_dir/$name.

# Arg 1: Directory of repo to patch
# Arg 2: Rev to start patching at
# Arg 3: Directory 'setup-dir' containing patches in 'setup-dir/$name'
# Exits with return code 1 if the number of arguments is incorrect.
# Does not do any error handling if the base_rev or patch_dir is not found etc.
# Does not do any error handling if the base_rev or patch_dir is not found etc.

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

echo -e "[${FUNCNAME[0]}] Patching ${name}..."
echo -e "[${FUNCNAME[0]}] Patching ${name} repo_dir:${repo_dir} base_rev:${base_rev} patch_dir:${patch_dir}"
cd $repo_dir
git fetch
git reset --hard ${base_rev}
Expand Down
4 changes: 3 additions & 1 deletion examples/arm/executor_runner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ set(PYTHON_EXECUTABLE
)

# Download ethos_u dependency if needed.
file(MAKE_DIRECTORY ${ETHOS_SDK_PATH}/../ethos_u)

include(FetchContent)
set(ethos_u_base_rev "24.08")
FetchContent_Declare(
Expand All @@ -69,7 +71,7 @@ endif()

# Always patch the core_platform repo since this is fast enough.
set(core_platform_base_rev "b728c774158248ba2cad8e78a515809e1eb9b77f")
set(patch_dir "examples/arm/ethos-u-setup")
set(patch_dir "${ET_DIR_PATH}/examples/arm/ethos-u-setup")
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}"
WORKING_DIRECTORY ${ET_DIR_PATH}
COMMAND_ECHO STDOUT
Expand Down
Loading