Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Requirements - EIGENTLICH ÜBERFLÜSSIG, da auf Seite 0 geschrieben... . ?!?

All steps to format / setup a bootable SD card can only be performed within a Linux,
(Windows Subsystem for Linux is not capable to format a SD card) the Linux tool fdisk / sfdisk depend on it.

The tools bsp-editor, alt-boot-disc-util and SoC EDS Command Shell are present.
An installation of INTEL SoC FPGA EMBEDDED DEVELOPMENT SUITE along with Intel Quartus Prime Lite, so the tools
bsp-editor, alt-boot-disc-util and SoC EDS Command Shell are present.

Background

The boot process of the HPS consists of several stages:

  • Boot ROM
     - Hard coded into the chip
     - It's purpose is to detect the selected boot source
     - Perform minimal Setup of the HPS
     - Load the next Boot stage [Preloader / u-boot-spl] into the On chip RAM [OCRAM]
        therefore the preloader / SPL u-boot is limited to 64 kByte on Cyclone 5 devices

  • Preloader
     - Perform additional HPS initialization
     - Bring up SDRAM
     - Load the next boot stage from Flash to SDRAM and jump to it
     - Preloader-optins:
            u-boot - SPL
            SoC EDS - MPL [Altera bare-metal libraries - HWLibs]
     - For Cyclone 5 devices, the preloader consists of 4 identical copies. each 64 kB in size,
        256 kb in total
     - When generating the preloader, it can be necessary to manually add a header and checksum
       into the binary, the tool mkpimage can perform these additions

  • Main Bootloader
     - Load Linux [u-boot] or Bare Metal Application into the RAM
     - Jump to it.
       In case of Linux, load Kernel, followed by the loading of the Linux rootfs
     - When generating the preloader, it can be necessary to manually add a header and checksum 
       into the binary, the tool mkimage can perform these additions


DIE GRAFIK GEHÖRT INTEL; DARF DIE HIER ÜBERHAUPT SEIN?---------------------------------------------------------


Image Added

BSP Editor

The BSP-Editor takes the handoff folder and generates further source and configuration files to be able to compile
the U-Boot Preloader and U-Boot Bootloader for the HPS.

Like before mentioned, the SoC EDS Shell has limit access to the file system, so its the easiest solution to open a SoC EDS Shell
with administrative privileges. Use your file browser and navigate to    C:\intelFPGA\18.1\embedded\    .
Right click onto the    Embedded_Command_Shell.bat   , select Run as administrator and click onto Yes in the
window - User Account Control .

Type into the Shell    bsp-editor.exe    and press Enter. The BSP-Editor window opens.

Via    File → New HPS BSP...    a the dialogue - New BSP - opens, click onto the tree doted button and point in the next
window - Open - to the folder PlatformEditorHPS_hps_0 inside your handoff folder, locate inside your project folder.
Press open, the window closes and then press OK, the dialogue closes.

Image Added Image Added

Back in the BSP-Editor, the U-Boot preloader must be configured. In the right column, under spl.boot are four Checkboxes,
each beginning with BOOT_FROM_... check only BOOT_FROM_SDMMC , the following three lines are of no interest.

check FAT_SUPPORT , FAT_BOOT_PARTITION: must contain a 1 and FAT_LOAD_PAYLOAD_NAME: must contain u-boot.img .

Hit the button Generate in the bottom right corner, after processing, in the bottom tab Information
Finished generation BSP files. Total time taken = x seconds is visible.

In your project folder, the folder - software - appears.

Image Added Image Added


U-Boot - Make preloader and main bootloader

Bootloader ...__________________________________________________________________________________

...


Mit der Soc EDS shell zum Projekt navigieren -> z.b. Projekt\software\spl_bsp
dort das kommando
[make clean] cd
make UNTER DER PFADANGABE “/usr/bin/make” ausführen (rpeloader in spl_bsp/preloader....bin)
und
make uboot ausführen.
[Alternativer workaround zu /usr/bin/make ist export PATH=/bin:$PATH, funzt nicht richtig]

...

Spezielle Config - socfpga_cyclone5.h - unter: Projektordner\software\spl_bsp\uboot-socfpga\include\configs

Spl and main U-Boot, what are they for

spl - inizialize the hps

BSP Editor

Open a SoC EDS Shell und ...

navigate to C:\intelFPGA\18.1\embedded open open as admin Embedded_Command_Shell.bat (Linux VORGEHEN?!?!?)
Da wird für Uboot gebraucht

run as administrator confirm Notification, type command

bsp-editor.exe window - BSP Editor - opens

In editor File   → New HPS BSP ...   .

     BILD 5

New Window - New BSP - opens, click button ... opens window - open - point the path to handoff folder and select
via one left click, so that in the fild foldre name:
C:\temp\Project\hps_isw_handoff\PlatformEditorHPS_hps_0
zu lesen ist, click Open and in other window OK .

    Bild 6

In BSP Editor, check in the left column under
spl.bbot — that only BOOT_FROM_SDMMC is checked
check FAT_SUPPORT
FAT_BOOT_PARTITION: must be 1
FAT_LOAD_PAYLOAD_NAME: must be u-boot.img

Hit Generate

    Bild 7

Folder has new folder - software

    Bild 8

...





navigate to C:\intelFPGA\18.1\embedded open as admin Embedded_Command_Shell.bat (Linux sh)

...