DEVELOPMENT GUIDE VAB-800 Linux BSP 1.4
1.4-09222014-165700
Copyright Copyright © 2014-VIA Technologies Incorporated. All rights reserved.
No part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise without the prior written permission of VIA Technologies, Incorporated.
Trademarks All brands, product names, company names, trademarks and service marks are the property of their respective holders.
Disclaimer VIA Technologies makes no warranties, implied or otherwise, in regard to this document and to the products described in this document. The information provided in this document is believed to be accurate and reliable as of the publication date of this document. However, VIA Technologies assumes no responsibility for the use or misuse of the information in this document and for any patent infringements that may arise from the use of this document. The information and product specifications within this document are subject to change at any time, without notice and without obligation to notify any person of such change.
VIA Technologies, Inc. reserves the right the make changes to the products described in this manual at any time without prior notice.
VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Revision History
Version DateDateDate Remarks 1.0 12/24/2012 Initial external release 1.1 4/2/2013 Added the eMMC evaluation kit process in Appendix A Modified Micro SD/eMMC partition method in Chapter 4 1.2 4/19/2013 Added the ADI ADV7511W in Step 10 of 3.2.2 Run Ltib to build VAB-800 BSP 1.3 8/14/2014 Modified the necessary packages and patch of Ltib for Ubuntu 12.04 64bit host development PC 1.4 9/17/2014 Added Xrandr dual display setting in Appendix.E
iii VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Table of Contents
1.1.1. Introduction ...... 111 1.1. Overview...... 1 1.2. Package Content...... 2 1.2.1. BSP Folder Contents...... 2 1.2.2. EVK Folder Contents...... 2
2.2.2. Setup Building Environment ...... 333 2.1. Configure Ubuntu...... 3 2.1.1. Change Default Editor (optional) ...... 3 2.1.2. Sudoers...... 3 2.1.3. Install Host Packages...... 4 2.1.4. Change Default Shell...... 4 2.1.5. Configure Ccache (optional)...... 5 2.1.6. Change Permissions on /opt ...... 5 2.2. Install LTIB...... 6 2.2.1. Extracting Bundle and Installing LTIB...... 6 2.2.1.1. Download i.MX53 Linux Source Bundle...... 6 2.2.1.2. User install ...... 7 2.2.1.3. Extract content...... 7 2.2.1.4. Adopting Extra the LTIB Patch...... 9
3.3.3. Building BSP through LTIBLTIB...... 101010 3.1.1. Getting iMX5x Based Board Packages...... 10 3.2. Building VAB-800 BSP...... 15 3.2.1. Add/Replace VAB-800 modification files ...... 15 3.2.2. Run LTIB to build VAB-800 BSP...... 17
4.4.4. Making Linux System Booting MediaMedia...... 272727 4.1. Making a Linux System Micro SD Storage Card...... 27 4.1.1. Requirements ...... 27
iv VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 4.1.2. Partition Micro SD storage card...... 27 4.1.3. Copy images to Micro SD storage card...... 29 4.2. Making a Linux System eMMC...... 30 4.2.1. Requirements ...... 30 4.2.2. Partition eMMC...... 30 4.2.3. Copy images to eMMC ...... 32 4.2.4. Setup u-boot parameter for eMMC...... 34
Appendix A. Making Ubuntu Demo Image ...... 373737 A.1. Getting Ubuntu demo image...... 37 A.2. Making demo image into Micro SD...... 40 A.3. Replace U-boot/Kernel/Modules of VAB-800...... 40 A.4. Making demo image to eMMC (optional) ...... 45
Appendix B. The List of Additional FilesFiles...... 525252 B.1. FreeScale Patch Files...... 52 B.2. VAB-800 Patch Files ...... 53
Appendix C. Touch Panel Calibration ...... 545454
Appendix D. Setting UU----bootbootboot...... 575757
Appendix E. XRandR Dual Display Setting ...... 606060
v VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Lists of Figures
Figure 1. VAB-800 package content ...... 2 Figure 2. Source Code download link ...... 6 Figure 3. Target Image Builder Platform Selection...... 11 Figure 4. Platform choice...... 11 Figure 5. Save Platform Image Selection ...... 11 Figure 6. i.MX Development Platforms...... 12 Figure 7. imx5x Platform Selection ...... 13 Figure 8. Platform Save ...... 13 Figure 9. iMX5x Based Boards...... 14 Figure 10. iMX53 loco...... 14 Figure 11. Save the configuration ...... 15 Figure 12. iMX5x Based Boards...... 18 Figure 13. Target System Configuration ...... 19 Figure 14. Boot up with a tty and login setting (original) ...... 19 Figure 15. Boot up with a tty and login setting (modified)...... 20 Figure 16. Configure the kernel ...... 21 Figure 17. Save the configuration ...... 21 Figure 18. Kernel configuration menu ...... 22 Figure 19. GPIO ...... 23 Figure 20. FUSE support ...... 24 Figure 21. NTFS support (optional)...... 24 Figure 22. ADI ADV7511W DVI/HDMI Interface Chip support...... 25 Figure 23. Save the configuration ...... 25 Figure 24. Build successful...... 26 Figure 25. Select eMMC boot at J4...... 34 Figure 26. u-boot parameter...... 35 Figure 27. u-boot parameter...... 50
vi VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Lists of Tables
Table 1. Images generated through LTIB...... 26 Table 2. J4 jumper settings ...... 34 Table 3. u-boot/kernel/modules ...... 40 Table 4. u-boot bootloader and Linux Kernel ulmage...... 45 Table 5. u-boot/kernel/rootfs...... 46 Table 6. J4 jumper settings ...... 49 Table 7. VAB-800 patch file...... 53
vii VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 1. Introduction The purpose of this document is to provide a practical introduction on developing software for the VAB-800/AMOS-800/ARTiGO A800 on a Linux development host only.
The AMOS-800/ARTiGO A800 is a fanless ARM-based embedded system with VIA VAB-800 Pico-ITX board. This development guide will use VAB-800 as an example instead of AMOS-800/ARTiGO A800, since the VAB-800 BSP is used in AMOS-800/ARTIGO A800 system.
1.1. Overview The VIA VAB-800 platform is an embedded system powered by ARM processor with Linux kernel 2.6.35 operating system as default. The Linux major functions include all system-requirement shell commands and drivers ready for VAB-800 platform. VAB-800’s Linux package does not offer a development environment. Users can develop it under an Ubuntu environment.
There are three major boot components for Linux, the """u"uuu----boot.binboot.binboot.bin"""",, """uImage"uImageuImage"""" and """Root"Root File SystemSystem"""". The "u"u"u-"u---boot.bin"boot.bin" is for initial peripheral hardware parameter. The "uImage" is the Linux kernel image, and the """Root"Root File System" is for Linux O.S. The system will not boot successfully into a Linux environment if one of these files does not exist on the boot media (SD storage card or onboard eMMC).
1 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 1.2. Package Content There are three folders in VAB-800 package.
Figure 111.1. VABVAB----800800 package content
1.2.1. BSP Folder Contents • LTIB (Linux Target Image Builder)Builder):::: A tool that can be used to develop and deploy BSPs (Board Support Packages) for a number of embedded target platforms including PowerPC, ARM.
• Patch filefile:::: This folder provides u-boot/kernel configuration, source code and patch files for VAB-800. It also includes Ltib patch files which support BSP development on Ubuntu 12.04 x64 host PC.
• External packagepackage:::: This folder provides X window driver package and patch files for VAB-800.
1.2.2. EVK Folder Contents • uuu-u---bootbootboot.bin:.bin: U-boot image.
• uImageuImage:::: Linux kernel image.
• vabvabvab-vab---800_rootfs_patch.tar800_rootfs_patch.tar800_rootfs_patch.tar.bz2:.bz2: Including driver modules, configuration files and FlexCAN utility. User can evaluate VAB-800 with Freescale Ubuntu demo root file system.
Note: If user needs the supporting files for all software mentioned in VAB-800 Linux BSP document, please contact our regional sales representative for assistance.
2 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 2. Setup Building Environment This chapter will guide you through setting up your developing environment. All instructions in this guide are for Ubuntu 12.04 (64Bit). Please install the Ubuntu to your PC/NB in advance.
2.1. Configure Ubuntu
2.1.1. Change Default Editor (optional) The default editor is NANO. To set vi as the default editor: user@ubuntu:~$ sudo update-alternatives --config editor There are 3 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status ------* 0 /bin/nano 40 auto mode 1 /bin/ed -100 manual mode 2 /bin/nano 40 manual mode 3 /usr/bin/vim.tiny 10 manual mode
Press enter to keep the current choice[*], or type selection number: 3 update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/editor (editor) in manual mode.
2.1.2. Sudoers The sudoer’s file must be updated to allow the login account to run the rpm commands as root. The login for this example is "user". Edit the sudoer’s file using the $$$sudo$sudo visudo and add the line after the comment "#User alias specification" as shown below. The first word "%us"%user"er"er"er" would be the login name you are using. Save the changes when it is done. user@ubuntu:~$ sudo visudo ...... # User alias specification %user ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm
3 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
2.1.3. Install Host Packages The following packages are installed to support a LTIB development environment and presented in a bash script that can be cut and pasted into your environment and execute:
#/bin/bash # Install LTIB dependant packages sudo apt-get install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev sudo apt-get install libdbus-glib-1-dev liborbit2-dev intltool sudo apt-get install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool sudo apt-get install uuid-dev liblzo2-dev sudo apt-get install tcl dpkg ia32-libs libc6-dev-i386 lib32z1 # The following recommended for Linux development. # They are not required by LTIB. sudo apt-get install gparted openssh-server sudo apt-get install nfs-common nfs-kernel-server lintian sudo apt-get install git-core git-doc git-email git-gui gitk sudo apt-get install diffstat indent tofrodos fakeroot doxygen uboot- mkimage sudo apt-get install sendmail mailutils meld atftpd sharutils sudo apt-get install manpages-dev manpages-posix manpages-posix-dev linux- doc sudo apt-get install vnc4server xvnc4viewer
2.1.4. Change Default Shell The Ubuntu default shell is dash. To change the default shell to bash, select
Below is a screenshot to show the status before and after the reconfiguration. user@ubuntu:~$ ls -l /bin/sh lrwxrwxrwx 1 root root 4 2012-01-02 07:23 /bin/sh -> dash user@ubuntu:~$ sudo dpkg-reconfigure dash [sudo] password for user: Removing 'diversion of /bin/sh to /bin/sh.distrib by dash' Adding 'diversion of /bin/sh to /bin/sh.distrib by bash' Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash' user@ubuntu:~$ ls -l /bin/sh lrwxrwxrwx 1 root root 4 2012-01-02 18:51 /bin/sh -> bash
4 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
2.1.5. Configure Ccache (optional) LTIB uses ccache to speed up the compilation. The cache that LTIB uses exists as a .ccache directory in each user's home directory. The path for this example is """/home/us"/home/us/home/user/.ccacheer/.ccacheer/.ccache"""". This directory can grow to be quite large if no upper limit is set.
The followings are the ccache commands to limit the size to 50 MB [1] . The size may change as you see fit, clean the ccache [2] and show the settings [3].
[1] user@ubuntu:~$ ccache -M 50M Set cache size limit to 50.0 Mbytes [2] user@ubuntu:~$ ccache -c Cleaned cache [3] user@ubuntu:~$ ccache -s cache directory /home/user/.ccache cache hit (direct) 0 cache hit (preprocessed) 0 cache miss 0 files in cache 0 cache size 0 Kbytes max cache size 50.0 Mbytes
2.1.6. Change Permissions on /opt The LTIB installation process creates the directory "/opt/freescale". By default the "/opt" directory has root privileges which are changed to allow a regular user to access. user@ubuntu:~/imx53/11.09.01/ltib$ ls -ld /opt drwxr-xr-x 2 root root 4096 2012-01-02 14:24 /opt user@ubuntu:~/imx53/11.09.01/ltib$ sudo chmod 777 /opt [sudo] password for user: user@ubuntu:~/imx53/11.09.01/ltib$ ls -ld /opt drwxrwxrwx 2 root root 4096 2012-01-02 14:24 /opt
5 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 2.2. Install LTIB The LTIB (Linux Target Image Builder) is a tool that can be used to develop and deploy BSPs (Board Support Packages) for a number of embedded target platforms including PowerPC, ARM.
The VAB-800 BSP is developed based on Freescale released i.MX5x BSP "L2.6.35_11.09.01_ER_source_bundle.tar.gz". Users can get it from Freescale official web site.
2.2.1. Extracting Bundle and Installing LTIB This section describes the steps to extract the content from the source bundle and to install LTIB.
2.2.1.1. Download i.MX53 Linux Source Bundle The Linux source bundle can be found and downloaded at: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB &fpsp=1&tab=Design_Tools_Tab
The Run-time Software section in Board Support Packages tab is shown in Figure 2.
Figure 222.2. Source Code download link
Using Firefox, the default save location is in the Downloads folder that contains the file: "L2.6.35_11.09.01_ER_source_bundle.tar.gz" which is zipped and tar with an md5 checksum of 18eaeb0dcae95c083d40ad13267549a3.
6 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 2.2.1.2. User install All LTIB installation and execution should be done as a regular user and not using the root account.
To accommodate running LTIB as a regular user and allow this process to perform privileged commands requiring root permissions that the sudoer’s file is modified (see section 2.1.2), and the permissions on the /opt directory are changed (see section 2.1.6).
2.2.1.3. Extract content We assume that the file "L2.6.35_11.09.01_ER_source_bundle.tar.gz" is already in the """/home/user/Downloads"/home/user/Downloads/home/user/Downloads"""" folder directory.
7 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide user@ubuntu:~$ cd ~/Downloads user@ubuntu:~/Downloads$ ls -l total 1047352 -rw-rw-r-- 1 user user 1072482848 2012-01-02 18:05 L2.6.35_11.09.01_ER_source_bundle.tar.gz user@ubuntu:~/Downloads$ mkdir -p ~/imx53/11.09.01 user@ubuntu:~/Downloads$ tar -zxf L2.6.35_11.09.01_ER_source_bundle.tar.gz -C ~/imx53/11.09.01/ user@ubuntu:~/Downloads$ cd !$ cd ~/imx53/11.09.01/ user@ubuntu:~/imx53/11.09.01$ ls -l total 1046968 -rwxrwxr-x 1 user user 18941043 2011-11-23 07:19 L2.6.35_11.09.01_ER_docs.tar.gz -rwxrwxr-x 1 user user 230125193 2011-10-13 07:41 L2.6.35_11.09.01_ER_images_MX5X.tar.gz -rwxrwxr-x 1 user user 822925221 2011-10-10 10:27 L2.6.35_11.09.01_ER_source.tar.gz -rwxrwxr-x 1 user user 93132 2011-11-08 11:28 patches.tar.gz user@ubuntu:~/imx53/11.09.01$ tar -zxf L2.6.35_11.09.01_ER_source.tar.gz user@ubuntu:~/imx53/11.09.01$ cd *source user@ubuntu:~/imx53/11.09.01/L2.6.35_11.09.01_ER_source$ ls EULA install ltib.tar.gz package_manifest.txt pkgs redboot_201003.zip tftp.zip user@ubuntu:~/imx53/11.09.01/L2.6.35_11.09.01_ER_source$ ./install
You are about to install the LTIB (GNU/Linux Target Image Builder) Before installing LTIB, you must read and accept the EULA (End User License Agreement) which will be presented next.
Do you want to continue ? Y|n Y ------I have read and accept the EULA (yes|no): yes The LTIB files are extracted from a tar file which includes the prefix ltib. After installation you will find LTIB in: /home/user/imx53/11.09.01/L2.6.35_11.09.01_ER_source/ltib Where do you want to install LTIB ? (/home/user/imx53/11.09.01/L2.6.35_11.09.01_ER_source) .. ------Copying packages to ../ltib/pkgs Installation complete, your ltib installation has been placed in ../ltib, to complete the installation: cd ../ltib ./ltib user@ubuntu:~/imx53/11.09.01/L2.6.35_11.09.01_ER_source$
8 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 2.2.1.4. Adopting Extra the LTIB Patch Adding the LTIB patch """ubuntu"ubuntuubuntu----ltibltibltibltib----patch.tgzpatch.tgzpatch.tgz"""" to avoid compiling errors in Ubuntu 12.04 x64 host PC. user@ubuntu:~/imx53/11.09.01/ltib$ cp ubuntu-ltib-patch.tgz user@ubuntu:~/imx53/11.09.01/ltib$ tar zxvf ubuntu-ltib-patch.tgz user@ubuntu:~/imx53/11.09.01/ltib$ cd ubuntu-ltib-patch user@ubuntu:~/imx53/11.09.01/ltib/ubuntu-ltib-patch$ ./install-patches.sh ~/imx53/11.09.01/ltib/
9 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 3. Building BSP through LTIB Once the building environment has been configured as described in Chapter 2, the environment and host are now ready to run the LTIB. This chapter will guide you on how to build the BSP through LTIB.
3.1.1. Getting iMX5x Based Board Packages To get iMX5x based board packages through LTIB when you first use the LTIB. Those packages include iMX5x hardware definitions, drivers and many more. user@ubuntu:~/imx53/11.09.01/ltib$ ./ltib
Depending on the performance of user’s computer, this process would take time to run. It may take several minutes to an hour. Once the LTIB environment is configured, a menu will be available for selecting configurations.
The first menu is shown in Figure 3. Use the arrow keys to move the cursor between
Choose
10 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 333.3. Target Image Builder Platform Selection
Choose
Figure 444.4. Platform choice
In Figure 5, it shows that
Figure 555.5. Save Platform Image Selection
11 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide The next menu is shown in Figure 6 and provides the target platform to be selected. Using the arrow down key, move the cursor over the Selection (imx25_3stack) --- and press the enter key. The submenu of the selected platform is shown in Figure 7.
Figure 666.6. i.MX Development PlPlatformsatforms
In submenu selection, select the imx5x platform by moving the cursor over the imx5x as shown in Figure 7, then press enter key.
12 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 777.7. imx5x Platform Selection
Move the cursor to
Figure 888.8. Platform Save
13 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide The imx5x Based Boards menu is now presented as shown in Figure 9. The U- Boot board selection must be changed to mx53_loco which is another name for the quick start board. Move the cursor over board (mx511 bbg) and press enter key.
Figure 999.9. iMX5x Based BoaBoardsrdsrdsrds
Then choose the mx53_loco as shown in Figure 10.
Figure 101010.10. iMX53 loco
Move the cursor over
14 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide In Figure 11, it shows that
Figure 111111.11. Save the configuration
The sudoer’s password is asked for the current user. Enter the password to begin the building process. The building process would take 1.5 hours to complete.
3.2. Building VAB-800 BSP Once the iMX5x basic packages have been obtained in your building platform as described in section 3.1, this section will guide you on how to add/replace modification source files and build VAB-800 BSP in order to make u-boot, kernel workable on VAB-800.
3.2.1. Add/Replace VAB-800 modification files Since there are several H/W definitions that are different from original iMX5x source files. User has to add/replace VAB-800 modification source files in below path, in order to enable the VAB-800 I/O functions. The LTIB path for this example is """/home/user/imx53/11.09.01/ltib"/home/user/imx53/11.09.01/ltib/home/user/imx53/11.09.01/ltib"""". Those files can be found at "BSP"BSP////PatchPatch filefile////kernel"kernel" and "BSP"BSP////PatchPatch filefile////ubootubootuboot////"""" folders.
15 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 【Replace】 Source Folder Target Path Files BSP\Patch ~/imx53/11.09.01/ltib/rpm/BUILD/linux/arc mx53_loco.c file\kernel h/arm/mach-mx5/ serial.h devices.c mx53_loco_pmic_mc34708.c clock.c ~/imx53/11.09.01/ltib/rpm/BUILD/linux/arc Hardware.h h/arm/plat-mxc/include/mach/ iomux-mx53.h memory.h mx5x.h ~/imx53/11.09.01/ltib/rpm/BUILD/linux/arc imx5_defconfig h/arm/configs/ ~/imx53/11.09.01/ltib/rpm/BUILD/linux/arc Kconfig h/arm/plat-mxc/ ahci_sata.c system.c ~/imx53/11.09.01/ltib/rpm/BUILD/linux/dri ipu_common.c vers/mxc/ipu3/ ~/imx53/11.09.01/ltib/rpm/BUILD/linux/dri Kconfig vers/video/mxc/ ldb.c Makefile mxc_ipuv3_fb.c mxcfb_sii902x.c tve.c via_adv7511w.c via_adv7511w.h ~/imx53/11.09.01/ltib/rpm/BUILD/linux/dri drv.c vers/net/can/flexcan/ dev.c flexcan.h mbm.c ~/imx53/11.09.01/ltib/rpm/BUILD/linux/dri sd_ops.c vers/mmc/core/ mmc.c ~/imx53/11.09.01/ltib/rpm/BUILD/linux/so mxc_spdif.c und/soc/codecs BSP\Patch ~/imx53/11.09.01/ltib/config/platform/imx u-boot.spec.in file\uboot / ~/imx53/11.09.01/ltib/rpm/BUILD/u-boot- generic.c 2009.8/cpu/arm_cortexa8/mx53
【Add】 Path Target Path Files BSP\Patch /opt/freescale/pkgs/ u-boot-v2009.08- file\uboot imx_11.09.01_201112.tar.gz /opt/freescale/pkgs/ VAB-800_uboot.patch
16 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Note:
Please refer to Appendix B for more detailed description of modification files.
3.2.2. Run LTIB to build VAB-800 BSP The following steps will guide you to build image after adding/replacing the VAB-800 modification files.
Step 1 Open "Terminal" utility.
Step 2 Type $./ltib ---c-ccc user@ubuntu:~/imx53/11.09.01/ltib$ ./ltib -c
Step 3 LTIB menu will be shown on the screen.
17 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 121212.12. iMX5x Based Boards
18 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Step 4 Select Target System Configuration->options->boot up with a tty and login.
Figure 131313.13. Target System Configuration
Figure 141414.14. Boot up with a tty and login setting (original)
19 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Step 5 Modify ttymxc0 to ttymxc1 due to the default debug port is set to COM2 (ttymxc1) in VAB-800. After the modification, the debug message will print out from COM2 if you modify using this example.
Figure 151515.15. Boot up with a tty and login setting (modified)
Step 6 Select "Configure the kernel".
20 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 161616.16. Configure the kernel
Step 7 Move cursor over
Step 8 Select
Figure 171717.17. Save the configuration
21 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Step 9 Then the kernel configuration menu will be shown on the screen.
Figure 181818.18. Kernel configuration menu
22 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Step 10 It is recommended to select below options at least. (For example: Figure 19 to Figure 22)
Device Drivers ---> [*] GPIO Support ---> [*] /sys/class/gpio/... (sysfs interface) File systems ---> [*] FUSE (Filesystem in Userspace) support File systems ---> DOS/FAT/NT Filesystems ---> <*> NTFS file system support File systems ---> DOS/FAT/NT Filesystems ---> <*> NTFS write support Device Drivers ---> Graphics support ---> MXC Framebuffer support -- -> Synchronous Panel Framebuffer ---> <*>MXC LDB System Type ---> (112)DMA memory zone size Add Device Drivers ---> Graphic support ---> <*> ADI ADV7511W DVI/HDMI Interface Chip
Figure 191919.19. GPIO
23 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 202020.20. FUSE support
Figure 212121.21. NTFS support (optional)
24 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 222222.22. ADI ADV7511W DVI/HDMI Interface Chip support
Step 11
Move cursor over
Step 12
Select
FigurFigurFigureFigure 232323.23. Save the configuration
The sudoer’s password is asked for the current user. Enter the password to begin the building process. The building process would take 1.5 hours to complete.
If the building process is successful, you can see the message on the screen.
25 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 242424.24. Build successful
There are u-boot.bin, uImage and root file system generated by LTIB. The location for this example can be found in the directory """/home/user/imx53/"/home/user/imx53//home/user/imx53/ltib/rootfsltib/rootfsltib/rootfs////"""" as shown in Table 1.
Binary PathPathPath Description u-boot.bin ~/imx53/ltib/rootfs/boot U-Boot boot loader uImage ~/imx53/ltib/rootfs/boot Kernel rootfs ~/imx53/ltib/rootfs Root file system: A folder which includes drivers, library, instruction, and configuration files. All you have done in LTIB will be put here. Table 111.1. Images generated through LTIB
26 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 4. Making Linux System Booting Media VAB-800 supports booting from Micro SD storage card and onboard eMMC. This section will guide you on how to make the Linux system boot media for VAB-800.
4.1. Making a Linux System Micro SD Storage Card When you get u-boot.bin, uImage and root file system from either EVK or LTIB, you can refer to the following sections to make it for booting.
4.1.1. Requirements • Your computer
• Micro SD storage card. Recommended size is 8GB or at least 4GB Class 4.
• SD card reader.
4.1.2. Partition Micro SD storage card The Micro SD storage card can be identified and auto mount once inserted to the computer. You can check Micro SD card code name by $ df ---h-hhh user@user:~/$ df -h ... Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 7.2G 531M 6.3G 8% /media/usb
However, there are some instances that the Micro SD storage card could not identify or auto mount after inserting to the computer. In that case, you can try the other way to identify the Micro SD card.
27 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide user@user:~/$ dmesg | grep -i removable [105.502517] sd 9:0:0:0 [sdb] Attached SCSI removable disk
The Micro SD storage card code name for this example is identified as sdbsdbsdb. Umount Micro SD storage card before you partition it. user@user:~/$ sudo umount /dev/sdb1
The following steps on how to partition the Micro SD storage card. user@user:~/$ sudo fdisk /dev/sdb Type the following parameters (each followed by
Note:
Users have to create the partitions which leave enough space for the kernel, the boot loader and its configuration data made by users themselves.
Here, a new partition has been created on Micro SD storage. You have to apply the new partition table immediately, in order to format it. user@user:~/$ sudo partprobe
The file system format for this example is ext3, you can type the command to format the partition: user@user:~/$ sudo mkfs.ext3 /dev/sdb1
28 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 4.1.3. Copy images to Micro SD storage card
Step 1 Copy u-boot """u"uuu----boot.binboot.binboot.bin"""" to Micro SD storage card. user@user:~/imx53/11.09.01/ltib/rootfs/boot$ sudo dd if=u-boot.bin of=/dev/sdb bs=512 seek=2 skip=2
Step 2 Copy kernel """uImage"uImageuImage"""" to Micro SD storage card. user@user:~/imx53/11.09.01/ltib/rootfs/boot$ sudo dd if=uImage of=/dev/sdb bs=512 seek=2048
Step 3 Copy root file system to Micro SD storage card.
There are two types of root file system that can be copied to Micro SD storage card. One is made from LTIB. It is a simple and basic root file system depending on user’s selections. The other type can be downloaded from Freescale web site. It is an Ubuntu 10.04 base evaluation image. User can refer to Appendix A to make an Ubuntu image.
The root file system for this example is generated by LTIB. The location is """/home/user/imx53/11.09.01/ltib/rootfs"/home/user/imx53/11.09.01/ltib/rootfs/home/user/imx53/11.09.01/ltib/rootfs"""". A folder includes driver modules, Linux instructions and configurations which depend on user’s selection in LTIB. User can make it as a compression file (e.g. tar.gz or tar.bz2) or just copy all the files from """/home/user/imx53/11.09.01/ltib/rootfs"/home/user/imx53/11.09.01/ltib/rootfs/home/user/imx53/11.09.01/ltib/rootfs"""" into Micro SD storage card. user@user:~/imx53/11.09.01/ltib/rootfs$ sudo tar -cjf rootfs.tar.bz2 *
Mount SD card as a folder and decompress the """rootfs.tar.bz2"rootfs.tar.bz2rootfs.tar.bz2"""" you made to Micro SD storage card:
29 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
user@user:~/$ sudo mkdir /mnt/mountpoint user@user:~/$ sudo mount /dev/sdb1 /mnt/mountpoint user@user:~/$ cd /mnt/mountpoint user@user:/mnt/mountpoint$ sudo tar jxvf rootfs.tar.bz2 ./
Notes:
1. VAB-800 Linux BSP won’t provide Ubuntu root file system for evaluation actively. Users can get an Ubuntu demo image from Freescale official web site and follow Freescale’s policy to evaluate. For more details please refer to Appendix A. 2. For the details on how to make a compression root file system for evaluation, refer to Appendix A. 3. The default debug port in VAB-800 is COM2. It has to modify the setting from tty1 to ttymxc1 in /etc/inittab if user uses root file system which generated in LTIB.
4.2. Making a Linux System eMMC
4.2.1. Requirements • A Linux System Micro SD storage card made in section 4.1 or Appendix A.
• A mass storage includes: """u"uuu----boot.binboot.binboot.bin"""", """uImage"uImageuImage"""" and """rootfs.tar.bz2"rootfs.tar.bz2rootfs.tar.bz2"""". You can put those files in a USB pen or SD storage card.
To copy images to eMMC, you must first boot from Micro SD card on VAB-800.
4.2.2. Partition eMMC eMMC can be identified when boot into VAB-800 from Micro SD card. lucid@lucid:~/$ ls -l | grep -i mmcblk ...
Sometimes the eMMC will auto mount if it is not the first time of using it. Umount the eMMC before partition it. The eMMC code name for this example is identified as mmcblk0. lucid@lucid:~/$ sudo umount /dev/mmcblk0*
30 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide The following steps describe how to partition the eMMC. lucid@lucid:~/$ sudo fdisk /dev/mmcblk0 Type the following parameters (each followed by
Note:
Users have to create the partitions which leave enough space for the kernel, the boot loader and its configuration data made by users themselves.
Here is an example; a new partition has been created on eMMC. The two partitions of eMMC are for storing the kernel image, and for putting the root file system. You have to apply the new partition table immediately, in order to format it. lucid@lucid:~/$ sudo partprobe
Make sure to umount the eMMC before doing the steps below.
You can type the command to format the partitions: lucid@lucid:~/$ sudo mkfs.msdos /dev/mmcblk0p1 lucid@lucid:~/$ sudo mkfs.ext3 /dev/mmcblk0p2
31 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
4.2.3. Copy images to eMMC User can put an EVK folder which includes u-boot/uImage/root file system to USB pen or Micro SD card. The storage for this example is an USB pen, and assumes the mount point is /media/usbpen.
Step 1 Copy u-boot """u"uuu----boot.binboot.binboot.bin"""" to eMMC
The image path for this example is /media/usbpen/EVK. lucid@lucid:~/$ sudo mount /dev/sda1 /media/usbpen lucid@lucid:~/$ cd /media/usbpen/EVK lucid@lucid:/media/usbpen/EVK$ sudo dd if=./u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 lucid@lucid:/media/usbpen/EVK$ sudo sync && sync
Step 2 Copy kernel """uImage"uImageuImage"""" to eMMC
The image path for this example is /media/usbpen/EVK. lucid@lucid:~/$ sudo mkdir /mnt/mountpoint lucid@lucid:~/$ sudo mount /dev/mmcblk0p1 /mnt/mountpoint lucid@lucid:~/$ cd /media/usbpen/EVK lucid@lucid:/media/usbpen/EVK$ sudo cp ./uImage /mnt/mountpoint lucid@lucid:/media/usbpen/EVK$ sudo sync && sync lucid@lucid:/media/usbpen/EVK$ sudo umount /mnt/mountpoint
Step 3 Copy root file system to eMMC.
There are two types of root file system that can be copied to Micro SD storage card. One is made from LTIB. It is a simple and basic root file system depending on user’s selections. The other type can be downloaded from Freescale web site. It is an Ubuntu 10.04 base evaluation image. User can refer to Appendix A to make an Ubuntu image.
32 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide The root file system for this example is generated by LTIB. The location is """/home/user/imx53/11.09.01/ltib/rootfs"/home/user/imx53/11.09.01/ltib/rootfs/home/user/imx53/11.09.01/ltib/rootfs"""". A folder includes driver modules, Linux instructions and configurations which depend on user’s selection in LTIB.
User can make it as a compression file (e.g. tar.gz or tar.bz2). The compression file for this example is rootfs.tar.bz2. user@user:~/imx53/11.09.01/ltib/rootfs$ sudo tar -cjf rootfs.tar.bz2 *
The compression file path for this example is /media/usbpen/EVK. lucid@lucid:~/$ sudo mount /dev/mmcblk0p2 /mnt/mountpoint lucid@lucid:~/$ cd /mnt/mountpoint lucid@lucid:/mnt/mountpoint$ sudo tar jxvf /media/usbpen/EVK/rootfs.tar.bz2 ./ ... lucid@lucid:/mnt/mountpoint$ sudo sync && sync lucid@lucid:/mnt/mountpoint$ cd ~ lucid@lucid:~/$ sudo umount /mnt/mountpoint
Notes:
1. VAB-800 Linux BSP won’t provide Ubuntu root file system for evaluation actively. Users can get an Ubuntu demo image from Freescale official web site and follow Freescale’s policy to evaluate. For more details, refer to Appendix A. 2. For the details on how to make a compression root file system for evaluation, refer to Appendix A. 3. Via debug port in VAB-800 is COM2. It has to modify the setting from tty1 to ttymxc1 in /etc/inittab if user uses root file system which generated in LTIB.
33 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 4.2.4. Setup u-boot parameter for eMMC Setup the u-boot parameter at the first time we boot from eMMC. Set the J4 jumper setting (refer to Table 2) to make it boot from eMMC.
Figure 252525.25. Select eMMC boot at J4
J4 : Boot Sect 111-1---2222 333- 3---4444 555- 5---6666 777- 7---8888 999- 9---10101010 eMMC Short Short Short Open Open Micro-SD Open Short Open Open Open USB-OTG Open Open Open Open Short Table 222.2. J4 jumper settings
34 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Connect the VAB-800 and host PC through J14 (COM2) of VAB-800. Run "putty" on host PC to receive the booting message. Power on the VAB-800 and press any key to stop the booting process as shown in Figure 26.
Figure 262626.26. u. u-u---bbbbootoot parameter
To check the parameter in u-boot:
VAB-800 U-Boot > pri bootargs_emmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw bootcmd_emmc=run bootargs_base bootargs_emmc;fatload mmc 1 0x70800000 uImage;bootm bootcmd=run bootcmd_emmc; bootm ${loadaddr}
35 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide To boot from eMMC, you have to set the parameters like the example below. Then the VAB will boot from eMMC.
VAB-800 U-Boot > setenv bootcmd 'run bootcmd_emmc; bootm ${loadaddr}' VAB-800 U-Boot > setenv bootargs_emmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw' VAB-800 U-Boot > setenv bootcmd_emmc 'run bootargs_base bootargs_emmc;fatload mmc 1 0x70800000 uImage;bootm' VAB-800 U-Boot > saveenv VAB-800 U-Boot > boot
36 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Appendix A. Making Ubuntu Demo Image There is a Canonical trademark policy when using Ubuntu in commercial usage or redistribution. The VAB-800 BSP does not provide Ubuntu DEMO image for evaluation actively. User can follow Freescale’s policy and get the demo image from Freescale official web site, if user would like to evaluate Ubuntu on VAB-800. The demo image is used on SD card by default.
This section will guide you to make an Ubuntu demo image, and copy it into Micro SD storage card or eMMC.
A.1. Getting Ubuntu demo image
Step 1 Register your account at http://www.freescale.com/ to be able to download the files.
Step 2 Go to "Design Resources" item --> Software and Tools--> then click "All Software and Tools"
37 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Step 3 Go to "Featured Embedded Software and Tools". Click the "i.MX SofSoftwaretware and Development Tools".
Step 4 Go to "i.MX Development Boards and Systems by Device". Click the "i.MX53" plus sign to expand. Then click "i.MX53 Quick Start Board".
38 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Step 5 Click """Downloads"DownloadsDownloads"""".
There are development tools and pre-built images shown here.
You can select Run-time Software to expand all the items.
Step 6
Download MX53_QSB_UBUNTU_SD_DEMO_IMAGE http://www.freescale.cohttp://www.freescale.com/webapp/sps/site/prod_summam/webapp/sps/site/prod_summary.jsp?code=IMX53QSBry.jsp?code=IMX53QSB &fpsp=1&tab=Design_Tools_Tab#
User can get a zip file """MCIMX53"MCIMX53MCIMX53----STARTSTARTSTART----UBUNTUUBUNTUUBUNTU----11111111----09090909----DemoDemoDemo----Image.zipImage.zipImage.zip"""".
39 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
A.2. Making demo image into Micro SD
Step 1 Prepare a Micro SD storage card (at least 4GB size and Class 4).
SteSteStepStep 2p 2 Refer to the document """MCIMX53"MCIMX53MCIMX53----STARTSTARTSTART----RR Flashing Doc.pdfDoc.pdf"""" after unzipped. Follow the steps to make bootable Micro SD storage card.
A.3. Replace U-boot/Kernel/Modules of VAB-800 User has to replace u-boot, kernel and modules binary files built from VAB- 800 BSP on the Micro SD storage card. These files can be found from EVK folder.
Step 1 Getting u-boot, kernel and modules:
User can get u-boot.bin, uImage and modules.tar.bz2 from EVK folder.
Binary Description u-boot.bin U-Boot bootloader uImage Kernel vab-800_rootfs_patch.tar.bz2 Modify configuration files if user would like to evaluate VAB-800 with Ubuntu (contains modules.tarmodules.tar.bz2.bz2 and CAN_utils.tar.bz2) Table 333.3. u. u-u---boot/boot/boot/kkkkernel/ernel/ernel/mmmmodulesodules
Step 2 Copying the u-boot/uImage/driver modules:
2.1. Insert the Micro SD storage card which the OS has made by """MCIMX53"MCIMX53MCIMX53----STARTSTARTSTART----RRRR----BSPBSPBSPBSP----11111111----09_C.exe09_C.exe09_C.exe"""" into your Linux developing PC.
40 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 2.2. Umount the Micro SD storage card if Linux OS auto mount your Micro SD card.
The Micro SD card code name for this example is sdb1. user@user:~ $ sudo umount /dev/sdb1
The path of EVK for this example is /home/user/EVK
2.3. Copy u-boot """u"uuu----boot.binboot.binboot.bin"""" to Micro SD storage card. user@user:~/EVK$ sudo dd if=./u-boot.bin of=/dev/sdb bs=512 seek=2 skip=2
2.4. Copy kernel """uImage"uImageuImage"""" to Micro SD storage card. user@user:~/EVK$ sudo dd if=uImage of=/dev/sdb bs=512 seek=2048
2.5. Put modification files in root file system.
The configuration files should be modified for VAB-800. User can use files "vab"vab----888800_rootfs_patch.tar.bz2"00_rootfs_patch.tar.bz2" in EVK folder.
• Unzip vab-800_rootfs_patch.tar.bz2 user@user:~/EVK$ sudo tar jxvf vab-800_rootfs_patch.tar.bz2
User will get the following:
• User runs the script """vab"vabvabvab----800.sh800.sh800.sh"""" to copy modification files automatically. user@user:~/EVK$ sudo ./vab-800.sh /mnt/mountpoint user@user:~/EVK$ sudo sync && sync user@user:~/EVK$ sudo umount /mnt/mountpoint
41 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Now, unplug Micro SD storage card from your computer.
2.6. Boot from Micro SD storage card (on VAB-800).
• Attach UART cable to VAB-800 COM2, and connect to your computer
• To modify parameters in u-boot
To setup or modify uu----bootboot parameters in uu----boot:boot:
[Display parts]
VAB-800 U-Boot > setenv vga 'setenv bootargs console=ttymxc1,115200 video=mxcdi1fb:GBR24,VGA-XGA di1_primary vga' VAB-800 U-Boot > setenv hdmi ‘setenv bootargs console=ttymxc1,115200 video=mxcdi0fb:RGB24,1024x768M@60 hdmi di0_primary’ VAB-800 U-Boot > setenv lvds1 ‘video=mxcdi0fb:RGB24,480C60 di0_primary ldb=di0 vga=off’ VAB-800 U-Boot > setenv lvds2 ‘video=mxcdi1fb:RGB24,480C60 di1_primary ldb=di1 vga=off’
[S[S[Storage[Storage device parts]
VAB-800 U-Boot > setenv bootargs_mmc 'set bootargs ${bootargs} root=/dev/mmcblk1p1 rw rootwait' VAB-800 U-Boot > setenv bootargs_emmc ‘setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw’ VAB-800 U-Boot > setenv bootcmd_emmc ‘run bootargs_base bootargs_emmc;fatload mmc 1 0x70800000 uImage;bootm’
[Boot sstoragetorage device parts]
42 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Here, user can set the boot device as either Micro SD or eMMC, and should set the below parameter according to the boot selection jumper (J4).
Set boot device as Micro SD:
VAB-800 U-Boot > setenv bootcmd ‘run bootcmd_mmc; bootm ${loadaddr}’
Set boot device as eMMC (optional):
VAB-800 U-Boot > setenv bootcmd ‘run bootcmd_emmc; bootm ${loadaddr}’
[Others]
VAB-800 U-Boot > setenv bootargs ‘console=ttymxc1,115200 gpu_nommu setenv bootargs console=ttymxc1,115200 video=mxcdi0fb:RGB24,1920x1080M@60 hdmi di0_primary root=/dev/nfs ip=dhcp nfsroot=10.29.240.144:/tftpboot/rootfs,v3,tcp’
User has to save the parameters when completing the settings.
VAB-800 U-Boot > saveenv VAB-800 U-Boot > boot
Finally, user should get the parameter in u-boot after modifying, type command pripripri in u-boot. In the example: the display is VGA and boot from Micro SD card.
Default user account and password are:
Account: lucid Password: lucid
43 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
baudrate=115200 loadaddr=0x70800000 netdev=eth0 ethprime=FEC0 uboot=u-boot.bin kernel=uImage ethact=FEC0 bootcd=run bootcmd_mmc bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm bootcmd_mmc=run bootargs_base bootargs_mmc; mmc read ${loadaddr} 0x800 0x1800; bootm bootargs_mmc=set bootargs ${bootargs} root=/dev/mmcblk1p1 rw rootwait vga=setenv bootargs console=ttymxc1,115200 video=mxcdi1fb:GBR24,VGA-XGA di1_primary vga bootcmd_obds=ext2load mmc 0:1 0x70800000 /unit_tests/obds.bin; go 70800000 nfsroot=/tftpboot/rootfs lcd=video=mxcdi0fb:RGB24,SEIKO-WVGA di0_primary lvds=video=mxcdi0fb:RGB666,XGA di0_primary ldb=di0 lvds1=video=mxcdi0fb:RGB24,480C60 di0_primary ldb=di0 vga=off lvds2=video=mxcdi1fb:RGB24,480C60 di1_primary ldb=di1 vga=off bootcmd=run bootcmd_mmc; bootm ${loadaddr} bootfile=uImage bootargs=console=ttymxc1,115200 gpu_nommu setenv bootargs console=ttymxc1,115200 video=mxcdi0fb:RGB24,1920x1080M@60 hdmi di0_primary root=/dev/nfs ip=dhcp nfsroot=10.29.240.144:/tftpboot/rootfs,v3,tcp fileaddr=70800000 netmask=255.255.254.0 hdmi=setenv bootargs console=ttymxc1,115200 video=mxcdi0fb:RGB24,1024x768M@60 hdmi di0_primary serverip=192.168.0.1 ipaddr=192.168.0.2 gatewayip=192.168.0.1 bootargs_base=setenv bootargs console=ttymxc1,115200 gpu_nommu ${vga} dnsip=192.168.0.1 bootdelay=3 stdin=serial stdout=serial stderr=serial
44 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
A.4. Making demo image to eMMC (optional) This section will guide user to copy images to eMMC for evaluation. However, it is a must to finish first the section A.2~A.3 before applying this section.
To make a demo image compression filefile,, follow the stepssteps below:
Step 1 Getting u-boot, and kernel image:
User can directly get the u-boot.bin, and uImage from EVK folder.
Binary Description u-boot.bin U-Boot bootloader Image uImage Linux Kernel Image Table 444.4. u. u-u---bootboot bootloader and Linux Kernel ulmage
StStStepStep 2 Making Ubuntu root file system:
2.1. Insert the Micro SD storage card which the OS has made in section A.3 on your Linux developing PC. (Ubuntu 10.04.x x86 at least)
2.2. Compress Micro SD storage card as a compression file.
The Micro SD card code name for this example is sdb1, and EVK folder path for this example is /home/user/EVK in your development PC. user@user:~ $ sudo mount /dev/sdb1 /mnt/mountpoint user@user:~ $ cd /mnt/mountpoint user@user: /mnt/mountpoint$ sudo tar jcvf ~/EVK/rootfs.tar.bz2 ./* ... user@user: /mnt/mountpoint$ sudo sync && sync user@user: /mnt/mountpoint$ cd ~ user@user:~ $ sudo umount /mnt/mountpoint
It would take 30~40 minutes to generate a """rootfs.tar.bz2"rootfs.tar.bz2rootfs.tar.bz2"""". Here, user could see the u-boot, uImage and rootfs in the EVK folder.
45 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Binary Description u-boot.bin U-Boot bootloader uImage Kernel rootfs.tar.bz2 The Ubuntu demo rootfs made from Micro SD card Table 555.5. u. u-u---boot/boot/boot/kkkkernel/rootfsernel/rootfs
User can put EVK folder to USB pen or Micro SD card. The storage for this example is an USB pen, and assumes the mount point is /media/usbpen.
Step 3 To copy images into eMMC, you must first boot from Micro SD card on VAB- 800.
Step 444 To partition eMMC.
The eMMC can be identified when booting into VAB-800 from Micro SD card. lucid@lucid:~/$ ls -l | grep -i mmcblk ...
Sometimes the eMMC will auto mount if it is not the first time of using it. Umount the eMMC before partition it. The eMMC code name for this example is identified as mmcblk0. lucid@lucid:~/$ sudo umount /dev/mmcblk0*
The following steps describe how to partition the eMMC. lucid@lucid:~/$ sudo fdisk /dev/mmcblk0 Type the following parameters (each followed by
46 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide 14336 [Starting at the offset sectors]
NoteNoteNote:Note::: Users have to create the partitions which leave enough space for the kernel, the boot loader and its configuration data made by users themselves.
Here is an example; a new partition has been created on eMMC. The two partitions of eMMC are for storing the kernel image, and for putting the root file system. You have to apply the new partition table immediately, in order to format it. lucid@lucid:~/$ sudo partprobe
Make sure to umount the eMMC before doing the steps below. You can type the command to format the partitions: lucid@lucid:~/$ sudo mkfs.msdos /dev/mmcblk0p1 lucid@lucid:~/$ sudo mkfs.ext3 /dev/mmcblk0p2
Step 555 Copy u-boot """u"uuu----boot.binboot.binboot.bin"""" to eMMC.
The image path for this example is /media/usbpen/EVK lucid@lucid:~/$ sudo mount /dev/sda1 /media/usbpen lucid@lucid:~/$ cd /media/usbpen/EVK lucid@lucid:/media/usbpen/EVK$ sudo dd if=./u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 lucid@lucid:/media/usbpen/EVK $ sudo sync && sync
Step 666 Copy kernel """uImage"uImageuImage"""" to eMMC.
The image path for this example is /media/usbpen/EVK.
47 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
lucid@lucid:~/$ sudo mkdir /mnt/mountpoint lucid@lucid:~/$ sudo mount /dev/mmcblk0p1 /mnt/mountpoint lucid@lucid:~/$ cd /media/usbpen/EVK lucid@lucid:/media/usbpen/EVK$ sudo cp ./uImage /mnt/mountpoint lucid@lucid:/media/usbpen/EVK$ sudo sync && sync lucid@lucid:/media/usbpen/EVK$ sudo umount /mnt/mountpoint
Step 777 Copy root file system to eMMC.
The compression file path for this example is /media/usbpen/EVK. lucid@lucid:~/$ sudo mount /dev/mmcblk0p2 /mnt/mountpoint lucid@lucid:~/$ cd /mnt/mountpoint lucid@lucid:/mnt/mountpoint$ sudo tar jxvf /media/usbpen/EVK/rootfs.tar.bz2 ./ ... lucid@lucid:/mnt/mountpoint$ sudo sync && sync lucid@lucid:/mnt/mountpoint$ cd ~ lucid@lucid:~/$ sudo umount /mnt/mountpoint
Notes: 1. VAB-800 Linux BSP won’t provide Ubuntu root file system for evaluation actively. Users can get an Ubuntu demo image from Freescale official web site and follow Freescale’s policy to evaluate. For more details, refer to Appendix A. 2. For details on how to make a compression root file system for evaluation, refer to Appendix A.. 3. Via debug port in VAB-800 is COM2. It has to modify the setting from tty1 to ttymxc1 in /etc/inittab if user uses root file system which generated in LTIB.
Step 888 Setup the u-boot parameter at the first time we boot from eMMC. Set the J4 jumper setting (refer to Table 6) to make it boot from eMMC. .
48 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
J4 : Boot Sect 111-1---2222 333- 3---4444 555- 5---6666 777- 7---8888 999- 9---10101010 eMMC Short Short Short Open Open Micro-SD Open Short Open Open Open USB-OTG Open Open Open Open Short Table 666.6. J4 jumper settings
Connect the VAB-800 and host PC through J14 (COM2) of VAB-800. Run "putty" on host PC to receive the booting message. Power on the VAB-800 and press any key to stop the booting process as shown in Figure 27.
49 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Figure 272727.27. u. u-u---bootboot parameter
To check the parameter in u-boot:
VAB-800 U-Boot > pri bootargs_emmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw bootcmd_emmc=run bootargs_base bootargs_emmc;fatload mmc 1 0x70800000 uImage;bootm bootcmd=run bootcmd_emmc; bootm ${loadaddr}
50 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide To boot from eMMC, you have to set the parameters like the example below. Then the VAB will boot from eMMC.
VAB-800 U-Boot > setenv bootcmd 'run bootcmd_emmc; bootm ${loadaddr}' VAB-800 U-Boot > setenv bootargs_emmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw' VAB-800 U-Boot > setenv bootcmd_emmc 'run bootargs_base bootargs_emmc;fatload mmc 1 0x70800000 uImage;bootm' VAB-800 U-Boot > saveenv VAB-800 U-Boot > boot
51 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Appendix B. The List of Additional Files There are several patch files of LTIB done for VAB-800. Please refer to the list as below.
B.1. FreeScale Patch Files This file, uuu-u---bootbootboot----v2009.08v2009.08v2009.08----imx_11.09.01_201112.tarimx_11.09.01_201112.tarimx_11.09.01_201112.tar.gz.gz.gz.gz, is provided by FreeScale for patching u-boot.
52 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
B.2. VAB-800 Patch Files The following patches are provided by VIA.
File Name Description VAB-800_uboot.patch Set default debug port as COM2 Set boot delay time from 3 to 5 Add default storage, display parameters Table 777.7. VABVAB----800800 patch file
53 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Appendix C. Touch Panel Calibration There are several touch screen drivers in the Freescale Ubuntu DEMO image, the touch panel calibration function might conflict with drivers. Therefore, user should remove unnecessary drivers and install the correct one.
This section describes how to calibrate Touch Panel with VAB-800.
Step 1 Remove the "evtouch" driver
Remove the "evtouch" driver, which might cause the conflict with xinput or something else. To do this, use the command in the terminal: lucid@lucid:~/$ sudo apt-get remove xserver-xorg-input-evtouch
Note: After removing the evtouch driver, it may look more normal in the xinput device list. To check the touch screen device in xinput list, execute the command "xinput list". Then you will see one touch screen device, mxc_ts, in the list instead of three.
Step 2 Install the "tslib" driver.
Make sure the installation of "tslib" driver. The "tslib" driver in the current image might show as installed in the apt list, but actually it is not. To ensure the installation, remove the driver and re-install it again. (internet connection is required) lucid@lucid:~/$ sudo apt-get remove xserver-xorg-input-tslib lucid@lucid:~/$ sudo apt-get install xserver-xorg-input-tslib
54 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
Step 3 Set up the environment variables.
User may either do this during the calibration or write in the /etc/profile to make it permanent (re-login is required). lucid@lucid:~/$ sudo vi /etc/profile
Add parameters into /etc/profile export TSLIB_TSDEVICE=/dev/input/ts0 export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_CONSOLEDEVICE=/dev/tty export TSLIB_FBDEVICE=/dev/fb0
Step 4 Create "ts.conf" file in /etc and write the below content in it. lucid@lucid:~/$ sudo vi /etc/ts.conf Add parameters into /etc/ts.conf module_raw input module variance delta=30 module dejitter delta=100 module linear
Step 5 Modify /usr/lib/X11/xorg.conf.d/05-evdev.conf
Find out the Section below, and replace the driver """evdev"evdevevdev"""" by """tslib"tslibtslib"""". (Relogin is required). lucid@lucid:~/$ sudo vi /usr/lib/X11/xorg.conf.d/05-evdev.conf Find below parameter:
Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection
55 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Modify as below:
Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "tslib" EndSection
Step 6 To calibrate Touch Panel
Run "ts_calibrate" to calibrate the touch screen. (Root required) lucid@lucid:~/$ sudo -i root@lucid:~/# ts_calibrate
Note:
If you write the environment variables in /etc/profile in step 3) and do the calibration by ``sudo'', it may show some error message because the environment variables is not being read by root user. Under this circumstances you should switch to root user by using the command ``sudo su -'', then make the calibration.
For unknown reason, screen may act abnormally after the calibration, do reboot, re-login or restart manually and it should work.
56 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Appendix D. Setting UU----bootboot
Step 1 Setting the display devices.
[VGA]
To set VGA as display output.
VAB-800 U-Boot > setenv bootargs_base ‘setenv bootargs console=ttymxc1,115200 gpu_nommu ${vga}’ To set VGA resolution.
VAB-800 U-Boot > setenv vga 'setenv bootargs console=ttymxc1,115200 video=mxcdi1fb:GBR24,VGA-XGA di1_primary vga' To replace the resolution, change the red color part with the desired resolution mode.
For example: To set 1680 x 1050 resolution, change VGA-XGA to VGA- WSXGA+.
VAB-800 U-Boot > setenv vga 'setenv bootargs console=ttymxc1,115200 video=mxcdi1fb:GBR24,VGA-WSXGA+ di1_primary vga'
Note: There are four modes to be set in VAB-800: VGA-WSXGA+ : 1680x1050p-60 VGA-SXGA : 1280x1024p-60 VGA-XGA : 1024x768p-60 VGA-SVGA : 800x600p-60
[HDMI]
To set HDMI as display output.
VAB-800 U-Boot > setenv bootargs_base ‘setenv bootargs console=ttymxc1,115200 gpu_nommu ${hdmi}’ To set HMDI resolution.
VAB-800 U-Boot > setenv hdmi ‘setenv bootargs console=ttymxc1,115200 video=mxcdi0fb:RGB24,1024x768M@60 hdmi di0_primary’
57 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide To replace the resolution, change the red color part with the desired resolution mode.
For example: To set 1920x1080, change 1024x768 to 1920x1080.
VAB-800 U-Boot > setenv hdmi ‘setenv bootargs console=ttymxc1,115200 video=mxcdi0fb:RGB24,1920x1080M@60 hdmi di0_primary’
[LVDS]
To set LVDS as display output.
VAB-800 U-Boot > setenv bootargs_base ‘setenv bootargs console=ttymxc1,115200 gpu_nommu ${lvds1}’ or
VAB-800 U-Boot > setenv bootargs_base ‘setenv bootargs console=ttymxc1,115200 gpu_nommu ${lvds2}’ To set LVDS port.
VAB-800 U-Boot > setenv lvds1 ‘video=mxcdi0fb:RGB24,480C60 di0_primary ldb=di0 vga=off’ VAB-800 U-Boot > setenv lvds2 ‘video=mxcdi1fb:RGB24,480C60 di1_primary ldb=di1 vga=off’
Note: VAB-800 supports AUO 7" 800x480 LVDS panel by default.
Step 2 Setting storage devices
[Micro SD storage card]
VAB-800 U-Boot > setenv bootargs_mmc ‘set bootargs ${bootargs} root=/dev/mmcblk1p1 rw rootwait’ VAB-800 U-Boot > setenv bootcmd_mmc ‘run bootargs_base bootargs_mmc; mmc read ${loadaddr} 0x800 0x1800; bootm’
[eMMC]
VAB-800 U-Boot > setenv bootargs_emmc ‘setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw’ VAB-800 U-Boot > setenv bootcmd_emmc ‘run bootargs_base bootargs_emmc;fatload mmc 1 0x70800000 uImage;bootm’
58 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide StStStepStep 3 Set booting storage devices.
Here, user can set the boot device as either Micro SD or eMMC, and should set the below parameter according to the boot selection jumper (J4).
Set boot device as Micro SD:
VAB-800 U-Boot > setenv bootcmd ‘run bootcmd_mmc; bootm ${loadaddr}’
Set boot device as eMMC:
VAB-800 U-Boot > setenv bootcmd ‘run bootcmd_emmc; bootm ${loadaddr}’
Step 4 Setting MAC address
Here, user should set the MAC address in either u-boot or eFuse*
Write into u-boot:
VAB-800 U-Boot > setenv ethaddr xx:xx:xx:xx:xx:xx Or
Write into eFuse*:.
VAB-800 U-Boot > iim blow fecmac xx:xx:xx:xx:xx:xx
Note: 1) Generally, the MAC Address will be written into SoC eFuse. User can skip this setting if the MAC address exists. 2) Be careful to write MAC address into eFuse. The reason is that the eFuse can only be written once.
It is a must to reset after you set MAC address and save already:
VAB-800 U-Boot > saveenv VAB-800 U-Boot > reset
59 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Appendix E. XRandR Dual Display Setting Display combination:
• HDMI(up to 1280x720)+VGA
• LVDS1+VGA
• HDMI(up to 1280x720) +LVDS2
• LVDS1+LVDS2
RandR function supports:
• Switch mode on the fly
• Switch single/clone/extend mode on fly
• Rotation
Note: 1) Since the H/W EDID of VGA and HDMI is co-lay on the same I2C bus on VAB800 Rev.A1. HDMI may not be lighted if both HDMI and VGA are connected. 2) Clone mode: the two monitors should have the same resolution. Otherwise, the one with smaller resolution only shows partial content. 3) Extend mode: The desktop content shown on two monitors may partially overlap or missing after mode switch. 4) The total height/width should be less than 2048 when EXA is enabled. It’s because max buffer of Z160 is 2048x2048.
Step 1 Connect the two display devices to the target board and boot up.
Step 2 Setup u-boot.
60 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Please set the following parameters in Uboot first according to the display combination.
• HDMI + VGA
VAB-800 U-Boot > setenv bootargs_base ‘setenv bootargs console=ttymxc1,115200 gpu_nommu ${test}’ VAB-800 U-Boot > setenv test ‘console=tty1,38400 video=mxcdi0fb:RGB24,1280x720M@60 di0_primary hdmi video=mxcdi1fb:GBR24,VGA-XGA vga’ VAB-800 U-Boot > saveenv VAB-800 U-Boot > reset
• LVDS1 + VGA
VAB-800 U-Boot > setenv bootargs_base ‘setenv bootargs console=ttymxc1,115200 gpu_nommu ${test}’ VAB-800 U-Boot > setenv test ‘console=tty1,38400 video=mxcdi0fb:RGB24,480C60 di0_primary ldb=di0 video=mxcdi1fb:GBR24,VGA-XGA vga’ VAB-800 U-Boot > saveenv VAB-800 U-Boot > reset
• HDMI + LVDS2
VAB-800 U-Boot > setenv bootargs_base 'setenv bootargs console=ttymxc1,115200 gpu_nommu ${test}' VAB-800 U-Boot > setenv test ‘console=tty1,38400 video=mxcdi0fb:RGB24,1280x720M@60 di0_primary hdmi video=mxcdi1fb:RGB24,480C60 ldb=di1 vga=off’ VAB-800 U-Boot > saveenv VAB-800 U-Boot > reset
• LVDS1 + LVDS2
VAB-800 U-Boot > setenv bootargs_base ‘setenv bootargs console=ttymxc1,115200 gpu_nommu ${t1} ${t2}’ VAB-800 U-Boot > setenv t1 ‘console=tty1,38400 video=mxcdi0fb:RGB24,480C60 di0_primary ldb=separate,di=0,di=1,ch0_map=SPWG,ch1_map=SPWG’ VAB-800 U-Boot > setenv t2 ‘video=mxcdi1fb:RGB24,480C60 vga=off’ VAB-800 U-Boot > saveenv VAB-800 U-Boot > reset
Step 3 [Change mode]
61 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide Open a terminal, and input the command: lucid@lucid:~/$ xrandr –q
The combination for this example is HDMI(1280x720) and VGA(1024x768), the mode setup in u-boot. lucid@lucid:~/$ xrandr –q Screen 0: minimum 640 x 400, current 1280 x 768, maximum 1920 x 1280 DISP3 BG - DI1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm builtin 60.0*+ D:1680x1050p-60 60.0 D:1280x1024p-60 60.0 D:1024x768p-60 60.0 D:1024x600p-60 60.0 D:800x600p-60 60.3 D:800x480p-60 67.5 D:640x480p-60 59.9 DISP3 BG connected 1280x720+0+0 (normal left inverted right x axis y axis) 641mm x 401mm builtin 60.0*+ 1920x1200 60.0 + 1920x1080P 60.0 + 50.0 24.0 1600x1200 60.0 1280x1024 75.0 60.0 1152x864 75.0 1280x720P 60.0 50.0 1024x768 75.0 60.0 800x600 75.0 60.3 720x576P_4_3 50.0 720x576P_16_9 50.0 720x480P_16_9 59.9 720x480P_4_3 59.9 640x480 75.0 60.0 59.9 lucid@lucid:~/$ xrandr --output [screen0] --mode [select one mode listed above of screen0]
Example (HDMI): lucid@lucid:~/$ xrandr --output "DISP3 BG" --mode 1280x720P
Note:
[screen0]: "DISP3 BG" [screen1]: "DISP3 BG - DI1"
62 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide [Switch Single/CSingle/Clone/lone/lone/EEEExtendxtend modemode]]]]
Example: lucid@lucid:~/$ xrandr --output "DISP3 BG" --mode 1280x720P --output "DISP3 BG - DI1" --mode D:640x480p-60
Example: lucid@lucid:~/$ xrandr --output "DISP3 BG" –left-of "DISP3 BG - DI1"
63 VABVAB- ---8080808000 Linux BSP V1.V1.4444 Development Guide
To disable one of the dual display.
lucid@lucid:~/$ xrandr --output [screen0/screen1] --off
Example: lucid@lucid:~/$ xrandr --output "DISP3 BG" --off
Note:
1) Please use command if user would like to set clone mode from extend mode. xrandr --output [screen0] --same-as [screen1] 2) Please use command under debug port (COM2) if user disables display under single mode. $export DISPLAY=:0.0 $xrandr --output [screen0] --auto Or $xrandr --output [screen0] --mode [mode list]
[Rotation] lucid@lucid:~/$ xrandr --output [screen0] --rotate [left, right, inverted, normal]
64