Skip to content

Commit eaebd8d

Browse files
committed
Makefile: add console tracing output on coreboot git repo logic ("INFO: ")
Signed-off-by: Thierry Laurion <[email protected]>
1 parent fe4b5e6 commit eaebd8d

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

Makefile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,27 +400,33 @@ define define_module =
400400
# module-specific cleanup action to get rid of it.
401401
$(build)/$($1_base_dir)/.canary: FORCE
402402
if [ ! -e "$$@" ]; then \
403+
echo "INFO: .canary file not found. Cloning repository $($1_repo) into $(build)/$($1_base_dir)"; \
403404
git clone $($1_repo) "$(build)/$($1_base_dir)"; \
405+
echo "INFO: Resetting repository to commit $($1_commit_hash)"; \
404406
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash); \
407+
echo "INFO: Creating .canary file with repo and commit hash"; \
405408
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \
406409
elif [ "$$$$(cat "$$@")" != '$($1_repo)|$($1_commit_hash)' ]; then \
407-
echo "Switching $1 to $($1_repo) at $($1_commit_hash)" && \
410+
echo "INFO: Canary file differs. Switching $1 to $($1_repo) at $($1_commit_hash)"; \
408411
git -C "$(build)/$($1_base_dir)" reset --hard HEAD^ && \
409-
echo "git fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no" && \
412+
echo "INFO: Fetching commit $($1_commit_hash) from $($1_repo) (without recursing submodules)"; \
410413
git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no && \
411-
echo "git reset --hard $($1_commit_hash)" && \
412-
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash) && \
413-
echo "git clean" && \
414+
echo "INFO: Resetting repository to commit $($1_commit_hash)"; \
415+
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash); \
416+
echo "INFO: Cleaning repository directory (including payloads and util/cbmem)"; \
414417
git -C "$(build)/$($1_base_dir)" clean -df && \
415418
git -C "$(build)/$($1_base_dir)" clean -dffx payloads util/cbmem && \
416-
echo "git submodule sync" && \
419+
echo "INFO: Synchronizing submodules"; \
417420
git -C "$(build)/$($1_base_dir)" submodule sync && \
418-
echo "git submodule update" && \
421+
echo "INFO: Updating submodules (init and checkout)"; \
419422
git -C "$(build)/$($1_base_dir)" submodule update --init --checkout && \
423+
echo "INFO: Updating .canary file with new repo info"; \
420424
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \
421425
fi
422426
if [ ! -e "$(build)/$($1_base_dir)/.patched" ]; then \
427+
echo "INFO: .patched file not found. Beginning patch application for $1"; \
423428
if [ -r patches/$($1_patch_name).patch ]; then \
429+
echo "INFO: Found patch file patches/$($1_patch_name).patch. Applying patch..."; \
424430
( git apply --verbose --reject --binary --directory build/$(CONFIG_TARGET_ARCH)/$($1_base_dir) ) \
425431
< patches/$($1_patch_name).patch \
426432
|| exit 1 ; \
@@ -434,6 +440,7 @@ define define_module =
434440
|| exit 1 ; \
435441
done ; \
436442
fi && \
443+
echo "INFO: Patches applied successfully. Creating .patched file"; \
437444
touch "$(build)/$($1_base_dir)/.patched"; \
438445
fi
439446
else

0 commit comments

Comments
 (0)