1. 主页
  2. 文档
  3. 操作系统手册
  4. Cortex-A9
  5. Ubuntu 12.04

Ubuntu 12.04

Chipsee Embedded Industrial Computer

Ubuntu User Manual

V1.0.3

This manual is used to provide users with a fast guide of Chipsee Embedded Industrial Computer about Ubuntu OS development. Through this manual, users can quickly understand the hardware resources; users can build a complete compilation of Ubuntu development environment; users can debug Ubuntu OS via serial.

1. Chipsee Embedded Industrial Computer Development Kit

Hardware:
(1)Chipsee Embedded Industrial Computer
(2)12V power adapter
(3)Mini-USB OTG cable
(4)Common serial cable or USB to serial cable
(5)TF Card (at least 4G)

Software:
(1)Chipsee Ubuntu1204 Image file
(2)QT4.8.4 for Linux

2. Getting started and Tests

Through this part of the content, you can use the image files of Ubuntu1204 we provide and MFGTools or bootable TF Card for image downloading, system booting and beginning basic software and hardware test.

2.1. Downloading images

The following download methods can be used to write the Ubuntu1204 System Image:
• MFGTool to download all images to eMMC card.
• Using bootable TF Card to download all images to eMMC card.

2.1.1. Booting switch configuration

CS-IMX6 has three boot switch modes, you can select one mode before the boot.

(eMMC Boot)

2.1.2. Prebuilt file package

You can get the prebuilt file package from a DVD, like prebuilt-imxv1-cs10600f070v3-ubuntu1204-qt4.8-emmc-20170709.tar.gz, the package has the following contents.

Contents

Description

boot/imx6q-sabresd.dtb

TF Card boot dtb file

boot/u-boot-sd.imx

TF Card boot bootloader

boot/zImage

TF Card boot kernel file

filesystem/rootfs-emmc-flasher.tar.bz2

TF Card boot rootfs

mksdcard.sh

shell tools to make bootable TF Card

README

Simple Guide

S1.jpg

Boot Switch Config Figure

emmc-flash/emmc/oneiric.tgz

rootfs in target emmc

emmc-flash/emmc/u-boot.bin

bootloader in target emmc

emmc-flash/emmc/uImage

kernel file in target emmc

emmc-flash/emmc/uImage_has_console

kernel file which supports Frambuffer

