Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kostap at marvell.com <kostap@marvell.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain
Date: Mon, 4 Feb 2019 16:31:35 +0200	[thread overview]
Message-ID: <20190204143137.32224-2-kostap@marvell.com> (raw)
In-Reply-To: <20190204143137.32224-1-kostap@marvell.com>

From: Konstantin Porotchkin <kostap@marvell.com>

Add host-only ARM RM toolchain for supporting firmware
builds for Armv8-based SoCs utilizing Cortex-M/Cortex-R
service CPUs.
The cross-toolchain used for building Armv8 application CPU
code cannot be used for Cortex-M/Cortex-R 32-bit THUMB code
generation.
This patch installs pre-build bate metal ARM GNU-RM toolchain
into the host file system folder /opt/gcc-arm for covering the
above mentioned cases.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
---
 package/Config.in.host                        |  1 +
 package/arm-gnu-rm-toolchain/Config.in.host   | 13 +++++++++++
 .../arm-gnu-rm-toolchain.hash                 |  2 ++
 .../arm-gnu-rm-toolchain.mk                   | 22 +++++++++++++++++++
 4 files changed, 38 insertions(+)
 create mode 100644 package/arm-gnu-rm-toolchain/Config.in.host
 create mode 100644 package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.hash
 create mode 100644 package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.mk

diff --git a/package/Config.in.host b/package/Config.in.host
index 16b474fc9d..41dfd76785 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -67,5 +67,6 @@ menu "Host utilities"
 	source "package/xorriso/Config.in.host"
 	source "package/zip/Config.in.host"
 	source "package/zstd/Config.in.host"
+	source "package/arm-gnu-rm-toolchain/Config.in.host"
 
 endmenu
diff --git a/package/arm-gnu-rm-toolchain/Config.in.host b/package/arm-gnu-rm-toolchain/Config.in.host
new file mode 100644
index 0000000000..3341760acd
--- /dev/null
+++ b/package/arm-gnu-rm-toolchain/Config.in.host
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_HOST_ARM_GNU_RM_TOOLCHAIN
+	bool "host arm-gnu-rm-toolchain"
+	depends on BR2_HOSTARCH = "x86_64"
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	help
+	  The GNU Embedded Toolchain for Arm is an open-source pre-built
+	  suite of tools for C, C++ and Assembly programming targeting
+	  Arm Cortex-M and Cortex-R family of processors.
+	  It includes the GNU Compiler (GCC) and is available free of charge
+	  directly from Arm for embedded software development.
+
+
+	  https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
\ No newline at end of file
diff --git a/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.hash b/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.hash
new file mode 100644
index 0000000000..a08e8e6208
--- /dev/null
+++ b/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 bb17109f0ee697254a5d4ae6e5e01440e3ea8f0277f2e8169bf95d07c7d5fe69 gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
diff --git a/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.mk b/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.mk
new file mode 100644
index 0000000000..be02130f28
--- /dev/null
+++ b/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# arm-gnu-rm-toolchain
+#
+################################################################################
+
+ARM_GNU_RM_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2
+ARM_GNU_RM_TOOLCHAIN_VERSION = 7-2018-q2-update
+ARM_GNU_RM_TOOLCHAIN_SOURCE = gcc-arm-none-eabi-$(ARM_GNU_RM_TOOLCHAIN_VERSION)-linux.tar.bz2
+
+define HOST_ARM_GNU_RM_TOOLCHAIN_EXTRACT_CMDS
+	$(TAR) xf $(HOST_ARM_GNU_RM_TOOLCHAIN_DL_DIR)/$(ARM_GNU_RM_TOOLCHAIN_SOURCE) -C $(BUILD_DIR)
+	mv $(BUILD_DIR)/gcc-arm-none-eabi-$(ARM_GNU_RM_TOOLCHAIN_VERSION)/* $(@D)
+	rmdir $(BUILD_DIR)/gcc-arm-none-eabi-$(ARM_GNU_RM_TOOLCHAIN_VERSION)/
+endef
+
+define HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_CMDS
+	mkdir -p $(HOST_DIR)/opt/gcc-arm/
+	cp -a $(@D)/* $(HOST_DIR)/opt/gcc-arm/
+endef
+
+$(eval $(host-generic-package))
-- 
2.17.1

  reply	other threads:[~2019-02-04 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 14:31 [Buildroot] [PATCH 0/3] Support 32-bit code generation for Armv8 targets kostap at marvell.com
2019-02-04 14:31 ` kostap at marvell.com [this message]
2019-02-04 14:48   ` [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain Thomas Petazzoni
2019-02-04 14:31 ` [Buildroot] [PATCH 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities kostap at marvell.com
2019-02-04 14:31 ` [Buildroot] [PATCH 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700 kostap at marvell.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204143137.32224-2-kostap@marvell.com \
    --to=kostap@marvell.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox