Difference between revisions of "CM-IAM: Linux: Ubuntu"

From Compulab Mediawiki
Jump to: navigation, search
 
(Package management)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
Ubuntu Linux for the CM-iAM is based on standard Ubuntu 9.04 Jaunty Jackalope. ''sb-iam.ubuntu-9.04.NAND.img'' run-time image contain a full-featured desktop filesystem. Network, sound, graphics should work out of the box.
+
Ubuntu Linux for the CM-iAM is based on standard Ubuntu 9.10 Karmic Koala. The  run-time image supplied contains a full-featured desktop filesystem. Network, sound and graphics should work out of the box.
  
 
== Authorization info ==
 
== Authorization info ==
* username: user
+
* username: fit
 
* password: 111111
 
* password: 111111
  
 
== Customized kernel ==
 
== Customized kernel ==
* Based on 2.6.28 kernel with patches from Ubuntu and Compulab.
+
* Based on the 2.6.31 kernel with patches from Ubuntu and Compulab.
 
* Supports most features present on the SB-iAM development board and CM-iAM module.
 
* Supports most features present on the SB-iAM development board and CM-iAM module.
 
* Described in more detail on the [[Linux Kernel for CM-iAM|Linux kernel for CM-iAM]] page.
 
* Described in more detail on the [[Linux Kernel for CM-iAM|Linux kernel for CM-iAM]] page.
 +
 +
== Package management ==
 +
