Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] new package: atfirmware
  2016-06-01 10:49 [Buildroot] [PATCH v2 0/2] new package: atfirmware Joao Pinto
@ 2016-05-09  9:27 ` Joao Pinto
       [not found]   ` <20160509225510.GA18182@e106497-lin.cambridge.arm.com>
  2016-06-01 10:49 ` [Buildroot] [PATCH v2 1/2] new packages: atfirmware and scpfirmware Joao Pinto
  2016-06-01 10:49 ` [Buildroot] [PATCH v2 2/2] configs: add u-boot and atfirmware options to juno Joao Pinto
  2 siblings, 1 reply; 9+ messages in thread
From: Joao Pinto @ 2016-05-09  9:27 UTC (permalink / raw)
  To: buildroot

Hi guys,
I will have to give a Juno training soon, and this feature would be great to
have in the time. Could you comment of the atfirmware patch? Do you have any
improvement suggestions?

Thanks.

On 5/3/2016 11:13 AM, Joao Pinto wrote:
> This patch adds to buildroot an important package for ARM64 based development 
> boards: The ARM Trusted Firmware (atfirmware).
> It also adds the scpfirmware which is a hidden package to get the System Control
> Processor (SCP) binary to be included in the bootloader (fip image), which is
> a requirement for ARM Juno's board. With this 2 packages, Juno gets fully 
> supported in the Buildroot.
> 
> Joao Pinto (2):
>   new packages: atfirmware and scpfirmware
>   configs: add u-noot and atfirmware options to juno
> 
>  board/arm/juno/readme.txt       | 21 ++++++++--
>  boot/Config.in                  |  2 +
>  boot/atfirmware/Config.in       | 70 +++++++++++++++++++++++++++++++++
>  boot/atfirmware/atfirmware.hash |  5 +++
>  boot/atfirmware/atfirmware.mk   | 85 +++++++++++++++++++++++++++++++++++++++++
>  boot/scpfirmware/Config.in      | 23 +++++++++++
>  boot/scpfirmware/scpfirmware.mk | 18 +++++++++
>  configs/arm_juno_defconfig      |  9 +++++
>  8 files changed, 230 insertions(+), 3 deletions(-)
>  create mode 100644 boot/atfirmware/Config.in
>  create mode 100644 boot/atfirmware/atfirmware.hash
>  create mode 100644 boot/atfirmware/atfirmware.mk
>  create mode 100644 boot/scpfirmware/Config.in
>  create mode 100644 boot/scpfirmware/scpfirmware.mk
> 

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

* [Buildroot] [PATCH 0/2] new package: atfirmware
       [not found]   ` <20160509225510.GA18182@e106497-lin.cambridge.arm.com>
@ 2016-05-10  9:00     ` Joao Pinto
  2016-05-13 10:20       ` Joao Pinto
  0 siblings, 1 reply; 9+ messages in thread
From: Joao Pinto @ 2016-05-10  9:00 UTC (permalink / raw)
  To: buildroot

On 5/9/2016 11:55 PM, Liviu.Dudau at arm.com wrote:
> On Mon, May 09, 2016 at 10:27:12AM +0100, Joao Pinto wrote:
>> Hi guys,
>> I will have to give a Juno training soon, and this feature would be great to
>> have in the time. Could you comment of the atfirmware patch? Do you have any
>> improvement suggestions?
> 
> It looks good to me but I have no ACK powers in the buildroot world.
> 
> I am traveling away from my Juno boards at the moment so I cannot add my Tested-by.
> 
> Best regards,
> Liviu

Thanks Liviu!

> 
>>
>> Thanks.
>>
>> On 5/3/2016 11:13 AM, Joao Pinto wrote:
>>> This patch adds to buildroot an important package for ARM64 based development 
>>> boards: The ARM Trusted Firmware (atfirmware).
>>> It also adds the scpfirmware which is a hidden package to get the System Control
>>> Processor (SCP) binary to be included in the bootloader (fip image), which is
>>> a requirement for ARM Juno's board. With this 2 packages, Juno gets fully 
>>> supported in the Buildroot.
>>>
>>> Joao Pinto (2):
>>>   new packages: atfirmware and scpfirmware
>>>   configs: add u-noot and atfirmware options to juno
>>>
>>>  board/arm/juno/readme.txt       | 21 ++++++++--
>>>  boot/Config.in                  |  2 +
>>>  boot/atfirmware/Config.in       | 70 +++++++++++++++++++++++++++++++++
>>>  boot/atfirmware/atfirmware.hash |  5 +++
>>>  boot/atfirmware/atfirmware.mk   | 85 +++++++++++++++++++++++++++++++++++++++++
>>>  boot/scpfirmware/Config.in      | 23 +++++++++++
>>>  boot/scpfirmware/scpfirmware.mk | 18 +++++++++
>>>  configs/arm_juno_defconfig      |  9 +++++
>>>  8 files changed, 230 insertions(+), 3 deletions(-)
>>>  create mode 100644 boot/atfirmware/Config.in
>>>  create mode 100644 boot/atfirmware/atfirmware.hash
>>>  create mode 100644 boot/atfirmware/atfirmware.mk
>>>  create mode 100644 boot/scpfirmware/Config.in
>>>  create mode 100644 boot/scpfirmware/scpfirmware.mk
>>>
>>
> 

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

* [Buildroot] [PATCH 0/2] new package: atfirmware
  2016-05-10  9:00     ` Joao Pinto
