fix symlink install of busybox so that it happens even on parallel builds (#394)

This commit is contained in:
Trammell hudson 2018-05-02 16:13:23 -04:00
parent 3dc4672bc6
commit 17bcc68f5d
Failed to extract signature
2 changed files with 18 additions and 16 deletions

View File

@ -394,20 +394,6 @@ $(foreach m, $(modules-y), \
$(call map,initrd_lib_add,$(call libs,$m)) \
)
# hack to install busybox into the initrd if busybox is configured
ifeq "$(CONFIG_BUSYBOX)" "y"
initrd_bins += $(initrd_bin_dir)/busybox
endif
$(initrd_bin_dir)/busybox: $(build)/$(busybox_dir)/busybox
$(do,SYMLINK,$@,$(MAKE) \
-C $(build)/$(busybox_dir) \
CC="$(heads_cc)" \
CONFIG_PREFIX="$(pwd)/initrd" \
$(MAKE_JOBS) \
install \
)
#
# hack to build cbmem from coreboot
# this must be built *AFTER* musl, but since coreboot depends on other things

View File

@ -13,8 +13,24 @@ busybox_config := config/busybox.config
busybox_output := busybox
busybox_target := \
$(CROSS_TOOLS) \
CONFIG_PREFIX="$(initrd_tmp_dir)" \
$(MAKE_JOBS) \
install
# Install symlinks when the busybox program is installed
ifeq "$(CONFIG_BUSYBOX)" "y"
initrd_bins += $(initrd_bin_dir)/busybox
endif
$(initrd_tmp_dir)/bin/busybox: $(build)/$(busybox_dir)/.build
$(call do,SYMLINK,bin/busybox,\
$(MAKE) \
-C $(build)/$(busybox_dir) \
CC="$(heads_cc)" \
CONFIG_PREFIX="$(initrd_bin_dir)/.." \
install \
| tee -a $(build)/log/busybox.log \
$(VERBOSE_REDIRECT) \
)
busybox_depends := $(musl_dep)