You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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?---------------------------------------------------------




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.

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.

 


U-Boot - Make preloader and main 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]

make erzeugt den preloader und vorher legt es die Uboot Sourcen im Verzeichniss ab
make uboot erzeugt den main Bosotloader



Infos über uboot

Uboot induvidialisieren:
Allgemeine config - socfpga_common.h - unter: ProjekOrdner\software\spl_bsp\uboot-socfpga\include\configs
Z154 - #define CONFIG_BOOTDELAY 5
Ab Z181 - Variablen
Ab Z298 - MMC Uart ... Einstellungen

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





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

cd C:/temp/Project/


make config

make clean

make

make uboot

run make / make clean
→ On win run Shell must be Admin and instead of make run /usr/bin/make


D:\ENTW\WIKI-Seiten\TEI0022\Seite 2 - Compiling U-Boot\10 Folder inhalt - Project-software-spl_bsp.jpg

C:\temp\Project\software\spl_bsp


Device Tree Blob


Linux requires a DTB file to start the Kernel properly

DTB informs the Linux Kernel about the existing Hardware, its Configuration and which driver to use



  • No labels