Skip to content

Commit

Permalink
utils/add-custom-hashes: symlink linux-headers to linux
Browse files Browse the repository at this point in the history
Most boards use BR2_KERNEL_HEADERS_AS_KERNEL with their custom kernels.
So when creating their custom hash files, the linux-headers.hash is the
same as linux.hash. In this case we symlink linux-headers to linux to
make maintenance easier. Update the add-custom-hashes tool to explicitly
handle this case.

Signed-off-by: Brandon Maier <[email protected]>
[Peter: use cmp -s]
Signed-off-by: Peter Korsgaard <[email protected]>
  • Loading branch information
blmaier authored and jacmet committed May 29, 2024
1 parent 47da55f commit d506e23
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils/add-custom-hashes
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ for file in $BR_NO_CHECK_HASH_FOR; do
done
done

# Symlink linux-headers to linux if identical
linux_hash="$BR2_GLOBAL_PATCH_DIR/linux/linux.hash"
linux_headers_hash="$BR2_GLOBAL_PATCH_DIR/linux-headers/linux-headers.hash"
if [ -e "$linux_hash" ] && [ -e "$linux_headers_hash" ] \
&& cmp -s "$linux_hash" "$linux_headers_hash"; then
ln -sf ../linux/linux.hash "$linux_headers_hash"
fi

message Verifying hashes

make clean
Expand Down

0 comments on commit d506e23

Please sign in to comment.