* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board
@ 2016-04-26 16:35 Joao Pinto
2016-04-26 16:35 ` [Buildroot] [PATCH 2/2] ARM Trusted Firmware (ATF) added to boot/ Joao Pinto
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Joao Pinto @ 2016-04-26 16:35 UTC (permalink / raw)
To: buildroot
This patch adds more options to the juno's default configuration file
and more content to the readme.txt, regarding the introduction of u-boot and
arm trusted firmware build.
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
board/arm/juno/readme.txt | 26 +++++++++++++++++++++-----
configs/arm_juno_defconfig | 12 ++++++++++++
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/board/arm/juno/readme.txt b/board/arm/juno/readme.txt
index 52fabf9..507ed6d 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, a minimal
+root filesystem, a u-boot binary and ARM Trusted Firmware binaries.
How to build it
===============
@@ -42,6 +42,21 @@ After building, you should obtain this tree:
+-- juno.dtb (if Juno r0 is used)
+-- juno-r1.dtb (if Juno r1 is used)
+-- Image
+ +-- u-boot.bin
+ +-- bl1.bin
+ +-- bl2.bin
+ +-- bl2u.bin
+ +-- bl31.bin
+ +-- fip.bin
+
+Other ARM Trusted Firmware options
+==================================
+If you need to include the bootlader into the fip package, please
+configure BR2_TARGET_ATFIRMWARE_PAYLOAD_PATH to specify the path to the
+binary.
+
+If you need to include the SCP Firmware into the fip package please
+specify SCP_BL2=<binary_path> in BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES.
Preparing your rootfs
======================
@@ -89,8 +104,8 @@ NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
......
-Installing kernel image and DTB
-===============================
+Installing kernel image, DTB and bootloader
+===========================================
1. Connect to the ARM Juno UART0 and execute USB_ON in the terminal
2. Connect a USB cable between your PC and ARM Juno USB type B connector
@@ -98,7 +113,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 'bl1.bin' and 'fip.bin' files 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..b94d04c 100644
--- a/configs/arm_juno_defconfig
+++ b/configs/arm_juno_defconfig
@@ -12,3 +12,15 @@ 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_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_BOARDNAME="vexpress_aemv8a_juno"
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.03"
+BR2_TARGET_ATFIRMWARE=y
+BR2_TARGET_ATFIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ATFIRMWARE_VERSION="v1.2"
+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"
+
--
1.8.1.5
^ permalink raw reply related [flat|nested] 15+ messages in thread* [Buildroot] [PATCH 2/2] ARM Trusted Firmware (ATF) added to boot/ 2016-04-26 16:35 [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board Joao Pinto @ 2016-04-26 16:35 ` Joao Pinto 2016-04-26 20:18 ` Thomas Petazzoni 2016-04-26 20:05 ` [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board Thomas Petazzoni 2016-04-26 20:19 ` Thomas Petazzoni 2 siblings, 1 reply; 15+ messages in thread From: Joao Pinto @ 2016-04-26 16:35 UTC (permalink / raw) To: buildroot New package atfirmware which has the goal to build the ARM Trusted Firmware. Signed-off-by: Joao Pinto <jpinto@synopsys.com> --- boot/Config.in | 1 + boot/atfirmware/Config.in | 81 +++++++++++++++++++++++++++++++++++++++++++ boot/atfirmware/atfirmware.mk | 39 +++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 boot/atfirmware/Config.in create mode 100644 boot/atfirmware/atfirmware.mk diff --git a/boot/Config.in b/boot/Config.in index 54760b9..e162fcc 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -13,5 +13,6 @@ source "boot/mxs-bootlets/Config.in" source "boot/syslinux/Config.in" source "boot/uboot/Config.in" source "boot/xloader/Config.in" +source "boot/atfirmware/Config.in" endmenu diff --git a/boot/atfirmware/Config.in b/boot/atfirmware/Config.in new file mode 100644 index 0000000..67a0831 --- /dev/null +++ b/boot/atfirmware/Config.in @@ -0,0 +1,81 @@ +config BR2_ATFIRMWARE + + bool "ARM Trusted Firmware (ATF)" + help + Enable this option if you want to build the ATF for your ARM based + embedded device. + +if BR2_ATFIRMWARE + +choice + prompt "ATF version" + +config BR2_ATFIRMWARE_CUSTOM_TARBALL + bool "Custom tarball" + help + This option allows to specify a URL pointing to a ATF source + tarball. This URL can use any protocol recognized by Buildroot, + like http://, ftp://, file:// or scp://. + + When pointing to a local tarball using file://, you may want to + use a make variable like $(TOPDIR) to reference the root of the + Buildroot tree. + +config BR2_ATFIRMWARE_CUSTOM_GIT + bool "Custom Git repository" + help + This option allows Buildroot to get the ATF source code from a + Git repository. + +config BR2_ATFIRMWARE_CUSTOM_LOCAL + bool "Local directory" + help + This option allows Buildroot to get the ATF kernel source code from + a local directory. + +endchoice + +config BR2_ATFIRMWARE_CUSTOM_TARBALL_LOCATION + string "URL of custom kernel tarball" + depends on BR2_ATFIRMWARE_CUSTOM_TARBALL + +if BR2_ATFIRMWARE_CUSTOM_GIT + +config BR2_ATFIRMWARE_CUSTOM_REPO_URL + string "URL of custom repository" + depends on BR2_ATFIRMWARE_CUSTOM_GIT + +config BR2_ATFIRMWARE_CUSTOM_REPO_VERSION + string "Custom repository version" + depends on BR2_ATFIRMWARE_CUSTOM_GIT + help + Revision to use in the typical format used by Git + E.G. a sha id, a tag, branch, .. + +endif + +config BR2_ATFIRMWARE_CUSTOM_LOCAL_PATH + string "Path to the local directory" + depends on BR2_ATFIRMWARE_CUSTOM_LOCAL + help + Path to the local directory with the ATF source code. + +config BR2_ATFIRMWARE_PLATFORM + string "ATF Target Platform" + help + E.G. If using a Juno board, you should specify 'juno' as + your platform. + +config BR2_BOOT_ATFIRMWARE_PAYLOAD_PATH + string "Path to the BL33 binary" + help + If you wish to build into the ATF a bootloader like U-Boot, you + should indicate the path to its binary here. + +config BR2_BOOT_ATFIRMWARE_ADDITIONAL_VARIABLES + string "Additional ATF build variables" + help + Additional parameters for the ATF build + E.G. 'SCP_BL2=<path_to_bl2> DEBUG=1 LOG_LEVEL=20' + +endif # BR2_ATFIRMWARE diff --git a/boot/atfirmware/atfirmware.mk b/boot/atfirmware/atfirmware.mk new file mode 100644 index 0000000..ce1e01e --- /dev/null +++ b/boot/atfirmware/atfirmware.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# ARM Trusted Firmware +# +################################################################################ + +# Compute ATF_SOURCE and ATF_SITE from the configuration +ifeq ($(BR2_ATFIRMWARE_CUSTOM_TARBALL),y) +ATFIRMWARE_TARBALL = $(call qstrip,$(BR2_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_ATFIRMWARE_CUSTOM_LOCAL),y) +ATFIRMWARE_SITE = $(call qstrip,$(BR2_ATFIRMWARE_CUSTOM_LOCAL_PATH)) +ATFIRMWARE_SITE_METHOD = local +else ifeq ($(BR2_ATFIRMWARE_CUSTOM_GIT),y) +ATFIRMWARE_SITE = $(call qstrip,$(BR2_ATFIRMWARE_CUSTOM_REPO_URL)) +ATFIRMWARE_SITE_METHOD = git +endif + +ATFIRMWARE_INSTALL_IMAGES = YES + +define ATFIRMWARE_BUILD_CMDS + $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \ + BL33=$(call qstrip,$(BR2_BOOT_ATFIRMWARE_PAYLOAD_PATH) \ + $(BR2_BOOT_ATFIRMWARE_ADDITIONAL_VARIABLES) \ + all fip +endef + +define ATFIRMWARE_INSTALL_IMAGES_CMDS + if test -h $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/bl1.bin ; then \ + cp -L $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/bl1.bin $(BINARIES_DIR)/ ; \ + fi + if test -h $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/fip.bin ; then \ + cp -L $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/fip.bin $(BINARIES_DIR)/ ; \ + fi +endef + +$(eval $(kconfig-package)) -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2] ARM Trusted Firmware (ATF) added to boot/ 2016-04-26 16:35 ` [Buildroot] [PATCH 2/2] ARM Trusted Firmware (ATF) added to boot/ Joao Pinto @ 2016-04-26 20:18 ` Thomas Petazzoni 0 siblings, 0 replies; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-26 20:18 UTC (permalink / raw) To: buildroot Hello, This patch should be the first patch in the series, and its title should be: atfirmware: new package > diff --git a/boot/Config.in b/boot/Config.in > index 54760b9..e162fcc 100644 > --- a/boot/Config.in > +++ b/boot/Config.in > @@ -13,5 +13,6 @@ source "boot/mxs-bootlets/Config.in" > source "boot/syslinux/Config.in" > source "boot/uboot/Config.in" > source "boot/xloader/Config.in" > +source "boot/atfirmware/Config.in" Alphabetic ordering please. > diff --git a/boot/atfirmware/Config.in b/boot/atfirmware/Config.in > new file mode 100644 > index 0000000..67a0831 > --- /dev/null > +++ b/boot/atfirmware/Config.in > @@ -0,0 +1,81 @@ > +config BR2_ATFIRMWARE Should be named BR2_TARGET_ATFIRMWARE to be consistent with other bootloaders. Of course then all options below should be prefixed with BR2_TARGET_ATFIRMWARE_. > + Remove this empty line. > + bool "ARM Trusted Firmware (ATF)" Make this option: depends on BR2_aarch64 (unless ATF is useful/used also on other architectures) > + help > + Enable this option if you want to build the ATF for your ARM based > + embedded device. > + > +if BR2_ATFIRMWARE > + > +choice > + prompt "ATF version" Like U-Boot/Barebox, please have a default that consists in using the latest official version released, i.e right now v1.2. > +config BR2_ATFIRMWARE_CUSTOM_TARBALL > + bool "Custom tarball" > + help > + This option allows to specify a URL pointing to a ATF source > + tarball. This URL can use any protocol recognized by Buildroot, > + like http://, ftp://, file:// or scp://. > + > + When pointing to a local tarball using file://, you may want to > + use a make variable like $(TOPDIR) to reference the root of the > + Buildroot tree. > + > +config BR2_ATFIRMWARE_CUSTOM_GIT > + bool "Custom Git repository" > + help > + This option allows Buildroot to get the ATF source code from a > + Git repository. > + > +config BR2_ATFIRMWARE_CUSTOM_LOCAL > + bool "Local directory" > + help > + This option allows Buildroot to get the ATF kernel source code from > + a local directory. > + > +endchoice > + > +config BR2_ATFIRMWARE_CUSTOM_TARBALL_LOCATION > + string "URL of custom kernel tarball" kernel, really? :-) > + depends on BR2_ATFIRMWARE_CUSTOM_TARBALL > + > +if BR2_ATFIRMWARE_CUSTOM_GIT > + > +config BR2_ATFIRMWARE_CUSTOM_REPO_URL > + string "URL of custom repository" > + depends on BR2_ATFIRMWARE_CUSTOM_GIT > + > +config BR2_ATFIRMWARE_CUSTOM_REPO_VERSION > + string "Custom repository version" > + depends on BR2_ATFIRMWARE_CUSTOM_GIT > + help > + Revision to use in the typical format used by Git > + E.G. a sha id, a tag, branch, .. I know "branch" is mentioned in linux/Config.in, but that's a bad idea. Just say that it can be a SHA1 commit id or a tag. > +config BR2_ATFIRMWARE_CUSTOM_LOCAL_PATH > + string "Path to the local directory" > + depends on BR2_ATFIRMWARE_CUSTOM_LOCAL > + help > + Path to the local directory with the ATF source code. > + > +config BR2_ATFIRMWARE_PLATFORM > + string "ATF Target Platform" > + help > + E.G. If using a Juno board, you should specify 'juno' as > + your platform. Please put something more generic like: Name of ATF platform to build for. > +config BR2_BOOT_ATFIRMWARE_PAYLOAD_PATH this should be named BR2_TARGET_ATFIRMWARE ... > + string "Path to the BL33 binary" > + help > + If you wish to build into the ATF a bootloader like U-Boot, you > + should indicate the path to its binary here. > + > +config BR2_BOOT_ATFIRMWARE_ADDITIONAL_VARIABLES > + string "Additional ATF build variables" > + help > + Additional parameters for the ATF build > + E.G. 'SCP_BL2=<path_to_bl2> DEBUG=1 LOG_LEVEL=20' > + > +endif # BR2_ATFIRMWARE > diff --git a/boot/atfirmware/atfirmware.mk b/boot/atfirmware/atfirmware.mk > new file mode 100644 > index 0000000..ce1e01e > --- /dev/null > +++ b/boot/atfirmware/atfirmware.mk > @@ -0,0 +1,39 @@ > +################################################################################ > +# > +# ARM Trusted Firmware > +# > +################################################################################ > + > +# Compute ATF_SOURCE and ATF_SITE from the configuration Please support the latest official version here (as requested above). > +ifeq ($(BR2_ATFIRMWARE_CUSTOM_TARBALL),y) > +ATFIRMWARE_TARBALL = $(call qstrip,$(BR2_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_ATFIRMWARE_CUSTOM_LOCAL),y) > +ATFIRMWARE_SITE = $(call qstrip,$(BR2_ATFIRMWARE_CUSTOM_LOCAL_PATH)) > +ATFIRMWARE_SITE_METHOD = local > +else ifeq ($(BR2_ATFIRMWARE_CUSTOM_GIT),y) > +ATFIRMWARE_SITE = $(call qstrip,$(BR2_ATFIRMWARE_CUSTOM_REPO_URL)) > +ATFIRMWARE_SITE_METHOD = git > +endif > + > +ATFIRMWARE_INSTALL_IMAGES = YES > + > +define ATFIRMWARE_BUILD_CMDS > + $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \ > + BL33=$(call qstrip,$(BR2_BOOT_ATFIRMWARE_PAYLOAD_PATH) \ Is it OK if the BL33 variable is empty? > + $(BR2_BOOT_ATFIRMWARE_ADDITIONAL_VARIABLES) \ > + all fip Please indent the continuations lines. So: $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \ BL33=... \ $(BR2_....) \ all fip > +endef > + > +define ATFIRMWARE_INSTALL_IMAGES_CMDS > + if test -h $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/bl1.bin ; then \ > + cp -L $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/bl1.bin $(BINARIES_DIR)/ ; \ > + fi > + if test -h $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/fip.bin ; then \ > + cp -L $(@D)/build/$(BR2_ATFIRMWARE_PLATFORM)/fip.bin $(BINARIES_DIR)/ ; \ > + fi On my platform, the final image is named "flash-image.bin". Is this a non-standard vendor-specific choice? (I've only worked with one vendor specific fork of ATF). This file is different (and bigger than fip.bin). So maybe we should simply make it configurable which image files should be copied to BINARIES_DIR ? In addition, in my case, the file is in build/<platform>/debug/, but I guess it's because I did a debug build. Could you rework the above comments and send an updated version? Thanks a lot! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board 2016-04-26 16:35 [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board Joao Pinto 2016-04-26 16:35 ` [Buildroot] [PATCH 2/2] ARM Trusted Firmware (ATF) added to boot/ Joao Pinto @ 2016-04-26 20:05 ` Thomas Petazzoni [not found] ` <20160427102152.GL28464@e106497-lin.cambridge.arm.com> 2016-04-26 20:19 ` Thomas Petazzoni 2 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-26 20:05 UTC (permalink / raw) To: buildroot Hello, This patch should be the second patch in the series, since it relies on the atfirmware package being added. The title of the patch should be something like: configs: use atfirmware package in arm_juno_defconfig On Tue, 26 Apr 2016 17:35:55 +0100, Joao Pinto wrote: > +Other ARM Trusted Firmware options > +================================== One empty new line here. > +If you need to include the bootlader into the fip package, please bootlader -> bootloader can you say "into the ARM Trusted Firmware fip image" instead of "into the fip package". In the context of Buildroot, "package" has a specific meaning, and there is nothing like a "fip package" in Buildroot. > +configure BR2_TARGET_ATFIRMWARE_PAYLOAD_PATH to specify the path to the > +binary. Why don't you automatically put the bootloader as the payload of the ATF firmware? How can the ATF firmware be useful without the bootloader as the payload? This is a real question, maybe there's a real use for it. > +If you need to include the SCP Firmware into the fip package please Same comment about "into the fip package". > +specify SCP_BL2=<binary_path> in BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES. Just for info, what is this SCP Firmware ? > > Preparing your rootfs > ====================== > @@ -89,8 +104,8 @@ NOR3LOAD: 00000000 ;Image Load Address > NOR3ENTRY: 00000000 ;Image Entry Point > ...... > > -Installing kernel image and DTB > -=============================== > +Installing kernel image, DTB and bootloader > +=========================================== > > 1. Connect to the ARM Juno UART0 and execute USB_ON in the terminal > 2. Connect a USB cable between your PC and ARM Juno USB type B connector > @@ -98,7 +113,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 'bl1.bin' and 'fip.bin' files 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..b94d04c 100644 > --- a/configs/arm_juno_defconfig > +++ b/configs/arm_juno_defconfig > @@ -12,3 +12,15 @@ 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_UBOOT=y > +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y > +BR2_TARGET_UBOOT_BOARDNAME="vexpress_aemv8a_juno" > +BR2_TARGET_UBOOT_CUSTOM_VERSION=y > +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.03" > +BR2_TARGET_ATFIRMWARE=y > +BR2_TARGET_ATFIRMWARE_CUSTOM_GIT=y > +BR2_TARGET_ATFIRMWARE_VERSION="v1.2" > +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" > + The last empty new line is useless. Could you fix those issues and send an updated version? Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20160427102152.GL28464@e106497-lin.cambridge.arm.com>]
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board [not found] ` <20160427102152.GL28464@e106497-lin.cambridge.arm.com> @ 2016-04-27 11:31 ` Thomas Petazzoni 0 siblings, 0 replies; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-27 11:31 UTC (permalink / raw) To: buildroot Hello, On Wed, 27 Apr 2016 11:21:52 +0100, Liviu.Dudau at arm.com wrote: > > Same comment about "into the fip package". > > > > > +specify SCP_BL2=<binary_path> in BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES. > > > > Just for info, what is this SCP Firmware ? > > Juno has a System Control Processor that does SoC clock and power management. OK, thanks for the explanation! So perhaps just for the sake of clarity, use "System Control Processor" in the readme.txt instead of just SCP. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board 2016-04-26 16:35 [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board Joao Pinto 2016-04-26 16:35 ` [Buildroot] [PATCH 2/2] ARM Trusted Firmware (ATF) added to boot/ Joao Pinto 2016-04-26 20:05 ` [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board Thomas Petazzoni @ 2016-04-26 20:19 ` Thomas Petazzoni [not found] ` <20160427102302.GM28464@e106497-lin.cambridge.arm.com> 2 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-26 20:19 UTC (permalink / raw) To: buildroot Hello, On Tue, 26 Apr 2016 17:35:55 +0100, Joao Pinto wrote: > + +-- u-boot.bin > + +-- bl1.bin > + +-- bl2.bin > + +-- bl2u.bin > + +-- bl31.bin > + +-- fip.bin Looking at your atfirmware package, I see bl1.bin and fip.bin being copied to output/images, but not bl2.bin, bl2u.bin and bl31.bin. Why are you mentioning them here? Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20160427102302.GM28464@e106497-lin.cambridge.arm.com>]
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board [not found] ` <20160427102302.GM28464@e106497-lin.cambridge.arm.com> @ 2016-04-27 11:31 ` Thomas Petazzoni 2016-04-27 11:44 ` Joao Pinto 0 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-27 11:31 UTC (permalink / raw) To: buildroot Hello, On Wed, 27 Apr 2016 11:23:02 +0100, Liviu.Dudau at arm.com wrote: > > On Tue, 26 Apr 2016 17:35:55 +0100, Joao Pinto wrote: > > > > > + +-- u-boot.bin > > > + +-- bl1.bin > > > + +-- bl2.bin > > > + +-- bl2u.bin > > > + +-- bl31.bin > > > + +-- fip.bin > > > > Looking at your atfirmware package, I see bl1.bin and fip.bin being > > copied to output/images, but not bl2.bin, bl2u.bin and bl31.bin. Why > > are you mentioning them here? > > Those get embedded into the fip.bin. For Juno you need only bl1.bin and > fip.bin to be transfered to the board. Right, and they are indeed not copied to $(BINARIES_DIR) by the atfirmware package. So they shouldn't be mentioned in the readme.txt. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board 2016-04-27 11:31 ` Thomas Petazzoni @ 2016-04-27 11:44 ` Joao Pinto 2016-04-27 11:57 ` Thomas Petazzoni [not found] ` <20160427120454.GN28464@e106497-lin.cambridge.arm.com> 0 siblings, 2 replies; 15+ messages in thread From: Joao Pinto @ 2016-04-27 11:44 UTC (permalink / raw) To: buildroot Hello! On 4/27/2016 12:31 PM, Thomas Petazzoni wrote: > Hello, > > On Wed, 27 Apr 2016 11:23:02 +0100, Liviu.Dudau at arm.com wrote: > >>> On Tue, 26 Apr 2016 17:35:55 +0100, Joao Pinto wrote: >>> >>>> + +-- u-boot.bin >>>> + +-- bl1.bin >>>> + +-- bl2.bin >>>> + +-- bl2u.bin >>>> + +-- bl31.bin >>>> + +-- fip.bin >>> >>> Looking at your atfirmware package, I see bl1.bin and fip.bin being >>> copied to output/images, but not bl2.bin, bl2u.bin and bl31.bin. Why >>> are you mentioning them here? >> >> Those get embedded into the fip.bin. For Juno you need only bl1.bin and >> fip.bin to be transfered to the board. > > Right, and they are indeed not copied to $(BINARIES_DIR) by the > atfirmware package. So they shouldn't be mentioned in the readme.txt. Yes, no problem I will give a check to all your comments. > > Thomas > The SCP firmware is a critical piece for the Juno, but the problem is that it can't be built from any repository I think. @Liviu: Could you please confirm this info? If the SCP firmware exists as a binary only, then we have to include it in /board/arm/juno folder for building the ATF out-of-the-box. Opinions? Thanks, Joao ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board 2016-04-27 11:44 ` Joao Pinto @ 2016-04-27 11:57 ` Thomas Petazzoni [not found] ` <20160427120454.GN28464@e106497-lin.cambridge.arm.com> 1 sibling, 0 replies; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-27 11:57 UTC (permalink / raw) To: buildroot Hello, On Wed, 27 Apr 2016 12:44:39 +0100, Joao Pinto wrote: > The SCP firmware is a critical piece for the Juno, but the problem is that it > can't be built from any repository I think. > @Liviu: Could you please confirm this info? > > If the SCP firmware exists as a binary only, then we have to include it in > /board/arm/juno folder for building the ATF out-of-the-box. It's really super annoying to include binary blob in the Buildroot repository. If it really needs to be a binary blob, then I'd prefer to have it available somewhere (ARM website, Github, etc.) and a Buildroot package that downloads it. Best regards, Thoms -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20160427120454.GN28464@e106497-lin.cambridge.arm.com>]
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board [not found] ` <20160427120454.GN28464@e106497-lin.cambridge.arm.com> @ 2016-04-27 12:39 ` Thomas Petazzoni [not found] ` <20160427124632.GO28464@e106497-lin.cambridge.arm.com> 0 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-27 12:39 UTC (permalink / raw) To: buildroot Hello, On Wed, 27 Apr 2016 13:04:54 +0100, Liviu.Dudau at arm.com wrote: > > The SCP firmware is a critical piece for the Juno, but the problem is that it > > can't be built from any repository I think. > > @Liviu: Could you please confirm this info? > > That's right, SCP firmware is not available in source form to 3rd parties for now. Even though that's unfortunate, that's completely OK from a Buildroot point of view: we already have lots of packages for closed-source binary blobs (OpenGL implementations, firmwares, etc.). > > If the SCP firmware exists as a binary only, then we have to include it in > > /board/arm/juno folder for building the ATF out-of-the-box. > > Thomas, the way ARM Trusted Firmware works (documented in docs/firmware-design.md in > the ATF repo) requires that a runtime firmware binary for SCP (embedded within fip.bin) > is loaded at boot time. OK. > One option is to copy the original fip.bin from the board, extract > the bl2.bin from it using fip_create tool (bad name, sorry) and then > embed it back in the newly created fip.bin. Mind you, fip_create > actually supports updating an existing fip.bin, it doesn't have to > create the file from scratch. That's an option, but it doesn't give a Buildroot output that works "out of the box" on the target, which is not unacceptable (it can be explained in the readme.txt that comes with Buildroot for this board) but a bit sad. So when you're saying this, are you saying that the binary blob is not even available publicly for download? Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20160427124632.GO28464@e106497-lin.cambridge.arm.com>]
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board [not found] ` <20160427124632.GO28464@e106497-lin.cambridge.arm.com> @ 2016-04-27 12:53 ` Thomas Petazzoni 2016-04-27 14:17 ` Joao Pinto 0 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-27 12:53 UTC (permalink / raw) To: buildroot Hello, On Wed, 27 Apr 2016 13:46:33 +0100, Liviu.Dudau at arm.com wrote: > > So when you're saying this, are you saying that the binary blob is not > > even available publicly for download? > > It is available for download from Linaro downloads page, look for Juno firmware. > However it is bundled inside a fip.bin and that is wrapped in a tarball. That is still OK, we can always have a Buildroot package that downloads that tarball, extracts it, takes the fip.bin, uses the fip_create tool to extract the SCP firmware, install it somewhere, and then have the atfirmware package pick it up to create the final fip.bin. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board 2016-04-27 12:53 ` Thomas Petazzoni @ 2016-04-27 14:17 ` Joao Pinto 2016-04-27 14:31 ` Thomas Petazzoni 0 siblings, 1 reply; 15+ messages in thread From: Joao Pinto @ 2016-04-27 14:17 UTC (permalink / raw) To: buildroot On 4/27/2016 1:53 PM, Thomas Petazzoni wrote: > Hello, > > On Wed, 27 Apr 2016 13:46:33 +0100, Liviu.Dudau at arm.com wrote: > >>> So when you're saying this, are you saying that the binary blob is not >>> even available publicly for download? >> >> It is available for download from Linaro downloads page, look for Juno firmware. >> However it is bundled inside a fip.bin and that is wrapped in a tarball. > > That is still OK, we can always have a Buildroot package that > downloads that tarball, extracts it, takes the fip.bin, uses the > fip_create tool to extract the SCP firmware, install it somewhere, and > then have the atfirmware package pick it up to create the final fip.bin. There's a detail. fip_create is built by the atfirmware package. So the package must be built once, extract the scp, copy somewhere, built it again now with the SCP_BL2. It is doable, but double build is needed and I don't know how buildroot deals with this 2xbuild operation. > > Thomas > Joao ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board 2016-04-27 14:17 ` Joao Pinto @ 2016-04-27 14:31 ` Thomas Petazzoni [not found] ` <20160427144110.GR28464@e106497-lin.cambridge.arm.com> 0 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-27 14:31 UTC (permalink / raw) To: buildroot Hello, On Wed, 27 Apr 2016 15:17:34 +0100, Joao Pinto wrote: > > That is still OK, we can always have a Buildroot package that > > downloads that tarball, extracts it, takes the fip.bin, uses the > > fip_create tool to extract the SCP firmware, install it somewhere, and > > then have the atfirmware package pick it up to create the final fip.bin. > > There's a detail. fip_create is built by the atfirmware package. So the package > must be built once, extract the scp, copy somewhere, built it again now with the > SCP_BL2. It is doable, but double build is needed and I don't know how buildroot > deals with this 2xbuild operation. Gaah. This is indeed going to be insane. Another option is to have: 1/ Your atfirmware package as-is. 2/ A package that just downloads/extracts the SCP firmware. 3/ A post-image script that generates the final fip.bin. That's probably the easiest solution for now. We can see at making that better when/if we have more platforms that require a similar firmware. My ARM64 platform does not: I simply need to build U-Boot and ATF, and the image produced by ATF is directly usable. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20160427144110.GR28464@e106497-lin.cambridge.arm.com>]
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board [not found] ` <20160427144110.GR28464@e106497-lin.cambridge.arm.com> @ 2016-04-28 17:21 ` Joao Pinto 2016-04-28 19:57 ` Thomas Petazzoni 0 siblings, 1 reply; 15+ messages in thread From: Joao Pinto @ 2016-04-28 17:21 UTC (permalink / raw) To: buildroot Hi! I am planning to put the atfirmware package u-boot dependent, in order to get the u-boot binary automatically without being needed to specify the location of the binary. For this: # Automatically find the U-Boot binary ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME), ) ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/"u-boot.bin" else ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME) endif ATFIRMWARE_MAKE_OPTS += \ CROSS_COMPILE="$(TARGET_CROSS)" \ BL33=$(call qstrip,$(ATFIRMWARE_PAYLOAD_PATH)) \ $(call qstrip,$(BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES)) \ PLAT=$(ATFIRMWARE_PLATFORM) \ all fip In terms of the SCP_FW, I think for now is more reliable to make the final stage manually if using a Juno board. From my experience stuff in Linaro repositories change frequently and so we have a good probability of breaking the binary download. I suggest to put a note in the readme.txt saying what should be done, since everyone using a Juno will have access to the SCP FW in the board. What do you think? On 4/27/2016 3:41 PM, Liviu.Dudau at arm.com wrote: > On Wed, Apr 27, 2016 at 04:31:22PM +0200, Thomas Petazzoni wrote: >> Hello, >> >> On Wed, 27 Apr 2016 15:17:34 +0100, Joao Pinto wrote: >> >>>> That is still OK, we can always have a Buildroot package that >>>> downloads that tarball, extracts it, takes the fip.bin, uses the >>>> fip_create tool to extract the SCP firmware, install it somewhere, and >>>> then have the atfirmware package pick it up to create the final fip.bin. >>> >>> There's a detail. fip_create is built by the atfirmware package. So the package >>> must be built once, extract the scp, copy somewhere, built it again now with the >>> SCP_BL2. It is doable, but double build is needed and I don't know how buildroot >>> deals with this 2xbuild operation. > > It looks like the binary *is* available from a Linaro git tree, but it has the old > name before ATF has renamed it SCP_BL2: > > https://git.linaro.org/arm/vexpress-firmware.git/blob/refs/heads/juno:/SOFTWARE/bl30.bin > > Best regards, > Liviu > >> >> Gaah. This is indeed going to be insane. Another option is to have: >> >> 1/ Your atfirmware package as-is. >> 2/ A package that just downloads/extracts the SCP firmware. >> 3/ A post-image script that generates the final fip.bin. >> >> That's probably the easiest solution for now. We can see at making that >> better when/if we have more platforms that require a similar firmware. >> My ARM64 platform does not: I simply need to build U-Boot and ATF, and >> the image produced by ATF is directly usable. >> >> Thomas >> -- >> Thomas Petazzoni, CTO, Free Electrons >> Embedded Linux, Kernel and Android engineering >> http://free-electrons.com >> > Thanks. Joao ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board 2016-04-28 17:21 ` Joao Pinto @ 2016-04-28 19:57 ` Thomas Petazzoni 0 siblings, 0 replies; 15+ messages in thread From: Thomas Petazzoni @ 2016-04-28 19:57 UTC (permalink / raw) To: buildroot Hello, On Thu, 28 Apr 2016 18:21:50 +0100, Joao Pinto wrote: > # Automatically find the U-Boot binary > ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME), ) use qstrip, otherwise this will never be true. Also, remove the space after the comma. > ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/"u-boot.bin" Remove the quotes. > else > ATFIRMWARE_PAYLOAD_PATH = $(BINARIES_DIR)/$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME) Use qstrip here as well. Are you sure it's either u-boot.bin or a custom name? There are plenty of other possible image names in uboot.mk (but quite certainly not all of them apply to ARM64). > In terms of the SCP_FW, I think for now is more reliable to make the final stage > manually if using a Juno board. From my experience stuff in Linaro repositories > change frequently and so we have a good probability of breaking the binary download. > I suggest to put a note in the readme.txt saying what should be done, since > everyone using a Juno will have access to the SCP FW in the board. > > What do you think? Sounds OK. Having everything built automatically is better, but as a first step, it's definitely OK as long as there are explanations in readme.txt. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-04-28 19:57 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 16:35 [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board Joao Pinto
2016-04-26 16:35 ` [Buildroot] [PATCH 2/2] ARM Trusted Firmware (ATF) added to boot/ Joao Pinto
2016-04-26 20:18 ` Thomas Petazzoni
2016-04-26 20:05 ` [Buildroot] [PATCH 1/2] uboot and arm trusted firmware build added to juno board Thomas Petazzoni
[not found] ` <20160427102152.GL28464@e106497-lin.cambridge.arm.com>
2016-04-27 11:31 ` Thomas Petazzoni
2016-04-26 20:19 ` Thomas Petazzoni
[not found] ` <20160427102302.GM28464@e106497-lin.cambridge.arm.com>
2016-04-27 11:31 ` Thomas Petazzoni
2016-04-27 11:44 ` Joao Pinto
2016-04-27 11:57 ` Thomas Petazzoni
[not found] ` <20160427120454.GN28464@e106497-lin.cambridge.arm.com>
2016-04-27 12:39 ` Thomas Petazzoni
[not found] ` <20160427124632.GO28464@e106497-lin.cambridge.arm.com>
2016-04-27 12:53 ` Thomas Petazzoni
2016-04-27 14:17 ` Joao Pinto
2016-04-27 14:31 ` Thomas Petazzoni
[not found] ` <20160427144110.GR28464@e106497-lin.cambridge.arm.com>
2016-04-28 17:21 ` Joao Pinto
2016-04-28 19:57 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox