Yocto Platform Customization: Difference between revisions

From Variscite Wiki
Line 397: Line 397:


=Platform Customizations=
=Platform Customizations=
== Yocto FSLC ==
<section begin=YOCTO_FSLC/> <!--
-->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}}  <!--
-->{{#vardefine:TOOLCHAIN_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}}  <!--
-->{{#vardefine:BUILD_FOLDER|~/var-fslc-yocto}}  <!--
-->{{#vardefine:BUILD_FOLDER_ABSOLUTE_PATH|/home/<uname>/var-fslc-yocto}}  <!--
-->{{#vardefine:BUILD_DISTRO|fslc-x11}}  <!--
-->{{#vardefine:BUILD_DISTRO_FB|fslc-framebuffer}}  <!--
-->{{#vardefine:BUILD_FOLDER_FB|build_fb}} <!--
-->{{#vardefine:BUILD_SCRIPT|. setup-environment}} <!--
-->{{#vardefine:BUILD_FOLDER_X11|build_x11}} <!--
-->{{#vardefine:YOCTO_DESCRIPTION|Yocto Morty 2.2.1 based on FSL Community BSP 2.2 with L4.1.15_2.0.0-ga Linux release}} <section end=YOCTO_FSLC/>
== VAR-SOM-MX6 ==
== VAR-SOM-MX6 ==
<section begin=RELEASE_MORTY_BETA_VAR-SOM-MX6/>
<section begin=RELEASE_MORTY_BETA_VAR-SOM-MX6/>
Line 417: Line 404:
-->{{#vardefine:RELEASE_NOTES_LINK|https://docs.google.com/spreadsheets/d/1WN-kGn3r9mcJh0EdSE3wZNBmhw5g5A95facy6gSIFn4/pubhtml}}  <!--
-->{{#vardefine:RELEASE_NOTES_LINK|https://docs.google.com/spreadsheets/d/1WN-kGn3r9mcJh0EdSE3wZNBmhw5g5A95facy6gSIFn4/pubhtml}}  <!--
-->{{#vardefine:YOCTO_NAME|Morty}}  <!--
-->{{#vardefine:YOCTO_NAME|Morty}}  <!--
-->{{#vardefine:YOCTO_VERSION|2.2.1}}  <!--
-->{{#vardefine:FSLC_BSP_VERSION|2.2}}  <!--
-->{{#vardefine:FSL_BSP_VERSION|L4.1.15_2.0.0-ga}}  <!--
-->{{#vardefine:GSTREAMER_SUPPORT|yes}}  <!-- This parameter enables support for GSTREMAER
-->{{#vardefine:GSTREAMER_SUPPORT|yes}}  <!-- This parameter enables support for GSTREMAER
-->{{#vardefine:YOCTO_DESCRIPTION|Yocto Morty 2.2.1 based on FSL Community BSP 2.2 with L4.1.15_2.0.0-ga Linux release}}  <!--
-->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}}  <!--
-->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}}  <!--
-->{{#vardefine:TOOLCHAIN_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}}  <!--
-->{{#vardefine:TOOLCHAIN_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}}  <!--
Line 451: Line 440:
*RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
*RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
*RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
*RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
*YOCTO_NAME = '''{{#var:YOCTO_NAME}}'''
*YOCTO_VERSION = '''{{#var:YOCTO_VERSION}}'''
*FSLC_BSP_VERSION = '''{{#var:FSLC_BSP_VERSION}}'''
*FSL_BSP_VERSION = '''{{#var:FSL_BSP_VERSION}}'''
*RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
*RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
*RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
*RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
Line 516: Line 509:
*RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
*RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
*RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
*RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
*YOCTO_NAME = '''{{#var:YOCTO_NAME}}'''
*YOCTO_VERSION = '''{{#var:YOCTO_VERSION}}'''
*FSLC_BSP_VERSION = '''{{#var:FSLC_BSP_VERSION}}'''
*FSL_BSP_VERSION = '''{{#var:FSL_BSP_VERSION}}'''
*RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
*RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
*RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
*RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
Line 546: Line 543:
-->{{#vardefine:RELEASE_NOTES_LINK|}}  <!--
-->{{#vardefine:RELEASE_NOTES_LINK|}}  <!--
-->{{#vardefine:YOCTO_NAME|Morty}}  <!--
-->{{#vardefine:YOCTO_NAME|Morty}}  <!--
-->{{#vardefine:YOCTO_DESCRIPTION|Yocto Morty 2.2.1 based on FSL Community BSP 2.2 with L4.1.15_2.0.0-ga Linux release}}  <!--
-->{{#vardefine:YOCTO_VERSION|2.2.1}}  <!--
-->{{#vardefine:FSLC_BSP_VERSION|2.2}}  <!--
-->{{#vardefine:FSL_BSP_VERSION|L4.1.15_2.0.0-ga}}  <!--
-->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}}  <!--
-->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}}  <!--
-->{{#vardefine:TOOLCHAIN_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}}  <!--
-->{{#vardefine:TOOLCHAIN_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}}  <!--
Line 576: Line 575:
*RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
*RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
*RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
*RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
*YOCTO_NAME = '''{{#var:YOCTO_NAME}}'''
*YOCTO_VERSION = '''{{#var:YOCTO_VERSION}}'''
*FSLC_BSP_VERSION = '''{{#var:FSLC_BSP_VERSION}}'''
*FSL_BSP_VERSION = '''{{#var:FSL_BSP_VERSION}}'''
*RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
*RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
*RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
*RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''

Revision as of 08:55, 9 May 2017

Yocto

Documentation

  • Yocto Project Core - Morty 2.2.1 (released on 02/24/2017)

Documentation is available from www.yoctoproject.org

  • FSL Community BSP Release Notes 2.2 documentation

Documentation is available from http://freescale.github.io


VAR-SOM-MX6

Build Results

Device Tree Name
SOM type
Carrier Board type
LCD Type
Evaluation Kit name
uImage-imx6q-var-som-cap.dtb VAR-SOM-MX6_V2 (Quad / Dual) VAR-MX6CustomBoard Capacitive touch VAR-DVK-MX6_V2-PRO
VAR-STK-MX6_V2
uImage-imx6q-var-som-res.dtb VAR-SOM-MX6_V2 (Quad / Dual) VAR-MX6CustomBoard Resistive touch VAR-DVK-MX6_V2-PRO
VAR-STK-MX6_V2
uImage-imx6q-var-som-vsc.dtb VAR-SOM-MX6_V2 (Quad / Dual) VAR-SOLOCustomBoard Capacitive LVDS touch N/A
uImage-imx6dl-var-som-cap.dtb VAR-SOM-MX6_V2 (DualLite/ Solo) VAR-MX6CustomBoard Capacitive touch N/A
uImage-imx6dl-var-som-res.dtb VAR-SOM-MX6_V2 (DualLite/ Solo) VAR-MX6CustomBoard Resistive touch N/A
uImage-imx6dl-var-som-vsc.dtb VAR-SOM-MX6_V2 (DualLite/ Solo) VAR-SOLOCustomBoard Capacitive LVDS touch N/A
uImage-imx6dl-var-som-solo-vsc.dtb VAR-SOM-SOLO / VAR-SOM-DUAL VAR-SOLOCustomBoard Capacitive LVDS touch VAR-DVK-SOLO/DUAL
VAR-STK-SOLO/DUAL
uImage-imx6dl-var-som-solo-cap.dtb VAR-SOM-SOLO / VAR-SOM-DUAL VAR-MX6CustomBoard Capacitive touch N/A
uImage-imx6dl-var-som-solo-res.dtb VAR-SOM-SOLO / VAR-SOM-DUAL VAR-MX6CustomBoard Resistive touch N/A
uImage-imx6q-var-dart.dtb VAR-SOM-SOLO / VAR-SOM-DUAL VAR-DT6CustomBoard Capacitive LVDS touch VAR-DVK-DT6
VAR-STK-DT6


Device tree

Build the device tree for Dualite/Solo on VAR-MX6CustomBoard with capacitive touchscreen:
$ make -j4 imx6dl-var-som-cap.dtb

Build the device tree for Dualite/Solo on VAR-MX6CustomBoard with resistive touchscreen:
$ make -j4 imx6dl-var-som-res.dtb

Build the device tree for Dualite/Solo on VAR-SOLOCustomBoard:
$ make -j4 imx6dl-var-som-vsc.dtb

Build the device tree for Quad/Dual on VAR-MX6CustomBoard with capacitive touchscreen:
$ make -j4 imx6q-var-som-cap.dtb

Build the device tree for Quad/Dual on VAR-MX6CustomBoard with resistive touchscreen:
$ make -j4 imx6q-var-som-res.dtb

Build the device tree for Quad/Dual on VAR-SOLOCustomBoard:
$ make -j4 imx6q-var-som-vsc.dtb

Build the device tree for VAR-SOM-SOLO on VAR-MX6CustomBoard with capacitive touchscreen:
$ make -j4 imx6dl-var-som-solo-cap.dtb

Build the device tree for VAR-SOM-SOLO on VAR-MX6CustomBoard with resistive touchscreen:
$ make -j4 imx6dl-var-som-solo-res.dtb

Build the device tree for VAR-SOM-SOLO on VAR-SOLOCustomBoard:
$ make -j4 imx6dl-var-som-solo-vsc.dtb

Build the device tree for DART-MX6:
$ make -j4 imx6q-var-dart.dtb


Booting your specific Developer Kit

Select the one you are using.

MX6CustomBoard

Booting your MX6CustomBoard system from SD card requires while powering up the system. See picture below.

Mx6 boot.jpg

To boot a board using an SD card, follow the steps below:

  • Power-off the board.
  • Insert the SD card into the SD/MMC slot of the carrier board (DVK)
  • Push the middle button (Boot Select) and hold
  • Power-up the board
  • Release the middle button (Boot Select) after system starts to boot.
  • The board will automatically boot into Linux from the SD card

SoloCustomBoard

Booting your system requires switching the relevant DIP switch to "Boot from MMC". See picture below.

Solo boot.jpg

To boot board with SD card, Follow the steps below:

  • Power-off the board.
  • Insert the SD card into the SD/MMC slot of the carrier board (DVK)
  • Switch the relevant DIP switch to "Boot from MMC"
  • Power-up board
  • The board will automatically boot into Linux from SD card

DT6CustomBoard

Booting your system requires switching the relevant DIP switch to "Boot from SD card". See picture below.

Dart boot.jpg

To boot board with SD card, Follow the steps below:

  • Power-off the board.
  • Insert the SD card into the SD/MMC slot of the carrier board (DVK)
  • Switch the relevant DIP switch to "Boot from SD card"
  • Power-up board
  • The board will automatically boot into Linux from SD card

Automatic Device Tree selection in U-Boot

As shown in the Build Results table above, we have different kernel device trees, corresponding to our different H/W configurations (sometimes they are renamed without the "-" prefix).
We implemented a script in U-Boot's environment, which sets the fdt_file environment variable based on the detected hardware.

Enable/Disable Automatic Device Tree selection

To enable the automatic device tree selection in U-Boot (already enabled by default):

$ setenv fdt_file=undefined
$ saveenv

To disable the automatic device tree selection in U-Boot, set the device tree file manually:

$ setenv fdt_file=YOUR_DTB_FILE
$ saveenv


DART-6UL

Build Results

File Name Description
zImage-imx6ul-var-dart-emmc_wifi.dtb Device tree blob for DART-6UL with eMMC & WI-FI enabled. (SD card & NAND disabled)
zImage-imx6ul-var-dart-nand_wifi.dtb Device tree blob for DART-6UL with NAND flash & WI-FI enabled. (SD card & eMMC disabled)
zImage-imx6ul-var-dart-sd_emmc.dtb Device tree blob for DART-6UL with SD card & eMMC enabled (WIFI & NAND disabled)
zImage-imx6ul-var-dart-sd_nand.dtb Device tree blob for DART-6UL with SD card & NAND flash enabled (WIFI & eMMC disabled)
zImage-imx6ull-var-dart-emmc_wifi.dtb Device tree blob for DART-6ULL with eMMC & WI-FI enabled. (SD card & NAND disabled)
zImage-imx6ull-var-dart-nand_wifi.dtb Device tree blob for DART-6ULL with NAND flash & WI-FI enabled. (SD card & eMMC disabled)
zImage-imx6ull-var-dart-sd_emmc.dtb Device tree blob for DART-6ULL with SD card & eMMC enabled (WIFI & NAND disabled)
zImage-imx6ull-var-dart-sd_nand.dtb Device tree blob for DART-6ULL with SD card & NAND flash enabled (WIFI & eMMC disabled)


Device tree

Build only the device tree for DART-6UL with eMMC and WiFi:
$ make -j4 imx6ul-var-dart-emmc_wifi.dtb

Build only the device tree for DART-6UL with eMMC and SD card:
$ make -j4 imx6ul-var-dart-sd_emmc.dtb

Build only the device tree for DART-6UL with NAND flash and WiFi:
$ make -j4 imx6ul-var-dart-nand_wifi.dtb

Build only the device tree for DART-6UL with NAND flash and SD card:
$ make -j4 imx6ul-var-dart-sd_nand.dtb

Build only the device tree for DART-6ULL with eMMC and WiFi:
$ make -j4 imx6ull-var-dart-emmc_wifi.dtb

Build only the device tree for DART-6ULL with eMMC and SD card:
$ make -j4 imx6ull-var-dart-sd_emmc.dtb

Build only the device tree for DART-6ULL with NAND flash and WiFi:
$ make -j4 imx6ull-var-dart-nand_wifi.dtb

Build only the device tree for DART-6ULL with NAND flash and SD card:
$ make -j4 imx6ull-var-dart-sd_nand.dtb


SD card image file tree

/opt/images/
└── Yocto
    ├── imx6ul-var-dart-emmc_wifi.dtb
    ├── imx6ul-var-dart-nand_wifi.dtb
    ├── imx6ul-var-dart-sd_emmc.dtb
    ├── imx6ul-var-dart-sd_nand.dtb
    ├── imx6ull-var-dart-emmc_wifi.dtb
    ├── imx6ull-var-dart-nand_wifi.dtb
    ├── imx6ull-var-dart-sd_emmc.dtb
    ├── imx6ull-var-dart-sd_nand.dtb
    ├── rootfs.tar.bz2
    ├── rootfs.ubi
    ├── SPL-nand
    ├── SPL-sd
    ├── u-boot.img-nand
    ├── u-boot.img-sd
    └── zImage


Boot board with a bootable SD card

Note: Boot from SD card eliminates Wifi as the Wifi and SD card are using same SDIO interface.
A typical use-case, is to boot from SD card, flash eMMC or NAND flash, and re-boot form eMMC/NAND to have Wi-Fi operational.

Setting the Boot DIP switches

Booting your system from an SD card requires switching the Boot DIP switches. See picture below.

Boot switch 6ul1.jpg
  • "00" The current position in the picture will set the system to boot from SD card.
  • "01" Moving the right switch will set the system to boot from eMMC
  • "10" Moving the left switch will set the system to boot from NAND flash
  • "11" is illegal.

Be aware that your system has eMMC or NAND but never both.

Automatic device Tree selection in U-Boot

Upon reset you will see the U-Boot SPL printouts. It will print also the SOM configuration:
On-SOM storage: SD only, eMMC, NAND.
WIFI if chip exits.
For example:

U-Boot SPL 2015.10-00532-g482dc88 (Jan 03 2016 - 10:05:42)
i.MX6UL SOC 
Part number: DART-6U-A01
Assembly: AS11
Date of production: 2015 Dec 31
DART-6UL configuration: eMMC WIFI
Ram size: 512
Boot Device: SD

As explained in the above Build Results table we have 4 optional configurations.
We implemented in U-Boot and automatic device tree selection, so when kernel boots, the U-Boot will load the corresponding device tree according to On-SOM configuration.

SOM Type
Boot From
SOM Internal FLASH
SOM has WIFI/BT
Device Tree selected
DART-6UL SD eMMC Don't Care imx6ul-var-dart-sd_emmc.dtb
DART-6UL SD NAND Don't Care imx6ul-var-dart-sd_nand.dtb
DART-6UL eMMC eMMC Yes imx6ul-var-dart-emmc_wifi.dtb
DART-6UL eMMC eMMC NO imx6ul-var-dart-sd_emmc.dtb
DART-6UL NAND NAND YES imx6ul-var-dart-nand_wifi.dtb
DART-6UL NAND NAND NO imx6ul-var-dart-sd_nand.dtb
DART-6ULL SD eMMC Don't Care imx6ull-var-dart-sd_emmc.dtb
DART-6ULL SD NAND Don't Care imx6ull-var-dart-sd_nand.dtb
DART-6ULL eMMC eMMC Yes imx6ull-var-dart-emmc_wifi.dtb
DART-6ULL eMMC eMMC NO imx6ull-var-dart-sd_emmc.dtb
DART-6ULL NAND NAND YES imx6ull-var-dart-nand_wifi.dtb
DART-6ULL NAND NAND NO imx6ull-var-dart-sd_nand.dtb

Note: Boot from SD card eliminates Wifi as the Wifi and SD card are using same SDIO interface.
A typical use-case, is to boot from SD card, flash eMMC or NAND flash, and re-boot form eMMC/NAND to have Wi-Fi operational.

Disable Automatic Device Tree selection

To disable the automatic device tree selection in U-Boot:

$ setenv var_auto_fdt_file=N
$ saveenv

Now you can set the device tree to meet your requirements. For example:

$ setenv fdt_file=imx6ul-var-dart-sd_emmc.dtb
$ saveenv

Will select device tree that has SD and eMMC regardless if the SOM has WIFI.

$ setenv fdt_file=imx6ul-var-dart-sd_nand.dtb
$ saveenv

Will select device tree that has SD and NAND regardless if the SOM has WIFI.

Comment:
Make sure you don't set am illegal value like "imx6ul-var-dart-sd_nand.dtb" in a SOM that has eMMC flash.


Platform Customizations

VAR-SOM-MX6


DART-6UL

VAR-SOM-MX7

  • RELEASE_NAME = morty-fslc-4.1.15-mx7-v1.0-beta
  • RELEASE_LINK = RELEASE_MORTY_BETA_VAR-SOM-MX7
  • YOCTO_NAME = Morty
  • YOCTO_VERSION = 2.2.1
  • FSLC_BSP_VERSION = 2.2
  • FSL_BSP_VERSION = L4.1.15_2.0.0-ga
  • RECOVERY_SD_NAME = morty-fslc-4.1.15-mx7-v1.0-beta.img.gz
  • RECOVERY_SD_URL = ftp://customerv:Variscite1@ftp.variscite.com/VAR-SOM-MX7/Software/fslc
  • RELEASE_NOTES_LINK = '
  • MACHINE_NAME = imx7-var-som
  • KERNEL_GIT = https://github.com/varigit/linux-2.6-imx.git
  • KERNEL_BRANCH = imx-rel_imx_4.1.15_2.0.0_ga-var01
  • KERNEL_IMAGE = zImage
  • KERNEL_DEFCONFIG = imx7-var-som_defconfig
  • U-BOOT_GIT = https://github.com/varigit/uboot-imx.git
  • U-BOOT_BRANCH = imx_v2015.04_4.1.15_1.1.0_ga_var02
  • U-BOOT_SD_DEFCONFIG = mx7dvar_som_defconfig
  • U-BOOT_NAND_DEFCONFIG = mx7dvar_som_nand_defconfig
  • U-BOOT_SD_IMAGE_NAME = u-boot.imx-sd
  • U-BOOT_NAND_IMAGE_NAME = u-boot.imx-nand
  • U-SPL_SD_IMAGE_NAME = SPL-sd
  • U-SPL_NAND_IMAGE_NAME = SPL-nand
  • YOCTO_GIT = https://github.com/varigit/variscite-bsp-platform.git
  • YOCTO_META_GIT = '
  • YOCTO_BRANCH = morty
  • YOCTO_BUILD_RESULTS_SECTION = VAR-SOM-MX7_BUILD_RESULTS
  • YOCTO_BOOT_BOARD_SECTION = VAR-SOM-MX7_BOOT_BOARD
  • KERNEL_DTB_SECTION = VAR-SOM-MX7_DTB
  • SD_TREE_SECTION = VAR-SOM-MX7_SD_TREE