Skip to contentSkip to conversation

Altera Cyclone V u-boot-spl with meta-altera

DISCUSSION Usman, Fahad 3 participants 5 messages Jan 22, 2016 – Jan 25, 2016

lore
Share & tools
lore
#0 lore raw

Hi, I am using meta-altera layer (https://github.com/kraj/meta-altera) to build u-boot for Altera Cyclone V socfpga board. Building the u-boot-socfpga_2013.01.01 recipe does generate the u-boot-spl binary, but it cannot be directly used on the board as it has to be signed using Altera's tool "mkpimage" that comes with Altera's toolset (SoC EDS <http://rocketboards.org/foswiki/view/Documentation/AlteraSoCDevelopmentBoardYoctoGettingStarted#SoC_EDS>).

Is there a way to produce a signed u-boot-spl image during the build, that can be used directly on the target without using the EDS?

Thanks,
Fahad.

#1 lore raw

I’m not aware of a tool outside of Altera’s EDS mkpimage. What I ended up doing was installing a subset of the EDS tools (mkpimage and the jre directory), then tweaked the u-boot spl/Makefile to automatically invoke mkpimage to create the preloader. I also tweaked the meta-altera u-boot-socfpga.inc do_deploy() rules to copy the newly built preloader-mkpimage-* files to the deploy directory.

I’d be happy to send those to you, if you’re interested. Likewise, if you find a third party tool to add the preloader image header, let me know.

-Bill

From: [email protected] [mailto:[email protected]] On Behalf Of Usman, Fahad
Sent: Friday, January 22, 2016 7:19 AM
To: [email protected]; Khem Raj <[email protected]>; [email protected]
Subject: [yocto] Altera Cyclone V u-boot-spl with meta-altera

Hi, I am using meta-altera layer (https://github.com/kraj/meta-altera) to build u-boot for Altera Cyclone V socfpga board. Building the u-boot-socfpga_2013.01.01 recipe does generate the u-boot-spl binary, but it cannot be directly used on the board as it has to be signed using Altera's tool "mkpimage" that comes with Altera's toolset (SoC EDS<http://rocketboards.org/foswiki/view/Documentation/AlteraSoCDevelopmentBoardYoctoGettingStarted#SoC_EDS>).

Is there a way to produce a signed u-boot-spl image during the build, that can be used directly on the target without using the EDS?

Thanks,
Fahad.

#2 lore raw
Quoted 4 lines

Is there a way to produce a signed u-boot-spl image during the build, that can be used directly on the target without using the EDS?

If you upgrade to the U-Boot 2016.01 (or maybe even earlier?), mkimage actually supports adding the Bootrom signature to the SPL for you. The current makefile is kind enough to concatenate the U-Boot SPL and its DTS for you, and then run mkpimage to create an 'spl/u-boot-spl-dts.sfp' file [1].

If that doesn't work for you, you might find [2] to be useful. The bootrom "signature" is simple enough to implement in a do_compile_append() or custom task.

[1]
http://git.denx.de/?p=u-boot.git;a=blob;f=Makefile;h=c9c2cbedc641853c7886ffb023e5798362152899;hb=6905f4d3c7be46fed4859f51f0a8f9a1107c22e7#l1012

[2] https://github.com/maximeh/mkpimage

#3 lore raw
Quoted 8 lines

If you upgrade to the U-Boot 2016.01 (or maybe even earlier?), mkimage actually supports adding the Bootrom signature to the SPL for you. The current makefile is kind enough to concatenate the U-Boot SPL and its DTS for you, and then run mkpimage to create an 'spl/u-boot-spl-dts.sfp' file [1].

Quoted 11 lines

If that doesn't work for you, you might find [2] to be useful. The bootrom "signature" is simple enough to implement in a do_compile_append() or custom task.

[1]
http://git.denx.de/?p=u-boot.git;a=blob;f=Makefile;h=c9c2cbedc641853c7886ffb023e5798362152899;hb=6905f4d3c7be46fed4859f51f0a8f9a1107c22e7#l1012

[2] https://github.com/maximeh/mkpimage

Typo correction: u-boot-with-spl-dtb.sfp

#4 lore raw
In reply to Jon Szymaniak
Quoted 2 lines · Jon Szymaniak

If you upgrade to the U-Boot 2016.01 (or maybe even earlier?), mkimage actually supports adding the Bootrom signature to the SPL for you. The current makefile is kind enough to concatenate the U-Boot SPL and its DTS for you, and then run mkpimage to create an 'spl/u-boot-spl-dts.sfp' file [1].

Thanks Jon Szymaniak,
I was not aware that the bootrom signature support has been added to the current version of u-boot. I was able to built the u-boot-with-spl-dtb.sfp target and the single concatenated u-boot file worked on Cyclone 5 board right away.

Regards,
Fahad.