build the custom image - ArrowElectronics/arrow-soc-workshops GitHub Wiki

The hardware layer for the custom board now exists. Add this layer to the build and reference the newly defined my-custom-soc-board MACHINE. Finally, build the custom console-image-minimal, copy the image to an SD card and boot the custom board.

Change the Configuration to Build for the my-custom-soc-board MACHINE

The MACHINE variable in the .../poky/build/conf/local.conf file specifies the machine for the build. For this example, set the MACHINE variable to "my-custom-soc-board".

  1. Open the .../poky/build/conf/local.conf file in the default editor, gedit
  2. Navigate to the line MACHINE ?= "cyclone5".
  3. Change the line to read. MACHINE ?= "my-custom-soc-board"
  4. Save the file.

Add the meta-my-custom-soc-board Layer to the Layer Configuration File

Ensure that the OE environment is set up correctly. Open a shell (Ctrl+Alt+T)

    $ cd ~/socfpga-workshop/socfpga_yocto_workshop/poky
    $ source oe-init-build-env

Before you can use a layer during a build, you must add it to your bblayers.conf file, which is found in the Build Directory's conf directory.

First remove the meta-altera layer used previously. Use the bitbake-layers add-layer command to add the layer to the configuration file:

    $ bitbake-layers remove-layer ../meta-altera
    $ bitbake-layers add-layer ../meta-my-custom-soc-board

Build the custom console-image-minimal

Repeat the build. This will incrementally build portions of code specific to the my-custom-soc-board MACHINE and the Linux version selected. This build will not take as long as the previous build since it will be incremental.

    $ bitbake -k console-image-minimal

If the build fails before completion, rerun bitbake console-image-minimal. Failures can occur due to dependencies and out of order execution.

Copy the Linux image to a micro SD card.

Yocto builds a complete SD card image, including formatting for binary, FAT, and Linux partitions.

Insert a micro SD card (at least 4GB) into a USB adaptor. Determine the device associated with the SD card on the host. Run the command below before and after inserting the SD card adaptor into a USB slot. The new drive letter will show up as /dev/sdX/ where 'X' represents the actual letter (a,b,c,d etc).

    $ cat /proc/partitions

Use the dd utility to write the yocto image to the SD card.

Exercise caution: dd targeted at an incorrect drive letter can brick your computer!

    $ sudo dd if=tmp/deploy/images/my-custom-soc-board/console-image-minimal-my-custom-soc-board.wic of=/dev/sdX bs=1M seek=0
    $ sudo sync

Eject the mounted drive before removing the SD card media.

Boot the Linux image.


Using the SoCKit board

  • Set the jumpers to the positions shown in the image below.
  • A wired Mini-USB serial port connection between the host PC and the embedded target is required. (1)
  • Plug in the SoCKit DC power supply. Press the Red power button. (2)
  • Launch a linux terminal (like Minicom,Tera Term VT or Putty) and connect using serial port
  • Select 115200 baud
  • Select the appropriate target COM port
  • Plug in the SD card. (3)
  • Press the Warm Reset button to begin the boot. (4)
  • Use root for login

This order of operation is useful if the reader wishes to see the complete boot from Power On, including the bootloader. The boot will halt at the Linux login. Use root as the login.



Using the DE10-Nano board

  • Set the jumpers to the positions shown in the diagram.
  • A wired Mini-USB serial port connection between the host PC and the embedded target is required. (1)
  • Plug in the DE10-Nano DC power supply. (2)
  • Launch a linux terminal (like Minicom,Tera Term VT or Putty) and connect using serial port
  • Select 115200 baud
  • Select the appropriate target COM port
  • Plug in the SD card. (3)
  • Press the Warm Reset button to begin the boot. (4)
  • Use root for login

This order of operation is useful if the reader wishes to see the complete boot from Power On, including the bootloader. The boot will halt at the Linux login. Use root as the login.



Using the DataStorm DAQ board

  • Set the jumpers as shown in the diagram.
  • connect a micro-USB between the DataStorm DAQ and a PC (1)
  • Plug in the Power Adapter (2).
  • Launch a linux terminal (like Minicom,Tera Term VT or Putty) and connect using serial port
  • Select 115200 baud
  • Select the appropriate target COM port
  • Plug in the SD card. (3)
  • Press the Warm Reset button to begin the boot. (4)
  • Use root for login

This order of operation is useful if the reader wishes to see the complete boot from Power On, including the bootloader. The boot will halt at the Linux login. Use root as the login.

Review the boot log

Review the console boot log. The reader should see many of the custom layer features reflected there. A copy of the expected boot log has been provided. All relevant customizations are shown highlighted.

Show references to the customization

Next - Examine the live system

Return to - Review the Linux Kernel recipe

Return to - Building a Custom Linux BSP for SoC FPGA Systems Using the Yocto Project

⚠️ **GitHub.com Fallback** ⚠️