@ 2016-05-13 10:20       ` Joao Pinto
  2016-05-13 13:08         ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Joao Pinto @ 2016-05-13 10:20 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
Could you please check the patches?

Thanks a lot!

On 5/10/2016 10:00 AM, Joao Pinto wrote:
> On 5/9/2016 11:55 PM, Liviu.Dudau at arm.com wrote:
>> On Mon, May 09, 2016 at 10:27:12AM +0100, Joao Pinto wrote:
>>> Hi guys,
>>> I will have to give a Juno training soon, and this feature would be great to
>>> have in the time. Could you comment of the atfirmware patch? Do you have any
>>> improvement suggestions?
>>
>> It looks good to me but I have no ACK powers in the buildroot world.
>>
>> I am traveling away from my Juno boards at the moment so I cannot add my Tested-by.
>>
>> Best regards,
>> Liviu
> 
> Thanks Liviu!
> 
>>
>>>
>>> Thanks.
>>>
>>> On 5/3/2016 11:13 AM, Joao Pinto wrote:
>>>> This patch adds to buildroot an important package for ARM64 based development 
>>>> boards: The ARM Trusted Firmware (atfirmware).
>>>> It also adds the scpfirmware which is a hidden package to get the System Control
>>>> Processor (SCP) binary to be included in the bootloader (fip image), which is
>>>> a requirement for ARM Juno's board. With this 2 packages, Juno gets fully 
>>>> supported in the Buildroot.
>>>>
>>>> Joao Pinto (2):
>>>>   new packages: atfirmware and scpfirmware
>>>>   configs: add u-noot and atfirmware options to juno
>>>>
>>>>  board/arm/juno/readme.txt       | 21 ++++++++--
>>>>  boot/Config.in                  |  2 +
>>>>  boot/atfirmware/Config.in       | 70 +++++++++++++++++++++++++++++++++
>>>>  boot/atfirmware/atfirmware.hash |  5 +++
>>>>  boot/atfirmware/atfirmware.mk   | 85 +++++++++++++++++++++++++++++++++++++++++
>>>>  boot/scpfirmware/Config.in      | 23 +++++++++++
>>>>  boot/scpfirmware/scpfirmware.mk | 18 +++++++++
>>>>  configs/arm_juno_defconfig      |  9 +++++
>>>>  8 files changed, 230 insertions(+), 3 deletions(-)
>>>>  create mode 100644 boot/atfirmware/Config.in
>>>>  create mode 100644 boot/atfirmware/atfirmware.hash
>>>>  create mode 100644 boot/atfirmware/atfirmware.mk
>>>>  create mode 100644 boot/scpfirmware/Config.in
>>>>  create mode 100644 boot/scpfirmware/scpfirmware.mk
>>>>
>>>
>>
> 

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

* [Buildroot] [PATCH 0/2] new package: atfirmware
  2016-05-13 10:20       ` Joao Pinto
@ 2016-05-13 13:08         ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2016-05-13 13:08 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 13 May 2016 11:20:49 +0100, Joao Pinto wrote:

> Could you please check the patches?

Joao, I really do appreciate your patches, but it is definitely not
useful to ping every two days about them. There are currently 282
patches in the queue, so there's many many other patches than yours.

If you want to help, please review and/or test patches from others.

I'll get to your patches at some point (or someone else will), but this
may not happen in just two days.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [RESEND] [PATCH 2/2] configs: add u-noot and atfirmware options to juno
       [not found]   ` <20160601103734.GB23566@e106497-lin.cambridge.arm.com>
@ 2016-06-01 10:45     ` Joao Pinto
  0 siblings, 0 replies; 9+ messages in thread
From: Joao Pinto @ 2016-06-01 10:45 UTC (permalink / raw)
  To: buildroot

Hi,

On 6/1/2016 11:37 AM, Liviu.Dudau at arm.com wrote:
> Hi Joao,
> 
> Your commit subject contains a mis-spelling of U-Boot.
> 
> Also, your "Resend" is not the same version as the original, you have changed
> BR2_TARGET_UBOOT_DEFCONFIG into BR2_TARGET_UBOOT_BOARDNAME. I've discovered
> that because I have applied your original patch and not the "Resend". Please
> label the patches correctly and add version number and logs to the 0/x email
> at least.

You spotted that right, thanks! Going to send e v2 in a sec.

> 
> I've given the build a go, it boots fine on my Juno r0 board (well, mostly,
> the hardcoded command line is waiting for /dev/sda2 which is not going to
> work for me because I have an NFS rootfs).
> 
> Best regards,
> Liviu
> 

Thanks,
Joao

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

