diff mbox series

[v5,1/3] package/arm-gnu-a-toolchain: new package

Message ID 1585371871-29406-2-git-send-email-sunil@amarulasolutions.com
State Accepted
Headers show
Series Fix ATF v2.2 build for rk3399, add roc-rk3399-pc board | expand

Commit Message

Suniel Mahesh March 28, 2020, 5:04 a.m. UTC
From: Suniel Mahesh <sunil@amarulasolutions.com>

arm trusted firmware requires a bare metal toolchain to build platforms which
host cortex-m series core, like Rockchip rk3399 which has a cortex-m0 core.
Add pre-built cross-compilation ARM-A bare metal toolchain to avoid the following
build error.

make[3]: arm-none-eabi-gcc: Command not found

pre-built bate metal ARM GNU-A toolchain installs into the host file system folder
/opt/gcc-arm-none-eabi.

https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-eabi.tar.xz

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
---
Changes for v5:
- Introduced a BR2_PACKAGE_HOST_ARM_GNU_A_TOOLCHAIN config option
  based on discussions from Thomas Pettazzoni
- Added to package/Config.in.host

Changes for v4:
- Upated DEVELOPERS file as suggested by Heiko Thiery and Thomas Pettazoni

Changes for v3:
- no change

Changes for v2:
- Added lines in description regarding why bare metal toolchain is required,
  as suggested by Jagan and pointed out by Sergey
---
 DEVELOPERS                                         |  3 +++
 package/Config.in.host                             |  1 +
 package/arm-gnu-a-toolchain/Config.in.host         |  9 ++++++++
 .../arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash   |  2 ++
 package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk | 27 ++++++++++++++++++++++
 5 files changed, 42 insertions(+)
 create mode 100644 package/arm-gnu-a-toolchain/Config.in.host
 create mode 100644 package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash
 create mode 100644 package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk

Comments

Thomas Petazzoni March 29, 2020, 1:14 p.m. UTC | #1
Hello,

I've applied your patch, but after doing a number of changes, see below.

On Sat, 28 Mar 2020 10:34:29 +0530
sunil@amarulasolutions.com wrote:

>  DEVELOPERS                                         |  3 +++
>  package/Config.in.host                             |  1 +
>  package/arm-gnu-a-toolchain/Config.in.host         |  9 ++++++++

I've entirely dropped the visible Config.in.host option for this
package, it is merely a build dependency of ATF, so we don't need (at
this point at least) a visible option.

> +N:	Suniel Mahesh <sunil@amarulasolutions.com>
> +F:	package/arm-gnu-a-toolchain

Directories end with a / in DEVELOPERS.

> +config BR2_PACKAGE_HOST_ARM_GNU_A_TOOLCHAIN
> +	bool "host arm-gnu-a-toolchain"
> +	help
> +	  arm trusted firmware requires a bare metal toolchain to build some platforms
> +	  which host cortex-m series core, for instance rockchip rk3399 has a cortex-m0 core. 
> +	  This package installs a pre-built cross-compilation ARM-A bare metal toolchain for
> +	  the host machine.

Lines where way too long: you forgot to run "make check-package", which
would have pointed out this coding style issue. Of course, since I
dropped the Config.in.host, it was not a big issue.

> --- /dev/null
> +++ b/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# arm-gnu-a-toolchain
> +#
> +################################################################################
> +
> +ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel

You should have used the <pkg>_VERSION variable here instead of hardcoding 9.2-2019.12.

> +ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
> +ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
> +ARM_GNU_A_TOOLCHAIN_LICENSE = GPL-3.0+
> +ARM_GNU_A_TOOLCHAIN_LICENSE_FILES =

I've dropped this last variable, since it's empty.

