COM AM35 Linux: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
Line 28: Line 28:


==<br/>Debian system ==
==<br/>Debian system ==
===How to use/update our root file system ===
:1. Format a microSD card like following (in linux e.g. you can use palimpsest) with '''Master Boot Record''' partition scheme
::{| class="wikitable"
|P1 '''FAT'''  (Primary partition: 100MB)
|-
|P2 '''ext3''' (Primary partition: Residual space)
|}
:2. Untar the root file system to the ext3 partition of the microSD card (Don't copy the tar archive directly to the microSD card)
::{| class="wikitable"
|Start the Console on Linux
|-
|<code>''su''</code>
|-
|<code>''chmod 755 /path/of/the/microSD_card''</code>
|-
|<code>''cd /path/of/the/microSD_card''</code>
|-
|<code>''tar xfjv path/to/RootFS/Name_of_RootFS_file.tar.bz2''</code>
|}
=== Calibrating the touchscreen ===
=== Calibrating the touchscreen ===
:{| class="wikitable"
:{| class="wikitable"
Line 68: Line 93:
|<code>''shutdown -h now''</code>
|<code>''shutdown -h now''</code>
|}
|}


==<br/>How to control the GPIOs ==
==<br/>How to control the GPIOs ==

Revision as of 08:45, 16 July 2012


FAQ

Ethernet does not work

Check if the line "allow-hotplug eth0" in the file "/etc/network/interfaces" is activated. You can activate the ethernet interface on a running system with the command:

ifconfig eth0 up
Remark: To work with a nfs-rootfilesystem you have to disable the line "allow-hotplug eth0" in the file "/etc/network/interfaces". Maybe the system was prepared for this method for development and nobody did change it back.

How to set a Linux environment variable?

This example shows you how to configure the system to use a proxy-server with a environment variable.

export http_proxy=http://192.168.xxx.xxx:xxxx

How to schedule jobs to run periodically at certain times or dates?

You can use the cron daemon and/or anacron. To use anacron you have to copy or link your program or script into one of the the following folders:

/etc/cron.hourly
/etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly

For further information have a look at the general linux documentation.


Debian system

How to use/update our root file system

1. Format a microSD card like following (in linux e.g. you can use palimpsest) with Master Boot Record partition scheme
P1 FAT (Primary partition: 100MB)
P2 ext3 (Primary partition: Residual space)
2. Untar the root file system to the ext3 partition of the microSD card (Don't copy the tar archive directly to the microSD card)
Start the Console on Linux
su
chmod 755 /path/of/the/microSD_card
cd /path/of/the/microSD_card
tar xfjv path/to/RootFS/Name_of_RootFS_file.tar.bz2


Calibrating the touchscreen

ts_calibrate
Check the enviroment variable "TSLIB_TSDEVICE=/dev/input/event0" with printenv if an error occurs.

Running Qt Demos

cd /usr/qt/demos/demoname
demoname -qws
For the Qt-Browser change demoname to browser
If the touchscreen does not work please check the enviroment variable "QWS_MOUSE_PROTO=Tslib:/dev/input/event0" with printenv.

Run Qt demos with powerVR (3d acceleration) support:

cd /usr/qt/demos/embedded/demoname
demoname -qws

Run demos with a usb-mouse as input device:

cd /usr/qt/demos/demoname
/QWS_MOUSE_PROTO=Auto:/dev/input/mice demoname -qws
Remark: Just remember that you need to run the Qt demos with the options -qws. Omitting -qws results in the app waiting to connect to the QWS Server, which is not running.

Login/Shutdown system

Username: root
Password: foo
shutdown -h now


How to control the GPIOs

DHCOM Name: alt. DHCOM Name: SO-DIMM Pin# Linux <GPIO#>
GPIO A 154 116
GPIO B 156 117
GPIO C 162 118
GPIO D 163 119
GPIO E 164 125
GPIO F 165 140
GPIO G 167 141
GPIO H 173 155
GPIO I 175 152
CIF HSYNC GPIO J 74 96
CIF PCLK GPIO K 72 94
CIF MCLK GPIO L 70 58
CIF VSYNC GPIO M 68 97
CIF D9 GPIO N 66 98
CIF D8 GPIO O 64 95
CIF D7 GPIO P 62 106
CIF D6 GPIO Q 60 105
CIF D5 GPIO R 58 104
CIF D4 GPIO S 56 103
CIF D3 GPIO T 54 102
CIF D2 GPIO U 52 101
CIF D1 GPIO V 50 100
CIF D0 GPIO W 48 99
Remark: Depending on your board configuration some of the additional gpios shared with the camera interface are not available on your system.
Export
echo <GPIO#> >/sys/class/gpio/export
Remark: Have a look into /sys/class/gpio/ for already configured gpios.
Set direction
echo in >/sys/class/gpio/gpio<GPIO#>/direction
echo out >/sys/class/gpio/gpio<GPIO#>/direction
Set state
echo 0 >/sys/class/gpio/gpio<GPIO#>/value
echo 1 >/sys/class/gpio/gpio<GPIO#>/value

Initialize and test CAN

Initialize:
ip link set can0 up type can bitrate 500000
Send test message via cansend (part of can-utils):
cansend can0 100#11.2233.44556677.88