* [Buildroot] [PATCH v2 0/2] new package: atfirmware
@ 2016-06-01 10:49 Joao Pinto
  2016-05-09  9:27 ` [Buildroot] [PATCH " Joao Pinto
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Joao Pinto @ 2016-06-01 10:49 UTC (permalink / raw)
  To: buildroot

This patch adds to buildroot an important package for ARM64 based development 
boards: The ARM Trusted Firmware (atfirmware).
It also adds the scpfirmware which is a hidden package to get the System Control
Processor (SCP) binary to be included in the bootloader (fip image), which is
a requirement for ARM Juno's board. With this 2 packages, Juno gets fully 
supported in the Buildroot.

Joao Pinto (2):
  new packages: atfirmware and scpfirmware
  configs: add u-noot and atfirmware options to juno

 board/arm/juno/readme.txt       | 21 ++++++++--
 boot/Config.in                  |  2 +
 boot/atfirmware/Config.in       | 70 +++++++++++++++++++++++++++++++++
 boot/atfirmware/atfirmware.hash |  5 +++
 boot/atfirmware/atfirmware.mk   | 85 +++++++++++++++++++++++++++++++++++++++++
 boot/scpfirmware/Config.in      | 23 +++++++++++
 boot/scpfirmware/scpfirmware.mk | 18 +++++++++
 configs/arm_juno_defconfig      |  9 +++++
 8 files changed, 230 insertions(+), 3 deletions(-)
 create mode 100644 boot/atfirmware/Config.in
 create mode 100644 boot/atfirmware/atfirmware.hash
 create mode 100644 boot/atfirmware/atfirmware.mk
 create mode 100644 boot/scpfirmware/Config.in
 create mode 100644 boot/scpfirmware/scpfirmware.mk

-- 
1.8.1.5

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

* [Buildroot] [PATCH v2 1/2] new packages: atfirmware and scpfirmware
  2016-06-01 10:49 [Buildroot] [PATCH v2 0/2] new package: atfirmware Joao Pinto
  2016-05-09  9:27 ` [Buildroot] [PATCH " Joao Pinto
@ 2016-06-01 10:49 ` Joao Pinto
  2016-07-05 15:50   ` [Buildroot] [RESEND][PATCH " Maxime Hadjinlian
  2016-06-01 10:49 ` [Buildroot] [PATCH v2 2/2] configs: add u-boot and atfirmware options to juno Joao Pinto
  2 siblings, 1 reply; 9+ messages in thread
From: Joao Pinto @ 2016-06-01 10:49 UTC (permalink / raw)
  To: buildroot

This patch adds 2 new packages to buildroot: atfirmware and scpfirmware.
The first is used to generate the necessary bootlader binaries for ARM boards
and the second is a hidden package that only serves to get the scp binary
from Linaro repository to be used by ATFirmware (Juno requirement).

Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
Changes v1->v2:
- Nothing changed (just to keep up with patch set version).

 boot/Config.in                  |  2 +
 boot/atfirmware/Config.in       | 70 +++++++++++++++++++++++++++++++++
 boot/atfirmware/atfirmware.hash |  5 +++
 boot/atfirmware/atfirmware.mk   | 85 +++++++++++++++++++++++++++++++++++++++++
 boot/scpfirmware/Config.in      | 23 +++++++++++
 boot/scpfirmware/scpfirmware.mk | 18 +++++++++
 6 files changed, 203 insertions(+)
 create mode 100644 boot/atfirmware/Config.in
 create mode 100644 boot/atfirmware/atfirmware.hash
 create mode 100644 boot/atfirmware/atfirmware.mk
 create mode 100644 boot/scpfirmware/Config.in
 create mode 100644 boot/scpfirmware/scpfirmware.mk

diff --git a/boot/Config.in b/boot/Config.in
index 54760b9..246d6a1 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -3,6 +3,7 @@ menu "Bootloaders"
 source "boot/at91bootstrap/Config.in"
 source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
+source "boot/atfirmware/Config.in"
 source "boot/barebox/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub/Config.in"
@@ -11,6 +12,7 @@ source "boot/gummiboot/Config.in"
 source "boot/lpc32xxcdl/Config.in"
 source "boot/mxs-bootlets/Config.in"
 source "boot/syslinux/Config.in"
+source "boot/scpfirmware/Config.in"
 source "boot/uboot/Config.in"
 source "boot/xloader/Config.in"
 
diff --git a/boot/atfirmware/Config.in b/boot/atfirmware/Config.in
new file mode 100644
index 0000000..b116144
--- /dev/null
+++ b/boot/atfirmware/Config.in
@@ -0,0 +1,70 @@
+config BR2_TARGET_ATFIRMWARE
+	bool "ARM Trusted Firmware (ATF)"
+	depends on BR2_aarch64 && BR2_TARGET_UBOOT
+	select BR2_TARGET_SCPFIRMWARE if BR2_TARGET_ATFIRMWARE_PLATFORM='juno'
+	help
+	  Enable this option if you want to build the ATF for your ARM based
+	  embedded device.
+
+if BR2_TARGET_ATFIRMWARE
+choice
+	prompt "version"
+	help
+	  Select the specific ATF version you want to use
+
+config BR2_TARGET_ATFIRMWARE_LATEST_VERSION
+	bool "v1.2"
+
+config BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL
+	bool "Custom tarball"
+
+config BR2_TARGET_ATFIRMWARE_CUSTOM_GIT
+	bool "Custom Git repository"
+
+endchoice
+
+if BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL
+
+config BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION
+	string "URL of custom ARM Trusted Firmware tarball"
+
+endif
+
+config BR2_TARGET_ATFIRMWARE_VERSION
+	string
+	default "v1.2"	if BR2_TARGET_ATFIRMWARE_LATEST_VERSION
+	default "custom"	if BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL
+	default BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_VERSION if BR2_TARGET_ATFIRMWARE_CUSTOM_GIT
+
+config BR2_TARGET_ATFIRMWARE_CUSTOM_PATCH_DIR
+	string "Custom patch dir"
+	help
+	  If your ATF requires custom patches, add the path to the
+	  directory containing the patches here.
+
+if BR2_TARGET_ATFIRMWARE_CUSTOM_GIT
+
+config BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL
+	string "URL of custom Git repository"
+
+config BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_VERSION
+	string "Custom Git version"
+	help
+	  Revision to use in the typical format used by Git
+	  E.G. a sha id, a tag, ..
+
+endif
+
+config BR2_TARGET_ATFIRMWARE_PLATFORM
+	string "Name of ATF platform to build for"
+	help
+	  Target plaform to build for.
+	  E.G. If using ARM Juno, please type 'juno'
+
+config BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES
+	string "Additional ATF build variables"
+	help
+	  Additional parameters for the ATF build
+	  E.G. 'DEBUG=1 LOG_LEVEL=20'
+
+endif
diff --git a/boot/atfirmware/atfirmware.hash b/boot/atfirmware/atfirmware.hash
new file mode 100644
index 0000000..05a90c7
--- /dev/null
+++ b/boot/atfirmware/atfirmware.hash
@@ -0,0 +1,5 @@
+# From https://github.com/ARM-software/arm-trusted-firmware/archive/v1.2.tar.gz
+# Locally calculated
+sha256 fac2c08bd74337fec2e14a98fc9f748f atfirmware-v1.2.tar.gz
+md5 fac2c08bd74337fec2e14a98fc9f748f atfirmware-v1.2.tar.gz
+
diff --git a/boot/atfirmware/atfirmware.mk b/boot/atfirmware/atfirmware.mk
new file mode 100644
index 0000000..e2744c0
--- /dev/null
+++ b/boot/atfirmware/atfirmware.mk
@@ -0,0 +1,85 @@
+################################################################################
+#
+# ARM Trusted Firmware
+#
+################################################################################
+
+ATFIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_VERSION))
+
+#package dependencies
+ATFIRMWARE_DEPENDENCIES += uboot
+
+ifeq ($(ATFIRMWARE_VERSION),custom)
+# Handle custom ATF tarballs as specified by the configuration
+ATFIRMWARE_TARBALL = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION))
+ATFIRMWARE_SITE = $(patsubst %/,%,$(dir $(ATFIRMWARE_TARBALL)))
+ATFIRMWARE_SOURCE = $(notdir $(ATFIRMWARE_TARBALL))
+BR_NO_CHECK_HASH_FOR += $(ATFIRMWARE_SOURCE)
+else ifeq ($(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT),y)
+ATFIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL))
+ATFIRMWARE_SITE_METHOD = git
+endif
+
+ifneq ($(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_PATCH_DIR)),)
+define ATFIRMWARE_APPLY_CUSTOM_PATCHES
+	$(APPLY_PATCHES) $(@D) \
+		$(BR2_TARGET_ATFIRMWARE_CUSTOM_PATCH_DIR) \*.patch
+endef
+
+ATFIRMWARE_POST_PATCH_HOOKS += ATFIRMWARE_APPLY_CUSTOM_PATCHES
+endif
+
+ATFIRMWARE_INSTALL_IMAGES = YES
+
+# Automatically find the U-Boot binary
+ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME)),)
+ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/"u-boot.bin"
+else
+ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
+endif
+
+ATFIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_PLATFORM))
+
+#if juno target is selected, then lets configured the expected SCP firmware binary
+ifeq ($(ATFIRMWARE_PLATFORM),juno)
+ATFIRMWARE_SCP_FIRMWARE="SCP_BL2=$(BINARIES_DIR)/scp-fw.bin"
+#configure the dependencie of scpfirmware package
+ATFIRMWARE_DEPENDENCIES += scpfirmware
+endif
+
+ATFIRMWARE_MAKE_OPTS += \
+	CROSS_COMPILE="$(TARGET_CROSS)" \
+	BL33=$(call qstrip,$(ATFIRMWARE_PAYLOAD_PATH)) \
+	$(call qstrip,$(BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES)) \
+	$(ATFIRMWARE_SCP_FIRMWARE) \
+	PLAT=$(ATFIRMWARE_PLATFORM) \
+	all fip
+
+define ATFIRMWARE_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) \
+	$(MAKE) -C $(@D) $(ATFIRMWARE_MAKE_OPTS) \
+	$(ATFIRMWARE_MAKE_TARGET)
+endef
+
+define ATFIRMWARE_INSTALL_IMAGES_CMDS
+	cp -dpf $(@D)/build/$(ATFIRMWARE_PLATFORM)/release/*.bin $(BINARIES_DIR)/ ;
+endef
+
+# Configuration ckeck
+ifeq ($(BR2_TARGET_ATFIRMWARE)$(BR_BUILDING),yy)
+
+ifeq ($(ATFIRMWARE_VERSION),custom)
+ifeq ($(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION))),)
+$(error No tarball location specified. Please check BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION))
+endif
+endif
+
+ifeq ($(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT),y)
+ifeq ($(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL)),)
+$(error No repository specified. Please check BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL)
+endif
+endif
+
+endif
+
+$(eval $(generic-package))
diff --git a/boot/scpfirmware/Config.in b/boot/scpfirmware/Config.in
new file mode 100644
index 0000000..f2acc24
--- /dev/null
+++ b/boot/scpfirmware/Config.in
@@ -0,0 +1,23 @@
+config BR2_TARGET_SCPFIRMWARE
+	bool
+	depends on BR2_aarch64
+
+if BR2_TARGET_SCPFIRMWARE
+
+config BR2_TARGET_SCPFIRMWARE_VERSION
+	string
+	default BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_VERSION
+
+config BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT
+	bool
+	default "y"
+
+config BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_REPO_URL
+	string
+	default "https://git.linaro.org/arm/vexpress-firmware.git"
+
+config BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_VERSION
+	string
+	default "901f81977c3b367a2e0bf3d6444be302822d97a3"
+
+endif
diff --git a/boot/scpfirmware/scpfirmware.mk b/boot/scpfirmware/scpfirmware.mk
new file mode 100644
index 0000000..0508a21
--- /dev/null
+++ b/boot/scpfirmware/scpfirmware.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# System Control Processor (SCP) Firmware
+#
+################################################################################
+
+SCPFIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_SCPFIRMWARE_VERSION))
+SCPFIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_REPO_URL))
+SCPFIRMWARE_SITE_METHOD = git
+
+SCPFIRMWARE_INSTALL_IMAGES = YES
+
+define SCPFIRMWARE_INSTALL_IMAGES_CMDS
+	mv $(@D)/SOFTWARE/bl30.bin $(@D)/SOFTWARE/scp-fw.bin ;	\
+	cp -dpf $(@D)/SOFTWARE/scp-fw.bin $(BINARIES_DIR)/ ;
+endef
+
+$(eval $(generic-package))
-- 
1.8.1.5

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

* [Buildroot] [PATCH v2 2/2] configs: add u-boot and atfirmware options to juno
  2016-06-01 10:49 [Buildroot] [PATCH v2 0/2] new package: atfirmware Joao Pinto
  2016-05-09  9:27 ` [Buildroot] [PATCH " Joao Pinto
  2016-06-01 10:49 ` [Buildroot] [PATCH v2 1/2] new packages: atfirmware and scpfirmware Joao Pinto
@ 2016-06-01 10:49 ` Joao Pinto
       [not found]   ` <20160601103734.GB23566@e106497-lin.cambridge.arm.com>
  2 siblings, 1 reply; 9+ messages in thread
From: Joao Pinto @ 2016-06-01 10:49 UTC (permalink / raw)
  To: buildroot

This patch adds the necessary U-Boot and ATFirmware configurations to the
Juno's defconfig and updates the readme.txt file regarding the new output
binaries.

Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
Changes v1->v2:
- Changed BR2_TARGET_UBOOT_DEFCONFIG to BR2_TARGET_UBOOT_BOARDNAME
- Fixed a typo in the e-mail subject

 board/arm/juno/readme.txt  | 21 ++++++++++++++++++---
 configs/arm_juno_defconfig |  9 +++++++++
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/board/arm/juno/readme.txt b/board/arm/juno/readme.txt
index 52fabf9..2a2af55 100644
--- a/board/arm/juno/readme.txt
+++ b/board/arm/juno/readme.txt
@@ -7,8 +7,8 @@ These instructions apply to all models of the ARM Juno:
   - Juno r0 (does not support PCIe)
   - Juno r1 (supports PCIe)
 
-Buildroot will generate the kernel image, device tree blob and a
-minimal root filesystem.
+Buildroot will generate the kernel image, device tree blob, bootloader binaries
+and a minimal root filesystem.
 
 How to build it
 ===============
@@ -42,6 +42,20 @@ After building, you should obtain this tree:
     +-- juno.dtb (if Juno r0 is used)
     +-- juno-r1.dtb (if Juno r1 is used)
     +-- Image
+    +-- bl1.bin
+    +-- bl2.bin
+    +-- bl2u.bin
+    +-- bl31.bin
+    +-- fip.bin
+    +-- scp-fw.bin
+    +-- u-boot.bin
+
+Preparing your rootfs
+======================
+
+Format your pen drive as a ext3 filesystem by executing:
+
+   $ mkfs.ext3 /dev/<your device>
 
 Preparing your rootfs
 ======================
@@ -98,7 +112,8 @@ Installing kernel image and DTB
 3. Open the software/ folder
 4. Copy the 'Image' file to software/
 5. Copy the 'juno-r1.dtb' (r1) or the 'juno.dtb' (r0) file to software/
-6. Press the red button in the front pannel of ARM Juno
+6. Copy the bootloader binaries (bl1.bin and fip.bin) to software/
+7. Press the red button in the front pannel of ARM Juno
 
 At this time, the board will erase the Flash entry for each new item and
 replace it with the lastest ones.
diff --git a/configs/arm_juno_defconfig b/configs/arm_juno_defconfig
index 87b6374..2349000 100644
--- a/configs/arm_juno_defconfig
+++ b/configs/arm_juno_defconfig
@@ -12,3 +12,12 @@ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/arm/juno/linux-juno-defconfig"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="arm/juno arm/juno-r1"
+BR2_TARGET_ATFIRMWARE=y
+BR2_TARGET_ATFIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git"
+BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_VERSION="v1.2"
+BR2_TARGET_ATFIRMWARE_PLATFORM="juno"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="vexpress_aemv8a_juno"
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.03"
-- 
1.8.1.5

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

* [Buildroot] [RESEND][PATCH v2 1/2] new packages: atfirmware and scpfirmware
  2016-06-01 10:49 ` [Buildroot] [PATCH v2 1/2] new packages: atfirmware and scpfirmware Joao Pinto
@ 2016-07-05 15:50   ` Maxime Hadjinlian
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Hadjinlian @ 2016-07-05 15:50 UTC (permalink / raw)
  To: buildroot

Hi Joao,

You add two patches within the same patch, we strongly prefer to have
atomic changes, so it would nice if you could split and resend your
series.

Meanwhile it will be marked as "Changes Request" in our patchwork.

On Thu, Jun 30, 2016 at 6:29 PM, Joao Pinto <Joao.Pinto@synopsys.com> wrote:
> This patch adds 2 new packages to buildroot: atfirmware and scpfirmware.
> The first is used to generate the necessary bootlader binaries for ARM boards
> and the second is a hidden package that only serves to get the scp binary
> from Linaro repository to be used by ATFirmware (Juno requirement).
>
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
> Tested-by: Liviu Dudau <Liviu.Dudau@arm.com>
> ---
> Changes v1->v2:
> - Nothing changed (just to keep up with patch set version).
>
>  boot/Config.in                  |  2 +
>  boot/atfirmware/Config.in       | 70 +++++++++++++++++++++++++++++++++
>  boot/atfirmware/atfirmware.hash |  5 +++
>  boot/atfirmware/atfirmware.mk   | 85 +++++++++++++++++++++++++++++++++++++++++
>  boot/scpfirmware/Config.in      | 23 +++++++++++
>  boot/scpfirmware/scpfirmware.mk | 18 +++++++++
>  6 files changed, 203 insertions(+)
>  create mode 100644 boot/atfirmware/Config.in
>  create mode 100644 boot/atfirmware/atfirmware.hash
>  create mode 100644 boot/atfirmware/atfirmware.mk
>  create mode 100644 boot/scpfirmware/Config.in
>  create mode 100644 boot/scpfirmware/scpfirmware.mk
>
> diff --git a/boot/Config.in b/boot/Config.in
> index 54760b9..246d6a1 100644
> --- a/boot/Config.in
> +++ b/boot/Config.in
> @@ -3,6 +3,7 @@ menu "Bootloaders"
>  source "boot/at91bootstrap/Config.in"
>  source "boot/at91bootstrap3/Config.in"
>  source "boot/at91dataflashboot/Config.in"
> +source "boot/atfirmware/Config.in"
>  source "boot/barebox/Config.in"
>  source "boot/boot-wrapper-aarch64/Config.in"
>  source "boot/grub/Config.in"
> @@ -11,6 +12,7 @@ source "boot/gummiboot/Config.in"
>  source "boot/lpc32xxcdl/Config.in"
>  source "boot/mxs-bootlets/Config.in"
>  source "boot/syslinux/Config.in"
> +source "boot/scpfirmware/Config.in"
>  source "boot/uboot/Config.in"
>  source "boot/xloader/Config.in"
>
> diff --git a/boot/atfirmware/Config.in b/boot/atfirmware/Config.in
> new file mode 100644
> index 0000000..b116144
> --- /dev/null
> +++ b/boot/atfirmware/Config.in
> @@ -0,0 +1,70 @@
> +config BR2_TARGET_ATFIRMWARE
> +       bool "ARM Trusted Firmware (ATF)"
> +       depends on BR2_aarch64 && BR2_TARGET_UBOOT
> +       select BR2_TARGET_SCPFIRMWARE if BR2_TARGET_ATFIRMWARE_PLATFORM='juno'
> +       help
> +         Enable this option if you want to build the ATF for your ARM based
> +         embedded device.
> +
> +if BR2_TARGET_ATFIRMWARE
> +choice
> +       prompt "version"
> +       help
> +         Select the specific ATF version you want to use
> +
> +config BR2_TARGET_ATFIRMWARE_LATEST_VERSION
> +       bool "v1.2"
> +
> +config BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL
> +       bool "Custom tarball"
> +
> +config BR2_TARGET_ATFIRMWARE_CUSTOM_GIT
> +       bool "Custom Git repository"
> +
> +endchoice
> +
> +if BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL
> +
> +config BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION
> +       string "URL of custom ARM Trusted Firmware tarball"
> +
> +endif
> +
> +config BR2_TARGET_ATFIRMWARE_VERSION
> +       string
> +       default "v1.2"  if BR2_TARGET_ATFIRMWARE_LATEST_VERSION
> +       default "custom"        if BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL
> +       default BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_VERSION if BR2_TARGET_ATFIRMWARE_CUSTOM_GIT
> +
> +config BR2_TARGET_ATFIRMWARE_CUSTOM_PATCH_DIR
> +       string "Custom patch dir"
> +       help
> +         If your ATF requires custom patches, add the path to the
> +         directory containing the patches here.
> +
> +if BR2_TARGET_ATFIRMWARE_CUSTOM_GIT
> +
> +config BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL
> +       string "URL of custom Git repository"
> +
> +config BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_VERSION
> +       string "Custom Git version"
> +       help
> +         Revision to use in the typical format used by Git
> +         E.G. a sha id, a tag, ..
> +
> +endif
> +
> +config BR2_TARGET_ATFIRMWARE_PLATFORM
> +       string "Name of ATF platform to build for"
> +       help
> +         Target plaform to build for.
> +         E.G. If using ARM Juno, please type 'juno'
> +
> +config BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES
> +       string "Additional ATF build variables"
> +       help
> +         Additional parameters for the ATF build
> +         E.G. 'DEBUG=1 LOG_LEVEL=20'
> +
> +endif
> diff --git a/boot/atfirmware/atfirmware.hash b/boot/atfirmware/atfirmware.hash
> new file mode 100644
> index 0000000..05a90c7
> --- /dev/null
> +++ b/boot/atfirmware/atfirmware.hash
> @@ -0,0 +1,5 @@
> +# From https://github.com/ARM-software/arm-trusted-firmware/archive/v1.2.tar.gz
> +# Locally calculated
> +sha256 fac2c08bd74337fec2e14a98fc9f748f atfirmware-v1.2.tar.gz
> +md5 fac2c08bd74337fec2e14a98fc9f748f atfirmware-v1.2.tar.gz
> +
> diff --git a/boot/atfirmware/atfirmware.mk b/boot/atfirmware/atfirmware.mk
> new file mode 100644
> index 0000000..e2744c0
> --- /dev/null
> +++ b/boot/atfirmware/atfirmware.mk
> @@ -0,0 +1,85 @@
> +################################################################################
> +#
> +# ARM Trusted Firmware
> +#
> +################################################################################
> +
> +ATFIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_VERSION))
> +
> +#package dependencies
> +ATFIRMWARE_DEPENDENCIES += uboot
> +
> +ifeq ($(ATFIRMWARE_VERSION),custom)
> +# Handle custom ATF tarballs as specified by the configuration
> +ATFIRMWARE_TARBALL = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION))
> +ATFIRMWARE_SITE = $(patsubst %/,%,$(dir $(ATFIRMWARE_TARBALL)))
> +ATFIRMWARE_SOURCE = $(notdir $(ATFIRMWARE_TARBALL))
> +BR_NO_CHECK_HASH_FOR += $(ATFIRMWARE_SOURCE)
> +else ifeq ($(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT),y)
> +ATFIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL))
> +ATFIRMWARE_SITE_METHOD = git
> +endif
> +
> +ifneq ($(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_PATCH_DIR)),)
> +define ATFIRMWARE_APPLY_CUSTOM_PATCHES
> +       $(APPLY_PATCHES) $(@D) \
> +               $(BR2_TARGET_ATFIRMWARE_CUSTOM_PATCH_DIR) \*.patch
> +endef
> +
> +ATFIRMWARE_POST_PATCH_HOOKS += ATFIRMWARE_APPLY_CUSTOM_PATCHES
> +endif
> +
> +ATFIRMWARE_INSTALL_IMAGES = YES
> +
> +# Automatically find the U-Boot binary
> +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME)),)
> +ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/"u-boot.bin"
> +else
> +ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
> +endif
> +
> +ATFIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ATFIRMWARE_PLATFORM))
> +
> +#if juno target is selected, then lets configured the expected SCP firmware binary
> +ifeq ($(ATFIRMWARE_PLATFORM),juno)
> +ATFIRMWARE_SCP_FIRMWARE="SCP_BL2=$(BINARIES_DIR)/scp-fw.bin"
> +#configure the dependencie of scpfirmware package
> +ATFIRMWARE_DEPENDENCIES += scpfirmware
> +endif
> +
> +ATFIRMWARE_MAKE_OPTS += \
> +       CROSS_COMPILE="$(TARGET_CROSS)" \
> +       BL33=$(call qstrip,$(ATFIRMWARE_PAYLOAD_PATH)) \
> +       $(call qstrip,$(BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES)) \
> +       $(ATFIRMWARE_SCP_FIRMWARE) \
> +       PLAT=$(ATFIRMWARE_PLATFORM) \
> +       all fip
> +
> +define ATFIRMWARE_BUILD_CMDS
> +       $(TARGET_CONFIGURE_OPTS) \
> +       $(MAKE) -C $(@D) $(ATFIRMWARE_MAKE_OPTS) \
> +       $(ATFIRMWARE_MAKE_TARGET)
> +endef
> +
> +define ATFIRMWARE_INSTALL_IMAGES_CMDS
> +       cp -dpf $(@D)/build/$(ATFIRMWARE_PLATFORM)/release/*.bin $(BINARIES_DIR)/ ;
> +endef
> +
> +# Configuration ckeck
> +ifeq ($(BR2_TARGET_ATFIRMWARE)$(BR_BUILDING),yy)
> +
> +ifeq ($(ATFIRMWARE_VERSION),custom)
> +ifeq ($(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION))),)
> +$(error No tarball location specified. Please check BR2_TARGET_ATFIRMWARE_CUSTOM_TARBALL_LOCATION))
> +endif
> +endif
> +
> +ifeq ($(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT),y)
> +ifeq ($(call qstrip,$(BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL)),)
> +$(error No repository specified. Please check BR2_TARGET_ATFIRMWARE_CUSTOM_GIT_REPO_URL)
> +endif
> +endif
> +
> +endif
> +
> +$(eval $(generic-package))
> diff --git a/boot/scpfirmware/Config.in b/boot/scpfirmware/Config.in
> new file mode 100644
> index 0000000..f2acc24
> --- /dev/null
> +++ b/boot/scpfirmware/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_TARGET_SCPFIRMWARE
> +       bool
> +       depends on BR2_aarch64
> +
> +if BR2_TARGET_SCPFIRMWARE
> +
> +config BR2_TARGET_SCPFIRMWARE_VERSION
> +       string
> +       default BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_VERSION
> +
> +config BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT
> +       bool
> +       default "y"
> +
> +config BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_REPO_URL
> +       string
> +       default "https://git.linaro.org/arm/vexpress-firmware.git"
> +
> +config BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_VERSION
> +       string
> +       default "901f81977c3b367a2e0bf3d6444be302822d97a3"
> +
> +endif
> diff --git a/boot/scpfirmware/scpfirmware.mk b/boot/scpfirmware/scpfirmware.mk
> new file mode 100644
> index 0000000..0508a21
> --- /dev/null
> +++ b/boot/scpfirmware/scpfirmware.mk
> @@ -0,0 +1,18 @@
> +################################################################################
> +#
> +# System Control Processor (SCP) Firmware
> +#
> +################################################################################
> +
> +SCPFIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_SCPFIRMWARE_VERSION))
> +SCPFIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_SCPFIRMWARE_CUSTOM_GIT_REPO_URL))
> +SCPFIRMWARE_SITE_METHOD = git
> +
> +SCPFIRMWARE_INSTALL_IMAGES = YES
> +
> +define SCPFIRMWARE_INSTALL_IMAGES_CMDS
> +       mv $(@D)/SOFTWARE/bl30.bin $(@D)/SOFTWARE/scp-fw.bin ;  \
> +       cp -dpf $(@D)/SOFTWARE/scp-fw.bin $(BINARIES_DIR)/ ;
> +endef
> +
> +$(eval $(generic-package))
> --
> 1.8.1.5
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2016-07-05 15:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 10:49 [Buildroot] [PATCH v2 0/2] new package: atfirmware Joao Pinto
2016-05-09  9:27 ` [Buildroot] [PATCH " Joao Pinto
     [not found]   ` <20160509225510.GA18182@e106497-lin.cambridge.arm.com>
2016-05-10  9:00     ` Joao Pinto
2016-05-13 10:20       ` Joao Pinto
2016-05-13 13:08         ` Thomas Petazzoni
2016-06-01 10:49 ` [Buildroot] [PATCH v2 1/2] new packages: atfirmware and scpfirmware Joao Pinto
2016-07-05 15:50   ` [Buildroot] [RESEND][PATCH " Maxime Hadjinlian
2016-06-01 10:49 ` [Buildroot] [PATCH v2 2/2] configs: add u-boot and atfirmware options to juno Joao Pinto
     [not found]   ` <20160601103734.GB23566@e106497-lin.cambridge.arm.com>
2016-06-01 10:45     ` [Buildroot] [RESEND] [PATCH 2/2] configs: add u-noot " Joao Pinto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox