@@ -400,27 +400,33 @@ define define_module =
400
400
# module-specific cleanup action to get rid of it.
401
401
$(build ) /$($1_base_dir ) /.canary: FORCE
402
402
if [ ! -e "$$@ " ]; then \
403
+ echo "INFO: .canary file not found. Cloning repository $($1_repo ) into $(build ) /$($1_base_dir ) "; \
403
404
git clone $($1_repo ) "$(build ) /$($1_base_dir ) "; \
405
+ echo "INFO: Resetting repository to commit $($1_commit_hash ) "; \
404
406
git -C "$(build ) /$($1_base_dir ) " reset --hard $($1_commit_hash ) ; \
407
+ echo "INFO: Creating .canary file with repo and commit hash"; \
405
408
echo -n '$($1_repo ) |$($1_commit_hash ) ' > "$$@ "; \
406
409
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 ) "; \
408
411
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)"; \
410
413
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)"; \
414
417
git -C "$(build ) /$($1_base_dir ) " clean -df && \
415
418
git -C "$(build ) /$($1_base_dir ) " clean -dffx payloads util/cbmem && \
416
- echo "git submodule sync" && \
419
+ echo "INFO: Synchronizing submodules"; \
417
420
git -C "$(build ) /$($1_base_dir ) " submodule sync && \
418
- echo "git submodule update" && \
421
+ echo "INFO: Updating submodules (init and checkout)"; \
419
422
git -C "$(build ) /$($1_base_dir ) " submodule update --init --checkout && \
423
+ echo "INFO: Updating .canary file with new repo info"; \
420
424
echo -n '$($1_repo ) |$($1_commit_hash ) ' > "$$@ "; \
421
425
fi
422
426
if [ ! -e "$(build ) /$($1_base_dir ) /.patched" ]; then \
427
+ echo "INFO: .patched file not found. Beginning patch application for $1"; \
423
428
if [ -r patches/$($1_patch_name ) .patch ]; then \
429
+ echo "INFO: Found patch file patches/$($1_patch_name ) .patch. Applying patch..."; \
424
430
( git apply --verbose --reject --binary --directory build/$(CONFIG_TARGET_ARCH ) /$($1_base_dir ) ) \
425
431
< patches/$($1_patch_name ) .patch \
426
432
|| exit 1 ; \
@@ -434,6 +440,7 @@ define define_module =
434
440
|| exit 1 ; \
435
441
done ; \
436
442
fi && \
443
+ echo "INFO: Patches applied successfully. Creating .patched file"; \
437
444
touch "$(build ) /$($1_base_dir ) /.patched"; \
438
445
fi
439
446
else
0 commit comments