Booting Linux Using Prebuilt SD Card Image
How to create an SD card using pre-compiled Linux binaries package and use it to boot Linux on the Altera Cyclone V SoC Development board

This page needs tagging. Please add keywords describing what this page is about.

Prerequisites

The following items will be needed in order to succesfully get started with booting Linux on the Altera SoC Development board:
  • Altera SoC Development board (include power supply and required accessories).
  • Host computer running Windows or Linux
  • External USB micro SD card reader (or host computer with built-in micro SD card reader). Alternatively a micro SD to SD card adapter can be used if the host PC or the reader has a SD slot but no micro SD slot.
  • 4GB (or larger) micro SD or micro SDHC card. The actual image is 2GB, but most SD cards have some amount of invalid sectors, so using a 2GB SD card might not work.
  • (Optional) Local Ethernet network, with DHCP server (will be used to provide IP address to the board).

Creating SD Card

This section explains how to create the SD card necessary to boot Linux, using the SD card image available with the precompiled Linux binaries package.

Note: If the host computer is running Windows, run the following commands from the SoC EDS Embedded Command Shell. The SoC EDS Embedded Command Shell can be started by running the 'C:\altera\<Altera Tools Version>\embedded\Embedded_Command_Shell.bat' batch file or from the "SoC EDS <Altera Tools Version> Command Shell" link found in the Start Menu. For a Linux host, please run from the standard shell prompt. Some commands assume a BASH shell is used.

Creating SD Card on Linux

Downloading and Uncompressing the SD card image

The steps required to create the SD card for the Cyclone V Development board are:

1. Download the GSRD release binaries:
$ wget https://releases.rocketboards.org/2015.10/gsrd/bin/linux-socfpga-gsrd-15.1-cv-bin.tar.gz

Note: If the network uses a proxy to access the web, set the http_proxy environment variable before executing the wget command:
$ export http_proxy="<proxy server name>:<proxy server port>"

2. Extract the compressed Linux SD card image from archive:
$ tar xzvf linux-socfpga-gsrd-15.1-cv-bin.tar.gz

3. Expand the compressed Linux SD card image:
$ tar xzvf sdimage.tar.gz

Note: The final file will be named 'sdimage.img' and can be used to write to an SD card in later steps.

Writing the Image to the SD card

4. Insert SD card into SD card writer, and connect writer to the PC

5. Determine the device associated with the SD card on the host by running the following command before and after inserting the card in the reader:
$ cat /proc/partitions 

Let's assume it is /dev/sdx.

6. Use dd utility to write the SD image to the SD card:
$ sudo dd if=sdimage.img of=/dev/sdx bs=1M

Note we are using sudo to be able to write to the card.

7. Use sync utility to flush the changes to the SD card:
$ sudo sync

Creating SD Card on Windows

1. Download the compressed SD card image archive from here: https://releases.rocketboards.org/2015.10/gsrd/bin/linux-socfpga-gsrd-15.1-cv-bin.tar.gz.

2. This archive contains the SD card image file and may also contain other archive files. Extract the SD card image "sdimage.img" from this compressed archive using WinZip or similar.

3. Insert SD card into SD card writer, and connect writer to the PC.

4. Download and install the free Win32 Disk Imager tool from http://sourceforge.net/projects/win32diskimager.

This tool will allow the user to read and write raw disk images to/from the SD Card.

5. Write the sdimage.img image file to the SD card using the Win32 Disk Imager tool

Note: Be careful to select the SD card disk drive to write

Arria V Development Board Steps

The steps to create the SD card for the Arria V development board are similar:
$ wget https://releases.rocketboards.org/2015.10/gsrd/bin/linux-socfpga-gsrd-15.1-av-bin.tar.gz
$ tar xzvf linux-socfpga-gsrd-15.1-av-bin.tar.gz
$ tar xzvf sdimage.img.gz
$ sudo dd if=sdimage.img of=/dev/sdx bs=1M
$ sudo sync

Configuring Board

This section presents the necessary board settings in order to run the GSRD on the Altera SoC development boards.

Cyclone V Development Board

The following image is provided to make it easier to find these locations on the board:

cyclonev soc dev board with markup.jpg

  • Configure Jumpers
    Jumper Setting
    J5 open
    J6 shorted
    J7 shorted
    J9 open
    J13 shorted
    J16 open
    J26 left shorted
    J27 right shorted
    J28 left shorted
    J29 right shorted
    J30 left shorted
    J31 open
    • Configure switches
      Switch Setting
      SW1 All OFF
      SW2 All OFF
      SW3 1:ON 2:ON 3:ON 4:ON 5:ON 6:ON
      SW4 1:OFF 2:OFF 3:ON 4:ON
      • Make sure the power switch SW5 on the board is turned OFF.
      • Connect mini USB cable from the host PC to the board connector J8.
      • Connect Ethernet cable from board connector J2 to the local network (hub or switch). This is needed only if networking is to be used.
      • Connect 19V power supply cable to the board connector J22.

      Arria V Development Board

      The following image is provided to make it easier to find the jumpers, switched and connectors locations on the board:

      arriav.png

      • Configure Jumpers
        Jumper Setting
        J6 2.5 shorted
        J7 open
        J18 open
        J19 shorted
        J21 shorted
        J23 open
        J28 open
        J30 open
        J37 left shorted
        J38 right shorted
        J39 left shorted
        J40 right shorted
        J41 left shorted
        J45 shorted
        J46 shorted

        • Configure switches
          Switch Setting
          SW1 1:OFF 2:OFF 3:OFF 4:OFF 5:OFF 6:OFF 7:ON 8:ON
          SW2 1:OFF 2:ON 3:OFF 4:OFF
          SW3 All ON
          SW4 1:OFF 2:OFF 3:ON 4:OFF
          • Make sure the power switch SW5 on the board is turned OFF.
          • Connect mini USB cable from the host PC to the board connector J22.
          • Connect Ethernet cable from board connector J13 to the local network (hub or switch). This is needed only if networking is to be used.
          • Connect 19V power supply cable to the board connector J34.

          Configuring Serial Connection

          The board has a built-in USB to Serial converter chip that allows the host computer to see the board as a virtual serial port.

          Both Ubuntu 12.04 and CentsOS 6.5 have built-in drivers for the USB to Serial converter chip that is on the Altera SoC Development board, so no driver installation is necessary on those platforms.

          1. The virtual serial port is usually named /dev/ttyUSB0. In order to determine the device name associated with the virtual serial port on your host PC, please perform the following:
          • Use the following command to determine which USB serial devices are already installed: ls /dev/ttyUSB*
          • Power up the board using the switch SW5. The board LEDs will turn on.
          • Use the ls /dev/ttyUSB* command command again to determine which new USB serial device appeared.
          2. Install a terminal emulator application on the host PC, if not already installed.

          Note: To configure minicom, please run the following commands. Set up other terminal emulator applications similarly to use the COM port or tty interface for 115200bps and 8-N-1.
          $ sudo minicom -s

          Under Serial Port Setup choose the following
          • Serial Device: /dev/ttyUSB0 (edit to match the system as necessary)
          • Bps/Par/Bits: 115200 8N1
          • Hardware Flow Control: No
          • Software Flow Control: No
          • Hit [ESC] to return to the main configuration menu
          Select Save Setup as dfl to save the default setupSelect Exit.

          Notes:
          • Depending on your board version, the USB Serial device may not be available to your host PC until the board is powered up. This will prevent you from starting the terminal emulator until the board is powered up. If the SD card is already inserted, the boot process will have already started by the time the terminal emulator is started, and you may miss some of the boot messages.
          • To avoid the above problem, you may use this sequence:
            1. Power up the board without the SD card inserted,
            2. Start the terminal emulator
            3. Insert SD card and press HPS warm reset button (S8 on Cyclone V board, S10 on Arria V board)

          Booting Linux

          This section presents how to boot Linux on the board. The required steps are:
          1. Prepare SD card
          2. Configure Board
          3. Configure the terminal emulator (USB port, 115200bps 8-N-1)
          4. Start the terminal emualtor - it will use the defined configuration
          5. Power up board (or, if already powered up, press Warm reset button or power cycle)
          6. The terminal emulator will show Linux booting, then asking for the username. Enter root then press ENTER. No password will be required.
          7. The four FPGA LEDs on the top right corner of the board will light ON and OFF sequentially. AlteraLinuxGettingStarted.png
          8. The IP address of the target board will be displayed on the 1st line of the LCD display. Note that the IP address is displayed only at the boot time, it is not updated if the IP address is changed later, for example by the user.

          Reference Information

© 1999-2024 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Privacy Policy - Terms Of Use

This website is using cookies. More info. That's Fine