* [Buildroot] [PATCH 0/3] Support 32-bit code generation for Armv8 targets
@ 2019-02-04 14:31 kostap at marvell.com
2019-02-04 14:31 ` [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain kostap at marvell.com
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: kostap at marvell.com @ 2019-02-04 14:31 UTC (permalink / raw)
To: buildroot
From: Konstantin Porotchkin <kostap@marvell.com>
This patch set adds support for building images for SoC that make usage
of Armv8 application CPUs and Cortex-M/Cortex-R service CPUs.
The application CPU cross-toolchain is unable to generate 32-bit THUMB
code, therefore usage of secondary toolchain is needed.
The required pre-built toolchain is taken from ARM developers site and
installed in host filesystem only.
The patch set makes use of dual toolchain for adding support for Marvell
Armada 3700 SoC that uses both Cortex-A53 and Cortex-M3 CPUs for running
system firmware.
Konstantin Porotchkin (3):
package: arm-gnu-rm-toolchain: Add ARM-RM toolchain
boot: a3700-utils-marvell: Add Armada-3700 utilities
boot: arm-trusted-firmware: add support for Marvell Armada 3700
boot/Config.in | 1 +
boot/a3700-utils-marvell/Config.in | 46 +++++++++++++++++++
.../a3700-utils-marvell.hash | 2 +
.../a3700-utils-marvell.mk | 28 +++++++++++
.../arm-trusted-firmware.mk | 7 +++
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 +++++++++
9 files changed, 122 insertions(+)
create mode 100644 boot/a3700-utils-marvell/Config.in
create mode 100644 boot/a3700-utils-marvell/a3700-utils-marvell.hash
create mode 100644 boot/a3700-utils-marvell/a3700-utils-marvell.mk
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
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain
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
2019-02-04 14:48 ` 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
2 siblings, 1 reply; 5+ messages in thread
From: kostap at marvell.com @ 2019-02-04 14:31 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities
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 ` [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain kostap at marvell.com
@ 2019-02-04 14:31 ` 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
2 siblings, 0 replies; 5+ messages in thread
From: kostap at marvell.com @ 2019-02-04 14:31 UTC (permalink / raw)
To: buildroot
From: Konstantin Porotchkin <kostap@marvell.com>
Marvell Armada 37xx firmware code and utilities are kept in
a separate repository. This code is needed as a dependency
to build ATF firmware for Marvell Armada 37xx SoCs.
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
---
boot/Config.in | 1 +
boot/a3700-utils-marvell/Config.in | 46 +++++++++++++++++++
.../a3700-utils-marvell.hash | 2 +
.../a3700-utils-marvell.mk | 28 +++++++++++
4 files changed, 77 insertions(+)
create mode 100644 boot/a3700-utils-marvell/Config.in
create mode 100644 boot/a3700-utils-marvell/a3700-utils-marvell.hash
create mode 100644 boot/a3700-utils-marvell/a3700-utils-marvell.mk
diff --git a/boot/Config.in b/boot/Config.in
index 8e0c8e5df4..4acde0e764 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -19,5 +19,6 @@ source "boot/syslinux/Config.in"
source "boot/ts4800-mbrboot/Config.in"
source "boot/uboot/Config.in"
source "boot/vexpress-firmware/Config.in"
+source "boot/a3700-utils-marvell/Config.in"
endmenu
diff --git a/boot/a3700-utils-marvell/Config.in b/boot/a3700-utils-marvell/Config.in
new file mode 100644
index 0000000000..1fff8555a9
--- /dev/null
+++ b/boot/a3700-utils-marvell/Config.in
@@ -0,0 +1,46 @@
+config BR2_TARGET_A3700_UTILS_MARVELL
+ bool "a3700-utils-marvell"
+ depends on BR2_aarch64
+ help
+ Marvell Armada 37xx firmware code and utilities are kept in
+ a separate repository. This code is needed as a dependency
+ to build ATF firmware for Marvell Armada 37xx SoCs.
+
+ https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell/
+
+choice
+ bool "a3700-utils-marvell-version"
+
+config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_GIT
+ bool "Custom Git repository"
+ help
+ Allows to specify custom repository for the component
+ Useful for developers building out of bleeding edge sources
+
+config BR2_TARGET_A3700_UTILS_MARVELL_RELEASE
+ bool "Release repository on Github"
+ help
+ Use the package sources specified in this buildroot release
+
+config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_TARBALL
+ bool "Release sources supplied as archives"
+ help
+ Use the package sources from local archive
+
+endchoice
+
+if BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_GIT
+
+config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_REPO_URL
+ string "URL of custom repository"
+
+config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_REPO_VERSION
+ string "Custom repository version"
+ help
+ Revision to use in the typical format used by Git
+ E.G. a sha id, a tag, branch, ..
+
+endif
+
+config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_TARBALL_LOCATION
+ string "Name of local archive file with release"
diff --git a/boot/a3700-utils-marvell/a3700-utils-marvell.hash b/boot/a3700-utils-marvell/a3700-utils-marvell.hash
new file mode 100644
index 0000000000..b4f4cd70e9
--- /dev/null
+++ b/boot/a3700-utils-marvell/a3700-utils-marvell.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 5a8dd5ae9322d19a61a8ca9ca9235c0a24dee889e6a0b2f848fc8d9e1494505d a3700-utils-marvell-a0a1cb88327afa91415c59822fa9c5894d9ec3d7.tar.gz
diff --git a/boot/a3700-utils-marvell/a3700-utils-marvell.mk b/boot/a3700-utils-marvell/a3700-utils-marvell.mk
new file mode 100644
index 0000000000..c4fb29d73a
--- /dev/null
+++ b/boot/a3700-utils-marvell/a3700-utils-marvell.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# a3700-utils-marvell
+#
+################################################################################
+
+ifeq ($(BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_GIT),y)
+A3700_UTILS_MARVELL_VERSION = $(call qstrip,$(BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_REPO_VERSION))
+A3700_UTILS_MARVELL_SITE = $(call qstrip,$(BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_REPO_URL))
+A3700_UTILS_MARVELL_SITE_METHOD = git
+BR_NO_CHECK_HASH_FOR += $(A3700_UTILS_MARVELL_SOURCE)
+else
+ifeq ($(BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_TARBALL),y)
+A3700_UTILS_MARVELL_TARBALL = $(call qstrip,$(BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_TARBALL_LOCATION))
+A3700_UTILS_MARVELL_SITE = $(patsubst %/,%,$(dir $(A3700_UTILS_MARVELL_TARBALL)))
+A3700_UTILS_MARVELL_SITE_METHOD = file
+A3700_UTILS_MARVELL_SOURCE = $(notdir $(A3700_UTILS_MARVELL_TARBALL))
+BR_NO_CHECK_HASH_FOR += $(A3700_UTILS_MARVELL_SOURCE)
+else
+# This is the commit for A3700-utils-armada-18.12.0
+A3700_UTILS_MARVELL_VERSION = a0a1cb88327afa91415c59822fa9c5894d9ec3d7
+A3700_UTILS_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,A3700-utils-marvell,$(A3700_UTILS_MARVELL_VERSION))
+endif
+endif
+A3700_UTILS_MARVELL_LICENSE = GPL-2.0+ or LGPL-2.1 with freertos-exception-2.0, BSD-3-Clause, Marvell Commercial
+A3700_UTILS_MARVELL_LICENSE_FILES = wtptp/src/TBB_Linux/readme.txt
+
+$(eval $(generic-package))
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700
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 ` [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain kostap at marvell.com
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 ` kostap at marvell.com
2 siblings, 0 replies; 5+ messages in thread
From: kostap at marvell.com @ 2019-02-04 14:31 UTC (permalink / raw)
To: buildroot
From: Konstantin Porotchkin <kostap@marvell.com>
Add support for TF-A image builds for Marvell Armada 3700 family
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
---
boot/arm-trusted-firmware/arm-trusted-firmware.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index 23f493653d..397bed64bc 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -52,6 +52,13 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += MV_DDR_PATH=$(MV_DDR_MARVELL_DIR)
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += mv-ddr-marvell
endif
+ifeq ($(BR2_TARGET_A3700_UTILS_MARVELL),y)
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += WTP=$(A3700_UTILS_MARVELL_DIR)
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += CROSS_CM3=$(HOST_DIR)/opt/gcc-arm/bin/arm-none-eabi-
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += a3700-utils-marvell
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-rm-toolchain
+endif
+
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain
2019-02-04 14:31 ` [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain kostap at marvell.com
@ 2019-02-04 14:48 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-02-04 14:48 UTC (permalink / raw)
To: buildroot
Hello,
Title should be:
package/arm-gnu-rm-toolchain: new package
On Mon, 4 Feb 2019 16:31:35 +0200
<kostap@marvell.com> wrote:
> Add host-only ARM RM toolchain for supporting firmware
"host-only" doesn't mean much here. It's a cross-compilation toolchain,
so it's not really "host-only".
> This patch installs pre-build bate metal ARM GNU-RM toolchain
pre-build -> "a pre-built"
> into the host file system folder /opt/gcc-arm for covering the
> above mentioned cases.
"into the host filesystem folder /opt/gcc-arm" ->
$(HOST_DIR)/opt/gcc-arm
> 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"
I don't think we need a Config.in.host option for this.
> 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
These two lines together don't make sense. If you select
BR2_HOSTARCH_NEEDS_IA32_LIBS, it's because the pre-built binaries are
for x86 32 bits, and therefore the 32 bit compat libraries are needed
when running on a x86-64 system. If pre-built binaries are for x86 32
bits, then surely the dependency on BR2_HOSTARCH = "x86_64" is not
correct.
But anyway as stated above, I don't think a Config.in.host file is
needed here.
> 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
Why do you need custom extract commands ? It seems to be just a regular
tarball.
> +
> +define HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_CMDS
> + mkdir -p $(HOST_DIR)/opt/gcc-arm/
> + cp -a $(@D)/* $(HOST_DIR)/opt/gcc-arm/
Install in gcc-arm-none-eabi so that it's clear it's a bare-metal
toolchain.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-02-04 14:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Buildroot] [PATCH 1/3] package: arm-gnu-rm-toolchain: Add ARM-RM toolchain kostap at marvell.com
2019-02-04 14:48 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox