Avoid toolchain download when it is preinstalled
PATCH 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 | 2 ++ 1 file changed, 2 insertions(+)
toolchain/toolchain-external/toolchain-external.mk +2 -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,7 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
Signature · 1 line
1.7.10.4
PATCH 1/1 Avoid toolchain download when it is preinstalled
Hi Laurent,
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 | 2 ++ 1 file changed, 2 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 354
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +1
-0@@ -347,6 +348,7 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
Can you be a bit more specific about the configuration you see this problem with?
Although I can confirm that there is an attempted download when you configure a pre-installed codesourcery toolchain, I can't fix the problem completely with your patch:
$ make toolchain
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
toolchain undefined Extracting
toolchain undefined Patching toolchain//toolchain
toolchain-external undefined Downloading
/toolchain-external-undefined.tar.gz: Scheme missing. --2013-11-06 15:33:31--
http://sources.buildroot.net//toolchain-external-undefined.tar.gz
Thanks,
Thomas
PATCH 1/1 Avoid toolchain download when it is preinstalled
Quoted 39 lines · Thomas De Schampheleire
Hi Laurent,
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 | 2 ++ 1 file changed, 2 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.bz2toolchain/toolchain-external/toolchain-external.mk else · line 354
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +1
-0@@ -347,6 +348,7 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YESCan you be a bit more specific about the configuration you see this problem with?
Although I can confirm that there is an attempted download when you configure a pre-installed codesourcery toolchain, I can't fix the problem completely with your patch:
Quoted 8 lines
$ make toolchainQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
toolchain undefined Extracting
toolchain undefined Patching toolchain//toolchain
toolchain-external undefined Downloading/toolchain-external-undefined.tar.gz: Scheme missing. --2013-11-06 15:33:31--
http://sources.buildroot.net//toolchain-external-undefined.tar.gz
You're right, the commit message stats that variables must be empty, but my patch does not define them at all. I have probably been fooled by a dirty configuration in my testing sandbox. I will resubmit ASAP.
PATCH 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 | 2 ++ 1 file changed, 2 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 354
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +1
-0@@ -347,6 +348,7 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
I think the right fix would be something like:
ifeq ($(...codesourcery..),y)
...
else ifeq ($(...some other toolchain),y)
....
- else
+ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
# Custom toolchainTOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
- endif
+ elseTOOLCHAIN_EXTERNAL_SOURCE =
endif
So that TOOLCHAIN_EXTERNAL_SOURCE is empty when the external toolchain is locally installed. Having an empty <pkg>_SOURCE is what tells the package infrastructure to not download the thing.
Of course, approach above completely untested.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 Avoid toolchain download when it is preinstalled
Quoted 49 lines · Thomas Petazzoni
Dear 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 | 2 ++ 1 file changed, 2 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.bz2toolchain/toolchain-external/toolchain-external.mk else · line 354
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +1
-0@@ -347,6 +348,7 @@ else TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) endif +endif TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YESI think the right fix would be something like:
ifeq ($(...codesourcery..),y)
...
else ifeq ($(...some other toolchain),y)
....
- else
+ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
# Custom toolchainTOOLCHAIN_EXTERNAL_SITE= $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))TOOLCHAIN_EXTERNAL_SOURCE= $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
- endif
+ elseTOOLCHAIN_EXTERNAL_SOURCE=
endif
Quoted 4 lines
So that
TOOLCHAIN_EXTERNAL_SOURCEis empty when the external toolchain is locally installed. Having an empty <pkg>_SOURCE is what tells the package infrastructure to not download the thing.
I am afraid this won't work, because I really want to choose some 'codesourcery' toolchain *and* avoid download. Preinstalled toolchain has larger scope than custom toolchain. By the way my patch had another issue, that i will fix and resubmit soon.
PATCH 1/1 Avoid toolchain download when it is preinstalled
Dear Laurent GONZALEZ,
(Please fix your e-mail client to wrap lines at around 80 columns, except of course when you send patches!).
Quoted 7 lines · Laurent GONZALEZ
Quoted 4 lines
So that
TOOLCHAIN_EXTERNAL_SOURCEis empty when the external toolchain is locally installed. Having an empty <pkg>_SOURCE is what tells the package infrastructure to not download the thing.I am afraid this won't work, because I really want to choose some 'codesourcery' toolchain *and* avoid download. Preinstalled toolchain has larger scope than custom toolchain. By the way my patch had another issue, that i will fix and resubmit soon.
Aaah, yes, indeed. In this case, I think I'd prefer to have something like:
ifeq ($(codesourcery...),y)
...
else ifeq ($(someothertoolchain...),y)
...
else
... custom toolchain origin
endif
# In fact, we don't need to download the toolchain, since it is already
# available on the system, so force the site and source to be empty so # that nothing will be downloaded/extracted. ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y) TOOLCHAIN_EXTERNAL_SITE = TOOLCHAIN_EXTERNAL_SOURCE = endif
It's just that I find the big enclosing ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) condition a little bit difficult to follow.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com