Versions Compared

Key

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

This step shows how to create the SD card. As mentioned in page "Board bring-up overview for TEI0022" this step is for SD card setup which should be done in the following two steps:

  • Generate SD card partitions and filesystems
    • SD card structure
    • Generate partitions
    • Generate filesystems
  • Copy files to partitions

The section "Generate SD card partitions and filesystems" describes the process to create the needed partitions and filesystems on the SD card. Section "Copy files to partitions" shows the moving from files on the partitions.

Generate SD card partitions and filesystems

The Intel Cyclone V needs a specific SD card structure which should be realized within the following steps in a linux system. Therefore, the structure shall be introduced in the next subsection. Then, in the second subsection the partitions shall be generated. In the last subsection, the filesystems shall be created

SD card structure

The SD card needs three partitions, one vfat, one linux and one 0xA2 partition. The following table shows the target SD card partition which shall be generated in the next section.

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:

...

#PartitionPurposeSize
1W95 FAT32 (LBA)(U-Boot, )Linux Kernel, Device Tree Blob> 20 MB
2
Linux ext(2/3 or 4)

...

Linux Root Filesystem> 150 MB to 2 GB

...

30xA2 Preloader(, U-Boot)>= 2 MB

Generate partitions

To generate the several partitions, following the next steps is necessary:

  • Insert the SD card into your linux system.
  • Start a terminal.
  • Identify the SD card via shell command lsblk
  • Attention: If the wrong identifier is selected, the following commands can destroy the host system! Therefore, be aware to use the correct identifier.
  • The identifier is similar to sdXXX, where XXX symbols the identified SD card.
  • Start the tool fdisk as root via sudo fdisk /dev/sdXXX
  • Look at the partition structure via inserting p → Enter
  • Attention: Deleting the partitions in the next step destroys the saved information. If the information are needed save them before continuing!
  • Then delete all partitions via d → Enter
  • After all partitions are deleted the SD card structure can be created.

Creating the partition #1:

  • Create a new partitions via inserting n → Enter
  • Select the primar partition via inserting p → Enter
  • Set the partittion number to via inserting 1 → Enter
  • Select the first sector via inserting 2048 → Enter
  • Select the last sector via inserting +20M → Enter

Creating the partition #2:

  • Create a new partitions via inserting n → Enter
  • Select the primar partition via inserting p → Enter
  • Set the partittion number to via inserting 2 → Enter



Copy files to partitions

The first partition need to be the vFat partition, best practice: vFat, Linux and 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

fANG MIT AUTO AN; SOLLTE Es wegen dem Texteditrot zu fehlern kommen, → manuell machen

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

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)

...

u-boot.img muss auf diese Partition!!!!

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)

...

//////////////////////// SOC EDA Installation für Linux !!!!!!!!!!!!!!

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

...

Poky (Yocto Project Reference Distro) 2.7.2 arrow-sockit ttyS0

arrow-sockit login:


////////////////////////

Informationsfragmente


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.



Was soll das folgende heißen?

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



/////////////////////////////