Skip to content

Commit

Permalink
kbuild: fix spurious initramfs rebuild
Browse files Browse the repository at this point in the history
When gen_initramfs_list is used to generate make dependencies, it
includes symbolic links, for which make tracks the link target. Any
change to that target will cause an initramfs rebuild, even if the
symlink points to something outside of the initramfs directory.

If the target happens to be /tmp, the rebuild occurs for each kernel
build, since gen_initramfs_list uses mktemp...

Proposed way to fix it is to omit symbolic links from generated
dependencies, but this has a small drawback: changing perm/owner on a
symlink will go unnoticed.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Maxime Bizon authored and Sam Ravnborg committed Apr 11, 2009
1 parent 20375bf commit 9e5ec86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/gen_initramfs_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ print_mtime() {
}

list_parse() {
echo "$1 \\"
[ ! -L "$1" ] && echo "$1 \\" || :
}

# for each file print a line in following format
Expand Down

0 comments on commit 9e5ec86

Please sign in to comment.