Message ID | 20180323214030.8003-1-ccrisan@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/1] toolchain-external-custom: allow specifying relative path to binaries | expand |
Calin, All, On 2018-03-23 23:40 +0200, Calin Crisan spake thusly: > There are cases where a downloaded toolchain doesn't have its binaries > placed directly in a "bin" subfolder (where BuildRoot currently looks > for them). > > A common example is the official Raspberry Pi Toolchain > (https://github.com/raspberrypi/tools), which has its binaries in > "arm-bcm2708/arm-linux-gnueabihf/bin". > > This commit introduces BR2_TOOLCHAIN_EXTERNAL_BIN_PATH that defaults > to "bin" and can be changed as needed. > > Signed-off-by: Calin Crisan <ccrisan@gmail.com> > --- > toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +- > .../toolchain-external-custom/Config.in.options | 8 ++++++++ > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk > index 3bf9fac412..4dfe3815ae 100644 > --- a/toolchain/toolchain-external/pkg-toolchain-external.mk > +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk > @@ -77,7 +77,7 @@ ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) > TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) > endif > else > -TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin > +TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH)) > endif > > # If this is a buildroot toolchain, it already has a wrapper which we want to > diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > index 70c7d8e3c3..bb199aab85 100644 > --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > @@ -12,6 +12,14 @@ config BR2_TOOLCHAIN_EXTERNAL_URL > help > URL of the custom toolchain tarball to download and install. > > +config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH > + string "Toolchain bin path" > + default "bin" > + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD > + help > + Path to where the binaries (e.g. the compiler) can be found, > + relative to the downloaded toolchain root directory. Indentation is incorrect: it should be a leading TAB for option, and a leading TAB and two spaces for the help text. See: https://buildroot.org/downloads/manual/manual.html#writing-rules-config-in Otherwise, looks sensible to me... Regards, Yann E. MORIN. > config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX > string "Toolchain prefix" > default "$(ARCH)-linux" > -- > 2.16.2 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
Yann, I have posted a v2 that fixes this and another issue with supported external toolchains. Please let me know if there's anything else that needs to be addressed. Thanks, Calin. On Sun, Mar 25, 2018, 11:35 Yann E. MORIN <yann.morin.1998@free.fr> wrote: > Calin, All, > > On 2018-03-23 23:40 +0200, Calin Crisan spake thusly: > > There are cases where a downloaded toolchain doesn't have its binaries > > placed directly in a "bin" subfolder (where BuildRoot currently looks > > for them). > > > > A common example is the official Raspberry Pi Toolchain > > (https://github.com/raspberrypi/tools), which has its binaries in > > "arm-bcm2708/arm-linux-gnueabihf/bin". > > > > This commit introduces BR2_TOOLCHAIN_EXTERNAL_BIN_PATH that defaults > > to "bin" and can be changed as needed. > > > > Signed-off-by: Calin Crisan <ccrisan@gmail.com> > > --- > > toolchain/toolchain-external/pkg-toolchain-external.mk | 2 > +- > > .../toolchain-external-custom/Config.in.options | 8 > ++++++++ > > 2 files changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk > b/toolchain/toolchain-external/pkg-toolchain-external.mk > > index 3bf9fac412..4dfe3815ae 100644 > > --- a/toolchain/toolchain-external/pkg-toolchain-external.mk > > +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk > > @@ -77,7 +77,7 @@ ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) > > TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which > $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) > > endif > > else > > -TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin > > +TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(call > qstrip,$(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH)) > > endif > > > > # If this is a buildroot toolchain, it already has a wrapper which we > want to > > diff --git > a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > > index 70c7d8e3c3..bb199aab85 100644 > > --- > a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > > +++ > b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > > @@ -12,6 +12,14 @@ config BR2_TOOLCHAIN_EXTERNAL_URL > > help > > URL of the custom toolchain tarball to download and install. > > > > +config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH > > + string "Toolchain bin path" > > + default "bin" > > + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD > > + help > > + Path to where the binaries (e.g. the compiler) can be found, > > + relative to the downloaded toolchain root directory. > > Indentation is incorrect: it should be a leading TAB for option, and a > leading TAB and two spaces for the help text. > > See: > > https://buildroot.org/downloads/manual/manual.html#writing-rules-config-in > > Otherwise, looks sensible to me... > > Regards, > Yann E. MORIN. > > > config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX > > string "Toolchain prefix" > > default "$(ARCH)-linux" > > -- > > 2.16.2 > > > > _______________________________________________ > > buildroot mailing list > > buildroot@busybox.net > > http://lists.busybox.net/mailman/listinfo/buildroot > > -- > > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' > conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ > | > | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is > no | > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v > conspiracy. | > > '------------------------------^-------^------------------^--------------------' > <div dir="auto">Yann, I have posted a v2 that fixes this and another issue with supported external toolchains. Please let me know if there's anything else that needs to be addressed.<div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto"><br></div><div dir="auto">Calin.</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Mar 25, 2018, 11:35 Yann E. MORIN <<a href="mailto:yann.morin.1998@free.fr" target="_blank" rel="noreferrer">yann.morin.1998@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Calin, All,<br> <br> On 2018-03-23 23:40 +0200, Calin Crisan spake thusly:<br> > There are cases where a downloaded toolchain doesn't have its binaries<br> > placed directly in a "bin" subfolder (where BuildRoot currently looks<br> > for them).<br> ><br> > A common example is the official Raspberry Pi Toolchain<br> > (<a href="https://github.com/raspberrypi/tools" rel="noreferrer noreferrer noreferrer" target="_blank">https://github.com/raspberrypi/tools</a>), which has its binaries in<br> > "arm-bcm2708/arm-linux-gnueabihf/bin".<br> ><br> > This commit introduces BR2_TOOLCHAIN_EXTERNAL_BIN_PATH that defaults<br> > to "bin" and can be changed as needed.<br> ><br> > Signed-off-by: Calin Crisan <<a href="mailto:ccrisan@gmail.com" rel="noreferrer noreferrer" target="_blank">ccrisan@gmail.com</a>><br> > ---<br> > toolchain/toolchain-external/<a href="http://pkg-toolchain-external.mk" rel="noreferrer noreferrer noreferrer" target="_blank">pkg-toolchain-external.mk</a> | 2 +-<br> > .../toolchain-external-custom/Config.in.options | 8 ++++++++<br> > 2 files changed, 9 insertions(+), 1 deletion(-)<br> ><br> > diff --git a/toolchain/toolchain-external/<a href="http://pkg-toolchain-external.mk" rel="noreferrer noreferrer noreferrer" target="_blank">pkg-toolchain-external.mk</a> b/toolchain/toolchain-external/<a href="http://pkg-toolchain-external.mk" rel="noreferrer noreferrer noreferrer" target="_blank">pkg-toolchain-external.mk</a><br> > index 3bf9fac412..4dfe3815ae 100644<br> > --- a/toolchain/toolchain-external/<a href="http://pkg-toolchain-external.mk" rel="noreferrer noreferrer noreferrer" target="_blank">pkg-toolchain-external.mk</a><br> > +++ b/toolchain/toolchain-external/<a href="http://pkg-toolchain-external.mk" rel="noreferrer noreferrer noreferrer" target="_blank">pkg-toolchain-external.mk</a><br> > @@ -77,7 +77,7 @@ ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),)<br> > TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc))<br> > endif<br> > else<br> > -TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin<br> > +TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH))<br> > endif<br> ><br> > # If this is a buildroot toolchain, it already has a wrapper which we want to<br> > diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options<br> > index 70c7d8e3c3..bb199aab85 100644<br> > --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options<br> > +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options<br> > @@ -12,6 +12,14 @@ config BR2_TOOLCHAIN_EXTERNAL_URL<br> > help<br> > URL of the custom toolchain tarball to download and install.<br> ><br> > +config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH<br> > + string "Toolchain bin path"<br> > + default "bin"<br> > + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD<br> > + help<br> > + Path to where the binaries (e.g. the compiler) can be found,<br> > + relative to the downloaded toolchain root directory.<br> <br> Indentation is incorrect: it should be a leading TAB for option, and a<br> leading TAB and two spaces for the help text.<br> <br> See:<br> <a href="https://buildroot.org/downloads/manual/manual.html#writing-rules-config-in" rel="noreferrer noreferrer noreferrer" target="_blank">https://buildroot.org/downloads/manual/manual.html#writing-rules-config-in</a><br> <br> Otherwise, looks sensible to me...<br> <br> Regards,<br> Yann E. MORIN.<br> <br> > config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX<br> > string "Toolchain prefix"<br> > default "$(ARCH)-linux"<br> > --<br> > 2.16.2<br> ><br> > _______________________________________________<br> > buildroot mailing list<br> > <a href="mailto:buildroot@busybox.net" rel="noreferrer noreferrer" target="_blank">buildroot@busybox.net</a><br> > <a href="http://lists.busybox.net/mailman/listinfo/buildroot" rel="noreferrer noreferrer noreferrer" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br> <br> --<br> .-----------------.--------------------.------------------.--------------------.<br> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |<br> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |<br> | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |<br> | <a href="http://ymorin.is-a-geek.org/" rel="noreferrer noreferrer noreferrer" target="_blank">http://ymorin.is-a-geek.org/</a> | _/*\_ | / \ HTML MAIL | v conspiracy. |<br> '------------------------------^-------^------------------^--------------------'<br> </blockquote></div>
Calin, All, On 2018-03-25 08:46 +0000, Calin Crisan spake thusly: > Yann, I have posted a v2 that fixes this and another issue with supported external toolchains. Please let me know if there's > anything else that needs to be addressed. Ah, I had missed your v2. Sorry. Lemme review that now, then. Regards, Yann E. MORIN. > Thanks, > Calin. > On Sun, Mar 25, 2018, 11:35 Yann E. MORIN < [1]yann.morin.1998@free.fr> wrote: > > Calin, All, > > On 2018-03-23 23:40 +0200, Calin Crisan spake thusly: > > There are cases where a downloaded toolchain doesn't have its binaries > > placed directly in a "bin" subfolder (where BuildRoot currently looks > > for them). > > > > A common example is the official Raspberry Pi Toolchain > > ( [2]https://github.com/raspberrypi/tools), which has its binaries in > > "arm-bcm2708/arm-linux-gnueabihf/bin". > > > > This commit introduces BR2_TOOLCHAIN_EXTERNAL_BIN_PATH that defaults > > to "bin" and can be changed as needed. > > > > Signed-off-by: Calin Crisan < [3]ccrisan@gmail.com> > > --- > > toolchain/toolchain-external/ [4]pkg-toolchain-external.mk | 2 +- > > .../toolchain-external-custom/Config.in.options | 8 > ++++++++ > > 2 files changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/toolchain/toolchain-external/ [5]pkg-toolchain-external.mk b/toolchain/toolchain-external/ > [6]pkg-toolchain-external.mk > > index 3bf9fac412..4dfe3815ae 100644 > > --- a/toolchain/toolchain-external/ [7]pkg-toolchain-external.mk > > +++ b/toolchain/toolchain-external/ [8]pkg-toolchain-external.mk > > @@ -77,7 +77,7 @@ ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) > > TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) > > endif > > else > > -TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin > > +TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH)) > > endif > > > > # If this is a buildroot toolchain, it already has a wrapper which we want to > > diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > > index 70c7d8e3c3..bb199aab85 100644 > > --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > > +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options > > @@ -12,6 +12,14 @@ config BR2_TOOLCHAIN_EXTERNAL_URL > > help > > URL of the custom toolchain tarball to download and install. > > > > +config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH > > + string "Toolchain bin path" > > + default "bin" > > + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD > > + help > > + Path to where the binaries (e.g. the compiler) can be found, > > + relative to the downloaded toolchain root directory. > > Indentation is incorrect: it should be a leading TAB for option, and a > leading TAB and two spaces for the help text. > > See: > [9]https://buildroot.org/downloads/manual/manual.html#writing-rules-config-in > > Otherwise, looks sensible to me... > > Regards, > Yann E. MORIN. > > > config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX > > string "Toolchain prefix" > > default "$(ARCH)-linux" > > -- > > 2.16.2 > > > > _______________________________________________ > > buildroot mailing list > > [10]buildroot@busybox.net > > [11]http://lists.busybox.net/mailman/listinfo/buildroot > > -- > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ > | > | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | > | [12]http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | > '------------------------------^-------^------------------^--------------------' > > Links: > 1. mailto:yann.morin.1998@free.fr > 2. https://github.com/raspberrypi/tools > 3. mailto:ccrisan@gmail.com > 4. http://pkg-toolchain-external.mk > 5. http://pkg-toolchain-external.mk > 6. http://pkg-toolchain-external.mk > 7. http://pkg-toolchain-external.mk > 8. http://pkg-toolchain-external.mk > 9. https://buildroot.org/downloads/manual/manual.html#writing-rules-config-in > 10. mailto:buildroot@busybox.net > 11. http://lists.busybox.net/mailman/listinfo/buildroot > 12. http://ymorin.is-a-geek.org/
diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk index 3bf9fac412..4dfe3815ae 100644 --- a/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -77,7 +77,7 @@ ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) endif else -TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin +TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH)) endif # If this is a buildroot toolchain, it already has a wrapper which we want to diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options index 70c7d8e3c3..bb199aab85 100644 --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options @@ -12,6 +12,14 @@ config BR2_TOOLCHAIN_EXTERNAL_URL help URL of the custom toolchain tarball to download and install. +config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH + string "Toolchain bin path" + default "bin" + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + Path to where the binaries (e.g. the compiler) can be found, + relative to the downloaded toolchain root directory. + config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX string "Toolchain prefix" default "$(ARCH)-linux"
There are cases where a downloaded toolchain doesn't have its binaries placed directly in a "bin" subfolder (where BuildRoot currently looks for them). A common example is the official Raspberry Pi Toolchain (https://github.com/raspberrypi/tools), which has its binaries in "arm-bcm2708/arm-linux-gnueabihf/bin". This commit introduces BR2_TOOLCHAIN_EXTERNAL_BIN_PATH that defaults to "bin" and can be changed as needed. Signed-off-by: Calin Crisan <ccrisan@gmail.com> --- toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +- .../toolchain-external-custom/Config.in.options | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-)