Avoid toolchain download when it is preinstalled
PATCH v2 1/1 Avoid toolchain download when it is preinstalled
For configurations using a toolchain that is preinstalled on the host, <pkg>_SITE and <pkg>_SOURCE variables must be kept empty to avoid downloading any toolchain package.
--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)
toolchain/toolchain-external/toolchain-external.mk +5 -0
@@ -236,6 +236,7 @@ define TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK ln -sf . $(TARGET_DIR)/usr/lib/arm-linux-gnueabihf endef +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/ TOOLCHAIN_EXTERNAL_SOURCE = arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
@@ -347,6 +348,10 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +else +TOOLCHAIN_EXTERNAL_SITE = +TOOLCHAIN_EXTERNAL_SOURCE = +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
Signature · 1 line
1.7.10.4
PATCH v2 1/1 Avoid toolchain download when it is preinstalled
Quoted 22 lines · Laurent GONZALEZ
For configurations using a toolchain that is preinstalled on the host, <pkg>_SITE and <pkg>_SOURCE variables must be kept empty to avoid downloading any toolchain package.
Signed-off-by GONZALEZ Laurent <[email protected]>--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)toolchain/toolchain-external/toolchain-external.mk +1
-0@@ -236,6 +236,7 @@ define TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK ln -sf . $(TARGET_DIR)/usr/lib/arm-linux-gnueabihf endef +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/ TOOLCHAIN_EXTERNAL_SOURCE = arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
toolchain/toolchain-external/toolchain-external.mk else · line 357
Quoted 10 lines
toolchain/toolchain-external/toolchain-external.mk +4
-0@@ -347,6 +348,10 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +else +TOOLCHAIN_EXTERNAL_SITE = +TOOLCHAIN_EXTERNAL_SOURCE = +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
PATCH v2 1/1 Avoid toolchain download when it is preinstalled
In reply to Laurent GONZALEZDear Laurent GONZALEZ,
Quoted 22 lines · Laurent GONZALEZ
For configurations using a toolchain that is preinstalled on the host, <pkg>_SITE and <pkg>_SOURCE variables must be kept empty to avoid downloading any toolchain package.
Signed-off-by GONZALEZ Laurent <[email protected]>--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)toolchain/toolchain-external/toolchain-external.mk +1
-0@@ -236,6 +236,7 @@ define TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK ln -sf . $(TARGET_DIR)/usr/lib/arm-linux-gnueabihf endef +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/ TOOLCHAIN_EXTERNAL_SOURCE = arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
toolchain/toolchain-external/toolchain-external.mk else · line 356
Quoted 9 lines
toolchain/toolchain-external/toolchain-external.mk +4
-0@@ -347,6 +348,10 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +else +TOOLCHAIN_EXTERNAL_SITE = +TOOLCHAIN_EXTERNAL_SOURCE = +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
As I suggested, I don't think enclosing all of the toolchain profiles in ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) is useful.
See my reply to your previous version.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 Avoid toolchain download when it is preinstalled
Quoted 33 lines · Thomas Petazzoni
Dear Laurent GONZALEZ,
Quoted 30 lines · Laurent GONZALEZ
For configurations using a toolchain that is preinstalled on the host, <pkg>_SITE and <pkg>_SOURCE variables must be kept empty to avoid downloading any toolchain package.
Signed-off-by GONZALEZ Laurent <[email protected]>--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)toolchain/toolchain-external/toolchain-external.mk +5
-0@@ -236,6 +236,7 @@ define TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK ln -sf . $(TARGET_DIR)/usr/lib/arm-linux-gnueabihf endef +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/ TOOLCHAIN_EXTERNAL_SOURCE = arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2@@ -347,6 +348,10 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +else +TOOLCHAIN_EXTERNAL_SITE = +TOOLCHAIN_EXTERNAL_SOURCE = +endif
Quoted 5 lines
toolchain/toolchain-external/toolchain-external.mk else · line 356
Quoted 1 line
toolchain/toolchain-external/toolchain-external.mk +0
-0TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YESAs I suggested, I don't think enclosing all of the toolchain profiles in ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) is useful.
IHMO, it is useful.
Consider a configuration, where a have a CS toolchain already installed somewhere on my host, I want to use it, but I want to avoid an extra download.
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305=y
# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201203 is not set # BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109 is not set # BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 is not set # BR2_TOOLCHAIN_EXTERNAL_CUSTOM is not set
# BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD is not set BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED=y BR2_TOOLCHAIN_EXTERNAL_PATH="/path/to/toolchain/usr" BR2_TOOLCHAIN_EXTERNAL_PREFIX="arm-none-linux-gnueabi"
That's why the global enclosing is required. Generally it does not look to be a bad idea to prevent download when BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD is not set !