Page 1
Linux User Manual iW-RainboW-G15D i.MX6 Qseven SOM Development platform Linux User Guide REL 1.0 iWave Systems Technologies Pvt. Ltd. Page 1 of 69...
Page 2
If you are not the intended recipient (or authorized to receive for the recipient), you are hereby notified that any disclosure, copying distribution or use of any of the information contained within this document is STRICTLY PROHIBITED. Thank you. “iWave Systems Tech. Pvt. Ltd.” REL 1.0 iWave Systems Technologies Pvt.
Page 3
(including liability to any person by reason of negligence) will be accepted by iWave Systems, its subsidiaries or employees for any direct or indirect loss or damage caused by omissions from or inaccuracies in this document.
Linux User Manual Table of Contents INTRODUCTION ............................8 Purpose ................................8 Scope ................................. 8 List of Acronyms ..............................8 BOARD SUPPORT PACKAGE......................... 10 BSP Driver details ............................10 2.1.1 BSP Supported Features ..........................10 2.1.2 Driver Source description ..........................10 2.1.3 Device tree source description ........................
Page 5
Linux User Manual Basic device Tests ............................34 4.2.1 RAM Test ..............................35 4.2.2 SD/MMC Test .............................. 35 4.2.3 SPI NOR Flash Test............................36 4.2.4 I2C Test ................................ 36 4.2.5 SATA Test ..............................37 4.2.6 Ethernet Test ............................... 37 4.2.7 USB Test ..............................
Page 6
Linux User Manual 5.10.1 Audio Test ..............................64 5.10.2 Camera Test ..............................65 5.10.3 Gstreamer Test ............................66 5.10.4 VPU Test ..............................67 5.10.5 GPU Test ..............................67 APPENDIX ..............................68 Frequently Asked Question ..........................68 REL 1.0 iWave Systems Technologies Pvt. Ltd.
Page 7
Linux User Manual List of Figures Figure 1: Boot device memory layout ..........................25 Figure 2: Platform Detection ............................27 Figure 3: Binary Programming Succeed .......................... 28 Figure 4: OTG device detection on Host PC ........................48 Figure 5: LCD Image Dump .............................. 55 Figure 6: HDMI 1080p Image ............................
Linux User Manual 1. INTRODUCTION Purpose The purpose of this document is to help the software engineer to program and test the iW-RainboW-G15M-Q7 Linux development platform and this will also guide to configure the Linux development environment in the Host PC and build the board support package.
Page 9
Linux User Manual Acronyms Abbreviations System On Module Serial Peripheral Interface UART Universal Asynchronous Receiver/Transmitter Universal Serial Bus USB OTG USB On The Go REL 1.0 iWave Systems Technologies Pvt. Ltd. Page 9 of 69...
Linux User Manual 2. BOARD SUPPORT PACKAGE BSP Driver details This section explains about the features supported, the device driver details and path of the device drivers and device tree details in the iW-RainboW-G15M-Q7 BSP. 2.1.1 BSP Supported Features Refer the Software release note for the supported features in the BSP.
Linux User Manual 2.1.3 Device tree source description This section explains about the device tree source code configuration and organization for iW-RainboW-G15M-Q7 platform. The device tree source codes will be available in below path of the Linux kernel. ~/arch/arm/boot/dts/...
Linux User Manual BSP Yocto Compilation This section explains procedure and detailed information about compiling the YOCTO for RZ/G1M/G1N SOM. 2.2.1 Host Requirements A Linux host PC with latest version (ex. Ubuntu version 14.04). Root permission on the Development Host.
Linux User Manual 2.2.4 Setting up the repo utility Repo is a tool built on top of Git that makes it easier to manage projects that contain multiple repositories, which do not need to be on the same server.
Linux User Manual To apply the Yocto patch file, execute the below commands. $patch -Np1 < <path Yocto patch file>/PATCH000-iW-PRDVZ-SC-01-RX.X-RELX.X- YoctoKrogoth_basic_customization.patch The Yocto patch file from deliverables is located in the below path. iW-RainboW-G15M-Q7-RX.X-RELX.X-Linux4.1.15-YoctoKrogoth_Deliverables/Source- Code/Linux/Yocto/PATCH000-iW-PRDVZ-SC-01-RX.X-RELX.X- YoctoKrogoth_basic_customization.patch ...
Linux User Manual 2.2.7 Yocto build This section provides the detailed information and process for building the yocto binaries. Open a terminal window and change the directory to yocto setup path. $cd ~/<path to iwg15-release-bsp>/iwg15-release-bsp/ To setup environment build path, execute the below command. This is required only once on switching of every new terminal window.
Linux User Manual 2.2.8 U-boot This section provides the detailed information and process for building the u-boot binary image. Open a terminal window and change the directory to yocto setup path. $cd ~/<path to iwg15-release-bsp>/iwg15-release-bsp/ To setup environment build path, execute the below command. This is required only once on switching of every new terminal window.
Linux User Manual 2.2.9 Linux kernel This section provides the detailed information and process for building the kernel images. Open a terminal window and change the directory to yocto setup path. $cd ~/<path to iwg15-release-bsp>/iwg15-release-bsp/ To setup environment build path, execute the below command. This is required only once on switching of every new terminal window.
To export the Cross Compiler and tool chain path, execute the below command. host@host/<Directory>/u-boot-iwg15~$export ARCH=arm host@host/<Directory>/uboot-iwg15~$export PATH=$PATH:/opt/fsl-imx-x11/4.1.15- 2.1.0/sysroots/<processor>-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi host@host/<Directory>/u-boot-iwg15~$export CROSS_COMPILE=arm-poky-linux-gnueabi- To configure for iWave-G15M-Q7 platform, execute the below command. host@host/<directory>/u-boot-iwg15~$make mx6_iwg15m_q7_defconfig To compile the u-boot source code, execute the below command. host@host/<directory>/u-boot-iwg15~$make CC="arm-poky-linux-gnueabi-gcc --sysroot=/opt/fsl- imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi/" ...
Linux User Manual 2.3.2 Linux kernel Create a directory and open the directory in host to build the Linux. host@host~$mkdir <directory_name> host@host~$cd <directory_name> The Linux kernel source code tar file from deliverables is located in the below path.
Page 22
Linux User Manual Audio-in patch apply procedure Linux, apply patch file, “PATCH003-iW-PRDVZ-SC-01-R5.0-REL1.0-Linux4.1.15_Kernel_audio- in_customization.patch” which shifts the data to the right location through SDMA script and makes AC’97 Audio IN tone proper. The audio-in patch file has to be applied on top of the Linux kernel. To prepare the Linux kernel for the iW-RainboW-G15M-Q7 platform, refer the section Linux kernel in standalone compilation.
Linux User Manual BSP Customization This section explains the information about steps to customize the platform devices information for customer specific devices and to customize the file systems for other user configurations. 2.4.1 Display device This chapter describes how to set up the display device in the device tree. Here, the LCD display is connected in LVDS0 channel.
= "fsl,mag3110"; reg = <0x0e>; position = <2>; Default Linux boot logo To Enable Default Linux Boot logo, deselect “Standard 224-color iWave logo” in make menuconfig and compile again. Device Drivers ---> Graphics support ---> [*] Bootup logo --->...
Linux User Manual 3. BINARY PROGRAMMING MFG –Tool Programming This section explains the step by step procedure to flash the binaries using MFG tool. 3.1.1 Requirements To program the binaries for iW-RainboW-G15M-Q7 platform, following Items are required: Micro SD/ Standard SD/ eMMC/ SATA ...
Linux User Manual 3.1.2 MFG-Tool The MFG-Tool is a manufacturing tool from Freescale that runs under Windows. It is designed to program firmware to iW-RainboW-G15M-Q7 platforms for mass production. The MFG-Tool with this deliverables will divide the boot device’s space equally for VFAT and EXT4 partition after allocation of boot loader environment variables space.
3.1.4 Binary Programming Select Serial downloader boot mode in iW-RainboW-G15M-Q7 platform and make sure that boot media is connected/ inserted properly. Refer section Boot Mode Setting in iW-RainboW-G15D-QuickStartGuide document for boot mode setting procedure. Connect debug UART with host PC and Power ON the iW-RainboW-G15M-Q7 platform. Refer sections Debug UART Setting and Powering ON iW-RainboW-G15D in iW-RainboW-G15D-QuickStartGuide document to connect debug UART and power ON procedure.
Linux User Manual After successfully programming the Binaries to boot device, the progress bar will become Green colour and status box will be shown “Done”. Figure 3: Binary Programming Succeed Click “Stop” to finish, and Click “Exit” to terminate the application.
Linux User Manual Manual SD Card Programming This section explains the step by step procedure to flash the binaries into micro SD card manually. 3.2.1 Requirements To program the binaries in SD card for iW-RainboW-G15M-Q7 platform, following Items are required: ...
Page 30
Linux User Manual Press 'p' to create primary partition. Give 1 as partition number. Then give first cylinder as ‘7’(Based on the total cylinders we have to change the size) Because first 7 cylinders is for U-Boot.bin purpose and Last cylinder as half of displayed size (e.g.
Page 31
Linux User Manual List out partition types in SD. Press 'p' to view. Below message will be displayed Command (m for help): p Disk /dev/sdb: 1021 MB, 1021837312 bytes 31 heads, 62 sectors/track, 1038 cylinders Units = cylinders of 1922 * 512 = 984064 bytes...
Linux User Manual 3.2.3 Binary Programming Insert SD card using SD card reader to the PC. Execute mount command to see the attached nodes and mount points. $mount SD card may attach to the dev nodes either sdb/sdc/sdd/sde. Assume the SD card is attached to /dev/sdb node.
UART and power ON procedure. To enter in boot loader console, refer the section Linux Test Environment section in iW-RainboW-G15D QuickStartGuide document to get the boot loader console. Note: Refer the section Boot Media Setting in i.MX6-QsevenSOM-HardwareUserGuide document for boot media device selection.
Linux User Manual The platform information will be displayed in command prompt as shown below. arch_number = 0x0000112E env_t = 0x00000000 boot_params = 0x10000100 DRAM bank = 0x00000000 -> start = 0x10000000 -> size = 0x40000000 ethaddr = aa:bb:cc:dd:ee:f1...
To display the data in the RAM location, execute the below command. iWave-G15 >md <RAM_addr> <No_of_location_to_be_display> To test the RAM read/write, execute the below. iWave-G15 >mtest <RAM_addr_start> <RAM_addr_end> <DATA> <No_of_times> Example iWave-G15 >mtest 0x10800000 0x10900000 0xAABBCCDD 0x1 Pattern AABBCCDD Writing... Reading...Tested 1 iteration(s) without errors.
To write the data from RAM into SPI flash, execute the below. iWave-G15 >sf write <RAM_addr> <flash_offset><size> Example iWave-G15 >sf write 0x10800000 0x000000 0x100 Writing SPI NOR flash 0x0 [0x100 bytes] <- ram 0x10800000 SUCCESS 4.2.4 I2C Test ...
Linux User Manual 4.2.5 SATA Test To initialize the SATA device, execute the below command. iWave-G15 >sata init AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part...
Page 38
>mdio read FEC 0x3 0x0 To write any register to Ethernet PHY device, execute the below command. iWave-G15 >mdio write <busname> <phyaddr> <reg> <value> To set the Ethernet speed as 1000Mbps and full duplex, execute the below command.
Page 39
To list out the options, execute the below command. iWave-G15 >fuse To blow the MAC address permanently, execute the below command. iWave-G15 >fuse prog <bank> <word> <lower 32 bit hex value> iWave-G15 >fuse prog <bank> <word> <upper 16 bit hex value> Example Assume a MAC address “AA:BB:CC:DD:EE:FF”...
Page 40
Linux User Manual TFTP server Create the tftp configuration file and insert the following content. $sudo nano /etc/xinetd.d/tftp service tftp protocol = udp prot = 69 socket_type = dgram wait= yes user = <user_name> server = /usr/sbin/in.tftpd server_args = /tftpboot -s...
To load the kernel and file systems from the Micro SD, the environment variables should be set as shown below. iWave-G15 >setenv bootcmd_msd 'run bootargs_msd; run fdt_check;mmc dev 1;fatload mmc 1 ${loadaddr} ${kernel};fatload mmc 1 ${fdt_addr} ${fdt_file};bootz ${loadaddr} - ${fdt_addr}' iWave-G15 >setenv bootargs_msd 'setenv bootargs ${bootargs_base} root=/dev/mmcblk1p2...
To load the kernel and file systems from the EMMC, the environment variables should be set as shown below. iWave-G15 >setenv bootcmd_mmc 'run bootargs_mmc; run fdt_check;mmc dev 2;fatload mmc 2 ${loadaddr} ${kernel};fatload mmc 2 ${fdt_addr} ${fdt_file};bootz ${loadaddr} - ${fdt_addr}' iWave-G15 >setenv bootargs_mmc 'setenv bootargs ${bootargs_base} root=/dev/mmcblk2p2 rootwait rootfstype=ext4 rw ${hdmi} ${lcd}' iWave-G15 >setenv bootcmd 'run bootcmd_mmc'...
To load the kernel and file systems using the TFTP and NFS, the environment variables should be set as shown below. iWave-G15 >setenv serverip '<serverip>' iWave-G15 >setenv nfsroot '<rootfs-(filesystem)path in host >' iWave-G15 >setenv bootfile 'zImage' iWave-G15 >setenv bootcmd 'run bootcmd_net' iWave-G15 >saveenv...
Example iWave-G15 >setenv bootargs_mmc 'setenv bootargs ${bootargs_base} root=/dev/mmcblk2p2 rootwait rootfstype=ext4 rw ${hdmi} ${lcd} maxcpus=2' By default LDO core regulators will be bypassed (LDO bypass). To activate the LDO regulators (LDO active), set the below environment variable.
Debug UART Setting and Powering ON iW-RainboW-G15D in iW-RainboW-G15D-QuickStartGuide document to connect debug UART and power ON procedure. To enter in boot loader console, refer the section Linux Test Environment section in iW-RainboW-G15D Quick Start Guide document to get the boot loader console. ...
Linux User Manual 5.1.1 SD/eMMC/USB host/ USB OTG (as host)/ SATA test The Standard SD / Micro SD / eMMC / USB (Host) / USB OTG (as Host) / SATA will mount in below mentioned directories. Standard SD - /run/media/mmcblk0p1, /run /media/mmcblk0p2 …etc...
Linux User Manual 5.1.2 USB OTG as device Connect OTG Cable to OTG Port To change the directory to kernel modules, execute the below command root@iWave-G15~/$cd /lib/modules/4.xx.xx-xx/kernel/ Execute below command to insert the file storage module.
Linux User Manual Figure 4: OTG device detection on Host PC To unload the modules, execute the below command root@iWave-G15/lib/modules/4.xx.xx-xx/kernel~/$rmmod g_mass_storage.ko root@iWave-G15/lib/modules/4.xx.xx-xx/kernel~/$rmmod usb_f_mass_storage.ko root@iWave-G15/lib/modules/4.xx.xx-xx/kernel~/$rmmod libcomposite.ko root@iWave-G15/lib/modules/4.xx.xx-xx/kernel~/$rmmod configfs.ko To change the directory to “root” folder, execute the below command root@iWave-G15/lib/modules/4.xx.xx-xx/kernel~/$cd /home/root...
Linux User Manual 5.1.3 SPI NOR Flash Test Caution: Accessing the SPI Flash will corrupt the boot code, if SPI Flash is configured as the boot device. To display the SPI NOR flash information, execute the below command.
Linux User Manual 5.2.1 Ethernet Test This section explains how to test the Ethernet with different speed (10/100/1000Mbps) and duplex (half/full) in the iW-RainboW-G15M platform. Connect the Ethernet cable and to enable the Ethernet device, execute the below command.
Page 51
-s eth0 autoneg off Execute the below command to set the desired speed/duplex in the ethernet. root@iWave-G15~$ethtool -s eth0 speed [SPEED] duplex [DUPLEX] Example root@iWave-G15~$ethtool -s eth0 speed 100 duplex half root@iWave-G15~$ethtool -s eth0 speed 10 duplex full ...
Set the bitrate and enable the CAN device, execute the below command. root@iWave-G15~$ip link set <CAN_DEVICE> up type can bitrate <bitrate> The <CAN_DEVICE> depends upon the CAN port you have connected with another platform. It may be can0 or can1.
Linux User Manual 5.2.3 Bluetooth Test This section explains how to test the USB Bluetooth in the iW-RainboW-G15M platform. Connect the USB Bluetooth module and execute below command to check the Bluetooth interface. root@iWave-G15~$hciconfig hci0: Type: USB BD Address: 00:15:83:15:A1:B9 ACL MTU: 672:4 SCO MTU: 48:1...
Linux User Manual Display devices Test The iW-RainboW-G15M-Q7 platform will support the below display devices. HDMI (up to 1080p) LVDS – 0 & LVDS-1 Testing device Requirements To test the display devices supported by iW-RainboW-G15M-Q7 platform, following Items are required.
Linux User Manual 5.3.3 LVDS-1 Test To change the directory to “iwtest” folder, execute the below command. root@iWave-G15~/$cd /iwtest/ Dump the image on LVDS-1 frame buffer. root@iWave-G15/iwtest~$cat <image name>.bin > /dev/fb0 Example root@iWave-G15/iwtest~$cat wvga.bin > /dev/fb0 ...
Linux User Manual 5.3.5 HDMI Test The HDMI supported resolutions are, 640x480p, 720x480p, 1280x720p, 1920x1080p And the tested resolutions are, 1280x720p,1920x1080p Note: HDMI Monitor should support the standard HDMI resolution set. If not the images will not be displayed properly.
Linux User Manual 720p Resolution 1080p (1920x1080) is the default HDMI resolution. To change the HDMI resolution to 720p, refer the HDMI and LCD settings section. To change the directory to “iwtest” folder and to enable the HDMI frame buffer, execute the below commands respectively.
Linux User Manual 5.4.1 USB HID Devices Mouse Insert the USB Mouse in iW-RainboW-G15M-Q7 platform USB slot. The following message will be displayed in command prompt. usb 2-1.1: new low speed USB device number 4 using fsl-ehci input:...
root@iWave-G15/$cat /dev/ttymxc2 To set the Baud rate to a different value, execute the below command root@iWave-G15/$stty –F /dev/<node> crtscts <Baud rate> Example root@iWave-G15/$stty –F /dev/ttymxc2 crtscts 115200 The default UART baud rate is 9600bps and the tested Baud rates are given below: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 &...
Linux User Manual RTC Test The given BSP supports the built-in RTC. This section explains how to test RTC in the iW-RainboW-G15M platform. To list out the date options, execute the below command. root@iWave-G15/$date --help BusyBox v1.20.2 () multi-call binary.
Linux User Manual PCIe Device test The given BSP supports the PCIe switch and End point devices. This section explains how to list the connected PCIe switches and End point devices in the iW-RainboW-G15M platform. Connect the PCIe device in iW-RainboW-G15M-Q7 platform before powering ON.
To read the values from magneto meter, execute the below command and the read values will be printed in the console. root@iWave-G15/$echo <no of times> > /sys/class/hwmon/hwmon1/device/read Example root@iWave-G15/$echo 100 > /sys/class/hwmon/hwmon1/device/read To power off/shut down the magnetometer, execute the below command.
1 > /sys/class/hwmon/hwmon0/device/enable To read the values from barometer, execute the below command and the read values will be printed in the console. root@iWave-G15/$echo <no of times> > /sys/class/hwmon/hwmon0/device/read Example root@iWave-G15/$echo 100 > /sys/class/hwmon/hwmon0/device/read To power off/shut down the barometer, execute the below command.
Example root@iWave-G15~$aplay -D plughw:0,0 /unit_tests/audio8k16S.wav To record an audio file, execute the below command. root@iWave-G15~$arecord -D plughw:<card>,<subdevice> -d <duration in sec> /<path to audio file>/<audiofile_name> Example root@iWave-G15~$arecord -D plughw:0,0 -d 10 /unit_tests/test.wav Note: AC'97 audio-in may not work properly. To fix this issue, refer the section Audio-in patch apply procedure.
Linux User Manual 5.10.3 Gstreamer Test The given BSP supports the Gstreamer framework. This section explains how to play a multimedia file using Gstreamer framework in the iW-RainboW-G15M platform. To play a video/audio file using gplay, execute the below command.
Linux User Manual 6. APPENDIX Frequently Asked Question 1. How to power ON the iW-RainboW-G15M-Q7 platform? Refer the section Powering ON iW-RainboW-G15M-Q7 in iW-RainboW-G15M-QuickStartGuide for iW- RainboW-G15M-Q7 platform power ON procedure 2. How to connect the Debug port of iW-RainboW-G15M-Q7 with host PC / What are the settings to be done in...
Page 69
Linux User Manual 8. Is it possible to use 64bit host pc for BSP compilation? To compile the BSP in 64 bit host pc following host package should be installed. $sudo apt-get install ia32-libs Please refer http://www.debian-administration.org/articles/534 9. Why host PC thrown an error “uImage cannot build” while linux kernel compilation? If the host thrown an error “uImage cannot build”...
Need help?
Do you have a question about the iW-RainboW-G15D and is the answer not in the manual?
Questions and answers