Versions Compared

Key

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

Table of Contents

Requirements

All steps to format / setup a bootable SD card can only be performed within a Linux installation.
(Windows Subsystem for Linux is not capable to format a SD card)

Soweit ist das folgende wohl überflüssig, da schon erwähnt auf den Seiten zuvor:--------------
An installation of INTEL SoC FPGA EMBEDDED DEVELOPMENT SUITE, so the tools
bsp-editor, alt-boot-disc-util and SoC EDS Command Shell are present.


Partitions within the SD card

The SD card can be partitioned or not, a partitioned SD card offers the advantage of a separation / persistent data storage.
Partitions of the SD card:

...

Unknown - partition for u-boot config script and how to setup (uboot.scr)
                   The main u-boot environment can be saved with saveenv
vfat-partition:          optional - Linux-Config-Script / main u-boot instead a2-partition


Format the SD card

To partition the SD card, Linux offers the command line tool fdisk [sfdisk].
        BEWARE!    fdisk  [sfdisk] can operate on every disk within the system and does not ask for approval.

Console commands are in cursive letters and bold, comments to a command follow the command
inside brackets.
Example:
   commands_in_cursive_letters_and_bolt   (comment in brackets)

Identify your SD card

Inserd the Sd card into the system, start a console [Ctrl + Alt + t] and type:
     lsblk   (list the disks conected to the system / Get SD-card-path)

...

RM = Removable → sdc is the SD card with one partition sdc1

Format the card - Manual approach:

To format the card, start the tool fdisk by typing:
     sudo fdisk /dev/sdc   (sudo=grant root, enter password    fdisk=tool   /dev/...=SD card)
The command promt changes to Command (m for help).

...

Step 6: Close programm → Type q


Format the card - Automated approach:

MISSING:
 - Partitionensgröße editieren
 - HINWEIS → Besser nicht 8GB bei einer 8GB-Karte verwenden, wegen defekter Sektoren

...

(To read the partition table from a storage device - sudo sfdisk -d /dev/sdX > PathToTextFile)

Data of each partition

Before writing data to the partitions, unmount the device
      sudo umount /dev/sdX*
and plage the SD card  in and out of the card reader.

W95 Fat32 partition

The W95 Fat32 partition needs to be formated.
   sudo umount /dev/sdX*
   sudo mkfs -t vfat /dev/sdXp (p=partition number, needs to be 1)

After the operation finishes, use a data browser to copy the
Linux kernel / zImage(.bin)   and the   device tree blob / socfpga.dtb.

ext(2/3/4) partition

The ext(2/3/4) partition is formated via:
   sudo mkfs.ext3 /dev/sdXp   (p=partition number, should be 2)

...

Extract the ... .tar.gz file to the partition:
   sudo tar -xvf pathToCompressed.tar.gz -C /mnt/card/   (x=decompress v=show progress -C=extract to)
   sudo sync   (imported, empty all buffers)

a2 partition

This partition need no formatting, the data needs to be copied with the tool
alt-boot-disk-util .

...

(The tool dd can also be used to write the preloader - sudo dd if=pathToSplUboot of=/dev/sdXp seek=0 bs=64k conv=fsync)


Console output of boot process

BootRom           -    no output

...