> +HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
> +
> +define HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_CMDS
> +	rm -rf $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> +	mkdir -p $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> +	cp -rf $(@D)/* $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> +
> +	cd $(HOST_DIR)/bin && \

You need to create $(HOST_DIR)/bin before cd-ing into it, as this
directory may not exist.

> +	for i in $(HOST_DIR)/opt/gcc-arm-none-eabi/bin/*; do \
> +		ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \

Simplified as:

        cd $(HOST_DIR)/bin && \
        for i in ../opt/gcc-arm-none-eabi/bin/*; do \
                ln -sf $$i; \
        done

I was also not sure these symlinks where really useful, it would have
been possible to pass an explicit path to the toolchain when building
ATF. But ok, I've kept the symlinks, we'll see how it goes.

Thanks!

Thomas
Belisko Marek March 30, 2020, 7:24 a.m. UTC | #2
Hi

On Sun, Mar 29, 2020 at 3:14 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> I've applied your patch, but after doing a number of changes, see below.
>
> On Sat, 28 Mar 2020 10:34:29 +0530
> sunil@amarulasolutions.com wrote:
>
> >  DEVELOPERS                                         |  3 +++
> >  package/Config.in.host                             |  1 +
> >  package/arm-gnu-a-toolchain/Config.in.host         |  9 ++++++++
>
> I've entirely dropped the visible Config.in.host option for this
> package, it is merely a build dependency of ATF, so we don't need (at
> this point at least) a visible option.
>
> > +N:   Suniel Mahesh <sunil@amarulasolutions.com>
> > +F:   package/arm-gnu-a-toolchain
>
> Directories end with a / in DEVELOPERS.
>
> > +config BR2_PACKAGE_HOST_ARM_GNU_A_TOOLCHAIN
> > +     bool "host arm-gnu-a-toolchain"
> > +     help
> > +       arm trusted firmware requires a bare metal toolchain to build some platforms
> > +       which host cortex-m series core, for instance rockchip rk3399 has a cortex-m0 core.
> > +       This package installs a pre-built cross-compilation ARM-A bare metal toolchain for
> > +       the host machine.
>
> Lines where way too long: you forgot to run "make check-package", which
> would have pointed out this coding style issue. Of course, since I
> dropped the Config.in.host, it was not a big issue.
Does it mean that with this we can enable same for nanopi NEO4 (which
was dropped in 8af7b11bd8a95bc41e4de46f727f3b0afde465a4)
with comment:

This defconfig tries to build an ARM Trusted Firmware version that
    needs an ARM32 toolchain, which is not available as the platform is an
    ARM64 one. The correct solution for this is to have a package in
    Buildroot for an ARM32 bare-metal toolchain, but this wasn't done in
    time for the 2019.08 release.

but when I just reverted mentioned commit NEO4 boots fine without
issue. So I'm bit confused if I need to add support for NEO4 with this
changes to NEO4 and resurrect it? Thanks.
>
> > --- /dev/null
> > +++ b/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk
> > @@ -0,0 +1,27 @@
> > +################################################################################
> > +#
> > +# arm-gnu-a-toolchain
> > +#
> > +################################################################################
> > +
> > +ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel
>
> You should have used the <pkg>_VERSION variable here instead of hardcoding 9.2-2019.12.
>
> > +ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
> > +ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
> > +ARM_GNU_A_TOOLCHAIN_LICENSE = GPL-3.0+
> > +ARM_GNU_A_TOOLCHAIN_LICENSE_FILES =
>
> I've dropped this last variable, since it's empty.
>
> > +HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
> > +
> > +define HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_CMDS
> > +     rm -rf $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> > +     mkdir -p $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> > +     cp -rf $(@D)/* $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> > +
> > +     cd $(HOST_DIR)/bin && \
>
> You need to create $(HOST_DIR)/bin before cd-ing into it, as this
> directory may not exist.
>
> > +     for i in $(HOST_DIR)/opt/gcc-arm-none-eabi/bin/*; do \
> > +             ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
>
> Simplified as:
>
>         cd $(HOST_DIR)/bin && \
>         for i in ../opt/gcc-arm-none-eabi/bin/*; do \
>                 ln -sf $$i; \
>         done
>
> I was also not sure these symlinks where really useful, it would have
> been possible to pass an explicit path to the toolchain when building
> ATF. But ok, I've kept the symlinks, we'll see how it goes.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



BR,

marek
Sergey Matyukevich March 30, 2020, 7:47 a.m. UTC | #3
> Hi
> 
> On Sun, Mar 29, 2020 at 3:14 PM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> >
> > Hello,
> >
> > I've applied your patch, but after doing a number of changes, see below.
> >
> > On Sat, 28 Mar 2020 10:34:29 +0530
> > sunil@amarulasolutions.com wrote:
> >
> > >  DEVELOPERS                                         |  3 +++
> > >  package/Config.in.host                             |  1 +
> > >  package/arm-gnu-a-toolchain/Config.in.host         |  9 ++++++++
> >
> > I've entirely dropped the visible Config.in.host option for this
> > package, it is merely a build dependency of ATF, so we don't need (at
> > this point at least) a visible option.
> >
> > > +N:   Suniel Mahesh <sunil@amarulasolutions.com>
> > > +F:   package/arm-gnu-a-toolchain
> >
> > Directories end with a / in DEVELOPERS.
> >
> > > +config BR2_PACKAGE_HOST_ARM_GNU_A_TOOLCHAIN
> > > +     bool "host arm-gnu-a-toolchain"
> > > +     help
> > > +       arm trusted firmware requires a bare metal toolchain to build some platforms
> > > +       which host cortex-m series core, for instance rockchip rk3399 has a cortex-m0 core.
> > > +       This package installs a pre-built cross-compilation ARM-A bare metal toolchain for
> > > +       the host machine.
> >
> > Lines where way too long: you forgot to run "make check-package", which
> > would have pointed out this coding style issue. Of course, since I
> > dropped the Config.in.host, it was not a big issue.
> Does it mean that with this we can enable same for nanopi NEO4 (which
> was dropped in 8af7b11bd8a95bc41e4de46f727f3b0afde465a4)
> with comment:
> 
> This defconfig tries to build an ARM Trusted Firmware version that
>     needs an ARM32 toolchain, which is not available as the platform is an
>     ARM64 one. The correct solution for this is to have a package in
>     Buildroot for an ARM32 bare-metal toolchain, but this wasn't done in
>     time for the 2019.08 release.
> 
> but when I just reverted mentioned commit NEO4 boots fine without
> issue. So I'm bit confused if I need to add support for NEO4 with this
> changes to NEO4 and resurrect it? Thanks.

You mean if you revert that commit w/o any changes, NEO4 builds and
boots fine ? Probably you have already installed arm32 toolchain on
your build server, that is why it works fine for you.

Looking at the patches from Sunil, you have to add
BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y
into ATF section of NEO4 board defconfig.

Regards,
Sergey
Belisko Marek March 30, 2020, 8:07 a.m. UTC | #4
On Mon, Mar 30, 2020 at 9:47 AM Sergey Matyukevich <geomatsi@gmail.com> wrote:
>
> > Hi
> >
> > On Sun, Mar 29, 2020 at 3:14 PM Thomas Petazzoni
> > <thomas.petazzoni@bootlin.com> wrote:
> > >
> > > Hello,
> > >
> > > I've applied your patch, but after doing a number of changes, see below.
> > >
> > > On Sat, 28 Mar 2020 10:34:29 +0530
> > > sunil@amarulasolutions.com wrote:
> > >
> > > >  DEVELOPERS                                         |  3 +++
> > > >  package/Config.in.host                             |  1 +
> > > >  package/arm-gnu-a-toolchain/Config.in.host         |  9 ++++++++
> > >
> > > I've entirely dropped the visible Config.in.host option for this
> > > package, it is merely a build dependency of ATF, so we don't need (at
> > > this point at least) a visible option.
> > >
> > > > +N:   Suniel Mahesh <sunil@amarulasolutions.com>
> > > > +F:   package/arm-gnu-a-toolchain
> > >
> > > Directories end with a / in DEVELOPERS.
> > >
> > > > +config BR2_PACKAGE_HOST_ARM_GNU_A_TOOLCHAIN
> > > > +     bool "host arm-gnu-a-toolchain"
> > > > +     help
> > > > +       arm trusted firmware requires a bare metal toolchain to build some platforms
> > > > +       which host cortex-m series core, for instance rockchip rk3399 has a cortex-m0 core.
> > > > +       This package installs a pre-built cross-compilation ARM-A bare metal toolchain for
> > > > +       the host machine.
> > >
> > > Lines where way too long: you forgot to run "make check-package", which
> > > would have pointed out this coding style issue. Of course, since I
> > > dropped the Config.in.host, it was not a big issue.
> > Does it mean that with this we can enable same for nanopi NEO4 (which
> > was dropped in 8af7b11bd8a95bc41e4de46f727f3b0afde465a4)
> > with comment:
> >
> > This defconfig tries to build an ARM Trusted Firmware version that
> >     needs an ARM32 toolchain, which is not available as the platform is an
> >     ARM64 one. The correct solution for this is to have a package in
> >     Buildroot for an ARM32 bare-metal toolchain, but this wasn't done in
> >     time for the 2019.08 release.
> >
> > but when I just reverted mentioned commit NEO4 boots fine without
> > issue. So I'm bit confused if I need to add support for NEO4 with this
> > changes to NEO4 and resurrect it? Thanks.
>
> You mean if you revert that commit w/o any changes, NEO4 builds and
> boots fine ? Probably you have already installed arm32 toolchain on
> your build server, that is why it works fine for you.
OK taht could be an option as I have arm-none-eabi installed on my
laptop and that is the reason why it works ;).
>
> Looking at the patches from Sunil, you have to add
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y
> into ATF section of NEO4 board defconfig.
OK I'll revert patch which remove NEO4 board and add this option to
defconfig. Thanks a lot.
>
> Regards,
> Sergey

BR,

marek
Suniel Mahesh March 30, 2020, 10:46 a.m. UTC | #5
On Sun, Mar 29, 2020 at 6:44 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> I've applied your patch, but after doing a number of changes, see below.

Thanks for all the changes and suggestions. Next time I will make sure that I
do make check-package before submitting.

Suniel

>
> On Sat, 28 Mar 2020 10:34:29 +0530
> sunil@amarulasolutions.com wrote:
>
> >  DEVELOPERS                                         |  3 +++
> >  package/Config.in.host                             |  1 +
> >  package/arm-gnu-a-toolchain/Config.in.host         |  9 ++++++++
>
> I've entirely dropped the visible Config.in.host option for this
> package, it is merely a build dependency of ATF, so we don't need (at
> this point at least) a visible option.
>
> > +N:   Suniel Mahesh <sunil@amarulasolutions.com>
> > +F:   package/arm-gnu-a-toolchain
>
> Directories end with a / in DEVELOPERS.
>
> > +config BR2_PACKAGE_HOST_ARM_GNU_A_TOOLCHAIN
> > +     bool "host arm-gnu-a-toolchain"
> > +     help
> > +       arm trusted firmware requires a bare metal toolchain to build some platforms
> > +       which host cortex-m series core, for instance rockchip rk3399 has a cortex-m0 core.
> > +       This package installs a pre-built cross-compilation ARM-A bare metal toolchain for
> > +       the host machine.
>
> Lines where way too long: you forgot to run "make check-package", which
> would have pointed out this coding style issue. Of course, since I
> dropped the Config.in.host, it was not a big issue.
>
> > --- /dev/null
> > +++ b/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk
> > @@ -0,0 +1,27 @@
> > +################################################################################
> > +#
> > +# arm-gnu-a-toolchain
> > +#
> > +################################################################################
> > +
> > +ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel
>
> You should have used the <pkg>_VERSION variable here instead of hardcoding 9.2-2019.12.
>
> > +ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
> > +ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
> > +ARM_GNU_A_TOOLCHAIN_LICENSE = GPL-3.0+
> > +ARM_GNU_A_TOOLCHAIN_LICENSE_FILES =
>
> I've dropped this last variable, since it's empty.
>
> > +HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
> > +
> > +define HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_CMDS
> > +     rm -rf $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> > +     mkdir -p $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> > +     cp -rf $(@D)/* $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
> > +
> > +     cd $(HOST_DIR)/bin && \
>
> You need to create $(HOST_DIR)/bin before cd-ing into it, as this
> directory may not exist.
>
> > +     for i in $(HOST_DIR)/opt/gcc-arm-none-eabi/bin/*; do \
> > +             ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
>
> Simplified as:
>
>         cd $(HOST_DIR)/bin && \
>         for i in ../opt/gcc-arm-none-eabi/bin/*; do \
>                 ln -sf $$i; \
>         done
>
> I was also not sure these symlinks where really useful, it would have
> been possible to pass an explicit path to the toolchain when building
> ATF. But ok, I've kept the symlinks, we'll see how it goes.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 1fb4e65..ce1a761 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2389,6 +2389,9 @@  N:	Steven Noonan <steven@uplinklabs.net>
 F:	package/hwloc/
 F:	package/powertop/
 
+N:	Suniel Mahesh <sunil@amarulasolutions.com>
+F:	package/arm-gnu-a-toolchain
+
 N:	Sven Haardiek <sven.haardiek@iotec-gmbh.de>
 F:	package/lcdproc/
 F:	package/python-influxdb/
diff --git a/package/Config.in.host b/package/Config.in.host
index eb8f63f..19dcab6 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -2,6 +2,7 @@  menu "Host utilities"
 
 	source "package/aespipe/Config.in.host"
 	source "package/android-tools/Config.in.host"
+	source "package/arm-gnu-a-toolchain/Config.in.host"
 	source "package/btrfs-progs/Config.in.host"
 	source "package/cargo/Config.in.host"
 	source "package/cbootimage/Config.in.host"
diff --git a/package/arm-gnu-a-toolchain/Config.in.host b/package/arm-gnu-a-toolchain/Config.in.host
new file mode 100644
index 0000000..07b73a7
--- /dev/null
+++ b/package/arm-gnu-a-toolchain/Config.in.host
@@ -0,0 +1,9 @@ 
+config BR2_PACKAGE_HOST_ARM_GNU_A_TOOLCHAIN
+	bool "host arm-gnu-a-toolchain"
+	help
+	  arm trusted firmware requires a bare metal toolchain to build some platforms
+	  which host cortex-m series core, for instance rockchip rk3399 has a cortex-m0 core. 
+	  This package installs a pre-built cross-compilation ARM-A bare metal toolchain for
+	  the host machine.
+
+	  https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-eabi.tar.xz
diff --git a/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash b/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash
new file mode 100644
index 0000000..b18e56c
--- /dev/null
+++ b/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash
@@ -0,0 +1,2 @@ 
+# Locally calculated
+sha256 ac952d89ae0fc3543e81099e7d34917efc621f5def112eee843fd1ce755eca8c  gcc-arm-9.2-2019.12-x86_64-arm-none-eabi.tar.xz
diff --git a/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk b/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk
new file mode 100644
index 0000000..cbe8aba
--- /dev/null
+++ b/package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk
@@ -0,0 +1,27 @@ 
+################################################################################
+#
+# arm-gnu-a-toolchain
+#
+################################################################################
+
+ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel
+ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
+ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_A_TOOLCHAIN_LICENSE = GPL-3.0+
+ARM_GNU_A_TOOLCHAIN_LICENSE_FILES =
+
+HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
+
+define HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_CMDS
+	rm -rf $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
+	mkdir -p $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
+	cp -rf $(@D)/* $(HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR)
+
+	cd $(HOST_DIR)/bin && \
+	for i in $(HOST_DIR)/opt/gcc-arm-none-eabi/bin/*; do \
+		ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
+	done
+
+endef
+
+$(eval $(host-generic-package))