uboot and arm trusted firmware build added to juno board
PATCH 1/2 uboot and arm trusted firmware build added to juno board
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.
--- board/arm/juno/readme.txt | 26 +++++++++++++++++++++----- configs/arm_juno_defconfig | 12 ++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-)
board/arm/juno/readme.txt +21 -5
@@ -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.
configs/arm_juno_defconfig +12 -0
@@ -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" +
Signature · 1 line
1.8.1.5
PATCH 2/2 ARM Trusted Firmware (ATF) added to boot/
New package atfirmware which has the goal to build the ARM Trusted Firmware.
--- 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
boot/Config.in +1 -0
@@ -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
boot/atfirmware/Config.in new file +81 -0
81 lines not on this page · raw message
boot/atfirmware/atfirmware.mk new file +39 -0
@@ -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))
Signature · 1 line
1.8.1.5
PATCH 2/2 ARM Trusted Firmware (ATF) added to boot/
Hello,
This patch should be the first patch in the series, and its title should be:
atfirmware: new package
boot/Config.in source "boot/mxs-bootlets/Config.in" · line 16
Quoted 9 lines
boot/Config.in +1
-0@@ -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.
boot/atfirmware/Config.in line 1
Quoted 7 lines
boot/atfirmware/Config.in new file +1
-0@@ -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_.
boot/atfirmware/Config.in line 2
Quoted 1 line
boot/atfirmware/Config.in new file +1
-0+
Remove this empty line.
boot/atfirmware/Config.in line 3
Quoted 1 line
boot/atfirmware/Config.in new file +1
-0+ bool "ARM Trusted Firmware (ATF)"
Make this option:
depends on BR2_aarch64
(unless ATF is useful/used also on other architectures)
boot/atfirmware/Config.in line 11
Quoted 8 lines
boot/atfirmware/Config.in new file +8
-0+ 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.
Quoted 17 lines
boot/atfirmware/Config.in new file +17
-0+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. +
boot/atfirmware/Config.in line 39
Quoted 10 lines
boot/atfirmware/Config.in new file +10
-0+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? :-)
Quoted 4 lines
boot/atfirmware/Config.in new file +4
-0+ depends on BR2_ATFIRMWARE_CUSTOM_TARBALL + +if BR2_ATFIRMWARE_CUSTOM_GIT +
boot/atfirmware/Config.in line 53
Quoted 10 lines
boot/atfirmware/Config.in new file +10
-0+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.
boot/atfirmware/Config.in line 67
Quoted 11 lines
boot/atfirmware/Config.in new file +11
-0+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.
boot/atfirmware/Config.in line 69
Quoted 1 line
boot/atfirmware/Config.in new file +1
-0+config BR2_BOOT_ATFIRMWARE_PAYLOAD_PATH
this should be named BR2_TARGET_ATFIRMWARE ...
Quoted 18 lines
boot/atfirmware/Config.in new file +12
-0+ 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_ATFIRMWAREboot/atfirmware/atfirmware.mk new file +0
-0
boot/atfirmware/atfirmware.mk line 7
Quoted 7 lines
boot/atfirmware/atfirmware.mk new file +7
-0@@ -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).
Quoted 8 lines
boot/atfirmware/atfirmware.mk new file +8
-0+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
boot/atfirmware/atfirmware.mk line 25
Quoted 10 lines
boot/atfirmware/atfirmware.mk new file +10
-0+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?
boot/atfirmware/atfirmware.mk line 27
Quoted 2 lines
boot/atfirmware/atfirmware.mk new file +2
-0+ $(BR2_BOOT_ATFIRMWARE_ADDITIONAL_VARIABLES) \ + all fip
Please indent the continuations lines. So:
$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \ BL33=... \ $(BR2_....) \ all fip
boot/atfirmware/atfirmware.mk line 36
Quoted 9 lines
boot/atfirmware/atfirmware.mk new file +9
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 uboot and arm trusted firmware build added to juno board
In reply to Joao PintoHello,
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
Quoted 2 lines · Joao Pinto
+Other ARM Trusted Firmware options
+==================================
One empty new line here.
Quoted 1 line
+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.
board/arm/juno/readme.txt After building, you should obtain this tree: · line 56
Quoted 2 lines
board/arm/juno/readme.txt +2
-0+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.
Quoted 1 line
+If you need to include the SCP Firmware into the fip package please
Same comment about "into the fip package".
Quoted 1 line
+specify SCP_BL2=<binary_path> in
BR2_TARGET_ATFIRMWARE_ADDITIONAL_VARIABLES.
Just for info, what is this SCP Firmware ?
Quoted 34 lines
Preparing your rootfs
======================board/arm/juno/readme.txt +4
-3@@ -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.configs/arm_juno_defconfig +2
-0@@ -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
configs/arm_juno_defconfig BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y · line 26
Quoted 10 lines
configs/arm_juno_defconfig +10
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello,
Quoted 7 lines · Liviu.Dudau at arm.com
Quoted 5 lines
Same comment about "into the fip package".
Quoted 1 line
+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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 uboot and arm trusted firmware build added to juno board
In reply to Joao PintoHello,
board/arm/juno/readme.txt After building, you should obtain this tree: · line 50
Quoted 6 lines · Joao Pinto
board/arm/juno/readme.txt +6
-0+ +-- 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello,
Quoted 9 lines · Liviu.Dudau at arm.com
Quoted 9 lines · Joao Pinto
Quoted 7 lines
board/arm/juno/readme.txt +6
-0+ +-- u-boot.bin + +-- bl1.bin + +-- bl2.bin + +-- bl2u.bin + +-- bl31.bin + +-- fip.bin
Quoted 6 lines
Quoted 3 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello!
Quoted 17 lines · Thomas Petazzoni
Hello,
Quoted 13 lines · Liviu.Dudau at arm.com
Quoted 12 lines · Joao Pinto
board/arm/juno/readme.txt After building, you should obtain this tree: · line 50
Quoted 7 lines
board/arm/juno/readme.txt +6
-0+ +-- u-boot.bin + +-- bl1.bin + +-- bl2.bin + +-- bl2u.bin + +-- bl31.bin + +-- fip.binLooking 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?
Quoted 5 lines
Quoted 2 lines
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.
Quoted 3 lines
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
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello,
Quoted 6 lines · Joao Pinto
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello,
Quoted 5 lines · Liviu.Dudau at arm.com
Quoted 3 lines
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.).
Quoted 6 lines
Quoted 2 lines
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.mdin the ATF repo) requires that a runtime firmware binary for SCP (embedded within fip.bin) is loaded at boot time.
OK.
Quoted 5 lines
One option is to copy the original fip.bin from the board, extract the bl2.bin from it using
fip_createtool (bad name, sorry) and then embed it back in the newly created fip.bin. Mind you,fip_createactually 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello,
Quoted 5 lines · Liviu.Dudau at arm.com
Quoted 2 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Quoted 7 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · Liviu.Dudau at arm.com
Quoted 2 lines
So when you're saying this, are you saying that the binary blob is not even available publicly for download?
Quoted 7 lines
Quoted 2 lines
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_createtool 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.
Quoted 3 lines
Thomas
Joao
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello,
Quoted 9 lines · Joao Pinto
Quoted 4 lines
That is still OK, we can always have a Buildroot package that downloads that tarball, extracts it, takes the fip.bin, uses the
fip_createtool 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_createis built by the atfirmware package. So the package must be built once, extract the scp, copy somewhere, built it again now with theSCP_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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 uboot and arm trusted firmware build added to juno board
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"
elseATFIRMWARE_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?
Quoted 15 lines · Liviu.Dudau at arm.com
Quoted 13 lines · Thomas Petazzoni
Hello,
Quoted 9 lines · Joao Pinto
Quoted 4 lines
That is still OK, we can always have a Buildroot package that downloads that tarball, extracts it, takes the fip.bin, uses the
fip_createtool 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_createis built by the atfirmware package. So the package must be built once, extract the scp, copy somewhere, built it again now with theSCP_BL2. It is doable, but double build is needed and I don't know how buildroot deals with this 2xbuild operation.
Quoted 27 lines
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,
LiviuQuoted 18 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thanks.
Joao
PATCH 1/2 uboot and arm trusted firmware build added to juno board
Hello,
Quoted 2 lines · Joao Pinto
# 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.
Quoted 1 line
ATFIRMWARE_PAYLOAD_PATH= $(BINARIES_DIR)/"u-boot.bin"
Remove the quotes.
Quoted 2 lines
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).
Quoted 7 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com