All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets
@ 2019-02-05 10:45 kostap at marvell.com
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 1/3] package/arm-gnu-rm-toolchain: new package kostap at marvell.com
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: kostap at marvell.com @ 2019-02-05 10:45 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.

V3 changes:
patch #1 (arm-gnu-rm-toolchain)
- Move the toolchain from installation folder to host FS instead of copy it
- Add symbolic links in $(HOST_DIR)/bin to the toolchain executables
- Add source files information (download link, license)
- Change the hash values from localy calculated sha256 to md5 provided by ARM
patch #2 (a3700-utils-marvell) - no changes
patch #3 (a3700 boot image build support)
- Use the $(HOST_DIR)/bin/* links instead of installation path for CROSS_CM3

V2 changes:
patch #1 (arm-gnu-rm-toolchain)
- Remove Config.in.host
- Remove custom extract command
- Set installation path to $(HOST_DIR)/opt//opt/gcc-arm-none-eabi
- Update commit message according to review notes
patch #2 (a3700-utils-marvell) - no changes
patch #3 (a3700 boot image build support)
- Update CROSS_CM3 path in arm-trusted-firmware to reflect patch #1 changes

Konstantin Porotchkin (3):
  package/arm-gnu-rm-toolchain: new package
  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 +++
 .../arm-gnu-rm-toolchain.hash                 |  3 ++
 .../arm-gnu-rm-toolchain.mk                   | 28 +++++++++++
 7 files changed, 115 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/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] 8+ messages in thread

* [Buildroot] [PATCH v3 1/3] package/arm-gnu-rm-toolchain: new package
  2019-02-05 10:45 [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets kostap at marvell.com
@ 2019-02-05 10:45 ` kostap at marvell.com
  2019-02-09 14:47   ` Thomas Petazzoni
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities kostap at marvell.com
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: kostap at marvell.com @ 2019-02-05 10:45 UTC (permalink / raw)
  To: buildroot

From: Konstantin Porotchkin <kostap@marvell.com>

Add cross-compialtion 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-built bate metal ARM GNU-RM toolchain
into the host file system folder $(HOST_DIR)/opt/gcc-arm-none-eabi
for covering the above mentioned cases.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
---
 .../arm-gnu-rm-toolchain.hash                 |  3 ++
 .../arm-gnu-rm-toolchain.mk                   | 28 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 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/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..d8797d9c13
--- /dev/null
+++ b/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.hash
@@ -0,0 +1,3 @@
+# taken from the distribution site
+md5 299ebd3f1c2c90930d28ab82e5d8d6c0 gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
+md5 7f88d3f1d0285e73e116cc3428bc1e13 gcc-arm-none-eabi-7-2018-q2-update-src.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..4c77fbf50e
--- /dev/null
+++ b/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# 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
+
+ARM_GNU_RM_TOOLCHAIN_LICENSE = GPL-3.0+, GPL-2.0+, LGPL-2.1+, LGPL-2.0+, LGPL-3.0+
+ARM_GNU_RM_TOOLCHAIN_LICENSE_FILES = license.txt
+ARM_GNU_RM_TOOLCHAIN_ACTUAL_SOURCE_TARBALL = https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-src.tar.bz2
+
+HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
+
+define HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_CMDS
+	rm -rf $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)
+	mkdir -p $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)
+	mv $(@D)/* $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)/
+
+	cd $(HOST_DIR)/bin; \
+	for i in $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)/bin/*; do \
+		ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
+	done
+endef
+
+$(eval $(host-generic-package))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v3 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities
  2019-02-05 10:45 [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets kostap at marvell.com
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 1/3] package/arm-gnu-rm-toolchain: new package kostap at marvell.com
@ 2019-02-05 10:45 ` kostap at marvell.com
  2019-02-09 15:15   ` Thomas Petazzoni
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700 kostap at marvell.com
  2019-12-27  7:24 ` [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets Jagan Teki
  3 siblings, 1 reply; 8+ messages in thread
From: kostap at marvell.com @ 2019-02-05 10:45 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] 8+ messages in thread

* [Buildroot] [PATCH v3 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700
  2019-02-05 10:45 [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets kostap at marvell.com
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 1/3] package/arm-gnu-rm-toolchain: new package kostap at marvell.com
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities kostap at marvell.com
@ 2019-02-05 10:45 ` kostap at marvell.com
  2019-02-09 15:17   ` Thomas Petazzoni
  2019-12-27  7:24 ` [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets Jagan Teki
  3 siblings, 1 reply; 8+ messages in thread
From: kostap at marvell.com @ 2019-02-05 10:45 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..3e490c03c4 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)/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] 8+ messages in thread

* [Buildroot] [PATCH v3 1/3] package/arm-gnu-rm-toolchain: new package
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 1/3] package/arm-gnu-rm-toolchain: new package kostap at marvell.com
@ 2019-02-09 14:47   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2019-02-09 14:47 UTC (permalink / raw)
  To: buildroot

Hello Kostya,

On Tue, 5 Feb 2019 12:45:10 +0200
<kostap@marvell.com> wrote:

> From: Konstantin Porotchkin <kostap@marvell.com>
> 
> Add cross-compialtion ARM RM toolchain for supporting firmware

cross-compilation

> 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..d8797d9c13
> --- /dev/null
> +++ b/package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.hash
> @@ -0,0 +1,3 @@
> +# taken from the distribution site

Please indicate the URL at which the hashes were found.

> +md5 299ebd3f1c2c90930d28ab82e5d8d6c0 gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
> +md5 7f88d3f1d0285e73e116cc3428bc1e13 gcc-arm-none-eabi-7-2018-q2-update-src.tar.bz2

Since md5 hashes are not very strong, please also add:

# Locally calculated
sha256 here the SHA256 gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
sha256 here the SHA256 gcc-arm-none-eabi-7-2018-q2-update-src.tar.bz2

> +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
> +
> +ARM_GNU_RM_TOOLCHAIN_LICENSE = GPL-3.0+, GPL-2.0+, LGPL-2.1+, LGPL-2.0+, LGPL-3.0+

These licensing details are not complete enough. There are some parts
that use the GCC exception.

> +ARM_GNU_RM_TOOLCHAIN_LICENSE_FILES = license.txt

This doesn't work, for two reasons:

 (1) You're moving files away from $(@D) when building

 (2) license.txt is deep down in
     share/doc/gcc-arm-none-eabi/license.txt, not at the root of the
     tree.

Please run "make legal-info" and make sure it works.

> +ARM_GNU_RM_TOOLCHAIN_ACTUAL_SOURCE_TARBALL = https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-src.tar.bz2
> +
> +HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
> +
> +define HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_CMDS
> +	rm -rf $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)
> +	mkdir -p $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)
> +	mv $(@D)/* $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)/

Don't move files, but copy them, otherwise legal-info will not work
after a build.

> +

Add:

	mkdir -p $(HOST_DIR)/bin

> +	cd $(HOST_DIR)/bin; \

Replace with:

	cd $(HOST_DIR)/bin && \

> +	for i in $(HOST_ARM_GNU_RM_TOOLCHAIN_INSTALL_DIR)/bin/*; do \
> +		ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
> +	done
> +endef
> +
> +$(eval $(host-generic-package))

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v3 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities kostap at marvell.com
@ 2019-02-09 15:15   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2019-02-09 15:15 UTC (permalink / raw)
  To: buildroot

Hello,

Commit title should be:

	boot/a3700-utils-marvell: new package

On Tue, 5 Feb 2019 12:45:11 +0200
<kostap@marvell.com> wrote:

> 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(+)

Entry in DEVELOPERS file is missing.

> 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"

Entries should be sorted alphabetically.

> 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

I'm not sure what this option is meant for.

> +config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_TARBALL
> +	bool "Release sources supplied as archives"
> +	help
> +	  Use the package sources from local archive

In terms of version selection, for the existing mv-ddr-marvell and
binaries-marvell packages, we don't offer any version selection, and
simply hardcode a specific revision in the package itself.

For a3700-utils-marvell, if you want to offer version selection, then
it should be done in the standard way:

choice

config BR2_TARGET_A3700_UTILS_MARVELL_LATEST_VERSION
	bool "18.12.0"

config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_TARBALL
	bool "Custom tarball"

config BR2_TARGET_A3700_UTILS_MARVELL_CUSTOM_GIT
	bool "Custom Git repository"

endchoice

> +
> +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

Please include the hash of the license file.

> 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

Why this site method ? Looks wrong, it will prevent downloading a
tarball.

> +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))

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v3 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700 kostap at marvell.com
@ 2019-02-09 15:17   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2019-02-09 15:17 UTC (permalink / raw)
  To: buildroot

Hello,

Commit title should be:

	boot/arm-trusted-firmware: add support for Marvell Armada 3700

On Tue, 5 Feb 2019 12:45:12 +0200
<kostap@marvell.com> wrote:

> 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..3e490c03c4 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)/bin/arm-none-eabi-

One assignment:

ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
	WTP=$(A3700_UTILS_MARVELL_DIR) \
	CROSS_CM3=$(HOST_DIR)/bin/arm-none-eabi-

> +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += a3700-utils-marvell
> +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-rm-toolchain

One assignment:

ARM_TRUSTED_FIRMWARE_DEPENDENCIES += \
	a3700-utils-marvell \
	host-arm-gnu-rm-toolchain

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets
  2019-02-05 10:45 [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets kostap at marvell.com
                   ` (2 preceding siblings ...)
  2019-02-05 10:45 ` [Buildroot] [PATCH v3 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700 kostap at marvell.com
@ 2019-12-27  7:24 ` Jagan Teki
  3 siblings, 0 replies; 8+ messages in thread
From: Jagan Teki @ 2019-12-27  7:24 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Tue, Feb 5, 2019 at 4:15 PM <kostap@marvell.com> wrote:
>
> 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.
>
> V3 changes:
> patch #1 (arm-gnu-rm-toolchain)
> - Move the toolchain from installation folder to host FS instead of copy it
> - Add symbolic links in $(HOST_DIR)/bin to the toolchain executables
> - Add source files information (download link, license)
> - Change the hash values from localy calculated sha256 to md5 provided by ARM
> patch #2 (a3700-utils-marvell) - no changes
> patch #3 (a3700 boot image build support)
> - Use the $(HOST_DIR)/bin/* links instead of installation path for CROSS_CM3
>
> V2 changes:
> patch #1 (arm-gnu-rm-toolchain)
> - Remove Config.in.host
> - Remove custom extract command
> - Set installation path to $(HOST_DIR)/opt//opt/gcc-arm-none-eabi
> - Update commit message according to review notes
> patch #2 (a3700-utils-marvell) - no changes
> patch #3 (a3700 boot image build support)
> - Update CROSS_CM3 path in arm-trusted-firmware to reflect patch #1 changes
>
> Konstantin Porotchkin (3):
>   package/arm-gnu-rm-toolchain: new package
>   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 +++
>  .../arm-gnu-rm-toolchain.hash                 |  3 ++
>  .../arm-gnu-rm-toolchain.mk                   | 28 +++++++++++
>  7 files changed, 115 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/arm-gnu-rm-toolchain.hash
>  create mode 100644 package/arm-gnu-rm-toolchain/arm-gnu-rm-toolchain.mk

Any chance of picking or reviewing these changes? rockchip rk3399 do
require similar arm32 dependency for ATF. Let us know if you need any
help so-that on this regard.


Jagan.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-27  7:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 10:45 [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets kostap at marvell.com
2019-02-05 10:45 ` [Buildroot] [PATCH v3 1/3] package/arm-gnu-rm-toolchain: new package kostap at marvell.com
2019-02-09 14:47   ` Thomas Petazzoni
2019-02-05 10:45 ` [Buildroot] [PATCH v3 2/3] boot: a3700-utils-marvell: Add Armada-3700 utilities kostap at marvell.com
2019-02-09 15:15   ` Thomas Petazzoni
2019-02-05 10:45 ` [Buildroot] [PATCH v3 3/3] boot: arm-trusted-firmware: add support for Marvell Armada 3700 kostap at marvell.com
2019-02-09 15:17   ` Thomas Petazzoni
2019-12-27  7:24 ` [Buildroot] [PATCH v3 0/3] Support 32-bit code generation for Armv8 targets Jagan Teki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.