VAR-SOM-MX6 Yocto GS: Difference between revisions
Line 68: | Line 68: | ||
| SATA | | SATA | ||
| + | | + | ||
|} | | CAN bus | ||
| +| | |||
| SPI | |||
| + | |||
| I2C | |||
| + | |||
} | |||
Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1.<br> | Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1.<br> | ||
= Installing required packages<br> = | = Installing required packages<br> = |
Revision as of 06:29, 10 March 2014
Introduction
This is the second release of VAR-SOM-MX6 - Yocto V4.1 Dora. We updated the kernel with features and cleanup update u-boot and added support for Bluetooth and camera on the Dual lite and Solo SOM versions.
We also added 2 packages that enable Eclipse/Yocto application debug. A debug application note will come soon.
Supported hardware and features
Feature |
Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Board support |
VAR-DVK-MX6,VAR-SOM-MX6 | ||||||||||||||||||||||||||||||||||||||
CPU |
|||||||||||||||||||||||||||||||||||||||
Software platform |
Yocto Dora release. | ||||||||||||||||||||||||||||||||||||||
Nand Recovery | NAND-recovery SD V22 - can be downloaded from FTP | ||||||||||||||||||||||||||||||||||||||
NAND Flash size support |
0.5,1.0,2.0 GB | ||||||||||||||||||||||||||||||||||||||
SD-Card |
+ | ||||||||||||||||||||||||||||||||||||||
Wired Network |
10/100/1000 Mbps Ethernet | ||||||||||||||||||||||||||||||||||||||
Wireless Network |
802.11 b/g/n | ||||||||||||||||||||||||||||||||||||||
Bluetooth |
4.0 | ||||||||||||||||||||||||||||||||||||||
USB host |
+ | ||||||||||||||||||||||||||||||||||||||
USB OTG |
Host and Device | ||||||||||||||||||||||||||||||||||||||
Uarts |
x3, up to 3.6 Mbps. Minicom avilable to use with the port | ||||||||||||||||||||||||||||||||||||||
RTC |
+ | ||||||||||||||||||||||||||||||||||||||
Display | HDMI 720P,1080P LVDS0 (On board LVDS to RGB bridge, EVK supports 800x480 resolution) LVDS1 external display | ||||||||||||||||||||||||||||||||||||||
Audio | Line IN/ Line out | ||||||||||||||||||||||||||||||||||||||
Camera | ov5640 camera sensor. CB402 board can be ordered seperately | ||||||||||||||||||||||||||||||||||||||
SATA | + | CAN bus | SPI | + | I2C | +
} Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1. Installing required packages
Follow the link below and install all the required packages on your machine. www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html For example, if your building machine is an Ubuntu machine: sudo apt-get install gawk wget git-core diffstat unzip texinfo build-essential chrpath libsdl1.2-dev xterm Variscite Yocto build is tested with Ubuntu 12.04 lts. Get Yocto Dora for i.MX6 with Variscite VAR-SOM-MX6 supportMethod 1This method use a complete image of Yocto and Variscite BSP support. You will not have the git database using this method. $ cd ~ $ tar xvf var_yocto_rel_v3.0.tar.bz2 This will install an entire source tree. No need to apply any patch. Method 2 using "Repo"This method use a "repo" to fetch Yocto and apply Variscite patch for BSP support.
Install the `repo` utility: $ mkdir ~/bin $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo $ export PATH=~/bin:$PATH NOTE: we uploaded as a reference the repo we used. Get Yocto Dora from github. $ cd ~ $ mkdir var-som-mx6-dora-v3 $ cd var-som-mx6-dora-v3 $ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dora $ repo sync Download var_yocto_v3.2.tar.bz2 from Variscite's FTP. $ tar xvf var_yocto_v3.0.tar.bz2 $ variscite/install Comment: This method will keep the git repositories. It will enable you to track Variscite and your changes. Setup and Customize your Yocto buildSetup the environment and build folder $ MACHINE=varsommx6q . setup-environment build_mx6q or $ MACHINE=varsommx6dual . setup-environment build_mx6dual or $ MACHINE=varsommx6solo . setup-environment build_mx6solo Comment: If you close your terminal and want to build Yocto you should change directory to ~var-som-mx6-dora-v3 and run the above command again. build_mx6q is your build directory and all bitbake commands should run from it local.conf customizations
Edit you local.conf file: $ gedit conf/local.conf Change your parallel build and download directory: Parallel build
Set the build parameters to fully utilize your host machine
BB_NUMBER_THREADS = '4' Download directory.Recommended to save download time and space.
DL_DIR = "/home/<uname>/yocto_dl" Build your image$ bitbake fsl-image-gui Other image build options:
The resulted images are in tmp/deploy/images/varsommx6q.
U-Boot options
By default all images are built for NAND-based U-Boot. If you want to change the setting to build SD-Card images, change the board file. under ~/var_yocto/sources/meta-fsl-arm-extra/conf/machine you will find Variscite board definitions. varsommx6q.conf Edit you specifc board and change UBOOT_MACHINE according to the folowing table.
ToolchainBuild the toolchain by: $ bitbake meta-ide-support $ bitbake meta-toolchain The output will be located at tmp/deploy/sdk/. On a 64 bit Ubuntu you will get: poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.sh. Install the tools by running: $ tmp/deploy/sdk/poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.1.sh The toolchain name depend on your build machine and may change. Build Linux out of Yocto tree
Prepare the Linux kernel $ bitbake -c cleansstate linux-variscite $ bitbake -c devshell linux-variscite This will open a new shell at ...tmp/work/varsommx6q-poky-linux-gnueabi/linux-variscite/3.0.35-r0/git# Copy the Linux kernel to a new folder $ mkdir ~/var-som-mx6-dora-v3/linux-imx $ cp -a * ~/var-som-mx6-dora-v3/linux-imx $ exit change dir into the new Linux kernel folder $ cd ~/var-som-mx6-dora-v3/linux-imx Set the tools path: $ export PATH=/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi:$PATH Clean the Linux kernel: $ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper Configure the Linux kernel: $ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- var_som_mx6_defconfig Change configuration if required: $ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig Build the Linux kernel: $ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage $ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules The best practice of testing the new Linux kernel is using TFTP&NFS. Described in the apendix. $ cp arch/arm/boot/uImage /tftpboot Install the Linux modules into the rootfs file system $ sudo make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules_install INSTALL_MOD_PATH=../rootfs Build U-Boot out of Yocto tree
Prepare the U-Boot boot loader $ bitbake -c cleansstate u-boot-variscite $ bitbake -c devshell u-boot-variscite This will open a new shell at ...tmp/work/varsommx6q-poky-linux-gnueabi/linux-variscite/3.0.35-r0/git# Copy the U-Boot boot loader to a new folder $ mkdir ~/var-som-mx6-dora/uboot-imx $ cp -a * ~/var-som-mx6-dora/uboot-imx $ exit change dir into the new u-boot folder $ cd ~/var-som-mx6-dora/uboot-imx set the tools path if required $ export PATH=/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi:$PATH Clean the U-Boot $ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper Configure the U-Boot boot loader $ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_nand_config Build the U-Boot boot loader $ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- Use our NAND-recovery sd-card to burn your u-boot to the NAND-Flash. In case you build an sd-card version use sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync Set the /dev/mmcblk0 according to you host sd-card device. Creating a recovery SD-Card Comment: we use Ubuntu 12.04 mount convention and a laptop media name. "/media/var_som_mx6_rf" and "/dev/mmcblk0" are widely used in this section. You should be aware of this and change the media name to you host machine name. Create a new folder: $ mkdir ~/my_recovery_sd $ cd ~/my_recovery_sd Insert Variscite recovery SD-Card version 19 into your host machine. Copy the recovery folder from the SD-Card into your local folder: $ sudo cp -a /media/var_som_mx6_rf/opt/recovery ./ $ sudo cp /media/var_som_mx6_rf/sbin/nand-recovery.sh ./ Update your local folder with the files you created during the Yocto build: $ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.ubi recovery/Yocto/rootfs.ubi.img $ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.tar.bz2 recovery/Yocto/rootfs.tar.bz2 $ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/uImage recovery/Yocto/uImage $ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/u-boot.bin recovery/Yocto/u-boot.bin Copy the SD-Card image from your Yocto build folder to the local recovery folder: $ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6dual/fsl-image-gui-varsommx6dual.sdcard ./ Build U-Boot for SD-Card. Follow the "Build U-Boot out of Yocto tree" section. Configure U-Boot with: $ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_config Build U-Boot: $ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- Copy U-Boot from your U-Boot build folder to the local recovery folder: $ cp u-boot.bin ~/my_recovery_sd From ~/my_recovery_sd folder Unmount your SD-Card. Build the SD-Card. First flash the SD-Card image and U-Boot. $ sudo dd if=fsl-image-gui-varsommx6q.sdcard of=/dev/mmcblk0 bs=1M $ sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync $ sync Set the SD-Card label: $ Sudo apt-get install gparted $ sudo gparted Set the label to var_som_mx6_rf Mount the SD-Card. You can simply remove it and inster it again to your host machine. Copy all files from the recovery folder on your host machibe into the SD-Card: $ sudo cp -a recovery/ /media/var_som_mx6_rf/opt/ $ sudo cp nand-recovery.sh /media/var_som_mx6_rf/sbin/ $ sudo rm /media/var_som_mx6_rf/var/lib/alsa/asound.state If you want you can back up your new SD-Card image: Un mount the SD-Card $ sudo dd of=mx6qd-som-nand-recovery-sd.v19.img if=/dev/mmcblk0 bs=1M
Comment: I used "/dev/mmcblk0" as the SD-Card device name. You should replace it with your own SD-Card device name. Useful Bitbake commands |