mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
ensure that Linux kernel is updated after a build and that busybox is not spuriously rebuilt (#397)
This commit is contained in:
parent
3d6eeb6a95
commit
0b644b1e19
5
Makefile
5
Makefile
@ -179,10 +179,9 @@ endef
|
||||
define do-copy =
|
||||
$(call do,INSTALL ,$1 => $2',\
|
||||
if ! cmp --quiet "$1" "$2" ; then \
|
||||
cp -a "$1" "$2"; \
|
||||
else \
|
||||
echo "$(DATE) UNCHANGED $(1:$(pwd)/%=%)" ; \
|
||||
fi
|
||||
cp -a "$1" "$2"; \
|
||||
)
|
||||
@sha256sum "$(2:$(pwd)/%=%)"
|
||||
endef
|
||||
@ -294,7 +293,7 @@ define define_module =
|
||||
|
||||
# Target for all of the outputs, which depend on their dependent modules
|
||||
# being built, as well as this module being configured
|
||||
$(call outputs,$1): $(build)/$($1_dir)/.build
|
||||
$(build)/$($1_dir)/.build: $(call outputs,$1)
|
||||
|
||||
# If any of the outputs are missing, we should force a rebuild
|
||||
# of the entire module
|
||||
|
@ -31,6 +31,7 @@ $(initrd_tmp_dir)/bin/busybox: $(build)/$(busybox_dir)/.build
|
||||
| tee -a $(build)/log/busybox.log \
|
||||
$(VERBOSE_REDIRECT) \
|
||||
)
|
||||
@touch $< # ensure that our build file is still newer
|
||||
|
||||
|
||||
busybox_depends := $(musl_dep)
|
||||
|
@ -114,7 +114,7 @@ FOO := $(shell mkdir -p "$(module_initrd_lib_dir)")
|
||||
define linux_module =
|
||||
|
||||
# Each module depends on building the Linux kernel
|
||||
$(build)/$(linux_dir)/$1: $(build)/$(BOARD)/bzImage
|
||||
$(build)/$(linux_dir)/$1: $(build)/$(linux_dir)/$(linux_output)
|
||||
|
||||
# The cpio file will depend on every module
|
||||
$(build)/$(BOARD)/modules.cpio: $(module_initrd_lib_dir)/$(notdir $1)
|
||||
@ -141,8 +141,9 @@ $(build)/$(BOARD)/modules.cpio: $(build)/$(linux_dir)/.build
|
||||
# The output of the linux.intermediate is the bzImage in the
|
||||
# linus build directory. We need to copy it into our board
|
||||
# specific directory for ease of locating it later.
|
||||
$(build)/$(BOARD)/bzImage: $(build)/$(linux_dir)/arch/x86/boot/bzImage
|
||||
$(call do-copy,$<,$@)
|
||||
$(build)/$(BOARD)/bzImage: $(build)/$(linux_dir)/.build
|
||||
$(call do-copy,$(dir $<)/$(linux_output),$@)
|
||||
@touch $@ # force a timestamp update
|
||||
|
||||
|
||||
# menuconfig target allows us to easily reconfigure this Linux kernel
|
||||
|
Loading…
Reference in New Issue
Block a user