* To be consistent with Ubuntu/Debian packaging standards, all custom packages provided by CompuLab reside in the [http://fit-pc2.com/download/ubuntu/dists/karmic trivial repository].
 +
* This repository contains binaries and sources for the kernel, graphic drivers, libraries, etc. You will receive all required updates automatically.
 +
* Please read more about working with a repository in [http://www.debian.org/doc/manuals/repository-howto/repository-howto Debian Repository HOWTO]
 +
 
== Graphic support ==
 
== Graphic support ==
* Intel Poulsbo chipset using GMA500 graphic module from PowerVR.
+
* Intel Poulsbo chipset using the GMA500 graphic module from PowerVR.
* Graphic drivers taken from [https://launchpad.net/~ubuntu-mobile/+archive/ppa PPA for Ubuntu Mobile Team], slightly patched and re-organized.
+
* Graphic drivers are [http://edc.intel.com/Software/Downloads/IEGD/ Intel® Embedded Graphics Drivers].
{{Note|The current state of graphic drivers for GMA500 may be called ''alpha version''. They are not included in any official Linux distribution yet. There are still a couple of technical issues to be fixed.}}
+
* Intel® Embedded Graphics Drivers specifically target the needs of embedded platform developers. Please review this [http://edc.intel.com/Download.aspx?id=2387&returnurl=/Software/Downloads/IEGD/default.aspx Users Guide].
 +
*: {{Note|The current state of the IEGD drivers for GMA500 may be called ''alpha version''. They are not included in any official Linux distribution yet. There are still a few technical issues to be fixed. Known issues are listed below.}}
 +
* Known issues
 +
** System hangs when resuming from Suspend and Hibernate states.
  
== Mplayer ==
+
== MPlayer ==
The GMA500 graphic module provides support for hardware decoding of most popular video codecs. The well-known MPlayer media player is patched for this purpose and supports the following codecs:
+
The GMA500 graphic module provides support for the hardware decoding of the most popular video codecs. The well-known MPlayer media player is patched for this purpose and supports the following codecs:
 
* MPEG-2
 
* MPEG-2
 
* MPEG-4 ASP (DivX)
 
* MPEG-4 ASP (DivX)
Line 25: Line 34:
 
{{Note|Non-accelerated decoding is currently not supported with the vaapi renderer.}}
 
{{Note|Non-accelerated decoding is currently not supported with the vaapi renderer.}}
  
Please check out the [http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi official mplayer-vaapi page] for more info.
+
Please read the [http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi official mplayer-vaapi page] for more information.
 +
 
 
== GPIO’s ==
 
== GPIO’s ==
The SB-iAM board from Compulab contains 8 or 15 general purpose I/O pins (GPIO’s) depending on assembly configuration. The CM-iAM provides 8 general purpose I/O pins (GPIO’s) from the Poulsbo chipset, 7 of which are dedicated and one is shared with alternate functionality, with different power domain support.
+
The SB-iAM board from Compulab contains 8 or 15 general purpose I/O pins (GPIO’s) depending on the assembly configuration. The CM-iAM provides eight general purpose I/O pins (GPIO’s) from the Poulsbo chipset, seven are dedicated and one is shared with alternate functionality, with different power domain support.
 +
 
 +
Seven additional GPIO’s are available from the IT8761E super I/O chip when option S (SIO) is assembled.
  
Seven additional GPIO’s are available from IT8761E super I/O chip when option S (SIO) is assembled. The kernel driver supposes the following pin naming convention:
+
There are two kernel modules for proper GPIO`s usage: {{filename|sch_gpio}} and {{filename|it8761e_gpio}}. The kernel modules suppose the following pin naming convention:
  
  
Line 41: Line 53:
 
| Notes
 
| Notes
 
|-
 
|-
| GPIO0
+
| GPIO1
 
| Poulsbo
 
| Poulsbo
 
| GPIO1
 
| GPIO1
Line 47: Line 59:
 
|
 
|
 
|-
 
|-
| GPIO1
+
| GPIO2
 
| Poulsbo
 
| Poulsbo
| GPIO6
+
| GPIO2
| P50-4 and P50-33
+
| P50-5
 
|
 
|
 
|-
 
|-
| GPIO2
+
| GPIO6
 
| Poulsbo
 
| Poulsbo
| GPIO2
+
| GPIO6
| P50-5
+
| P50-4 and P50-33
 
|
 
|
 
|-
 
|-
| GPIO3
+
| GPIO8
 
| Poulsbo
 
| Poulsbo
 
| GPIO8
 
| GPIO8
Line 65: Line 77:
 
| shared with CM-iAM ON Led
 
| shared with CM-iAM ON Led
 
|-
 
|-
| GPIO4
+
| GPIO9
 
| Poulsbo
 
| Poulsbo
 
| GPIO9
 
| GPIO9
Line 71: Line 83:
 
|
 
|
 
|-
 
|-
| GPIO5
+
| GPIO10
 
| Poulsbo
 
| Poulsbo
 
| GPIO_SUS0
 
| GPIO_SUS0
Line 77: Line 89:
 
|
 
|
 
|-
 
|-
| GPIO6
+
| GPIO11
 
| Poulsbo
 
| Poulsbo
 
| GPIO_SUS1
 
| GPIO_SUS1
Line 83: Line 95:
 
|
 
|
 
|-
 
|-
| GPIO7
+
| GPIO13
 
| Poulsbo
 
| Poulsbo
 
| GPIO_SUS3
 
| GPIO_SUS3
Line 89: Line 101:
 
|
 
|
 
|-
 
|-
| GPIO8
+
| GPIO240
 
| SIO chip
 
| SIO chip
 
| SIO_GPIO10
 
| SIO_GPIO10
Line 95: Line 107:
 
|
 
|
 
|-
 
|-
| GPIO9
+
| GPIO241
 
| SIO chip
 
| SIO chip
 
| SIO_GPIO11
 
| SIO_GPIO11
Line 101: Line 113:
 
|
 
|
 
|-
 
|-
| GPIO10
+
| GPIO242
 
| SIO chip
 
| SIO chip
 
| SIO_GPIO12
 
| SIO_GPIO12
Line 107: Line 119:
 
|
 
|
 
|-
 
|-
| GPIO11
+
| GPIO243
 
| SIO chip
 
| SIO chip
 
| SIO_GPIO13
 
| SIO_GPIO13
Line 113: Line 125:
 
|
 
|
 
|-
 
|-
| GPIO12
+
| GPIO245
 
| SIO chip
 
| SIO chip
 
| SIO_GPIO15
 
| SIO_GPIO15
Line 119: Line 131:
 
|
 
|
 
|-
 
|-
| GPIO13
+
| GPIO246
 
| SIO chip
 
| SIO chip
 
| SIO_GPIO16
 
| SIO_GPIO16
Line 125: Line 137:
 
|
 
|
 
|-
 
|-
| GPIO14
+
| GPIO248
 
| SIO chip
 
| SIO chip
 
| SIO_GPIO20
 
| SIO_GPIO20
Line 133: Line 145:
  
  
The GPIO sysfs interface allows users to manipulate any GPIO from userspace (also known as programmable flags). Since it uses gpiolib, it is able to dynamically utilize all GPIO's on the system.
+
The GPIO sysfs interface allows users to manipulate any GPIO from userspace (also known as programmable flags). Since it uses gpiolib, all GPIO's on the system may be utilized dynamically.
  
Userspace utilizes a sysfs control interface to dynamically request and release individual GPIO's. Once a GPIO has been requested, writing to the newly created path allows you to control the direction and the data while reading from it returns the GPIO data (which usually corresponds to a 0 or 1 representing the signal level).
+
Userspace utilizes a sysfs control interface to dynamically request and release individual GPIO's. Once a GPIO has been requested, writing to the newly created path allows you to control the direction and the data, while reading from it returns the GPIO data (which usually corresponds to a 0 or 1 representing the signal level).
  
Basic example of GPIO usage:
+
A basic example of GPIO usage:
 
<pre>
 
<pre>
root@sb-iam:/ echo 3 > /sys/class/gpio/export
+
root@ubuntu-fitpc2:/ modprobe sch_gpio
root@sb-iam:/ echo out > /sys/class/gpio/gpio3/direction
+
root@ubuntu-fitpc2:/ echo 8 > /sys/class/gpio/export
root@sb-iam:/ echo 1 > /sys/class/gpio/gpio3/value
+
root@ubuntu-fitpc2:/ echo out > /sys/class/gpio/gpio8/direction
## at this point CM-iAM ON LED should be in off-state.
+
root@ubuntu-fitpc2:/ echo 1 > /sys/class/gpio/gpio8/value
root@sb-iam:/ echo 0 > /sys/class/gpio/gpio3/value
+
## at this point the CM-iAM ON LED should be in off-state.
## at this point CM-iAM ON LED should be in on-state again.
+
root@ubuntu-fitpc2:/ echo 0 > /sys/class/gpio/gpio8/value
root@sb-iam:/ echo 3 > /sys/class/gpio/unexport
+
## at this point the CM-iAM ON LED should be in on-state again.
 +
root@ubuntu-fitpc2:/ echo 8 > /sys/class/gpio/unexport
 
</pre>
 
</pre>
  
Line 151: Line 164:
  
 
== Watchdog ==
 
== Watchdog ==
The CM-iAM provides watchdog functionality. It is possible to enable a watchdog timer either from BIOS (F2) or from the running Linux. The CM-iAM watchdog has an operating range between 31 and 255 seconds. The range is defined by the "Watchdog Timer Value" in the BIOS or by a margin parameter of the watchdog driver. Entering BIOS setup temporarily disables watchdog operation regardless of the current state; therefore, the system will not be restarted during an interactive BIOS session. Once the watchdog has been enabled, the system will be restarted every "Watchdog Timer Value" period, unless watchdog timer is reset or disabled by the software. The driver can be loaded by the ''modprobe cm-iam-wdt'' command.
+
The CM-iAM provides watchdog functionality. It is possible to enable a watchdog timer either from {{cmd|BIOS [F2]}} or when running Linux. The CM-iAM watchdog has an operating range between 31 and 255 seconds. The range is defined by the "Watchdog Timer Value" in the BIOS or by a margin parameter of the watchdog driver. Entering the BIOS setup temporarily disables watchdog operation regardless of the current state; therefore, the system will not be restarted during an interactive BIOS session. Once the watchdog has been enabled, the system will be restarted every "Watchdog Timer Value" period, unless the watchdog timer is reset or disabled by software. The driver can be loaded by the {{cmd|modprobe sbc-fitpc2-wdt}} command.
  
Basic example of watchdog usage:
+
A basic example of watchdog usage:
 
<pre>
 
<pre>
 
#include <stdio.h>
 
#include <stdio.h>
Line 184: Line 197:
  
 
== Sound ==
 
== Sound ==
There are two sound cards available in the evaluation kit, one on the core module CM-iAM and another on the SB-iAM baseboard. Current Linux drivers allow only one of the two cards to be active at any given time. The ''/etc/modprobe.d/alsa-base.conf'' file is responsible for choosing which card will be active.
+
There are two sound cards available in the evaluation kit, one on the CM-iAM core module and another on the SB-iAM baseboard. Current Linux drivers allow only one of the two cards to be active at any given time. The ''/etc/modprobe.d/alsa-base.conf'' file specifies which card will be active.
* To use the CM-iAM sound card, add this line to ''/etc/modprobe.d/alsa-base.conf'':
+
* To use the CM-iAM sound card, add this line to {{filename|/etc/modprobe.d/alsa-base.conf}}:
 
<pre>
 
<pre>
options snd-hda-intel probe_mask=0x1 model=ref
+
options snd-hda-intel probe_mask=0x1
 
</pre>
 
</pre>
* To use the SB-iAM sound card, add this line to ''/etc/modprobe.d/alsa-base.conf'':
+
In this case, the out line is CORE-HOUT (P31) and the in line is CORE-LINE-IN (P29) 
 +
 
 +
* To use the SB-iAM sound card, add this line to {{filename|/etc/modprobe.d/alsa-base.conf}}:
 
<pre>
 
<pre>
options snd-hda-intel probe_mask=0x2 model=ref
+
options snd-hda-intel probe_mask=0x2
 
</pre>
 
</pre>
 
+
In this case, the out lines are BASE-HOUT-A (P23) and BASE-HOUT-B (P22) and the in line is LINE-IN-C (P21)
{{Note|Switching between sound cards requires a system reboot.}}
+
{{ Note | Switching between sound cards requires a system reboot.}}
{{Note|The sound capturing channel on each card is permanent -- it's impossible to choose the capturing source. The CM-iAM sound card takes input from CORE-LINE-IN (P29 connector), while the SB-iAM sound card takes input from BASE-LINE-IN-C (P21 connector).}}
+
{{ Note | Existing IDT sound drivers still have issues; for example, the sound capturing channel on each card is permanent -- it's impossible to select a capturing source.}}
  
 
== See also ==
 
== See also ==
Line 202: Line 217:
 
* [[Linux Kernel for CM-iAM]]
 
* [[Linux Kernel for CM-iAM]]
  
[[Category:Linux|Ubuntu]]
+
[[Category:Linux]]
[[Category:CM-IAM|Linux: Ubuntu]]
+
[[Category:CM-IAM]]

Revision as of 13:07, 4 May 2010

Overview

Ubuntu Linux for the CM-iAM is based on standard Ubuntu 9.10 Karmic Koala. The run-time image supplied contains a full-featured desktop filesystem. Network, sound and graphics should work out of the box.

Authorization info

  • username: fit
  • password: 111111

Customized kernel

  • Based on the 2.6.31 kernel with patches from Ubuntu and Compulab.
  • Supports most features present on the SB-iAM development board and CM-iAM module.
  • Described in more detail on the Linux kernel for CM-iAM page.

Package management

  • To be consistent with Ubuntu/Debian packaging standards, all custom packages provided by CompuLab reside in the trivial repository.
  • This repository contains binaries and sources for the kernel, graphic drivers, libraries, etc. You will receive all required updates automatically.
  • Please read more about working with a repository in Debian Repository HOWTO

Graphic support

  • Intel Poulsbo chipset using the GMA500 graphic module from PowerVR.
  • Graphic drivers are Intel® Embedded Graphics Drivers.
  • Intel® Embedded Graphics Drivers specifically target the needs of embedded platform developers. Please review this Users Guide.
Admolition note.png The current state of the IEGD drivers for GMA500 may be called alpha version. They are not included in any official Linux distribution yet. There are still a few technical issues to be fixed. Known issues are listed below.
  • Known issues
    • System hangs when resuming from Suspend and Hibernate states.

MPlayer

The GMA500 graphic module provides support for the hardware decoding of the most popular video codecs. The well-known MPlayer media player is patched for this purpose and supports the following codecs:

  • MPEG-2
  • MPEG-4 ASP (DivX)
  • H.263 (MPEG-4 short-video header variant)
  • MPEG-4 AVC (H.264)
  • Windows Media Video 9 (WMV3)
  • Windows Media Video 9 Advanced (VC-1 Advanced profile)
Admolition note.png Non-accelerated decoding is currently not supported with the vaapi renderer.

Please read the official mplayer-vaapi page for more information.

GPIO’s

The SB-iAM board from Compulab contains 8 or 15 general purpose I/O pins (GPIO’s) depending on the assembly configuration. The CM-iAM provides eight general purpose I/O pins (GPIO’s) from the Poulsbo chipset, seven are dedicated and one is shared with alternate functionality, with different power domain support.

Seven additional GPIO’s are available from the IT8761E super I/O chip when option S (SIO) is assembled.

There are two kernel modules for proper GPIO`s usage: sch_gpio and it8761e_gpio. The kernel modules suppose the following pin naming convention:


GPIO’s pin naming convention on SB-iAM
GPIO name HW source Name on SB-iAM board Pin on SB-iAM board Notes
GPIO1 Poulsbo GPIO1 P50-1
GPIO2 Poulsbo GPIO2 P50-5
GPIO6 Poulsbo GPIO6 P50-4 and P50-33
GPIO8 Poulsbo GPIO8 P50-6 shared with CM-iAM ON Led
GPIO9 Poulsbo GPIO9 P50-10
GPIO10 Poulsbo GPIO_SUS0 P50-13
GPIO11 Poulsbo GPIO_SUS1 P50-15
GPIO13 Poulsbo GPIO_SUS3 P50-17
GPIO240 SIO chip SIO_GPIO10 P50-7
GPIO241 SIO chip SIO_GPIO11 P50-9
GPIO242 SIO chip SIO_GPIO12 P50-20
GPIO243 SIO chip SIO_GPIO13 P50-11
GPIO245 SIO chip SIO_GPIO15 P50-14
GPIO246 SIO chip SIO_GPIO16 P50-16
GPIO248 SIO chip SIO_GPIO20 P50-18


The GPIO sysfs interface allows users to manipulate any GPIO from userspace (also known as programmable flags). Since it uses gpiolib, all GPIO's on the system may be utilized dynamically.

Userspace utilizes a sysfs control interface to dynamically request and release individual GPIO's. Once a GPIO has been requested, writing to the newly created path allows you to control the direction and the data, while reading from it returns the GPIO data (which usually corresponds to a 0 or 1 representing the signal level).

A basic example of GPIO usage:

root@ubuntu-fitpc2:/ modprobe sch_gpio
root@ubuntu-fitpc2:/ echo 8 > /sys/class/gpio/export
root@ubuntu-fitpc2:/ echo out > /sys/class/gpio/gpio8/direction
root@ubuntu-fitpc2:/ echo 1 > /sys/class/gpio/gpio8/value
## at this point the CM-iAM ON LED should be in off-state.
root@ubuntu-fitpc2:/ echo 0 > /sys/class/gpio/gpio8/value
## at this point the CM-iAM ON LED should be in on-state again.
root@ubuntu-fitpc2:/ echo 8 > /sys/class/gpio/unexport

The GPIO framework and GPIO sysfs interface are both documented in Linux Kernel Documentation :: GPIO

Watchdog

The CM-iAM provides watchdog functionality. It is possible to enable a watchdog timer either from BIOS [F2] or when running Linux. The CM-iAM watchdog has an operating range between 31 and 255 seconds. The range is defined by the "Watchdog Timer Value" in the BIOS or by a margin parameter of the watchdog driver. Entering the BIOS setup temporarily disables watchdog operation regardless of the current state; therefore, the system will not be restarted during an interactive BIOS session. Once the watchdog has been enabled, the system will be restarted every "Watchdog Timer Value" period, unless the watchdog timer is reset or disabled by software. The driver can be loaded by the modprobe sbc-fitpc2-wdt command.

A basic example of watchdog usage:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

int main(void)
{
	int fd = open("/dev/watchdog", O_WRONLY);
	int ret = 0;
	if (fd == -1) {
		perror("watchdog");
		exit(EXIT_FAILURE);
	}
	while (1) {
		ret = write(fd, "\0", 1);
		if (ret != 1) {
			ret = -1;
			break;
		}
		sleep(10);
	}
	close(fd);
	return ret;
}

The watchdog interface in Linux is documented in Linux Kernel Documentation :: Watchdog

Sound

There are two sound cards available in the evaluation kit, one on the CM-iAM core module and another on the SB-iAM baseboard. Current Linux drivers allow only one of the two cards to be active at any given time. The /etc/modprobe.d/alsa-base.conf file specifies which card will be active.

  • To use the CM-iAM sound card, add this line to /etc/modprobe.d/alsa-base.conf:
options snd-hda-intel probe_mask=0x1

In this case, the out line is CORE-HOUT (P31) and the in line is CORE-LINE-IN (P29)

  • To use the SB-iAM sound card, add this line to /etc/modprobe.d/alsa-base.conf:
options snd-hda-intel probe_mask=0x2

In this case, the out lines are BASE-HOUT-A (P23) and BASE-HOUT-B (P22) and the in line is LINE-IN-C (P21)

Admolition note.png Switching between sound cards requires a system reboot.
Admolition note.png Existing IDT sound drivers still have issues; for example, the sound capturing channel on each card is permanent -- it's impossible to select a capturing source.

See also