diff options
Diffstat (limited to 'boot/barebox/barebox.mk')
-rw-r--r-- | boot/barebox/barebox.mk | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk index 422f27312d..8f02f9f9e1 100644 --- a/boot/barebox/barebox.mk +++ b/boot/barebox/barebox.mk @@ -28,7 +28,7 @@ $(1)_SITE_METHOD = git # Override the default value of _SOURCE to 'barebox-*' so that it is not # downloaded a second time for barebox-aux; also alows avoiding the hash # check: -$(1)_SOURCE = barebox-$$($(1)_VERSION).tar.gz +$(1)_SOURCE = barebox-$$($(1)_VERSION)$$(BR_FMT_VERSION_git).tar.gz else # Handle stable official Barebox versions $(1)_SOURCE = barebox-$$($(1)_VERSION).tar.bz2 @@ -88,13 +88,6 @@ $(1)_KCONFIG_DEPENDENCIES = \ $(BR2_BISON_HOST_DEPENDENCY) \ $(BR2_FLEX_HOST_DEPENDENCY) -ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) -define $(1)_BUILD_BAREBOXENV_CMDS - $$(TARGET_CC) $$(TARGET_CFLAGS) $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ - $$(@D)/scripts/bareboxenv.c -endef -endif - ifeq ($$(BR2_TARGET_$(1)_CUSTOM_ENV),y) $(1)_ENV_NAME = $$(notdir $$(call qstrip,\ $$(BR2_TARGET_$(1)_CUSTOM_ENV_PATH))) @@ -109,12 +102,23 @@ endef endif ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),) -define $(1)_KCONFIG_FIXUP_CMDS +define $(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH $$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT) $$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)") endef endif +define $(1)_KCONFIG_FIXUP_BAREBOXENV + $$(if $$(BR2_TARGET_$(1)_BAREBOXENV),\ + $$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET),\ + $$(call KCONFIG_DISABLE_OPT,CONFIG_BAREBOXENV_TARGET)) +endef + +define $(1)_KCONFIG_FIXUP_CMDS + $$($(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH) + $$($(1)_KCONFIG_FIXUP_BAREBOXENV) +endef + define $(1)_BUILD_CMDS $$($(1)_BUILD_BAREBOXENV_CMDS) $$(TARGET_MAKE_ENV) $$(MAKE) $$($(1)_MAKE_FLAGS) -C $$(@D) @@ -134,9 +138,14 @@ define $(1)_INSTALL_IMAGES_CMDS $$($(1)_INSTALL_CUSTOM_ENV) endef +# Starting with barebox v2020.09.0, the kconfig used calls the +# cross-compiler to check its capabilities. So we need the +# toolchain before we can call the configurators. +$(1)_KCONFIG_DEPENDENCIES += toolchain + ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) define $(1)_INSTALL_TARGET_CMDS - cp $$(@D)/bareboxenv $$(TARGET_DIR)/usr/bin + cp $$(@D)/scripts/bareboxenv-target $$(TARGET_DIR)/usr/bin/bareboxenv endef endif |