emmc-flash/emmc/*.bmp

bootloader logo file, 32bpp, bmp file

emmc-flash/mkemmc.sh

shell tools to download images

2.1.3. Downloading images with MFGTool

MFGTool can be used to download all images into a target device. It is a quick and easy tool for downloading images. You can get it from a DVD and use it in the Windows Platform.
• Unzip Mfgtools-K3035-Vx.x.zip, Edit “Mfgtools-K3035-Vx.x\cfg.ini” (Figure 1) and make sure the “name” is “Ubuntu-SabreSD-eMMC” (Figure 2).

(Figure 1)

(Figure 2)

Copy images from emmc-flash/emmc/ directory in prebuilt file package to “Mfgtools-K3035-Vx.x\Profiles\MX6Q Linux Update\OS Firmware\files\ubuntu” directory (Figure 4). Copy the logo file to “Mfgtools-K3035-Vx.x\Profiles\MX6Q Linux Update\OS Firmware\files\logo” directory and rename it to logo.bmp (Figure 5).

NOTE: The default uImage disable the Framebuffer function. If you want to use Framebuffer, please rename the “uImage_has_console” to “uImage” to replace the default “uImage”.

(Figure 3)

(Figure 4)

(Figure 5)

Set boot switch to download mode.

• Connect Chipsee Embedded Industrial Computer with PC by using Mini-USB OTG cable and Download images.
• Run MfgTool2.exe in Mfgtools-K3035-Vx.x directory. (Figure 7)

(Figure 7)

(Figure 8)

(Figure 9)

NOTE: “No Device Connected” indicates your USB-OTG cable is not ready, please check it. (Figure 9)

When it is “HID-compliant device”, Click “Start” to begin downloading the Image.

(Figure 10)

NOTE:If the PC OS is Window7, there is a message that lets you to format the disk, please ignore or cancel it.

Click “Stop” to stop download Image and exit. (Figure 11)

(Figure 11)

2.1.4. Downloading images with TF Card

The prebuilt file package has one shell tool to help you to make one bootable TF Card in Linux Platform. Use the TF Card to download images. It’s one another quick and easy way to downloading images.
• Copy prebuilt file to linux environment, like ubuntu1404.
• Insert TF card in ubuntu1404, check the device node, such as /dev/sdc.
• Untar prebuilt package. Do the following command.

$ sudo ./mksdcard.sh --device /dev/sdc

• Now you get one bootable TF card, insert it in Chipsee board, change the switch S1 to TF card boot mode; you can reference 2.1.1 Booting switch configuration.
• Power on, when you see the following message it indicates you have downloaded the image in emmc.
>>>>>>> eMMC Flashing Completed <<<<<<< • Power off and switch S1 to eMMC boot mode, you can reference 2.1.1 Booting switch configuration.[/fusion_text][/fusion_builder_column][fusion_builder_column type="1_1" layout="1_1" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_image_id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" border_radius_top_left="" border_radius_top_right="" border_radius_bottom_left="" border_radius_bottom_right="" box_shadow="no" box_shadow_vertical="" box_shadow_horizontal="" box_shadow_blur="0" box_shadow_spread="0" box_shadow_color="" box_shadow_style="" padding_top="" padding_right="" padding_bottom="" padding_left="" margin_top="" margin_bottom="" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"][fusion_menu_anchor name="Booting Ubuntu OS and Test" class="" /][fusion_title hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" content_align="left" size="2" font_size="" line_height="" letter_spacing="" margin_top="" margin_bottom="" margin_top_mobile="" margin_bottom_mobile="" text_color="" style_type="none" sep_color=""]

2.2.Booting Ubuntu OS and Test

[/fusion_title]

The Ubuntu version is 12.04, the username and password is: linaro and linaro, if you want to use root, just do it like this:

$ sudo passwd root

Then you should add a password for root, after that you can use the root.

(Figure 12)

2.2.1. SD Test

The SD Card is supported in hot plug, when you plug the SD card on board, The SD Card will be mounted to /media/xxxx-xxxx. Like (Figure 13)

(Figure 13)

2.2.2. USB Flash Disk Test

USB Flash Disk is similar to the SD Card.

2.2.3. SATA Test

SATA is not supported in hot plug, the Ubuntu OS supports NTFS, EXT3, and FAT.

2.2.4. Network Test

The network uses DHCP to obtain an IP Address. You can use the network by connecting the board cable to the router. And you can use command to change the IP Address.

#ifconfig eth0 down
#ifconfig eth0 192.168.xx.xxx up

2.2.5. Sound Card Test

Please open the sound to test the Sound Card. It uses Rhythmbox.

2.2.6. Video Test

Please Open a Video to test the Video.

2.2.7. HDMI Test

For HDMI output, please see IMX6Q U-boot Setting Hdmi Output for Ubuntu in IMX6Q U-boot Setting Hdmi Output For Ubuntu V1.0.pdf

Notes: HDMI is not supported in hot plug, and the sound comes from the HDMI monitor, not the speaker ot the headset on board.

2.2.8. WIFI Test

Please make sure your board has SDIO WIFI module before you test WIFI. If your board has SDIO WIFI Module, just connect to the WIFI and open the browser to test.

2.2.9. Serial Test

Serial ports in system

Serial Port Driver
COM1(RS232 Debug) /dev/ttySAC0
COM2(RS485) /dev/ttySAC1
COM3(RS232) /dev/ttySAC2
COM4(RS485) /dev/ttySAC3
COM5(RS485) /dev/ttySAC4

Notes:COM2(RS485)shares a pin with Bluetooth. If you use COM2(RS485), you can’t use Bluetooth.
Connect COM which you want to test on board to PC. Use software “SecureCRT” or “Putty” or some others in PC. Run “Serial Port” App to communicate with PC. Click “Setup”, set “Device” and “Baud rate”, set Device to what you want to test, set Baud rate 115200.

2.2.10. Can Test

For the CAN test, just reference CAN test in Ubuntu.pdf

2.2.11. GPIO Test

There are 8 gpio ports, you can set them to output or input, the LOW is 0V, the HIGH is 3.3V, please check “GPIO Connector” in Chipsee_FXXXC-Manual – V1.0.pdf (The XXX indicate the display, such as 101, 070) to know the position. The following table will give you the gpio numbers.

Pin number GPIO number
3 gpio106
4 gpio30
6 gpio95
7 gpio87
8 gpio29
9 gpio28
11 gpio94
12 gpio130

For CS80480F070 board, the GPIO is different from other.

PIN 11 Pin number GPIO number
11 205
12 106
13 29
14 30
15 28
16 204
17 94
18 95

Example: (set gpio106 output, and let it output HIGH or output LOW)

# echo 106 > /sys/class/gpio/export               //export gpio106
# echo out > /sys/class/gpio/gpio106/direction      //set gpio106 output
# echo 1 > /sys/class/gpio/gpio106/value           //set gpio106 output HIGH
# echo 0 > /sys/class/gpio/gpio106/value           //set gpio106 output LOW

Example 🙁 set gpio30 input)

# echo 30 > /sys/class/gpio/export                //export gpio30
# echo in > /sys/class/gpio/gpio30/direction        // set gpio30 input

Example 🙁 set gpio30 unexport)

# echo 30 > /sys/class/gpio/unexport             //unexport gpio30

3. Ubuntu system debug in Windows

In this chapter we will describe how to view the Ubuntu system via the serial port. The following operation is under Windows 7 x64 environment, similar to other Windows platforms.

3.1. View Ubuntu system via the serial port

1. Connect the COM1 on board to PC
2. Open software “SecureCRT” or “Putty” in Windows and set it like in the following figure.

3. Power on the board, you can see the serial output of information like in the following figure.

4. When the system is fully booted, you can communicate with it.

4. QT development

In this chapter, we introduce the development of the System with QT. The QT Version on the system is QT4.8.4.

4.1. Preparation

Download the qt 4.8.4 and qtcrator2.6.2, install them.

4.1. Example—HelloWorld

1. New a project like follow:

2. We tested it on build machine, now we will deploy it on our arm board.
Copy the project to the board from the following path:

Then we will make a project on board, like so:

NOTE: the command “qmake -project” “qmake” “make” must be done on board, like above.

3. Add a startup icon for “helloworld”.

$ cd /usr/share/applications
$ sudo vi helloworld.desktop

Add the following content in the file “helloworld.desktop”

[Desktop Entry]
Version=1.0 
Encoding=UTF-8 
Type=Application 
Name=helloworld
Comment=helloworld
NoDisplay=true 
Exec=/home/linaro/Desktop/helloworld/helloworld %f   // the path of qt binary.
Icon=/home/linaro/Desktop/helloworld/helloworld.png  // you can replace it by you own icon.
Name[en_US]=helloworld

Like this:

Then look at the following directory, you can find the icon, you can copy it to desktop, like this:

这篇文章对您有用吗?