Versions Compared

Key

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

Custom_table_size_100

Some of the reference designs from Trenz Electronics include a preconfigured yocto bsp layer that can be used to generate a Linux image and a prebuilt yocto linux image, that can be copied directly to sd card.

Generate image with predefined yocto BSP layer

Yocto BSP layer. This is a short description of how to use the BSP layer to create a Linux image with the Yocto project for the Board.

Prepare Yocto Project

Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue

The yocto bsp Yocto BSP layer will be generated with the quartus project in the <project name>/os/yocto/meta-<module> folder. The generated layers depends on the meta-altera layer (for more information see: Yocto KICKstart#Used source files).

  1. Download a reference design that includes yocto bsp a Yocto BSP layer
  2. Generate the quartus Quartus project as described in the wiki description of the downloaded reference design or in Project Delivery - Intel devices#Quick Start
  3. Copy the generated meta-<module> folder from <project name>/os/yocto/meta-<module> to the path/to/yocto/poky/ directory
  4. Follow the steps from Yocto KICKstart#Create a project for an Intel FPGA device without running the 'bitbake' command
  5. Add the generated bsp BSP layer meta-<machine> to /yocto/poky/build/conf/bblayers.conf with:

    Code Block
    themeMidnight
    linenumberstrue
    bitbake-layers add-layer ../meta-<module>


Generate linux image

Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue

There are two options to generate an image with the provided Yocto BSP layer:

  1. Generate an image with a minimal RAM-based root filesystem, which is bundled inside the kernel image.
  2. Generate an image with a root filesystem on sd card with its own partition.

For the reference design, the generation of an image with an init RAM filesystem is preferred.

Image with initial RAM filesystem

  1. Redefine the variable MACHINE with '<module>-<Board-Part-Short-Name>' in path/to//yocto/poky/build/conf/local.conf 
    1. A list with the correct MACHINE names can be found in the wiki description of the reference design: Overview→Requirements→Hardware
    2. run following commands to redefine 'MACHINE':

      Code Block
      themeMidnight
      linenumberstrue
      sed -i '/^MACHINE/s/MACHINE/#MACHINE/g' conf/local.conf
      echo -e '\nMACHINE = "<module>-<Board-Part-Short-Name>"' >> conf/local.conf


  2. Define the variables INITRAMFS_IMAGE_BUNDLE and INITRAMFS_IMAGE to create an image with initial RAM filesystem

    Code Block
    themeMidnight
    linenumberstrue
    echo -e '\nINITRAMFS_IMAGE_BUNDLE = "1"' >> conf/local.conf
    echo -e 'INITRAMFS_IMAGE = "te-initramfs"' >> conf/local.conf


  3. Build the image with following command (the image recipes are located in meta-<module>/recipes-core/images/):

    Code Block
    themeMidnight
    linenumberstrue
    bitbake te-image-minimal


Image with root filesystem on SD card

  1. Redefine the variable MACHINE with '<module>-<Board-Part-Short-Name>' in path/to/yocto/poky/build/conf/local.conf 
    1. A list with the correct MACHINE names can be found in the wiki description of the reference design: Overview→Requirements→Hardware
    2. run following commands to redefine 'MACHINE':

      Code Block
      themeMidnight
      linenumberstrue
      sed -i '/^MACHINE/s/MACHINE/#MACHINE/g' conf/local.conf
      echo -e '\nMACHINE = "<module>-<Board-Part-Short-Name>"' >> conf/local.conf


  2. Build the image with following command (the image recipes are located in meta-<module>/recipes-core/images/):

    Code Block
    themeMidnight
    linenumberstrue
    bitbake <module>te-image-minimal


Copy

image

.wic file to SD card

Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue

Yocto generates a full sd card image with .wic file which contains all needed files like u-boot, zImage , rootfs etc. included.The generated image and so on. This file is stored in path/to/yocto/poky/build/tmp/deploy/images/<machine>/<image_name>.wic. If you downloaded a reference design with prebuilt files, you can find a generated yocto linux image in <project name>/prebuilt/Board_Part_Short_Name/os/yocto/images/generate the linux yocto project yourself, using the .wic file is a very simple way to prepare the SD card for booting linux.

Do following steps to copy the image .wic file to the SD card:

  1. Insert the sd SD card into a sd SD card reader connected to the computer
  2. Run following command to get the device name of the SD card  (e.g. /dev/sdx):

    Code Block
    themeMidnight
    linenumberstrue
    lsblk


  3. Copy the generated *.wic image to the sd SD card (replace 'sdx' in 'of=/dev/sdx' with the correct sd card device name:

    Code Block
    themeMidnight
    linenumberstrue
    sudo dd if=path/to/yocto_image/poky/build/tmp/deploy/images/<machine>/<image_name>.wic of=/dev/sdx bs=1M seek=0


  4. Insert the SD card into your board, set boot mode to sd card (if the setting is available) and boot it.

Serial Console

Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue

  1. Open Serial Console (e.g. PuTTY)
    1. select COM Port

      Info

      Win OS: see device manager

      Linux OS: see  dmesg | grep tty  (UART is *USB1)


    2. Speed: 115200
  2. Press reset button Console output depends on used Software project, see Software Design - SDK#Applicationon the board
  3. Linux Console:
    1. Login data:

      Info

      Note: Wait until Linux boot finished


      Code Block
      themeMidnight
      linenumberstrue
      yocto loginUsername: root
      Password: root
      Info
      Note: Wait until Linux boot finished


    2. You can use Linux shell now.

      Code Block
      themeMidnight
      linenumberstrue
      i2cdetect -y -r 1   (check I2C 1 Bus, if available)
      dmesg | grep rtc    (RTC check, if available)
      udhcpc              (ETH0 check, if available)
      lsusb               (USB check, if available)




Scroll Only


HTML
<style>
.wiki-content .columnLayout .cell.aside {
width: 0%;
}</style>



Scroll pdf ignore


Custom_fix_page_content

Table of contents

Table of Contents
outlinetrue