<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wikilegacy.armadeus.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JulienB</id>
	<title>ArmadeusWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wikilegacy.armadeus.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JulienB"/>
	<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Special:Contributions/JulienB"/>
	<updated>2026-04-27T19:56:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=CAN_bus_Linux_driver&amp;diff=15299</id>
		<title>CAN bus Linux driver</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=CAN_bus_Linux_driver&amp;diff=15299"/>
		<updated>2026-03-26T14:26:05Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Quick test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current CAN bus driver uses SocketCAN API which is now the official CAN API for Linux.&lt;br /&gt;
SocketCAN is based on the Linux socket. Further details can be found on the links at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Please ensure that you use a recent version of armadeus BSP (kernel version more than 2.6.38 is required) before trying the instructions described on this page! With older kernel versions you may not be able to change the bitrate.}}&lt;br /&gt;
&lt;br /&gt;
==Driver installation==&lt;br /&gt;
* Nothing has to be done for the [[APF51Dev]], the [[APF28Dev]], [[APF6Dev]] and the [[OPOS6ULDev]].&lt;br /&gt;
* For the [[APF27Dev|APF27DevFull]]:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Networking support  ---&amp;gt;&lt;br /&gt;
    &amp;lt;M&amp;gt;   CAN bus subsystem support ---&amp;gt; &lt;br /&gt;
        --- CAN bus subsystem support&lt;br /&gt;
        &amp;lt;M&amp;gt;   Raw CAN Protocol (raw access with CAN-ID filtering)&lt;br /&gt;
        &amp;lt;M&amp;gt;   Broadcast Manager CAN Protocol (with content filtering)&lt;br /&gt;
              CAN Device Drivers  ---&amp;gt;&lt;br /&gt;
                  &amp;lt;M&amp;gt; Virtual Local CAN Interface (vcan)&lt;br /&gt;
                  &amp;lt;M&amp;gt; Platform CAN drivers with Netlink support&lt;br /&gt;
                  [*]   CAN bit-timing calculation   &lt;br /&gt;
                  &amp;lt;M&amp;gt; Microchip 251x series SPI CAN Controller&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make linux&lt;br /&gt;
 $ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Reflash kernel and rootfs&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
* Load all the required drivers (not needed on [[OPOS6UL]]):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe can&lt;br /&gt;
# modprobe can-dev&lt;br /&gt;
# modprobe can-raw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;CAN bus modules depending on board&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 &amp;amp; APF51 || APF6&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mcp251x          &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe flexcan         &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
* Set the bitrate before all operations&lt;br /&gt;
Example:&lt;br /&gt;
Set the bitrate of the can0 interface to 125kbps:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ip link set can0 up type can bitrate 125000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| An error occurs when you try to set the bitrate with an old Linux kernel. In that case, &#039;&#039;echo 125000 &amp;gt; /sys/devices/platform/FlexCAN.0/bitrate&#039;&#039; was reported to be a good alternative.}}&lt;br /&gt;
&lt;br /&gt;
* If the following error occurs when you do the last instruction :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ip: either &amp;quot;dev&amp;quot; is duplicate, or &amp;quot;type&amp;quot; is garbage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
check that this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# which ip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
return this message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
/sbin/ip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and not this one :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
/bin/ip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the binary is installed in &#039;&#039;/bin&#039;&#039; instead of &#039;&#039;/sbin&#039;&#039;, the executable file is a link to busybox and the command to set the bitrate doesn&#039;t work on busybox, so try the following instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make busybox-clean&lt;br /&gt;
$ make busybox-dirclean&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking applications  ---&amp;gt;&lt;br /&gt;
        [*] iproute2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, reflash your rootfs.&lt;br /&gt;
&lt;br /&gt;
==Quick test==&lt;br /&gt;
* Once the driver is installed and the bitrate is set, the CAN interface has to be started like a standard net interface (be sure to have previously setup bitrate cf above):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # ifconfig can0 up   or   ip link set can0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* and can be stopped like that:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # ifconfig can0 down   or   ip link set can0 down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The socketCAN version can be retrieved this way:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # cat /proc/net/can/version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The socketCAN statistics can be retrieved this way:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # cat /proc/net/can/stats&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Userspace tools==&lt;br /&gt;
Several tools are provided by socketCAN:&lt;br /&gt;
*&#039;&#039;&#039;candump&#039;&#039;&#039;: dump traffic on a CAN network&lt;br /&gt;
The following command shows the received message from the CAN bus&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
candump can0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;cansend&#039;&#039;&#039;: simple command line tool to send CAN-frames via CAN_RAW sockets &lt;br /&gt;
exemple :&lt;br /&gt;
The following command sends 3 bytes on the bus (0x1E, 0x10, 0x10) with the identifier 500.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
cansend can0 500#1E.10.10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can send a remote request message&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
cansend can0 500#R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The information with the identifier 500 will be available on the bus when the device receive the remote request message&lt;br /&gt;
*&#039;&#039;&#039;cangen&#039;&#039;&#039;: CAN frames generator for testing purpose&lt;br /&gt;
*&#039;&#039;&#039;canplayer&#039;&#039;&#039;: send CAN frames from a file to a CAN interface&lt;br /&gt;
&lt;br /&gt;
These tools can be compiled and installed on the target by means of the Buildroot menuconfig:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking  ---&amp;gt;&lt;br /&gt;
        [*]   Socket CAN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, reflash your rootfs.&lt;br /&gt;
&lt;br /&gt;
==Automatically launch CAN interface at startup==&lt;br /&gt;
* Add the following lines to &#039;&#039;/etc/network/interfaces&#039;&#039; configuration file:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;APF&amp;quot;&amp;gt;&lt;br /&gt;
auto can0&lt;br /&gt;
iface can0 inet manual&lt;br /&gt;
        pre-up /sbin/ip link set $IFACE type can bitrate 125000 on&lt;br /&gt;
        up /sbin/ifconfig $IFACE up&lt;br /&gt;
        down /sbin/ifconfig $IFACE down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* https://www.ridgerun.com/developer/wiki/index.php/How_to_configure_and_use_CAN_bus (How to configure and use CAN bus)&lt;br /&gt;
* http://developer.berlios.de/projects/socketcan/ (CAN Linux Driver)&lt;br /&gt;
* http://ww1.microchip.com/downloads/en/DeviceDoc/21801e.pdf (MCP2515 datasheet)&lt;br /&gt;
* http://www.kvaser.com/can/protocol/index.htm (CAN introduction)&lt;br /&gt;
* [[User:KevinJ#Communication_with_the_CAN_Bus_of_a_car|Communication with a car&#039;s CAN bus]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux drivers]]&lt;br /&gt;
[[Category:CAN bus]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=OPOS91&amp;diff=15298</id>
		<title>OPOS91</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=OPOS91&amp;diff=15298"/>
		<updated>2026-02-06T15:32:41Z</updated>

		<summary type="html">&lt;p&gt;JulienB: Created page with &amp;quot;Category: OPOS91  {{Under_Construction}}  ==Description==  The [https://www.opossom.com/english/product-opos91/index.html OPOS91] is a high-end [https://en.wikipedia.org/wiki/Single-board_computer Single Board Computer] targeted for advanced GUI and extended connectivity at low price.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: OPOS91]]&lt;br /&gt;
&lt;br /&gt;
{{Under_Construction}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The [https://www.opossom.com/english/product-opos91/index.html OPOS91] is a high-end [https://en.wikipedia.org/wiki/Single-board_computer Single Board Computer] targeted for advanced GUI and extended connectivity at low price.&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15297</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15297"/>
		<updated>2026-02-02T12:07:05Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Driver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
|-|APF27=&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
|-|APF6=&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
|-|OPOS93=&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
|-|APF27=&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-|APF6=&lt;br /&gt;
*  for kernel 3.19+ :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-|OPOS93=&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# vi setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
#  chmod +x setCam.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15296</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15296"/>
		<updated>2026-02-02T12:05:08Z</updated>

		<summary type="html">&lt;p&gt;JulienB: Tabs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
|-|APF27=&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
|-|APF6=&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
|-|OPOS93=&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-|APF27=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-|APF6 (kernel 3.19+)=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-|OPOS93=&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# vi setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
#  chmod +x setCam.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15295</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15295"/>
		<updated>2026-02-02T11:59:25Z</updated>

		<summary type="html">&lt;p&gt;JulienB: Tabs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
|-|APF27=&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
|-|APF6=&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
|-|OPOS93=&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;Camera drivers&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 || APF6 (kernel 3.19+)&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# vi setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
#  chmod +x setCam.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Test_Mermaid&amp;diff=15294</id>
		<title>Test Mermaid</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Test_Mermaid&amp;diff=15294"/>
		<updated>2026-01-30T17:36:19Z</updated>

		<summary type="html">&lt;p&gt;JulienB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Should see something below:&lt;br /&gt;
&lt;br /&gt;
{{#mermaid:sequenceDiagram&lt;br /&gt;
participant Alice&lt;br /&gt;
participant Bob&lt;br /&gt;
  Alice-&amp;gt;John: Hello John, how are you?&lt;br /&gt;
  loop Healthcheck&lt;br /&gt;
       John-&amp;gt;John: Fight against hypochondria&lt;br /&gt;
  end&lt;br /&gt;
  Note right of John: Rational thoughts &amp;lt;br/&amp;gt;prevail...&lt;br /&gt;
    John--&amp;gt;Alice: Great!&lt;br /&gt;
    John-&amp;gt;Bob: How about you?&lt;br /&gt;
    Bob--&amp;gt;John: Jolly good!&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Test_Mermaid&amp;diff=15293</id>
		<title>Test Mermaid</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Test_Mermaid&amp;diff=15293"/>
		<updated>2026-01-30T17:33:20Z</updated>

		<summary type="html">&lt;p&gt;JulienB: Created page with &amp;quot;{{#mermaid:sequenceDiagram participant Alice participant Bob   Alice-&amp;gt;John: Hello John, how are you?   loop Healthcheck        John-&amp;gt;John: Fight against hypochondria   end   Note right of John: Rational thoughts &amp;lt;br/&amp;gt;prevail...     John--&amp;gt;Alice: Great!     John-&amp;gt;Bob: How about you?     Bob--&amp;gt;John: Jolly good! }}&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#mermaid:sequenceDiagram&lt;br /&gt;
participant Alice&lt;br /&gt;
participant Bob&lt;br /&gt;
  Alice-&amp;gt;John: Hello John, how are you?&lt;br /&gt;
  loop Healthcheck&lt;br /&gt;
       John-&amp;gt;John: Fight against hypochondria&lt;br /&gt;
  end&lt;br /&gt;
  Note right of John: Rational thoughts &amp;lt;br/&amp;gt;prevail...&lt;br /&gt;
    John--&amp;gt;Alice: Great!&lt;br /&gt;
    John-&amp;gt;Bob: How about you?&lt;br /&gt;
    Bob--&amp;gt;John: Jolly good!&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15290</id>
		<title>LinuxInstall</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15290"/>
		<updated>2026-01-30T16:56:51Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Prerequisites for Linux installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;How-To install Armadeus Software Development Kit (SDK) on Linux systems. This SDK is currently based on the (excellent) [http://buildroot.net/ Buildroot].&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation was successfully tested on the following distributions:&lt;br /&gt;
* Debian Lenny (5.0),  Squeeze (6.0.x), Wheezy (7.2), Jessie (8.0)&lt;br /&gt;
* X/KUbuntu Edgy Eft (6.10), Gutsy Gibbon (7.10), Hardy Heron (8.04) &amp;amp; Jaunty Jackalope (9.04)&lt;br /&gt;
* Ubuntu  Lucid Lynx (10.04) (32 &amp;amp; 64bits), 12.04 LTS (32 &amp;amp; 64bits), 13.10 (32 &amp;amp; 64bits), 14.04, 15.04 &amp;amp; 16.04&lt;br /&gt;
* LUbuntu 17.10&lt;br /&gt;
* Mandriva 2006&lt;br /&gt;
* Fedora Core 3 &amp;amp; 4, Fedora 10, Laughlin (14)&lt;br /&gt;
* Red Hat Enterprise 5.2&lt;br /&gt;
* Gentoo 10.0 (32 &amp;amp; 64 bits)&lt;br /&gt;
* SuSE 10.1, OpenSUSE 11.3 - 12.3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The installation may fail on:&#039;&#039;&#039;&lt;br /&gt;
* Ubuntu Karmic Koala (9.10): tslib fails to build&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;APF28 requirements:&#039;&#039;&#039;&lt;br /&gt;
* APF28 board requires a Linux distribution with (GNU) tar version 1.20 or later to compile the Linux Kernel - Please update or upgrade your Linux distribution. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites for Linux installation==&lt;br /&gt;
{{Note|From here we assume that your Linux system has a &#039;&#039;make&#039;&#039; version &#039;&#039;&#039;greater or equal to&#039;&#039;&#039; 3.81. To check it: &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make -v&lt;br /&gt;
GNU Make 3.81&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
For armadeus up to 3.4, make should be &#039;&#039;&#039;strictly&#039;&#039;&#039; make-3.81 (make-3.82 is too strict). A Fedora (14 and 15) -specific solution can be found later; other recent distributions such as mageia1 also have make-3.82, and a generic solution, based on configure&amp;amp;&amp;amp; make&amp;amp;&amp;amp; sudo make install can be used to install make-3.81 (which can be retrieved from http://ftp.gnu.org/gnu/make/make-6.81.tar.gz) in /usr/local/bin (and , according to one&#039;s PATH, make 3-81 can be invoked directly or as /usr/local/bin/make). &lt;br /&gt;
 &lt;br /&gt;
Depending on your distribution, some additional packages are required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
|-|Debian/Ubuntu based systems=&lt;br /&gt;
[[Ubuntu/Debian installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
|-|Mandriva based systems=&lt;br /&gt;
[[Mandriva installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
|-|RPM-based systems (RedHat, Fedora, CentOS)=&lt;br /&gt;
[[RedHat/Fedora installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
|-|OpenSuse based systems=&lt;br /&gt;
[[OpenSuse installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
|-|Gentoo based systems=&lt;br /&gt;
[[Gentoo installation prerequisites]]&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Get Armadeus software==&lt;br /&gt;
* &#039;&#039;&#039;If you are a &amp;quot;careful&amp;quot; user&#039;&#039;&#039;, then download [https://gitlab.com/armadeus/armadeus-bsp/-/tags the latest stable installation tarball from gitlab] and detar it wherever you want:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ tar xjvf armadeus-7.0.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;If you want the latest snapshot or if you have a recent SOM ([[OPOS6UL]]/[[OPOS8MM]])&#039;&#039;&#039;, the whole development tree can be checked out from our [[GIT]] repository.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
   or if you don&#039;t have a gitlab account:&lt;br /&gt;
 $ git clone https://gitlab.com/armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* depending on your previous choice, a directory named &#039;&#039;armadeus/&#039;&#039; or &#039;&#039;armadeus-7.0/&#039;&#039; will be created on your hard-disk and will contain all the files you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;&#039;Do not use spaces&#039;&#039;&#039; in the directory name !&lt;br /&gt;
* &#039;&#039;&#039;Do not use a directory path beginning with /usr.&#039;&#039;&#039; It is a known bug of Buildroot (until BR2012.11, at 2012-12).&lt;br /&gt;
* GIT write/push accesses are limited to the integrators ([[User:JulienB|JulienB]], [[User:SebastienSz|SebastienSz]], [[User:Jorasse|Jorasse]], [[User:FabienM|FabienM]], [[User:SebastienR|SebastienR]])&lt;br /&gt;
&lt;br /&gt;
==Configure SDK/BSP options==&lt;br /&gt;
{{Note|If you are new to Armadeus and have troubles compiling armadeus-5.x/armadeus-6.x using the following instructions, you may find some hints here: [[Releases]]}}&lt;br /&gt;
*Go to the directory where you put the Armadeus sources:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd armadeus/  (or armadeus-7.0/)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*The first time you compile an Armadeus distribution you have to specify the target (here the [[APF9328]]) to work with. &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make apf9328_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command reloads the default configuration to support your target and automatically start a Buildroot&#039;s configuration menu.&lt;br /&gt;
&lt;br /&gt;
* Current valid default configurations are:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
apf9328_defconfig  apf27_defconfig  pps_defconfig  apf28_defconfig  apf51_defconfig  pps51_defconfig apf6_defconfig apf6legacy_defconfig opos6ul_defconfig opos6ulnano_defconfig opos6ulsp_defconfig opos8mm-legacy-5.10_defconfig opos93-legacy-6.1_defconfig opos93sp-legacy-6.1_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note| To get the full list of available config just type make, it will download buildroot and print following message :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
[...]&lt;br /&gt;
 System not configured. Use make &amp;lt;board&amp;gt;_defconfig &lt;br /&gt;
 armadeus valid configurations are:                &lt;br /&gt;
     opos6ul_legacy_defconfig opos6ulnano-preempt-rt_defconfig apf6_defconfig pps_defconfig opos6ultest_defconfig apf51_defconfig opos6ulsp_defconfig apf6dawnsmalllinux_defconfig apf27preempt-rt_defconfig apf27test_defconfig apf27_defconfig apf28legacytest_defconfig opos6ullegacy-4.14_defconfig opos6ulnano_defconfig apf28legacy_defconfig apf6mainline-4.19_defconfig opos6ul_defconfig apf6legacy_defconfig apf6xenomai_defconfig apf51test_defconfig opos6ul-preempt-rt_defconfig apf6legacy-preempt-rt_defconfig apf6legacy-4.1_defconfig pps51_defconfig apf6mainline-4.9_defconfig apf28test_defconfig apf28_defconfig apf6mediacenter_defconfig opos6ullegacy-4.9_defconfig opos6ul_recovery_defconfig apf6failsafe_defconfig apf6test_defconfig opos6ullegacy-4.1_defconfig apf27xenomai_defconfig&lt;br /&gt;
                                                   &lt;br /&gt;
Makefile:129: recipe for target &#039;/usr/local/projects/apf6_sp_419/buildroot/.configured&#039; failed&lt;br /&gt;
make: *** [/usr/local/projects/apf6_sp_419/buildroot/.configured] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For PPS boards, please see [[APF27_PPS]] or [[PPS51]] Wiki pages, as these boards have specific build.&lt;br /&gt;
&lt;br /&gt;
* After some downloads, you will get the Buildroot configuration interface:&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ever made changes during the following steps, at any time, you can reload the default configuration with:&lt;br /&gt;
 $ make xxx_defconfig       (xxx depending on your module name)}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Menuconfig3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
*If you are not familiar with Buildroot here are some tips:&lt;br /&gt;
*# you can move the highlighted item with the &amp;quot;up&amp;quot;/&amp;quot;down&amp;quot; arrow keys&lt;br /&gt;
*# with the &amp;quot;left&amp;quot;/&amp;quot;right&amp;quot; arrow keys you can choose between &amp;quot;Select&amp;quot;, &amp;quot;Exit&amp;quot; or &amp;quot;Help&amp;quot; buttons&lt;br /&gt;
*# &amp;quot;space&amp;quot;/&amp;quot;enter&amp;quot;:&lt;br /&gt;
*#* selects the currently highlighted item if you are on the &amp;quot;Select&amp;quot; button&lt;br /&gt;
*#* go back in previous menu if you are on &amp;quot;Exit&amp;quot; button&lt;br /&gt;
*#* show you some Help for current item if you are on &amp;quot;Help&amp;quot; button&lt;br /&gt;
*# for more Help about Buildroot commands, select &amp;quot;Help&amp;quot; in the main configuration screen&lt;br /&gt;
&lt;br /&gt;
* Update the memory configuration of your board (&#039;&#039;&#039;if needed&#039;&#039;&#039;; by default BSP is configured for the minimal memory configuration available on the corresponding board):&lt;br /&gt;
&lt;br /&gt;
:In menu:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;System configuration  ---&amp;gt;    [*] Armadeus Device Support  ---&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:you can check and change the quantity of RAM available on your Armadeus board:&lt;br /&gt;
:[[Image:Build_config_memory.png]]&lt;br /&gt;
:For [[APF9328]] the memory can be either 16 or 32MiB (be sure to select 1 RAM chip)&lt;br /&gt;
:For [[APF27]] it could be either 64MiB or 128MiB (2 x 64MiB) (in that case be sure to select 2 chips of 64MiB instead of 1 chip of 128MiB).&lt;br /&gt;
:For [[APF51]] it could be either 256MiB or 512MiB (2x256MiB) (in such case be sure to select 2 chips of 256MiB instead of 1 chip of 512).&lt;br /&gt;
:For [[APF28]] The memory can be 128, 256, 512 or 1024MiB (be sure to select 1 RAM chip).&lt;br /&gt;
:For [[APF6]]/[[APF6SP]] The memory can be 512 Mbytes or 1Gbytes with ram chip size of 512Mbytes.&lt;br /&gt;
:For [[OPOS6UL]]/[[OPOS6UL_NANO]] The memory size is automatically detected so you don&#039;t care ;-)&lt;br /&gt;
&lt;br /&gt;
* You may decrease the compilation time by increasing the number of parallel jobs running simultaneously on your system (the result is not guaranteed). This option is located in:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build Options ---&amp;gt;    (0) Number of jobs to run simultaneously&amp;lt;/pre&amp;gt;&lt;br /&gt;
0 means that Buildroot will try to guess automatically how much parallel jobs it can launch.&lt;br /&gt;
&lt;br /&gt;
* During the SDK/BSP build, a lot of software archives are downloaded from Internet. The downloaded files are put by default in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. &#039;&#039;&#039;If you have several views or plan to build the toolchain several times&#039;&#039;&#039;, we advise you to put all the downloaded files in &#039;&#039;/local/downloads&#039;&#039; (for example). This is done by configuring Buildroot to use this directory for all your views. Nevertheless, Buildroot will be downloaded separately for each build environment you set up.&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build options  ---&amp;gt;    (...) Download dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
:[[Image:Build_config_download.png]]&lt;br /&gt;
{{Note|Of course, &#039;&#039;/local/downloads&#039;&#039; should exists on your system and you should have writing rights on it !}}&lt;br /&gt;
* In recent Buildroot you can also use the following method:&lt;br /&gt;
 export BR2_DL_DIR=/local/downloads&lt;br /&gt;
&lt;br /&gt;
* After the build, we advise you to copy all the files in &#039;&#039;downloads/&#039;&#039; / &#039;&#039;/local/downloads&#039;&#039; on a removable medium, in case you want to install the development tools on other systems, without to have to reload all the archives.&lt;br /&gt;
&lt;br /&gt;
* Now, Exit the configuration tool and save your configuration&lt;br /&gt;
&lt;br /&gt;
* You can come back to this configuration menu, by typing (your changes will be kept): &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launch build==&lt;br /&gt;
 $ make&lt;br /&gt;
The toolchain and the full distribution are automatically built. During this procedure, several files are downloaded from Internet. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please wait for a while.... it takes at least one hour for the first run!&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
By default, the downloaded files/tarball are put in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. Please see the previous chapter to know how to optimize that if you plan to build several views or want to build faster.&lt;br /&gt;
&lt;br /&gt;
==Enjoy the result==&lt;br /&gt;
The generated binary files can be found in the subdirectory &#039;&#039;buildroot/output/images&#039;&#039;:&lt;br /&gt;
*&#039;&#039;apf9328-u-boot.brec&#039;&#039; (only on [[APF9328]]): BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working (see [[BootLoader]] page)&lt;br /&gt;
*&#039;&#039;xxx-u-boot.bin&#039;&#039;: U-Boot image file to be used with U-Boot itself, (see [[BootLoader#Update_U-Boot | updating U-Boot]])&lt;br /&gt;
*&#039;&#039;xxx-linux.bin&#039;&#039;: Linux image to use with U-Boot, (see [[Target_Software_Installation#Linux_kernel_installation | updating Linux]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.jffs2&#039;&#039;: JFFS2 filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ubi&#039;&#039; (not supported on [[APF9328]]): [[UBIFS|UBI]] filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ext4&#039;&#039;: EXT4 filesystem/rootfs image to use with U-Boot, (on [[APF6]] and [[OPOS6UL]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.tar&#039;&#039;: for an NFS/MMC based rootfs, (see [[Network_Configuration#Boot_from_NFS | Booting from NFS]] &amp;amp; [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note the new naming convention of binary files and directories (since Armadeus 4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;buildroot/output/build&#039;&#039;: contains all the build results for target root filesystem, Linux, Busybox and U-Boot...&lt;br /&gt;
*&#039;&#039;buildroot/output/toolchain/&#039;&#039;: cross compilation toolchain&#039;s build dir. Binaries usable for cross-compilation are in &#039;&#039;buildroot/output/host/usr/bin&#039;&#039;.&lt;br /&gt;
*&#039;&#039;buildroot/output/target/&#039;&#039;: target filessytem before generating rootfs images&lt;br /&gt;
&lt;br /&gt;
More information is available in the  [http://buildroot.uclibc.org/buildroot.html Buildroot&#039;s documentation]&lt;br /&gt;
&lt;br /&gt;
* Note: Previous versions (3.x) of Armadeus SDK stored the generated binary files at a different place: &#039;&#039; &#039;&#039;buildroot/binaries/XX/&#039;&#039; (where XX was the name of your board).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You then copy the binary image to your server directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==To keep your local copy/repository up-to-date with the armadeus GIT repository==&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will update your working directory to the latest release.&lt;br /&gt;
&lt;br /&gt;
Note: if &amp;quot;git pull&amp;quot; fails because a directory or a file already exists, then do:&lt;br /&gt;
 $ rm -rf &amp;lt;this-directory/file&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&lt;br /&gt;
You can do a:&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
to have the latest features automatically activated.&lt;br /&gt;
&lt;br /&gt;
You have to do a &#039;&#039;&#039;make&#039;&#039;&#039; to rebuild binary files and then upload the binary files to your target.&lt;br /&gt;
&lt;br /&gt;
Note: if definitively everything goes wrong while it worked before the last update.&lt;br /&gt;
You can apply the following procedure (all your modifications in buildroot will be lost):&lt;br /&gt;
 $ rm -rf buildroot/&lt;br /&gt;
 $ rm Makefile&lt;br /&gt;
 $ git pull&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15289</id>
		<title>LinuxInstall</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15289"/>
		<updated>2026-01-30T16:54:41Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Prerequisites for Linux installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;How-To install Armadeus Software Development Kit (SDK) on Linux systems. This SDK is currently based on the (excellent) [http://buildroot.net/ Buildroot].&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation was successfully tested on the following distributions:&lt;br /&gt;
* Debian Lenny (5.0),  Squeeze (6.0.x), Wheezy (7.2), Jessie (8.0)&lt;br /&gt;
* X/KUbuntu Edgy Eft (6.10), Gutsy Gibbon (7.10), Hardy Heron (8.04) &amp;amp; Jaunty Jackalope (9.04)&lt;br /&gt;
* Ubuntu  Lucid Lynx (10.04) (32 &amp;amp; 64bits), 12.04 LTS (32 &amp;amp; 64bits), 13.10 (32 &amp;amp; 64bits), 14.04, 15.04 &amp;amp; 16.04&lt;br /&gt;
* LUbuntu 17.10&lt;br /&gt;
* Mandriva 2006&lt;br /&gt;
* Fedora Core 3 &amp;amp; 4, Fedora 10, Laughlin (14)&lt;br /&gt;
* Red Hat Enterprise 5.2&lt;br /&gt;
* Gentoo 10.0 (32 &amp;amp; 64 bits)&lt;br /&gt;
* SuSE 10.1, OpenSUSE 11.3 - 12.3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The installation may fail on:&#039;&#039;&#039;&lt;br /&gt;
* Ubuntu Karmic Koala (9.10): tslib fails to build&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;APF28 requirements:&#039;&#039;&#039;&lt;br /&gt;
* APF28 board requires a Linux distribution with (GNU) tar version 1.20 or later to compile the Linux Kernel - Please update or upgrade your Linux distribution. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites for Linux installation==&lt;br /&gt;
{{Note|From here we assume that your Linux system has a &#039;&#039;make&#039;&#039; version &#039;&#039;&#039;greater or equal to&#039;&#039;&#039; 3.81. To check it: &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make -v&lt;br /&gt;
GNU Make 3.81&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
For armadeus up to 3.4, make should be &#039;&#039;&#039;strictly&#039;&#039;&#039; make-3.81 (make-3.82 is too strict). A Fedora (14 and 15) -specific solution can be found later; other recent distributions such as mageia1 also have make-3.82, and a generic solution, based on configure&amp;amp;&amp;amp; make&amp;amp;&amp;amp; sudo make install can be used to install make-3.81 (which can be retrieved from http://ftp.gnu.org/gnu/make/make-6.81.tar.gz) in /usr/local/bin (and , according to one&#039;s PATH, make 3-81 can be invoked directly or as /usr/local/bin/make). &lt;br /&gt;
 &lt;br /&gt;
Depending on your distribution, some additional packages are required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
|-|Debian=&lt;br /&gt;
===Debian/Ubuntu based systems===&lt;br /&gt;
[[Ubuntu/Debian installation prerequisites]]&lt;br /&gt;
|-|Mandriva=&lt;br /&gt;
===Mandriva based systems=== &lt;br /&gt;
[[Mandriva installation prerequisites]]&lt;br /&gt;
|-|RPM=&lt;br /&gt;
===RPM-based systems (RedHat, Fedora, CentOS)===&lt;br /&gt;
[[RedHat/Fedora installation prerequisites]]&lt;br /&gt;
|-|Suse=&lt;br /&gt;
===OpenSuse based systems===&lt;br /&gt;
[[OpenSuse installation prerequisites]]&lt;br /&gt;
|-|Gentoon=&lt;br /&gt;
===Gentoo based systems===&lt;br /&gt;
[[Gentoo installation prerequisites]]&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Get Armadeus software==&lt;br /&gt;
* &#039;&#039;&#039;If you are a &amp;quot;careful&amp;quot; user&#039;&#039;&#039;, then download [https://gitlab.com/armadeus/armadeus-bsp/-/tags the latest stable installation tarball from gitlab] and detar it wherever you want:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ tar xjvf armadeus-7.0.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;If you want the latest snapshot or if you have a recent SOM ([[OPOS6UL]]/[[OPOS8MM]])&#039;&#039;&#039;, the whole development tree can be checked out from our [[GIT]] repository.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
   or if you don&#039;t have a gitlab account:&lt;br /&gt;
 $ git clone https://gitlab.com/armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* depending on your previous choice, a directory named &#039;&#039;armadeus/&#039;&#039; or &#039;&#039;armadeus-7.0/&#039;&#039; will be created on your hard-disk and will contain all the files you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;&#039;Do not use spaces&#039;&#039;&#039; in the directory name !&lt;br /&gt;
* &#039;&#039;&#039;Do not use a directory path beginning with /usr.&#039;&#039;&#039; It is a known bug of Buildroot (until BR2012.11, at 2012-12).&lt;br /&gt;
* GIT write/push accesses are limited to the integrators ([[User:JulienB|JulienB]], [[User:SebastienSz|SebastienSz]], [[User:Jorasse|Jorasse]], [[User:FabienM|FabienM]], [[User:SebastienR|SebastienR]])&lt;br /&gt;
&lt;br /&gt;
==Configure SDK/BSP options==&lt;br /&gt;
{{Note|If you are new to Armadeus and have troubles compiling armadeus-5.x/armadeus-6.x using the following instructions, you may find some hints here: [[Releases]]}}&lt;br /&gt;
*Go to the directory where you put the Armadeus sources:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd armadeus/  (or armadeus-7.0/)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*The first time you compile an Armadeus distribution you have to specify the target (here the [[APF9328]]) to work with. &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make apf9328_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command reloads the default configuration to support your target and automatically start a Buildroot&#039;s configuration menu.&lt;br /&gt;
&lt;br /&gt;
* Current valid default configurations are:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
apf9328_defconfig  apf27_defconfig  pps_defconfig  apf28_defconfig  apf51_defconfig  pps51_defconfig apf6_defconfig apf6legacy_defconfig opos6ul_defconfig opos6ulnano_defconfig opos6ulsp_defconfig opos8mm-legacy-5.10_defconfig opos93-legacy-6.1_defconfig opos93sp-legacy-6.1_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note| To get the full list of available config just type make, it will download buildroot and print following message :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
[...]&lt;br /&gt;
 System not configured. Use make &amp;lt;board&amp;gt;_defconfig &lt;br /&gt;
 armadeus valid configurations are:                &lt;br /&gt;
     opos6ul_legacy_defconfig opos6ulnano-preempt-rt_defconfig apf6_defconfig pps_defconfig opos6ultest_defconfig apf51_defconfig opos6ulsp_defconfig apf6dawnsmalllinux_defconfig apf27preempt-rt_defconfig apf27test_defconfig apf27_defconfig apf28legacytest_defconfig opos6ullegacy-4.14_defconfig opos6ulnano_defconfig apf28legacy_defconfig apf6mainline-4.19_defconfig opos6ul_defconfig apf6legacy_defconfig apf6xenomai_defconfig apf51test_defconfig opos6ul-preempt-rt_defconfig apf6legacy-preempt-rt_defconfig apf6legacy-4.1_defconfig pps51_defconfig apf6mainline-4.9_defconfig apf28test_defconfig apf28_defconfig apf6mediacenter_defconfig opos6ullegacy-4.9_defconfig opos6ul_recovery_defconfig apf6failsafe_defconfig apf6test_defconfig opos6ullegacy-4.1_defconfig apf27xenomai_defconfig&lt;br /&gt;
                                                   &lt;br /&gt;
Makefile:129: recipe for target &#039;/usr/local/projects/apf6_sp_419/buildroot/.configured&#039; failed&lt;br /&gt;
make: *** [/usr/local/projects/apf6_sp_419/buildroot/.configured] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For PPS boards, please see [[APF27_PPS]] or [[PPS51]] Wiki pages, as these boards have specific build.&lt;br /&gt;
&lt;br /&gt;
* After some downloads, you will get the Buildroot configuration interface:&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ever made changes during the following steps, at any time, you can reload the default configuration with:&lt;br /&gt;
 $ make xxx_defconfig       (xxx depending on your module name)}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Menuconfig3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
*If you are not familiar with Buildroot here are some tips:&lt;br /&gt;
*# you can move the highlighted item with the &amp;quot;up&amp;quot;/&amp;quot;down&amp;quot; arrow keys&lt;br /&gt;
*# with the &amp;quot;left&amp;quot;/&amp;quot;right&amp;quot; arrow keys you can choose between &amp;quot;Select&amp;quot;, &amp;quot;Exit&amp;quot; or &amp;quot;Help&amp;quot; buttons&lt;br /&gt;
*# &amp;quot;space&amp;quot;/&amp;quot;enter&amp;quot;:&lt;br /&gt;
*#* selects the currently highlighted item if you are on the &amp;quot;Select&amp;quot; button&lt;br /&gt;
*#* go back in previous menu if you are on &amp;quot;Exit&amp;quot; button&lt;br /&gt;
*#* show you some Help for current item if you are on &amp;quot;Help&amp;quot; button&lt;br /&gt;
*# for more Help about Buildroot commands, select &amp;quot;Help&amp;quot; in the main configuration screen&lt;br /&gt;
&lt;br /&gt;
* Update the memory configuration of your board (&#039;&#039;&#039;if needed&#039;&#039;&#039;; by default BSP is configured for the minimal memory configuration available on the corresponding board):&lt;br /&gt;
&lt;br /&gt;
:In menu:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;System configuration  ---&amp;gt;    [*] Armadeus Device Support  ---&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:you can check and change the quantity of RAM available on your Armadeus board:&lt;br /&gt;
:[[Image:Build_config_memory.png]]&lt;br /&gt;
:For [[APF9328]] the memory can be either 16 or 32MiB (be sure to select 1 RAM chip)&lt;br /&gt;
:For [[APF27]] it could be either 64MiB or 128MiB (2 x 64MiB) (in that case be sure to select 2 chips of 64MiB instead of 1 chip of 128MiB).&lt;br /&gt;
:For [[APF51]] it could be either 256MiB or 512MiB (2x256MiB) (in such case be sure to select 2 chips of 256MiB instead of 1 chip of 512).&lt;br /&gt;
:For [[APF28]] The memory can be 128, 256, 512 or 1024MiB (be sure to select 1 RAM chip).&lt;br /&gt;
:For [[APF6]]/[[APF6SP]] The memory can be 512 Mbytes or 1Gbytes with ram chip size of 512Mbytes.&lt;br /&gt;
:For [[OPOS6UL]]/[[OPOS6UL_NANO]] The memory size is automatically detected so you don&#039;t care ;-)&lt;br /&gt;
&lt;br /&gt;
* You may decrease the compilation time by increasing the number of parallel jobs running simultaneously on your system (the result is not guaranteed). This option is located in:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build Options ---&amp;gt;    (0) Number of jobs to run simultaneously&amp;lt;/pre&amp;gt;&lt;br /&gt;
0 means that Buildroot will try to guess automatically how much parallel jobs it can launch.&lt;br /&gt;
&lt;br /&gt;
* During the SDK/BSP build, a lot of software archives are downloaded from Internet. The downloaded files are put by default in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. &#039;&#039;&#039;If you have several views or plan to build the toolchain several times&#039;&#039;&#039;, we advise you to put all the downloaded files in &#039;&#039;/local/downloads&#039;&#039; (for example). This is done by configuring Buildroot to use this directory for all your views. Nevertheless, Buildroot will be downloaded separately for each build environment you set up.&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build options  ---&amp;gt;    (...) Download dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
:[[Image:Build_config_download.png]]&lt;br /&gt;
{{Note|Of course, &#039;&#039;/local/downloads&#039;&#039; should exists on your system and you should have writing rights on it !}}&lt;br /&gt;
* In recent Buildroot you can also use the following method:&lt;br /&gt;
 export BR2_DL_DIR=/local/downloads&lt;br /&gt;
&lt;br /&gt;
* After the build, we advise you to copy all the files in &#039;&#039;downloads/&#039;&#039; / &#039;&#039;/local/downloads&#039;&#039; on a removable medium, in case you want to install the development tools on other systems, without to have to reload all the archives.&lt;br /&gt;
&lt;br /&gt;
* Now, Exit the configuration tool and save your configuration&lt;br /&gt;
&lt;br /&gt;
* You can come back to this configuration menu, by typing (your changes will be kept): &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launch build==&lt;br /&gt;
 $ make&lt;br /&gt;
The toolchain and the full distribution are automatically built. During this procedure, several files are downloaded from Internet. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please wait for a while.... it takes at least one hour for the first run!&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
By default, the downloaded files/tarball are put in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. Please see the previous chapter to know how to optimize that if you plan to build several views or want to build faster.&lt;br /&gt;
&lt;br /&gt;
==Enjoy the result==&lt;br /&gt;
The generated binary files can be found in the subdirectory &#039;&#039;buildroot/output/images&#039;&#039;:&lt;br /&gt;
*&#039;&#039;apf9328-u-boot.brec&#039;&#039; (only on [[APF9328]]): BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working (see [[BootLoader]] page)&lt;br /&gt;
*&#039;&#039;xxx-u-boot.bin&#039;&#039;: U-Boot image file to be used with U-Boot itself, (see [[BootLoader#Update_U-Boot | updating U-Boot]])&lt;br /&gt;
*&#039;&#039;xxx-linux.bin&#039;&#039;: Linux image to use with U-Boot, (see [[Target_Software_Installation#Linux_kernel_installation | updating Linux]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.jffs2&#039;&#039;: JFFS2 filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ubi&#039;&#039; (not supported on [[APF9328]]): [[UBIFS|UBI]] filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ext4&#039;&#039;: EXT4 filesystem/rootfs image to use with U-Boot, (on [[APF6]] and [[OPOS6UL]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.tar&#039;&#039;: for an NFS/MMC based rootfs, (see [[Network_Configuration#Boot_from_NFS | Booting from NFS]] &amp;amp; [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note the new naming convention of binary files and directories (since Armadeus 4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;buildroot/output/build&#039;&#039;: contains all the build results for target root filesystem, Linux, Busybox and U-Boot...&lt;br /&gt;
*&#039;&#039;buildroot/output/toolchain/&#039;&#039;: cross compilation toolchain&#039;s build dir. Binaries usable for cross-compilation are in &#039;&#039;buildroot/output/host/usr/bin&#039;&#039;.&lt;br /&gt;
*&#039;&#039;buildroot/output/target/&#039;&#039;: target filessytem before generating rootfs images&lt;br /&gt;
&lt;br /&gt;
More information is available in the  [http://buildroot.uclibc.org/buildroot.html Buildroot&#039;s documentation]&lt;br /&gt;
&lt;br /&gt;
* Note: Previous versions (3.x) of Armadeus SDK stored the generated binary files at a different place: &#039;&#039; &#039;&#039;buildroot/binaries/XX/&#039;&#039; (where XX was the name of your board).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You then copy the binary image to your server directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==To keep your local copy/repository up-to-date with the armadeus GIT repository==&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will update your working directory to the latest release.&lt;br /&gt;
&lt;br /&gt;
Note: if &amp;quot;git pull&amp;quot; fails because a directory or a file already exists, then do:&lt;br /&gt;
 $ rm -rf &amp;lt;this-directory/file&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&lt;br /&gt;
You can do a:&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
to have the latest features automatically activated.&lt;br /&gt;
&lt;br /&gt;
You have to do a &#039;&#039;&#039;make&#039;&#039;&#039; to rebuild binary files and then upload the binary files to your target.&lt;br /&gt;
&lt;br /&gt;
Note: if definitively everything goes wrong while it worked before the last update.&lt;br /&gt;
You can apply the following procedure (all your modifications in buildroot will be lost):&lt;br /&gt;
 $ rm -rf buildroot/&lt;br /&gt;
 $ rm Makefile&lt;br /&gt;
 $ git pull&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15285</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15285"/>
		<updated>2026-01-19T17:04:56Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
===APF27===&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
===OPOS93===&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;Camera drivers&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 || APF6 (kernel 3.19+)&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# vi setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
#  chmod +x setCam.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15284</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15284"/>
		<updated>2026-01-19T14:33:25Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
===APF27===&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
===OPOS93===&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;Camera drivers&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 || APF6 (kernel 3.19+)&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; setCam.sh &amp;amp;&amp;amp; chmod +x setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
EOF &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15283</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15283"/>
		<updated>2026-01-19T14:32:59Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
===APF27===&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
===OPOS93===&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;Camera drivers&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 || APF6 (kernel 3.19+)&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; setCam.sh &amp;amp;&amp;amp; chmod +x setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
EOF &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15282</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15282"/>
		<updated>2026-01-19T14:32:43Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
===APF27===&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
===OPOS93===&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;Camera drivers&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 || APF6 (kernel 3.19+)&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; setCam.sh &amp;amp;&amp;amp; chmod +x setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EOF &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15281</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15281"/>
		<updated>2026-01-19T14:24:23Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
===APF27===&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
===OPOS93===&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;Camera drivers&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 || APF6 (kernel 3.19+)&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; setCam.sh &amp;amp;&amp;amp; chmod +x setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
EOF &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15280</id>
		<title>Camera interface</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Camera_interface&amp;diff=15280"/>
		<updated>2026-01-16T18:14:53Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will find useful informations on how to use the Camera/CMOS Sensor Interface (CSI/CSI2) of the i.MX chip found on your APF and OPOS93Dev board.&lt;br /&gt;
Currently only the [[APF27]], [[APF6]] &amp;amp; [[OPOS93]] are supported.&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
===APF27===&lt;br /&gt;
* All the signals of the i.MX27 CSI interface can be found on the J9 connector of the [[APF27Dev|APF27Dev development board]].&lt;br /&gt;
* You should connect an external camera/sensor compatible with the CSI interface (8bits data bus) to see something ;-). Here are the tested sensor models:&lt;br /&gt;
** [[OV9653]] / [[OV9655]]&lt;br /&gt;
** [[OV7670]]&lt;br /&gt;
** [[OV3640]]&lt;br /&gt;
* All these sensors are controllable through an I2C interface. The one on J8 connector of [[APF27Dev]] can for example be used.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* [[APF6Dev]] boards have a wandcam (OV5640) compatible connector (near the PCIexpress one).&lt;br /&gt;
* MIPI bus is used on [[APF6Dev]]&lt;br /&gt;
&lt;br /&gt;
===OPOS93===&lt;br /&gt;
* The [[OPOS93DEV]] board has a 15-pin Raspberry Pi Camera compatible connector (located below the OPOS93 SoC).&lt;br /&gt;
* A 2-lane MIPI CSI-2 bus is used.&lt;br /&gt;
* Tested with the OmniVision OV5647 sensor.&lt;br /&gt;
&lt;br /&gt;
==Driver==&lt;br /&gt;
* From now we consider that you have a supported camera module plugged on your development board&lt;br /&gt;
* CSI interface can be driven through the V4L2 (Video For Linux) standard interface as soon as CSI/MIPI driver is loaded:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;Camera drivers&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF27 || APF6 (kernel 3.19+)&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe mx27_camera&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you have to load your camera driver in order for him to &amp;quot;attach&amp;quot; to the CSI one (for example for the OV9653):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe ov96xx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe -a mx6-camera mipi-csi2 ov5640-mipi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On OPOS93, the driver is automatically loaded when the camera is connected.&lt;br /&gt;
* Now it&#039;s up to you to configure your camera with the tools/API the camera driver is offering...&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
* We have a small SDL/V4L2 app to quickly test that your camera is working properly (you will also need a LCD interface): &#039;&#039;target/demos/camera/capture/&#039;&#039;&lt;br /&gt;
** it may be installed by default on your rootfs depending on your Buildroot defconfig.&lt;br /&gt;
** to launch it (here to have a 640x480 camera image on a LW700 TFT):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# capture --width 640 --height 480 --cam_width 640 --cam_height 480&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To trigger autofocus (APF6 with 3.19+ kernel):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# v4l2-ctl -c auto_focus_start=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* On OPOS93DEV, the pipeline must have the same configuration on every link in the pipeline.&lt;br /&gt;
* Let&#039;s create a script:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; setCam.sh &amp;amp;&amp;amp; chmod +x setCam.sh&lt;br /&gt;
&lt;br /&gt;
SOURCE=$3&lt;br /&gt;
FORV4L2=$4&lt;br /&gt;
XL=$1&lt;br /&gt;
YL=$2&lt;br /&gt;
&lt;br /&gt;
if [[$SOURCE == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        SOURCE=SBGGR10_1X10&lt;br /&gt;
fi&lt;br /&gt;
if [[$FORV4L2 == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        FORV4L2=BG10&lt;br /&gt;
fi&lt;br /&gt;
if [[$XL == &amp;quot;&amp;quot;]]; then&lt;br /&gt;
        XL=640&lt;br /&gt;
        YL=480&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
BAYER=$SOURCE/$XL\x$YL&lt;br /&gt;
echo Setting format to $XL/x$YL in $SOURCE - $FORV4L2&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;csidev-4ae00000.csi&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;mxc_isi.0&#039;:1 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;crossbar&#039;:2 [fmt:$BAYER  field:none]&amp;quot;&lt;br /&gt;
media-ctl -v -V &amp;quot;&#039;ov5647 2-0036&#039;:0 [fmt:$BAYER field:none]&amp;quot;&lt;br /&gt;
media-ctl -l &amp;quot;&#039;ov5647 2-0036&#039;:0 -&amp;gt; &#039;csidev-4ae00000.csi&#039;:0[1]&amp;quot;&lt;br /&gt;
v4l2-ctl -d /dev/video0 --set-fmt-video=width=$XL,height=$YL,pixelformat=$FORV4L2&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c exposure=855&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c gain_automatic=1&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c auto_exposure=0&lt;br /&gt;
v4l2-ctl -d /dev/v4l-subdev3 -c white_balance_automatic=1&lt;br /&gt;
&amp;gt; EOF &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run your script (if you put some arguments, remember the entire pipeline must have the same configuration) and check that all pads have the same format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# .setCam.sh&lt;br /&gt;
#  media-ctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try streaming to the framebuffer.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gst-launch-1.0 --no-position v4l2src ! &#039;video/x-bayer,format=bggr10le,width=640,height=480,bpp=10,framerate=(fraction)10/1&#039; ! bayer2rgbneon reduce-bpp=t show-fps=t silent=t ! fbdevsink device=/dev/fb0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Going further==&lt;br /&gt;
* [[Using the i.MX27 video codec|Using the i.MX27 video codec]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://linux.bytesex.org/v4l2/ Video4Linux]&lt;br /&gt;
&lt;br /&gt;
[[Category:Vision]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Accessing_U-Boot_environment_variables_from_Linux&amp;diff=15279</id>
		<title>Accessing U-Boot environment variables from Linux</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Accessing_U-Boot_environment_variables_from_Linux&amp;diff=15279"/>
		<updated>2026-01-07T16:41:08Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Setting and verifying an environment variable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Linux]]&lt;br /&gt;
[[Category: U-Boot]]&lt;br /&gt;
&lt;br /&gt;
U-Boot makes use of environment variables which can be read and set from the U-Boot command line with &#039;&#039;printenv&#039;&#039; and &#039;&#039;setenv&#039;&#039;.  It can be helpful to read and set these variables from Linux as well, for ex. to remote control some U-Boot processes like software updates.  The U-Boot distribution has sources for these commands, named &#039;&#039;fw_printenv&#039;&#039; and &#039;&#039;fw_setenv&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|U-Boot tools are now installed and configured on your APF since Armadeus 5.0. Therefore following installation procedure is only useful for reference information.}}&lt;br /&gt;
&lt;br /&gt;
Buildroot can automatically build these tools for you. You just have to:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and then select the following option:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
 Hardware handling  ---&amp;gt;&lt;br /&gt;
     [*] u-boot tools&lt;br /&gt;
         [*]   fw_printenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tools will be installed in &#039;&#039;/usr/sbin/&#039;&#039; of your target&#039;s rootfs.&lt;br /&gt;
&lt;br /&gt;
Then you have to create the config file for the utilities. The file name is &#039;&#039;fw_env.config&#039;&#039; and it lives in &#039;&#039;/etc&#039;&#039;.&lt;br /&gt;
To create this file, you need to know informations about where U-Boot stores its env variables.  Specifically, you need the mtd device name, the device offset, the env size and the flash sector size. You can guess most of them by looking at &#039;&#039;/proc/mtd&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* For the [[APF27]] with U-Boot 1.3.4:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# Configuration file for fw_(printenv/saveenv) utility.&lt;br /&gt;
# Up to two entries are valid, in this case the redundand&lt;br /&gt;
# environment sector is assumed present.&lt;br /&gt;
# Notice, that the &amp;quot;Number of sectors&amp;quot; is ignored on NOR.&lt;br /&gt;
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors&lt;br /&gt;
/dev/mtd1                 0x0000          0x20000           0x20000                 3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the [[APF51]] with U-Boot 2010.03:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# Configuration file for fw_(printenv/saveenv) utility.&lt;br /&gt;
# Up to two entries are valid, in this case the redundand&lt;br /&gt;
# environment sector is assumed present.&lt;br /&gt;
# Notice, that the &amp;quot;Number of sectors&amp;quot; is ignored on NOR.&lt;br /&gt;
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors&lt;br /&gt;
/dev/mtd1                 0x0000          0x20000           0x20000                 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the [[APF9328]] with U-Boot 1.3.4:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# Configuration file for fw_(printenv/saveenv) utility.&lt;br /&gt;
# Up to two entries are valid, in this case the redundand&lt;br /&gt;
# environment sector is assumed present.&lt;br /&gt;
# Notice, that the &amp;quot;Number of sectors&amp;quot; is ignored on NOR.&lt;br /&gt;
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors&lt;br /&gt;
/dev/mtd1                 0x0000          0x20000           0x20000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the [[APF9328]] / [[APF27]] / [[APF28]] / [[APF51]] since U-Boot since 2012.04.01 (Armadeus-5.0 and upper):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# Configuration file for fw_(printenv/saveenv) utility.&lt;br /&gt;
# Up to two entries are valid, in this case the redundant&lt;br /&gt;
# environment sector is assumed present.&lt;br /&gt;
# Notice, that the &amp;quot;Number of sectors&amp;quot; is ignored on NOR and SPI-dataflash.&lt;br /&gt;
# Futhermore, if the Flash sector size is ommitted, this value is assumed to&lt;br /&gt;
# be the same as the Environment size, which is valid for NOR and SPI-dataflash&lt;br /&gt;
&lt;br /&gt;
# Armadeus boards default environment configuration&lt;br /&gt;
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors&lt;br /&gt;
/dev/mtd1                 0x0000          0x20000           0x20000                 4&lt;br /&gt;
/dev/mtd2                 0x0000          0x20000           0x20000                 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the [[APF6]], as it uses an [[eMMC]] and no NOR/NAND Flash, there is a custom configuration file &#039;&#039;/etc/fw_env_apf6.config&#039;&#039; that should be moved to &#039;&#039;/etc/fw_env.config&#039;&#039; before going further.&lt;br /&gt;
* For the [[OPOS6UL]], as it uses an [[eMMC]] and no NOR/NAND Flash, there is a custom configuration file &#039;&#039;/etc/fw_env_opos6ul.config&#039;&#039; that should be moved to &#039;&#039;/etc/fw_env.config&#039;&#039; before going further.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== Printing all the environment variables===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# fw_printenv&lt;br /&gt;
bootdelay=1&lt;br /&gt;
baudrate=115200&lt;br /&gt;
ipaddr=192.168.0.2&lt;br /&gt;
serverip=192.168.0.1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Printing a single environment variable ===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# fw_printenv stdin&lt;br /&gt;
stdin=serial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting and verifying an environment variable ===&lt;br /&gt;
* Unlock Flash access (if needed):&lt;br /&gt;
** On [[APF6]], you have to do this first:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
echo 0 &amp;gt; /sys/block/mmcblk2boot0/force_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** On [[OPOS6UL]], you have to do this first:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
echo 0 &amp;gt; /sys/block/mmcblk0boot0/force_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** On [[OPOS93]]:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo 0 &amp;gt; /sys/block/mmcblk0boot1/force_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then set your variable:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
  # fw_setenv mytestvariable abcdefg&lt;br /&gt;
  # fw_printenv mytestvariable&lt;br /&gt;
  mytestenv=abcdefg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Care must be taken when changing env variables as a typo could easily render your system unbootable. Most problems can be fixed by connecting to the serial console and using U-Boot&#039;s command line to fix bad variable.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* This page is an adaptation on this one: http://elinux.org/U-boot_environment_variables_in_linux&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Wayland&amp;diff=15278</id>
		<title>Wayland</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Wayland&amp;diff=15278"/>
		<updated>2025-12-24T17:46:51Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Intro==&lt;br /&gt;
&lt;br /&gt;
Wayland is the new protocol dedicated to replace X11 windowing system. It&#039;s first Linux implementation is called &#039;&#039;weston&#039;&#039;. It uses KMS/DRM video drivers direct access, and so needs a recent kernel (4.4+). It currently works well on [[APF6]].&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
Use corresponding config (&#039;&#039;apf6_wayland_defconfig)&#039;&#039;, or activate it in menuconfig:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Target packages  ---&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    Graphic libraries and applications (graphic/text)  ---&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
        [*] weston                                                                                 │ │  &lt;br /&gt;
│ │           default compositor (drm)  ---&amp;gt;                                                       │ │  &lt;br /&gt;
│ │     -*-   DRM compositor                                                                       │ │  &lt;br /&gt;
│ │     [ ]   RDP compositor                                                                       │ │  &lt;br /&gt;
│ │     [ ]   headless (testing) compositor                                                        │ │  &lt;br /&gt;
│ │     [ ]   Wayland (nested) compositor                                                          │ │  &lt;br /&gt;
│ │     [ ]   X11 (nested) compositor                                                              │ │  &lt;br /&gt;
│ │     [ ]   XWayland support                                                                     │ │  &lt;br /&gt;
│ │     [*]   desktop shell                                                                        │ │  &lt;br /&gt;
│ │     [*]   fullscreen shell                                                                     │ │  &lt;br /&gt;
│ │     [*]   ivi shell                                                                            │ │  &lt;br /&gt;
│ │     [*]   kiosk shell                                                                          │ │  &lt;br /&gt;
│ │     [*]   demo clients                                                                         │ │&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Launching ==&lt;br /&gt;
* Needs to be done from a graphical/framebuffer console. [[Framebuffer#Login.2FConsole|To activate one]].&lt;br /&gt;
* Login to graphical console / tty1&lt;br /&gt;
* Do some config the first boot:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir /tmp/runtime&lt;br /&gt;
# chmod 0700 /tmp/runtime&lt;br /&gt;
# export XDG_RUNTIME_DIR=/tmp/runtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Start weston&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# weston -B drm-backend.so&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
* For OpenGL/ES demos, it is necessary to increase Linux kernel allocable video memory at boot:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;APF&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv extrabootargs &#039;${extrabootargs} cma=256M&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To rotate display in landscape mode on OPOS93Dev kit, one might create &#039;/etc/xdg/weston/weston.ini&#039; config file and add it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;APF&amp;quot;&amp;gt;&lt;br /&gt;
[output]&lt;br /&gt;
name=DSI-1&lt;br /&gt;
mode=720x1280@60&lt;br /&gt;
transform=rotate-90&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Graphical User Interface]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=UsingSyslog&amp;diff=15277</id>
		<title>UsingSyslog</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=UsingSyslog&amp;diff=15277"/>
		<updated>2025-10-10T12:52:47Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basis =&lt;br /&gt;
==Calling syslog method from shell==&lt;br /&gt;
To do that, use &#039;&#039;&#039;logger&#039;&#039;&#039; command :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
# logger -t &amp;quot;MYTAGNAME&amp;quot; &amp;quot;I like otters with cream&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then see the message in /var/log/messages:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
# tail /var/log/messages &lt;br /&gt;
...&lt;br /&gt;
Oct 16 16:50:13 armadeus user.notice MYTAGNAME: I like otters with cream&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calling syslog method from your C source code==&lt;br /&gt;
This part is quite simple, but we need to correctly use each parameter.&lt;br /&gt;
First step is to declare us as syslog client :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    ...&lt;br /&gt;
    openlog(&amp;quot;program_name&amp;quot;, LOG_PID, LOG_USER);&lt;br /&gt;
    ...&lt;br /&gt;
    closelog();&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then, you can call syslog from your code using printf like format :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    syslog(LOG_INFO, &amp;quot;%s called with %d arguments\n&amp;quot;, argv[0], argc);&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you compile the source file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
// log_syslog.c&lt;br /&gt;
#include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    openlog(&amp;quot;program_name&amp;quot;, LOG_PID, LOG_USER);&lt;br /&gt;
    syslog(LOG_INFO, &amp;quot;%s called with %d arguments&amp;quot;, argv[0], argc - 1);&lt;br /&gt;
    closelog();&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
With the command :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ gcc log_syslog.c -o log-syslog&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run it 2 times :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ ./log_syslog&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ ./log_syslog pim pam poum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will probably obtain no result in shell, but you can take a look in your system log (/var/log/syslog or /var/log/messages)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ tail -n 2 /var/log/syslog&lt;br /&gt;
Sep 19 18:46:49 mycomputer program_name[3022]: ./log_syslog called with 0 arguments&lt;br /&gt;
Sep 19 18:46:53 mycomputer program_name[3023]: ./log_syslog called with 3 arguments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can notice, that the lines contain program_name[PID] pattern showing us the name we have specified in openlog and the pid of the process because we ask it with LOG_PID argument.&lt;br /&gt;
&lt;br /&gt;
= Packages =&lt;br /&gt;
&lt;br /&gt;
== Busybox ==&lt;br /&gt;
&lt;br /&gt;
By default, syslog is managed by busybox, it can be configured using menuconfig :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make busybox-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The configuration menu can be found here :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
System Logging Utilities  ---&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Buildroot packages ==&lt;br /&gt;
&lt;br /&gt;
Some other packages are available under buildroot. To see it launch buildroot menuconfig :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select option :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    [*]   Show packages that are also provided by busybox&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to following menu and choose your prefered syslog implementation ;-):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Target packages  ---&amp;gt;&lt;br /&gt;
    System tools  ---&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] rsyslog&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] sysklogd&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] syslog-ng&lt;br /&gt;
        ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
* By default logs are not persistent (/var/log points to /tmp). To have persistent logs with rotation every 1Mbytes, one can try to add this to his post_build.sh script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# for persistent and rotating log messages&lt;br /&gt;
rm -rf $1/var/log&lt;br /&gt;
mkdir $1/var/log&lt;br /&gt;
sed -i -e &#039;s/SYSLOGD_ARGS=&amp;quot;&amp;quot;/SYSLOGD_ARGS=&amp;quot;-s 1024 -b 10&amp;quot;/&#039; $1/etc/init.d/S01syslogd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=UsingSyslog&amp;diff=15276</id>
		<title>UsingSyslog</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=UsingSyslog&amp;diff=15276"/>
		<updated>2025-10-10T12:50:43Z</updated>

		<summary type="html">&lt;p&gt;JulienB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basis =&lt;br /&gt;
==Calling syslog method from shell==&lt;br /&gt;
To do that, use &#039;&#039;&#039;logger&#039;&#039;&#039; command :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
# logger -t &amp;quot;MYTAGNAME&amp;quot; &amp;quot;I like otters with cream&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then see the message in /var/log/messages:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
# tail /var/log/messages &lt;br /&gt;
...&lt;br /&gt;
Oct 16 16:50:13 armadeus user.notice MYTAGNAME: I like otters with cream&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calling syslog method from your C source code==&lt;br /&gt;
This part is quite simple, but we need to correctly use each parameter.&lt;br /&gt;
First step is to declare us as syslog client :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    ...&lt;br /&gt;
    openlog(&amp;quot;program_name&amp;quot;, LOG_PID, LOG_USER);&lt;br /&gt;
    ...&lt;br /&gt;
    closelog();&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then, you can call syslog from your code using printf like format :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    syslog(LOG_INFO, &amp;quot;%s called with %d arguments\n&amp;quot;, argv[0], argc);&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you compile the source file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
// log_syslog.c&lt;br /&gt;
#include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    openlog(&amp;quot;program_name&amp;quot;, LOG_PID, LOG_USER);&lt;br /&gt;
    syslog(LOG_INFO, &amp;quot;%s called with %d arguments&amp;quot;, argv[0], argc - 1);&lt;br /&gt;
    closelog();&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
With the command :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ gcc log_syslog.c -o log-syslog&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run it 2 times :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ ./log_syslog&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ ./log_syslog pim pam poum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will probably obtain no result in shell, but you can take a look in your system log (/var/log/syslog or /var/log/messages)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ tail -n 2 /var/log/syslog&lt;br /&gt;
Sep 19 18:46:49 mycomputer program_name[3022]: ./log_syslog called with 0 arguments&lt;br /&gt;
Sep 19 18:46:53 mycomputer program_name[3023]: ./log_syslog called with 3 arguments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can notice, that the lines contain program_name[PID] pattern showing us the name we have specified in openlog and the pid of the process because we ask it with LOG_PID argument.&lt;br /&gt;
&lt;br /&gt;
= Packages =&lt;br /&gt;
&lt;br /&gt;
== Busybox ==&lt;br /&gt;
&lt;br /&gt;
By default, syslog is managed by busybox, it can be configured using menuconfig :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make busybox-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The configuration menu can be found here :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
System Logging Utilities  ---&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Buildroot packages ==&lt;br /&gt;
&lt;br /&gt;
Some other packages are available under buildroot. To see it launch buildroot menuconfig :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select option :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    [*]   Show packages that are also provided by busybox&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to following menu and choose your prefered syslog implementation ;-):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Target packages  ---&amp;gt;&lt;br /&gt;
    System tools  ---&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] rsyslog&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] sysklogd&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] syslog-ng&lt;br /&gt;
        ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
* By default logs are not persistent (/var/log points to /tmp). To have persistent logs with rotation every 1Mbytes, one can try to add this to his post_build.sh script:&lt;br /&gt;
&amp;lt;code source=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# for persistent and rotating log messages&lt;br /&gt;
rm -rf $1/var/log&lt;br /&gt;
mkdir $1/var/log&lt;br /&gt;
sed -i -e &#039;s/SYSLOGD_ARGS=&amp;quot;&amp;quot;/SYSLOGD_ARGS=&amp;quot;-s 1024 -b 10&amp;quot;/&#039; $1/etc/init.d/S01syslogd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=UsingSyslog&amp;diff=15246</id>
		<title>UsingSyslog</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=UsingSyslog&amp;diff=15246"/>
		<updated>2025-10-07T12:48:33Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Buildroot packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basis =&lt;br /&gt;
==Calling syslog method from shell==&lt;br /&gt;
To do that, use &#039;&#039;&#039;logger&#039;&#039;&#039; command :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
# logger -t &amp;quot;MYTAGNAME&amp;quot; &amp;quot;I like otters with cream&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then see the message in /var/log/messages:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
# tail /var/log/messages &lt;br /&gt;
...&lt;br /&gt;
Oct 16 16:50:13 armadeus user.notice MYTAGNAME: I like otters with cream&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calling syslog method from your C source code==&lt;br /&gt;
This part is quite simple, but we need to correctly use each parameter.&lt;br /&gt;
First step is to declare us as syslog client :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    ...&lt;br /&gt;
    openlog(&amp;quot;program_name&amp;quot;, LOG_PID, LOG_USER);&lt;br /&gt;
    ...&lt;br /&gt;
    closelog();&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then, you can call syslog from your code using printf like format :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    syslog(LOG_INFO, &amp;quot;%s called with %d arguments\n&amp;quot;, argv[0], argc);&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you compile the source file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
// log_syslog.c&lt;br /&gt;
#include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    openlog(&amp;quot;program_name&amp;quot;, LOG_PID, LOG_USER);&lt;br /&gt;
    syslog(LOG_INFO, &amp;quot;%s called with %d arguments&amp;quot;, argv[0], argc - 1);&lt;br /&gt;
    closelog();&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
With the command :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ gcc log_syslog.c -o log-syslog&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run it 2 times :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ ./log_syslog&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ ./log_syslog pim pam poum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will probably obtain no result in shell, but you can take a look in your system log (/var/log/syslog or /var/log/messages)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
itsme@mycomputer:~/log_syslog$ tail -n 2 /var/log/syslog&lt;br /&gt;
Sep 19 18:46:49 mycomputer program_name[3022]: ./log_syslog called with 0 arguments&lt;br /&gt;
Sep 19 18:46:53 mycomputer program_name[3023]: ./log_syslog called with 3 arguments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can notice, that the lines contain program_name[PID] pattern showing us the name we have specified in openlog and the pid of the process because we ask it with LOG_PID argument.&lt;br /&gt;
&lt;br /&gt;
= Packages =&lt;br /&gt;
&lt;br /&gt;
== Busybox ==&lt;br /&gt;
&lt;br /&gt;
By default, syslog is managed by busybox, it can be configured using menuconfig :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make busybox-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The configuration menu can be found here :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
System Logging Utilities  ---&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Buildroot packages ==&lt;br /&gt;
&lt;br /&gt;
Some other packages are available under buildroot. To see it launch buildroot menuconfig :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select option :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    [*]   Show packages that are also provided by busybox&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to following menu and choose your prefered syslog implementation ;-):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Target packages  ---&amp;gt;&lt;br /&gt;
    System tools  ---&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] rsyslog&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] sysklogd&lt;br /&gt;
        ...&lt;br /&gt;
        [ ] syslog-ng&lt;br /&gt;
        ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Communicate&amp;diff=15175</id>
		<title>Communicate</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Communicate&amp;diff=15175"/>
		<updated>2025-09-16T12:45:43Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Install packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
How-To connect your Armadeus board to your development Host.&lt;br /&gt;
&lt;br /&gt;
==Forewords==&lt;br /&gt;
The default connection uses a simple Serial Link either with a RS232 Null-Modem cable (with or without USB&amp;lt;-&amp;gt;serial adapter) or with a miniUSB cable ([[APF51]] / [[APF28]] / [[APF6]]).&lt;br /&gt;
&lt;br /&gt;
As you will have to transfer some MBytes of data, the Ethernet link is nice to have, if not mandatory.&amp;lt;br&amp;gt;&lt;br /&gt;
In order to use these two ways of transfer with the APF target, a terminal emulator (for Serial link) and a TFTP server (for Ethernet link) have to be configured.&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
At this stage, you should have something looking like that (IP addresses may change):&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:BoardConnection.png]]&lt;br /&gt;
&lt;br /&gt;
{{:RS232 Terminal configuration}}&lt;br /&gt;
&lt;br /&gt;
==TFTP server==&lt;br /&gt;
In order to send your image files (U-Boot, Linux, rootfs or FPGA&#039;s firmware) at higher speed (than serial port) to your Armadeus board, you can use the Ethernet link and [http://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol a TFTP server].&lt;br /&gt;
Once the server configured, the files located in the server shared directory (&#039;&#039;/tftpboot&#039;&#039; by default) will be accessible from the U-Boot/Linux TFTP clients.&lt;br /&gt;
&lt;br /&gt;
===TFTP server installation===&lt;br /&gt;
====Install packages====&lt;br /&gt;
{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|* On *Ubuntu / Debian:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt-get install tftpd-hpa xinetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or use your preferred graphical package manager&lt;br /&gt;
||&lt;br /&gt;
|* On Fedora:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ rpm -q tftpd xinetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|* On OpenSUSE 11.3:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
sudo zypper install tftp yast2-tftp-server&lt;br /&gt;
sudo yast2 tftp-server&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Choose Enable to start the TFTP server. It might be required to open the TFTP port in your firewall.&lt;br /&gt;
For more details see: [http://en.opensuse.org/SDB:YaST_TFTP_Server YaST TFTP Server on OpenSUSE site]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Create server&#039;s directory====&lt;br /&gt;
* Then create the directory (&#039;&#039;/tftpboot/&#039;&#039;) that will contain all the files that the server will export:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkdir /tftpboot&lt;br /&gt;
$ sudo chmod 777 /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Server configuration===  &lt;br /&gt;
* &#039;&#039;&#039;As root user&#039;&#039;&#039; edit or create the &#039;&#039;/etc/xinetd.d/tftp&#039;&#039; configuration file and modify/add it the following lines:&lt;br /&gt;
 # default: off&lt;br /&gt;
 # description: The tftp server serves files using the trivial file transfer&lt;br /&gt;
 #       protocol.  The tftp protocol is often used to boot diskless&lt;br /&gt;
 #       workstations, download configuration files to network-aware printers,&lt;br /&gt;
 #       and to start the installation process for some operating systems.&lt;br /&gt;
 service tftp&lt;br /&gt;
 {&lt;br /&gt;
        socket_type             = dgram&lt;br /&gt;
        protocol                = udp&lt;br /&gt;
        wait                    = yes&lt;br /&gt;
        user                    = root&lt;br /&gt;
        server                  = /usr/sbin/in.tftpd&lt;br /&gt;
        server_args             = -s /tftpboot&lt;br /&gt;
 #       disable                 = yes&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* Restart xinetd service:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo killall -HUP xinetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
For more information regarding how-to setup a TFTP server please check one of many Web How-to:&lt;br /&gt;
* [https://linuxlink.timesys.com/docs/linux_tftp Another how-to configure a TFTP Server for Linux]&lt;br /&gt;
* [http://www.webune.com/forums/how-to-install-tftp-server-in-linux.html till another how-to...]&lt;br /&gt;
* [http://doc.ubuntu-fr.org/tftpd ubuntu TFTP server documentation in French]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
====Timeout in U-Boot====&lt;br /&gt;
*On recent Debian distribution (sid?), it seems that installing &#039;&#039;ckermit&#039;&#039; package may switch inetd server from &#039;&#039;xinetd&#039;&#039; to &#039;&#039;openbsd-inetd&#039;&#039;. If you fall in that case, then you have to configure &#039;&#039;/etc/inetd.conf&#039;&#039; by adding the following line:&lt;br /&gt;
&amp;lt;pre class=host&amp;gt;&lt;br /&gt;
tftp		dgram	udp	wait	nobody	/usr/sbin/tcpd	/usr/sbin/in.tftpd -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then restart inetd:&lt;br /&gt;
&amp;lt;pre class=host&amp;gt;&lt;br /&gt;
/etc/init.d/openbsd-inetd restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Connection refused====&lt;br /&gt;
It looks like xinetd configuration is not sufficient in some recent versions of this tool. IPv6 is enabled by default and seems to be not compatible with the TFTP protocol. A simple inetd configuration should work for people who have this problem (&#039;&#039;connection refused&#039;&#039; in system logs with addresses like ::ffff:192.168.0.100).&lt;br /&gt;
&lt;br /&gt;
* Edit (as root user) - if necessary - the &#039;&#039;/etc/inetd.conf&#039;&#039; file and add this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp		dgram	udp	wait	nobody	/usr/sbin/tcpd	/usr/sbin/in.tftpd -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install inetd tools&lt;br /&gt;
&lt;br /&gt;
On Ubuntu/Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install inetutils-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup the hosts rules: edit (as root user) &#039;&#039;/etc/hosts.allow&#039;&#039; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
in.tftpd: ALL&lt;br /&gt;
tftpd: ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Restart inetd&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ /etc/init.d/openbsd-inetd restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s done... and should work for most people.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://www.columbia.edu/kermit/ Kermit Homepage]&lt;br /&gt;
* [http://www.jls-info.com/julien/linux/ GTKTerm Homepage]&lt;br /&gt;
* [http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch16_:_Telnet,_TFTP,_and_xinetd#TFTP TFTP server quick how-to]&lt;br /&gt;
* [https://linuxlink.timesys.com/docs/linux_tftp Another how-to configure a TFTP Server for Linux]&lt;br /&gt;
* [http://www.webune.com/forums/how-to-install-tftp-server-in-linux.html till another how-to...]&lt;br /&gt;
* [http://doc.ubuntu-fr.org/tftpd ubuntu TFTP server documentation in French]&lt;br /&gt;
* [[Connection_with_U-Boot_under_Windows | configuring RS-232 and TFTP on Windows to communicate with your board]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15174</id>
		<title>LinuxInstall</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15174"/>
		<updated>2025-09-16T11:25:28Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Configure SDK/BSP options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;How-To install Armadeus Software Development Kit (SDK) on Linux systems. This SDK is currently based on the (excellent) [http://buildroot.net/ Buildroot].&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation was successfully tested on the following distributions:&lt;br /&gt;
* Debian Lenny (5.0),  Squeeze (6.0.x), Wheezy (7.2), Jessie (8.0)&lt;br /&gt;
* X/KUbuntu Edgy Eft (6.10), Gutsy Gibbon (7.10), Hardy Heron (8.04) &amp;amp; Jaunty Jackalope (9.04)&lt;br /&gt;
* Ubuntu  Lucid Lynx (10.04) (32 &amp;amp; 64bits), 12.04 LTS (32 &amp;amp; 64bits), 13.10 (32 &amp;amp; 64bits), 14.04, 15.04 &amp;amp; 16.04&lt;br /&gt;
* LUbuntu 17.10&lt;br /&gt;
* Mandriva 2006&lt;br /&gt;
* Fedora Core 3 &amp;amp; 4, Fedora 10, Laughlin (14)&lt;br /&gt;
* Red Hat Enterprise 5.2&lt;br /&gt;
* Gentoo 10.0 (32 &amp;amp; 64 bits)&lt;br /&gt;
* SuSE 10.1, OpenSUSE 11.3 - 12.3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The installation may fail on:&#039;&#039;&#039;&lt;br /&gt;
* Ubuntu Karmic Koala (9.10): tslib fails to build&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;APF28 requirements:&#039;&#039;&#039;&lt;br /&gt;
* APF28 board requires a Linux distribution with (GNU) tar version 1.20 or later to compile the Linux Kernel - Please update or upgrade your Linux distribution. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites for Linux installation==&lt;br /&gt;
{{Note|From here we assume that your Linux system has a &#039;&#039;make&#039;&#039; version &#039;&#039;&#039;greater or equal to&#039;&#039;&#039; 3.81. To check it: &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make -v&lt;br /&gt;
GNU Make 3.81&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
For armadeus up to 3.4, make should be &#039;&#039;&#039;strictly&#039;&#039;&#039; make-3.81 (make-3.82 is too strict). A Fedora (14 and 15) -specific solution can be found later; other recent distributions such as mageia1 also have make-3.82, and a generic solution, based on configure&amp;amp;&amp;amp; make&amp;amp;&amp;amp; sudo make install can be used to install make-3.81 (which can be retrieved from http://ftp.gnu.org/gnu/make/make-6.81.tar.gz) in /usr/local/bin (and , according to one&#039;s PATH, make 3-81 can be invoked directly or as /usr/local/bin/make). &lt;br /&gt;
 &lt;br /&gt;
Depending on your distribution, some additional packages are required:&lt;br /&gt;
&lt;br /&gt;
===Debian/Ubuntu based systems===&lt;br /&gt;
[[Ubuntu/Debian installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Mandriva based systems=== &lt;br /&gt;
[[Mandriva installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===RPM-based systems (RedHat, Fedora, CentOS)===&lt;br /&gt;
[[RedHat/Fedora installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===OpenSuse based systems===&lt;br /&gt;
[[OpenSuse installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Gentoo based systems===&lt;br /&gt;
[[Gentoo installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
==Get Armadeus software==&lt;br /&gt;
* &#039;&#039;&#039;If you are a &amp;quot;careful&amp;quot; user&#039;&#039;&#039;, then download [https://gitlab.com/armadeus/armadeus-bsp/-/tags the latest stable installation tarball from gitlab] and detar it wherever you want:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ tar xjvf armadeus-7.0.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;If you want the latest snapshot or if you have a recent SOM ([[OPOS6UL]]/[[OPOS8MM]])&#039;&#039;&#039;, the whole development tree can be checked out from our [[GIT]] repository.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
   or if you don&#039;t have a gitlab account:&lt;br /&gt;
 $ git clone https://gitlab.com/armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* depending on your previous choice, a directory named &#039;&#039;armadeus/&#039;&#039; or &#039;&#039;armadeus-7.0/&#039;&#039; will be created on your hard-disk and will contain all the files you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;&#039;Do not use spaces&#039;&#039;&#039; in the directory name !&lt;br /&gt;
* &#039;&#039;&#039;Do not use a directory path beginning with /usr.&#039;&#039;&#039; It is a known bug of Buildroot (until BR2012.11, at 2012-12).&lt;br /&gt;
* GIT write/push accesses are limited to the integrators ([[User:JulienB|JulienB]], [[User:SebastienSz|SebastienSz]], [[User:Jorasse|Jorasse]], [[User:FabienM|FabienM]], [[User:SebastienR|SebastienR]])&lt;br /&gt;
&lt;br /&gt;
==Configure SDK/BSP options==&lt;br /&gt;
{{Note|If you are new to Armadeus and have troubles compiling armadeus-5.x/armadeus-6.x using the following instructions, you may find some hints here: [[Releases]]}}&lt;br /&gt;
*Go to the directory where you put the Armadeus sources:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd armadeus/  (or armadeus-7.0/)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*The first time you compile an Armadeus distribution you have to specify the target (here the [[APF9328]]) to work with. &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make apf9328_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command reloads the default configuration to support your target and automatically start a Buildroot&#039;s configuration menu.&lt;br /&gt;
&lt;br /&gt;
* Current valid default configurations are:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
apf9328_defconfig  apf27_defconfig  pps_defconfig  apf28_defconfig  apf51_defconfig  pps51_defconfig apf6_defconfig apf6legacy_defconfig opos6ul_defconfig opos6ulnano_defconfig opos6ulsp_defconfig opos8mm-legacy-5.10_defconfig opos93-legacy-6.1_defconfig opos93sp-legacy-6.1_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note| To get the full list of available config just type make, it will download buildroot and print following message :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
[...]&lt;br /&gt;
 System not configured. Use make &amp;lt;board&amp;gt;_defconfig &lt;br /&gt;
 armadeus valid configurations are:                &lt;br /&gt;
     opos6ul_legacy_defconfig opos6ulnano-preempt-rt_defconfig apf6_defconfig pps_defconfig opos6ultest_defconfig apf51_defconfig opos6ulsp_defconfig apf6dawnsmalllinux_defconfig apf27preempt-rt_defconfig apf27test_defconfig apf27_defconfig apf28legacytest_defconfig opos6ullegacy-4.14_defconfig opos6ulnano_defconfig apf28legacy_defconfig apf6mainline-4.19_defconfig opos6ul_defconfig apf6legacy_defconfig apf6xenomai_defconfig apf51test_defconfig opos6ul-preempt-rt_defconfig apf6legacy-preempt-rt_defconfig apf6legacy-4.1_defconfig pps51_defconfig apf6mainline-4.9_defconfig apf28test_defconfig apf28_defconfig apf6mediacenter_defconfig opos6ullegacy-4.9_defconfig opos6ul_recovery_defconfig apf6failsafe_defconfig apf6test_defconfig opos6ullegacy-4.1_defconfig apf27xenomai_defconfig&lt;br /&gt;
                                                   &lt;br /&gt;
Makefile:129: recipe for target &#039;/usr/local/projects/apf6_sp_419/buildroot/.configured&#039; failed&lt;br /&gt;
make: *** [/usr/local/projects/apf6_sp_419/buildroot/.configured] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For PPS boards, please see [[APF27_PPS]] or [[PPS51]] Wiki pages, as these boards have specific build.&lt;br /&gt;
&lt;br /&gt;
* After some downloads, you will get the Buildroot configuration interface:&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ever made changes during the following steps, at any time, you can reload the default configuration with:&lt;br /&gt;
 $ make xxx_defconfig       (xxx depending on your module name)}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Menuconfig3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
*If you are not familiar with Buildroot here are some tips:&lt;br /&gt;
*# you can move the highlighted item with the &amp;quot;up&amp;quot;/&amp;quot;down&amp;quot; arrow keys&lt;br /&gt;
*# with the &amp;quot;left&amp;quot;/&amp;quot;right&amp;quot; arrow keys you can choose between &amp;quot;Select&amp;quot;, &amp;quot;Exit&amp;quot; or &amp;quot;Help&amp;quot; buttons&lt;br /&gt;
*# &amp;quot;space&amp;quot;/&amp;quot;enter&amp;quot;:&lt;br /&gt;
*#* selects the currently highlighted item if you are on the &amp;quot;Select&amp;quot; button&lt;br /&gt;
*#* go back in previous menu if you are on &amp;quot;Exit&amp;quot; button&lt;br /&gt;
*#* show you some Help for current item if you are on &amp;quot;Help&amp;quot; button&lt;br /&gt;
*# for more Help about Buildroot commands, select &amp;quot;Help&amp;quot; in the main configuration screen&lt;br /&gt;
&lt;br /&gt;
* Update the memory configuration of your board (&#039;&#039;&#039;if needed&#039;&#039;&#039;; by default BSP is configured for the minimal memory configuration available on the corresponding board):&lt;br /&gt;
&lt;br /&gt;
:In menu:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;System configuration  ---&amp;gt;    [*] Armadeus Device Support  ---&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:you can check and change the quantity of RAM available on your Armadeus board:&lt;br /&gt;
:[[Image:Build_config_memory.png]]&lt;br /&gt;
:For [[APF9328]] the memory can be either 16 or 32MiB (be sure to select 1 RAM chip)&lt;br /&gt;
:For [[APF27]] it could be either 64MiB or 128MiB (2 x 64MiB) (in that case be sure to select 2 chips of 64MiB instead of 1 chip of 128MiB).&lt;br /&gt;
:For [[APF51]] it could be either 256MiB or 512MiB (2x256MiB) (in such case be sure to select 2 chips of 256MiB instead of 1 chip of 512).&lt;br /&gt;
:For [[APF28]] The memory can be 128, 256, 512 or 1024MiB (be sure to select 1 RAM chip).&lt;br /&gt;
:For [[APF6]]/[[APF6SP]] The memory can be 512 Mbytes or 1Gbytes with ram chip size of 512Mbytes.&lt;br /&gt;
:For [[OPOS6UL]]/[[OPOS6UL_NANO]] The memory size is automatically detected so you don&#039;t care ;-)&lt;br /&gt;
&lt;br /&gt;
* You may decrease the compilation time by increasing the number of parallel jobs running simultaneously on your system (the result is not guaranteed). This option is located in:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build Options ---&amp;gt;    (0) Number of jobs to run simultaneously&amp;lt;/pre&amp;gt;&lt;br /&gt;
0 means that Buildroot will try to guess automatically how much parallel jobs it can launch.&lt;br /&gt;
&lt;br /&gt;
* During the SDK/BSP build, a lot of software archives are downloaded from Internet. The downloaded files are put by default in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. &#039;&#039;&#039;If you have several views or plan to build the toolchain several times&#039;&#039;&#039;, we advise you to put all the downloaded files in &#039;&#039;/local/downloads&#039;&#039; (for example). This is done by configuring Buildroot to use this directory for all your views. Nevertheless, Buildroot will be downloaded separately for each build environment you set up.&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build options  ---&amp;gt;    (...) Download dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
:[[Image:Build_config_download.png]]&lt;br /&gt;
{{Note|Of course, &#039;&#039;/local/downloads&#039;&#039; should exists on your system and you should have writing rights on it !}}&lt;br /&gt;
* In recent Buildroot you can also use the following method:&lt;br /&gt;
 export BR2_DL_DIR=/local/downloads&lt;br /&gt;
&lt;br /&gt;
* After the build, we advise you to copy all the files in &#039;&#039;downloads/&#039;&#039; / &#039;&#039;/local/downloads&#039;&#039; on a removable medium, in case you want to install the development tools on other systems, without to have to reload all the archives.&lt;br /&gt;
&lt;br /&gt;
* Now, Exit the configuration tool and save your configuration&lt;br /&gt;
&lt;br /&gt;
* You can come back to this configuration menu, by typing (your changes will be kept): &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launch build==&lt;br /&gt;
 $ make&lt;br /&gt;
The toolchain and the full distribution are automatically built. During this procedure, several files are downloaded from Internet. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please wait for a while.... it takes at least one hour for the first run!&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
By default, the downloaded files/tarball are put in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. Please see the previous chapter to know how to optimize that if you plan to build several views or want to build faster.&lt;br /&gt;
&lt;br /&gt;
==Enjoy the result==&lt;br /&gt;
The generated binary files can be found in the subdirectory &#039;&#039;buildroot/output/images&#039;&#039;:&lt;br /&gt;
*&#039;&#039;apf9328-u-boot.brec&#039;&#039; (only on [[APF9328]]): BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working (see [[BootLoader]] page)&lt;br /&gt;
*&#039;&#039;xxx-u-boot.bin&#039;&#039;: U-Boot image file to be used with U-Boot itself, (see [[BootLoader#Update_U-Boot | updating U-Boot]])&lt;br /&gt;
*&#039;&#039;xxx-linux.bin&#039;&#039;: Linux image to use with U-Boot, (see [[Target_Software_Installation#Linux_kernel_installation | updating Linux]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.jffs2&#039;&#039;: JFFS2 filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ubi&#039;&#039; (not supported on [[APF9328]]): [[UBIFS|UBI]] filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ext4&#039;&#039;: EXT4 filesystem/rootfs image to use with U-Boot, (on [[APF6]] and [[OPOS6UL]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.tar&#039;&#039;: for an NFS/MMC based rootfs, (see [[Network_Configuration#Boot_from_NFS | Booting from NFS]] &amp;amp; [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note the new naming convention of binary files and directories (since Armadeus 4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;buildroot/output/build&#039;&#039;: contains all the build results for target root filesystem, Linux, Busybox and U-Boot...&lt;br /&gt;
*&#039;&#039;buildroot/output/toolchain/&#039;&#039;: cross compilation toolchain&#039;s build dir. Binaries usable for cross-compilation are in &#039;&#039;buildroot/output/host/usr/bin&#039;&#039;.&lt;br /&gt;
*&#039;&#039;buildroot/output/target/&#039;&#039;: target filessytem before generating rootfs images&lt;br /&gt;
&lt;br /&gt;
More information is available in the  [http://buildroot.uclibc.org/buildroot.html Buildroot&#039;s documentation]&lt;br /&gt;
&lt;br /&gt;
* Note: Previous versions (3.x) of Armadeus SDK stored the generated binary files at a different place: &#039;&#039; &#039;&#039;buildroot/binaries/XX/&#039;&#039; (where XX was the name of your board).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You then copy the binary image to your server directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==To keep your local copy/repository up-to-date with the armadeus GIT repository==&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will update your working directory to the latest release.&lt;br /&gt;
&lt;br /&gt;
Note: if &amp;quot;git pull&amp;quot; fails because a directory or a file already exists, then do:&lt;br /&gt;
 $ rm -rf &amp;lt;this-directory/file&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&lt;br /&gt;
You can do a:&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
to have the latest features automatically activated.&lt;br /&gt;
&lt;br /&gt;
You have to do a &#039;&#039;&#039;make&#039;&#039;&#039; to rebuild binary files and then upload the binary files to your target.&lt;br /&gt;
&lt;br /&gt;
Note: if definitively everything goes wrong while it worked before the last update.&lt;br /&gt;
You can apply the following procedure (all your modifications in buildroot will be lost):&lt;br /&gt;
 $ rm -rf buildroot/&lt;br /&gt;
 $ rm Makefile&lt;br /&gt;
 $ git pull&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15173</id>
		<title>LinuxInstall</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15173"/>
		<updated>2025-09-16T11:22:41Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Get Armadeus software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;How-To install Armadeus Software Development Kit (SDK) on Linux systems. This SDK is currently based on the (excellent) [http://buildroot.net/ Buildroot].&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation was successfully tested on the following distributions:&lt;br /&gt;
* Debian Lenny (5.0),  Squeeze (6.0.x), Wheezy (7.2), Jessie (8.0)&lt;br /&gt;
* X/KUbuntu Edgy Eft (6.10), Gutsy Gibbon (7.10), Hardy Heron (8.04) &amp;amp; Jaunty Jackalope (9.04)&lt;br /&gt;
* Ubuntu  Lucid Lynx (10.04) (32 &amp;amp; 64bits), 12.04 LTS (32 &amp;amp; 64bits), 13.10 (32 &amp;amp; 64bits), 14.04, 15.04 &amp;amp; 16.04&lt;br /&gt;
* LUbuntu 17.10&lt;br /&gt;
* Mandriva 2006&lt;br /&gt;
* Fedora Core 3 &amp;amp; 4, Fedora 10, Laughlin (14)&lt;br /&gt;
* Red Hat Enterprise 5.2&lt;br /&gt;
* Gentoo 10.0 (32 &amp;amp; 64 bits)&lt;br /&gt;
* SuSE 10.1, OpenSUSE 11.3 - 12.3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The installation may fail on:&#039;&#039;&#039;&lt;br /&gt;
* Ubuntu Karmic Koala (9.10): tslib fails to build&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;APF28 requirements:&#039;&#039;&#039;&lt;br /&gt;
* APF28 board requires a Linux distribution with (GNU) tar version 1.20 or later to compile the Linux Kernel - Please update or upgrade your Linux distribution. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites for Linux installation==&lt;br /&gt;
{{Note|From here we assume that your Linux system has a &#039;&#039;make&#039;&#039; version &#039;&#039;&#039;greater or equal to&#039;&#039;&#039; 3.81. To check it: &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make -v&lt;br /&gt;
GNU Make 3.81&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
For armadeus up to 3.4, make should be &#039;&#039;&#039;strictly&#039;&#039;&#039; make-3.81 (make-3.82 is too strict). A Fedora (14 and 15) -specific solution can be found later; other recent distributions such as mageia1 also have make-3.82, and a generic solution, based on configure&amp;amp;&amp;amp; make&amp;amp;&amp;amp; sudo make install can be used to install make-3.81 (which can be retrieved from http://ftp.gnu.org/gnu/make/make-6.81.tar.gz) in /usr/local/bin (and , according to one&#039;s PATH, make 3-81 can be invoked directly or as /usr/local/bin/make). &lt;br /&gt;
 &lt;br /&gt;
Depending on your distribution, some additional packages are required:&lt;br /&gt;
&lt;br /&gt;
===Debian/Ubuntu based systems===&lt;br /&gt;
[[Ubuntu/Debian installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Mandriva based systems=== &lt;br /&gt;
[[Mandriva installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===RPM-based systems (RedHat, Fedora, CentOS)===&lt;br /&gt;
[[RedHat/Fedora installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===OpenSuse based systems===&lt;br /&gt;
[[OpenSuse installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Gentoo based systems===&lt;br /&gt;
[[Gentoo installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
==Get Armadeus software==&lt;br /&gt;
* &#039;&#039;&#039;If you are a &amp;quot;careful&amp;quot; user&#039;&#039;&#039;, then download [https://gitlab.com/armadeus/armadeus-bsp/-/tags the latest stable installation tarball from gitlab] and detar it wherever you want:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ tar xjvf armadeus-7.0.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;If you want the latest snapshot or if you have a recent SOM ([[OPOS6UL]]/[[OPOS8MM]])&#039;&#039;&#039;, the whole development tree can be checked out from our [[GIT]] repository.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
   or if you don&#039;t have a gitlab account:&lt;br /&gt;
 $ git clone https://gitlab.com/armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* depending on your previous choice, a directory named &#039;&#039;armadeus/&#039;&#039; or &#039;&#039;armadeus-7.0/&#039;&#039; will be created on your hard-disk and will contain all the files you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;&#039;Do not use spaces&#039;&#039;&#039; in the directory name !&lt;br /&gt;
* &#039;&#039;&#039;Do not use a directory path beginning with /usr.&#039;&#039;&#039; It is a known bug of Buildroot (until BR2012.11, at 2012-12).&lt;br /&gt;
* GIT write/push accesses are limited to the integrators ([[User:JulienB|JulienB]], [[User:SebastienSz|SebastienSz]], [[User:Jorasse|Jorasse]], [[User:FabienM|FabienM]], [[User:SebastienR|SebastienR]])&lt;br /&gt;
&lt;br /&gt;
==Configure SDK/BSP options==&lt;br /&gt;
{{Note|If you are new to Armadeus and have troubles compiling armadeus-5.x/armadeus-6.x using the following instructions, you may find some hints here: [[Releases]]}}&lt;br /&gt;
*Go to the directory where you put the Armadeus sources:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd armadeus/  (or armadeus-7.0/)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*The first time you compile an Armadeus distribution you have to specify the target (here the [[APF9328]]) to work with. &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make apf9328_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command reloads the default configuration to support your target and automatically start a Buildroot&#039;s configuration menu.&lt;br /&gt;
&lt;br /&gt;
* Current valid default configurations are:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
apf9328_defconfig  apf27_defconfig  pps_defconfig  apf28_defconfig  apf51_defconfig  pps51_defconfig apf6_defconfig apf6legacy_defconfig opos6ul_defconfig opos6ulnano_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note| To get the full list of available config just type make, it will download buildroot and print following message :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
[...]&lt;br /&gt;
 System not configured. Use make &amp;lt;board&amp;gt;_defconfig &lt;br /&gt;
 armadeus valid configurations are:                &lt;br /&gt;
     opos6ul_legacy_defconfig opos6ulnano-preempt-rt_defconfig apf6_defconfig pps_defconfig opos6ultest_defconfig apf51_defconfig opos6ulsp_defconfig apf6dawnsmalllinux_defconfig apf27preempt-rt_defconfig apf27test_defconfig apf27_defconfig apf28legacytest_defconfig opos6ullegacy-4.14_defconfig opos6ulnano_defconfig apf28legacy_defconfig apf6mainline-4.19_defconfig opos6ul_defconfig apf6legacy_defconfig apf6xenomai_defconfig apf51test_defconfig opos6ul-preempt-rt_defconfig apf6legacy-preempt-rt_defconfig apf6legacy-4.1_defconfig pps51_defconfig apf6mainline-4.9_defconfig apf28test_defconfig apf28_defconfig apf6mediacenter_defconfig opos6ullegacy-4.9_defconfig opos6ul_recovery_defconfig apf6failsafe_defconfig apf6test_defconfig opos6ullegacy-4.1_defconfig apf27xenomai_defconfig&lt;br /&gt;
                                                   &lt;br /&gt;
Makefile:129: recipe for target &#039;/usr/local/projects/apf6_sp_419/buildroot/.configured&#039; failed&lt;br /&gt;
make: *** [/usr/local/projects/apf6_sp_419/buildroot/.configured] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For PPS boards, please see [[APF27_PPS]] or [[PPS51]] Wiki pages, as these boards have specific build.&lt;br /&gt;
&lt;br /&gt;
* After some downloads, you will get the Buildroot configuration interface:&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ever made changes during the following steps, at any time, you can reload the default configuration with:&lt;br /&gt;
 $ make xxx_defconfig       (xxx depending on your module name)}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Menuconfig3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
*If you are not familiar with Buildroot here are some tips:&lt;br /&gt;
*# you can move the highlighted item with the &amp;quot;up&amp;quot;/&amp;quot;down&amp;quot; arrow keys&lt;br /&gt;
*# with the &amp;quot;left&amp;quot;/&amp;quot;right&amp;quot; arrow keys you can choose between &amp;quot;Select&amp;quot;, &amp;quot;Exit&amp;quot; or &amp;quot;Help&amp;quot; buttons&lt;br /&gt;
*# &amp;quot;space&amp;quot;/&amp;quot;enter&amp;quot;:&lt;br /&gt;
*#* selects the currently highlighted item if you are on the &amp;quot;Select&amp;quot; button&lt;br /&gt;
*#* go back in previous menu if you are on &amp;quot;Exit&amp;quot; button&lt;br /&gt;
*#* show you some Help for current item if you are on &amp;quot;Help&amp;quot; button&lt;br /&gt;
*# for more Help about Buildroot commands, select &amp;quot;Help&amp;quot; in the main configuration screen&lt;br /&gt;
&lt;br /&gt;
* Update the memory configuration of your board (&#039;&#039;&#039;if needed&#039;&#039;&#039;; by default BSP is configured for the minimal memory configuration available on the corresponding board):&lt;br /&gt;
&lt;br /&gt;
:In menu:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;System configuration  ---&amp;gt;    [*] Armadeus Device Support  ---&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:you can check and change the quantity of RAM available on your Armadeus board:&lt;br /&gt;
:[[Image:Build_config_memory.png]]&lt;br /&gt;
:For [[APF9328]] the memory can be either 16 or 32MiB (be sure to select 1 RAM chip)&lt;br /&gt;
:For [[APF27]] it could be either 64MiB or 128MiB (2 x 64MiB) (in that case be sure to select 2 chips of 64MiB instead of 1 chip of 128MiB).&lt;br /&gt;
:For [[APF51]] it could be either 256MiB or 512MiB (2x256MiB) (in such case be sure to select 2 chips of 256MiB instead of 1 chip of 512).&lt;br /&gt;
:For [[APF28]] The memory can be 128, 256, 512 or 1024MiB (be sure to select 1 RAM chip).&lt;br /&gt;
:For [[APF6]]/[[APF6SP]] The memory can be 512 Mbytes or 1Gbytes with ram chip size of 512Mbytes.&lt;br /&gt;
:For [[OPOS6UL]]/[[OPOS6UL_NANO]] The memory size is automatically detected so you don&#039;t care ;-)&lt;br /&gt;
&lt;br /&gt;
* You may decrease the compilation time by increasing the number of parallel jobs running simultaneously on your system (the result is not guaranteed). This option is located in:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build Options ---&amp;gt;    (0) Number of jobs to run simultaneously&amp;lt;/pre&amp;gt;&lt;br /&gt;
0 means that Buildroot will try to guess automatically how much parallel jobs it can launch.&lt;br /&gt;
&lt;br /&gt;
* During the SDK/BSP build, a lot of software archives are downloaded from Internet. The downloaded files are put by default in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. &#039;&#039;&#039;If you have several views or plan to build the toolchain several times&#039;&#039;&#039;, we advise you to put all the downloaded files in &#039;&#039;/local/downloads&#039;&#039; (for example). This is done by configuring Buildroot to use this directory for all your views. Nevertheless, Buildroot will be downloaded separately for each build environment you set up.&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build options  ---&amp;gt;    (...) Download dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
:[[Image:Build_config_download.png]]&lt;br /&gt;
{{Note|Of course, &#039;&#039;/local/downloads&#039;&#039; should exists on your system and you should have writing rights on it !}}&lt;br /&gt;
* In recent Buildroot you can also use the following method:&lt;br /&gt;
 export BR2_DL_DIR=/local/downloads&lt;br /&gt;
&lt;br /&gt;
* After the build, we advise you to copy all the files in &#039;&#039;downloads/&#039;&#039; / &#039;&#039;/local/downloads&#039;&#039; on a removable medium, in case you want to install the development tools on other systems, without to have to reload all the archives.&lt;br /&gt;
&lt;br /&gt;
* Now, Exit the configuration tool and save your configuration&lt;br /&gt;
&lt;br /&gt;
* You can come back to this configuration menu, by typing (your changes will be kept): &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launch build==&lt;br /&gt;
 $ make&lt;br /&gt;
The toolchain and the full distribution are automatically built. During this procedure, several files are downloaded from Internet. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please wait for a while.... it takes at least one hour for the first run!&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
By default, the downloaded files/tarball are put in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. Please see the previous chapter to know how to optimize that if you plan to build several views or want to build faster.&lt;br /&gt;
&lt;br /&gt;
==Enjoy the result==&lt;br /&gt;
The generated binary files can be found in the subdirectory &#039;&#039;buildroot/output/images&#039;&#039;:&lt;br /&gt;
*&#039;&#039;apf9328-u-boot.brec&#039;&#039; (only on [[APF9328]]): BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working (see [[BootLoader]] page)&lt;br /&gt;
*&#039;&#039;xxx-u-boot.bin&#039;&#039;: U-Boot image file to be used with U-Boot itself, (see [[BootLoader#Update_U-Boot | updating U-Boot]])&lt;br /&gt;
*&#039;&#039;xxx-linux.bin&#039;&#039;: Linux image to use with U-Boot, (see [[Target_Software_Installation#Linux_kernel_installation | updating Linux]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.jffs2&#039;&#039;: JFFS2 filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ubi&#039;&#039; (not supported on [[APF9328]]): [[UBIFS|UBI]] filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ext4&#039;&#039;: EXT4 filesystem/rootfs image to use with U-Boot, (on [[APF6]] and [[OPOS6UL]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.tar&#039;&#039;: for an NFS/MMC based rootfs, (see [[Network_Configuration#Boot_from_NFS | Booting from NFS]] &amp;amp; [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note the new naming convention of binary files and directories (since Armadeus 4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;buildroot/output/build&#039;&#039;: contains all the build results for target root filesystem, Linux, Busybox and U-Boot...&lt;br /&gt;
*&#039;&#039;buildroot/output/toolchain/&#039;&#039;: cross compilation toolchain&#039;s build dir. Binaries usable for cross-compilation are in &#039;&#039;buildroot/output/host/usr/bin&#039;&#039;.&lt;br /&gt;
*&#039;&#039;buildroot/output/target/&#039;&#039;: target filessytem before generating rootfs images&lt;br /&gt;
&lt;br /&gt;
More information is available in the  [http://buildroot.uclibc.org/buildroot.html Buildroot&#039;s documentation]&lt;br /&gt;
&lt;br /&gt;
* Note: Previous versions (3.x) of Armadeus SDK stored the generated binary files at a different place: &#039;&#039; &#039;&#039;buildroot/binaries/XX/&#039;&#039; (where XX was the name of your board).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You then copy the binary image to your server directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==To keep your local copy/repository up-to-date with the armadeus GIT repository==&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will update your working directory to the latest release.&lt;br /&gt;
&lt;br /&gt;
Note: if &amp;quot;git pull&amp;quot; fails because a directory or a file already exists, then do:&lt;br /&gt;
 $ rm -rf &amp;lt;this-directory/file&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&lt;br /&gt;
You can do a:&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
to have the latest features automatically activated.&lt;br /&gt;
&lt;br /&gt;
You have to do a &#039;&#039;&#039;make&#039;&#039;&#039; to rebuild binary files and then upload the binary files to your target.&lt;br /&gt;
&lt;br /&gt;
Note: if definitively everything goes wrong while it worked before the last update.&lt;br /&gt;
You can apply the following procedure (all your modifications in buildroot will be lost):&lt;br /&gt;
 $ rm -rf buildroot/&lt;br /&gt;
 $ rm Makefile&lt;br /&gt;
 $ git pull&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15172</id>
		<title>LinuxInstall</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15172"/>
		<updated>2025-09-16T11:22:16Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Get Armadeus software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;How-To install Armadeus Software Development Kit (SDK) on Linux systems. This SDK is currently based on the (excellent) [http://buildroot.net/ Buildroot].&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation was successfully tested on the following distributions:&lt;br /&gt;
* Debian Lenny (5.0),  Squeeze (6.0.x), Wheezy (7.2), Jessie (8.0)&lt;br /&gt;
* X/KUbuntu Edgy Eft (6.10), Gutsy Gibbon (7.10), Hardy Heron (8.04) &amp;amp; Jaunty Jackalope (9.04)&lt;br /&gt;
* Ubuntu  Lucid Lynx (10.04) (32 &amp;amp; 64bits), 12.04 LTS (32 &amp;amp; 64bits), 13.10 (32 &amp;amp; 64bits), 14.04, 15.04 &amp;amp; 16.04&lt;br /&gt;
* LUbuntu 17.10&lt;br /&gt;
* Mandriva 2006&lt;br /&gt;
* Fedora Core 3 &amp;amp; 4, Fedora 10, Laughlin (14)&lt;br /&gt;
* Red Hat Enterprise 5.2&lt;br /&gt;
* Gentoo 10.0 (32 &amp;amp; 64 bits)&lt;br /&gt;
* SuSE 10.1, OpenSUSE 11.3 - 12.3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The installation may fail on:&#039;&#039;&#039;&lt;br /&gt;
* Ubuntu Karmic Koala (9.10): tslib fails to build&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;APF28 requirements:&#039;&#039;&#039;&lt;br /&gt;
* APF28 board requires a Linux distribution with (GNU) tar version 1.20 or later to compile the Linux Kernel - Please update or upgrade your Linux distribution. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites for Linux installation==&lt;br /&gt;
{{Note|From here we assume that your Linux system has a &#039;&#039;make&#039;&#039; version &#039;&#039;&#039;greater or equal to&#039;&#039;&#039; 3.81. To check it: &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make -v&lt;br /&gt;
GNU Make 3.81&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
For armadeus up to 3.4, make should be &#039;&#039;&#039;strictly&#039;&#039;&#039; make-3.81 (make-3.82 is too strict). A Fedora (14 and 15) -specific solution can be found later; other recent distributions such as mageia1 also have make-3.82, and a generic solution, based on configure&amp;amp;&amp;amp; make&amp;amp;&amp;amp; sudo make install can be used to install make-3.81 (which can be retrieved from http://ftp.gnu.org/gnu/make/make-6.81.tar.gz) in /usr/local/bin (and , according to one&#039;s PATH, make 3-81 can be invoked directly or as /usr/local/bin/make). &lt;br /&gt;
 &lt;br /&gt;
Depending on your distribution, some additional packages are required:&lt;br /&gt;
&lt;br /&gt;
===Debian/Ubuntu based systems===&lt;br /&gt;
[[Ubuntu/Debian installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Mandriva based systems=== &lt;br /&gt;
[[Mandriva installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===RPM-based systems (RedHat, Fedora, CentOS)===&lt;br /&gt;
[[RedHat/Fedora installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===OpenSuse based systems===&lt;br /&gt;
[[OpenSuse installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Gentoo based systems===&lt;br /&gt;
[[Gentoo installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
==Get Armadeus software==&lt;br /&gt;
* &#039;&#039;&#039;If you are a &amp;quot;careful&amp;quot; user&#039;&#039;&#039;, then download [https://gitlab.com/armadeus/armadeus-bsp/-/tags the latest stable installation tarball from gitlab] and detar it wherever you want:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ tar xjvf armadeus-7.0.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;If you want the latest snapshot or if you have a recent SOM ([[OPOS6UL]]/[[OPOS8MM]])&#039;&#039;&#039;, the whole development tree can be checked out from our [[GIT]] repository.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
 or if you don&#039;t have a gitlab account:&lt;br /&gt;
 $ https://gitlab.com/armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* depending on your previous choice, a directory named &#039;&#039;armadeus/&#039;&#039; or &#039;&#039;armadeus-7.0/&#039;&#039; will be created on your hard-disk and will contain all the files you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;&#039;Do not use spaces&#039;&#039;&#039; in the directory name !&lt;br /&gt;
* &#039;&#039;&#039;Do not use a directory path beginning with /usr.&#039;&#039;&#039; It is a known bug of Buildroot (until BR2012.11, at 2012-12).&lt;br /&gt;
* GIT write/push accesses are limited to the integrators ([[User:JulienB|JulienB]], [[User:SebastienSz|SebastienSz]], [[User:Jorasse|Jorasse]], [[User:FabienM|FabienM]], [[User:SebastienR|SebastienR]])&lt;br /&gt;
&lt;br /&gt;
==Configure SDK/BSP options==&lt;br /&gt;
{{Note|If you are new to Armadeus and have troubles compiling armadeus-5.x/armadeus-6.x using the following instructions, you may find some hints here: [[Releases]]}}&lt;br /&gt;
*Go to the directory where you put the Armadeus sources:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd armadeus/  (or armadeus-7.0/)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*The first time you compile an Armadeus distribution you have to specify the target (here the [[APF9328]]) to work with. &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make apf9328_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command reloads the default configuration to support your target and automatically start a Buildroot&#039;s configuration menu.&lt;br /&gt;
&lt;br /&gt;
* Current valid default configurations are:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
apf9328_defconfig  apf27_defconfig  pps_defconfig  apf28_defconfig  apf51_defconfig  pps51_defconfig apf6_defconfig apf6legacy_defconfig opos6ul_defconfig opos6ulnano_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note| To get the full list of available config just type make, it will download buildroot and print following message :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
[...]&lt;br /&gt;
 System not configured. Use make &amp;lt;board&amp;gt;_defconfig &lt;br /&gt;
 armadeus valid configurations are:                &lt;br /&gt;
     opos6ul_legacy_defconfig opos6ulnano-preempt-rt_defconfig apf6_defconfig pps_defconfig opos6ultest_defconfig apf51_defconfig opos6ulsp_defconfig apf6dawnsmalllinux_defconfig apf27preempt-rt_defconfig apf27test_defconfig apf27_defconfig apf28legacytest_defconfig opos6ullegacy-4.14_defconfig opos6ulnano_defconfig apf28legacy_defconfig apf6mainline-4.19_defconfig opos6ul_defconfig apf6legacy_defconfig apf6xenomai_defconfig apf51test_defconfig opos6ul-preempt-rt_defconfig apf6legacy-preempt-rt_defconfig apf6legacy-4.1_defconfig pps51_defconfig apf6mainline-4.9_defconfig apf28test_defconfig apf28_defconfig apf6mediacenter_defconfig opos6ullegacy-4.9_defconfig opos6ul_recovery_defconfig apf6failsafe_defconfig apf6test_defconfig opos6ullegacy-4.1_defconfig apf27xenomai_defconfig&lt;br /&gt;
                                                   &lt;br /&gt;
Makefile:129: recipe for target &#039;/usr/local/projects/apf6_sp_419/buildroot/.configured&#039; failed&lt;br /&gt;
make: *** [/usr/local/projects/apf6_sp_419/buildroot/.configured] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For PPS boards, please see [[APF27_PPS]] or [[PPS51]] Wiki pages, as these boards have specific build.&lt;br /&gt;
&lt;br /&gt;
* After some downloads, you will get the Buildroot configuration interface:&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ever made changes during the following steps, at any time, you can reload the default configuration with:&lt;br /&gt;
 $ make xxx_defconfig       (xxx depending on your module name)}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Menuconfig3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
*If you are not familiar with Buildroot here are some tips:&lt;br /&gt;
*# you can move the highlighted item with the &amp;quot;up&amp;quot;/&amp;quot;down&amp;quot; arrow keys&lt;br /&gt;
*# with the &amp;quot;left&amp;quot;/&amp;quot;right&amp;quot; arrow keys you can choose between &amp;quot;Select&amp;quot;, &amp;quot;Exit&amp;quot; or &amp;quot;Help&amp;quot; buttons&lt;br /&gt;
*# &amp;quot;space&amp;quot;/&amp;quot;enter&amp;quot;:&lt;br /&gt;
*#* selects the currently highlighted item if you are on the &amp;quot;Select&amp;quot; button&lt;br /&gt;
*#* go back in previous menu if you are on &amp;quot;Exit&amp;quot; button&lt;br /&gt;
*#* show you some Help for current item if you are on &amp;quot;Help&amp;quot; button&lt;br /&gt;
*# for more Help about Buildroot commands, select &amp;quot;Help&amp;quot; in the main configuration screen&lt;br /&gt;
&lt;br /&gt;
* Update the memory configuration of your board (&#039;&#039;&#039;if needed&#039;&#039;&#039;; by default BSP is configured for the minimal memory configuration available on the corresponding board):&lt;br /&gt;
&lt;br /&gt;
:In menu:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;System configuration  ---&amp;gt;    [*] Armadeus Device Support  ---&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:you can check and change the quantity of RAM available on your Armadeus board:&lt;br /&gt;
:[[Image:Build_config_memory.png]]&lt;br /&gt;
:For [[APF9328]] the memory can be either 16 or 32MiB (be sure to select 1 RAM chip)&lt;br /&gt;
:For [[APF27]] it could be either 64MiB or 128MiB (2 x 64MiB) (in that case be sure to select 2 chips of 64MiB instead of 1 chip of 128MiB).&lt;br /&gt;
:For [[APF51]] it could be either 256MiB or 512MiB (2x256MiB) (in such case be sure to select 2 chips of 256MiB instead of 1 chip of 512).&lt;br /&gt;
:For [[APF28]] The memory can be 128, 256, 512 or 1024MiB (be sure to select 1 RAM chip).&lt;br /&gt;
:For [[APF6]]/[[APF6SP]] The memory can be 512 Mbytes or 1Gbytes with ram chip size of 512Mbytes.&lt;br /&gt;
:For [[OPOS6UL]]/[[OPOS6UL_NANO]] The memory size is automatically detected so you don&#039;t care ;-)&lt;br /&gt;
&lt;br /&gt;
* You may decrease the compilation time by increasing the number of parallel jobs running simultaneously on your system (the result is not guaranteed). This option is located in:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build Options ---&amp;gt;    (0) Number of jobs to run simultaneously&amp;lt;/pre&amp;gt;&lt;br /&gt;
0 means that Buildroot will try to guess automatically how much parallel jobs it can launch.&lt;br /&gt;
&lt;br /&gt;
* During the SDK/BSP build, a lot of software archives are downloaded from Internet. The downloaded files are put by default in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. &#039;&#039;&#039;If you have several views or plan to build the toolchain several times&#039;&#039;&#039;, we advise you to put all the downloaded files in &#039;&#039;/local/downloads&#039;&#039; (for example). This is done by configuring Buildroot to use this directory for all your views. Nevertheless, Buildroot will be downloaded separately for each build environment you set up.&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build options  ---&amp;gt;    (...) Download dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
:[[Image:Build_config_download.png]]&lt;br /&gt;
{{Note|Of course, &#039;&#039;/local/downloads&#039;&#039; should exists on your system and you should have writing rights on it !}}&lt;br /&gt;
* In recent Buildroot you can also use the following method:&lt;br /&gt;
 export BR2_DL_DIR=/local/downloads&lt;br /&gt;
&lt;br /&gt;
* After the build, we advise you to copy all the files in &#039;&#039;downloads/&#039;&#039; / &#039;&#039;/local/downloads&#039;&#039; on a removable medium, in case you want to install the development tools on other systems, without to have to reload all the archives.&lt;br /&gt;
&lt;br /&gt;
* Now, Exit the configuration tool and save your configuration&lt;br /&gt;
&lt;br /&gt;
* You can come back to this configuration menu, by typing (your changes will be kept): &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launch build==&lt;br /&gt;
 $ make&lt;br /&gt;
The toolchain and the full distribution are automatically built. During this procedure, several files are downloaded from Internet. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please wait for a while.... it takes at least one hour for the first run!&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
By default, the downloaded files/tarball are put in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. Please see the previous chapter to know how to optimize that if you plan to build several views or want to build faster.&lt;br /&gt;
&lt;br /&gt;
==Enjoy the result==&lt;br /&gt;
The generated binary files can be found in the subdirectory &#039;&#039;buildroot/output/images&#039;&#039;:&lt;br /&gt;
*&#039;&#039;apf9328-u-boot.brec&#039;&#039; (only on [[APF9328]]): BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working (see [[BootLoader]] page)&lt;br /&gt;
*&#039;&#039;xxx-u-boot.bin&#039;&#039;: U-Boot image file to be used with U-Boot itself, (see [[BootLoader#Update_U-Boot | updating U-Boot]])&lt;br /&gt;
*&#039;&#039;xxx-linux.bin&#039;&#039;: Linux image to use with U-Boot, (see [[Target_Software_Installation#Linux_kernel_installation | updating Linux]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.jffs2&#039;&#039;: JFFS2 filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ubi&#039;&#039; (not supported on [[APF9328]]): [[UBIFS|UBI]] filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ext4&#039;&#039;: EXT4 filesystem/rootfs image to use with U-Boot, (on [[APF6]] and [[OPOS6UL]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.tar&#039;&#039;: for an NFS/MMC based rootfs, (see [[Network_Configuration#Boot_from_NFS | Booting from NFS]] &amp;amp; [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note the new naming convention of binary files and directories (since Armadeus 4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;buildroot/output/build&#039;&#039;: contains all the build results for target root filesystem, Linux, Busybox and U-Boot...&lt;br /&gt;
*&#039;&#039;buildroot/output/toolchain/&#039;&#039;: cross compilation toolchain&#039;s build dir. Binaries usable for cross-compilation are in &#039;&#039;buildroot/output/host/usr/bin&#039;&#039;.&lt;br /&gt;
*&#039;&#039;buildroot/output/target/&#039;&#039;: target filessytem before generating rootfs images&lt;br /&gt;
&lt;br /&gt;
More information is available in the  [http://buildroot.uclibc.org/buildroot.html Buildroot&#039;s documentation]&lt;br /&gt;
&lt;br /&gt;
* Note: Previous versions (3.x) of Armadeus SDK stored the generated binary files at a different place: &#039;&#039; &#039;&#039;buildroot/binaries/XX/&#039;&#039; (where XX was the name of your board).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You then copy the binary image to your server directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==To keep your local copy/repository up-to-date with the armadeus GIT repository==&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will update your working directory to the latest release.&lt;br /&gt;
&lt;br /&gt;
Note: if &amp;quot;git pull&amp;quot; fails because a directory or a file already exists, then do:&lt;br /&gt;
 $ rm -rf &amp;lt;this-directory/file&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&lt;br /&gt;
You can do a:&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
to have the latest features automatically activated.&lt;br /&gt;
&lt;br /&gt;
You have to do a &#039;&#039;&#039;make&#039;&#039;&#039; to rebuild binary files and then upload the binary files to your target.&lt;br /&gt;
&lt;br /&gt;
Note: if definitively everything goes wrong while it worked before the last update.&lt;br /&gt;
You can apply the following procedure (all your modifications in buildroot will be lost):&lt;br /&gt;
 $ rm -rf buildroot/&lt;br /&gt;
 $ rm Makefile&lt;br /&gt;
 $ git pull&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Ubuntu/Debian_installation_prerequisites&amp;diff=15171</id>
		<title>Ubuntu/Debian installation prerequisites</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Ubuntu/Debian_installation_prerequisites&amp;diff=15171"/>
		<updated>2025-09-16T11:04:40Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Mandatory packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mandatory packages==&lt;br /&gt;
* you can use the following commands (one at a time) to get them (assuming your userid is allowed to use &#039;&#039;sudo&#039;&#039; (execution of commands as root)):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 sudo apt-get install -y build-essential gcc g++ autoconf automake libtool bison flex gettext&lt;br /&gt;
 sudo apt-get install -y patch subversion texinfo wget git-core&lt;br /&gt;
 sudo apt-get install -y libncurses6 libncurses-dev&lt;br /&gt;
 sudo apt-get install -y zlib1g-dev liblzo2-2 liblzo2-dev&lt;br /&gt;
 sudo apt-get install -y libacl1 libacl1-dev gawk cvs curl lzma&lt;br /&gt;
 sudo apt-get install -y uuid-dev mercurial unzip&lt;br /&gt;
 sudo apt-get install -y libftdi-dev&lt;br /&gt;
 sudo apt-get install -y bc quilt&lt;br /&gt;
 &lt;br /&gt;
 # for Linaro external toolchain of APF6 on 64bits Host:&lt;br /&gt;
 sudo apt-get install -y lib32stdc++6 lib32z1&lt;br /&gt;
 &lt;br /&gt;
 # to use recover tool if board is bricked:&lt;br /&gt;
 #            python 2 :                                               /                 python 3 :&lt;br /&gt;
 sudo apt-get install -y python-serial python-usb libusb-1.0-0-dev     /    sudo apt-get install -y python3-serial python3-usb libusb-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* you will need &#039;&#039;bash&#039;&#039; as system interpreter and &#039;&#039;&#039;NOT&#039;&#039;&#039; &#039;&#039;dash&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo dpkg-reconfigure dash      (choose No)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Localization===&lt;br /&gt;
* if your distribution is localized in a language different of English, you will need to install &amp;quot;en_US&amp;quot; locale in order to compile the toolchain (by default our toolchain (uClibc) is configured to only support English). If not, you will get compilation errors like this one:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 extra/locale/locale_mmap.h:46: error: &#039;__LOCALE_DATA_WCctype_II_LEN&#039; undeclared here (not in a function)&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To solve this, install en_US.UTF-8 locale with the following:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ sudo dpkg-reconfigure locales&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===64 bits Hosts===&lt;br /&gt;
* On Debian/Jessie, these packages seems to be required (on 64 bits Host):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libx32stdc++6 libx32stdc++-4.9-dev lib64stdc++6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* On Debian 9 the following seems also recommended:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 sudo apt-get install libssl1.0-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On LUbuntu 16.04 it is:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 sudo apt-get install libssl-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
otherwise you will get:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: No such file or directory&lt;br /&gt;
compilation terminated.&lt;br /&gt;
scripts/Makefile.host:90: recipe for target &#039;scripts/extract-cert&#039; failed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On *Ubuntu 16.04, the following is required:&lt;br /&gt;
&amp;lt;pre class=host&amp;gt;&lt;br /&gt;
sudo apt-get install gcc-multilib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
otherwise you may get:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
In file included from ../../../libgcc/libgcc2.c:27:0:&lt;br /&gt;
../../../libgcc/../gcc/tsystem.h:87:19: fatal error: stdio.h: No such file or directory&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
                   ^&lt;br /&gt;
compilation terminated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Optional packages==&lt;br /&gt;
Not mandatory but useful to add for compiling some Buildroot packages:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 sudo apt-get -y install libglib2.0-dev &lt;br /&gt;
 # for fbtest&lt;br /&gt;
 sudo apt-get -y install libnetpbm10-dev&lt;br /&gt;
 # for Matchbox&lt;br /&gt;
 sudo apt-get -y install python-xcbgen&lt;br /&gt;
 # for mesa&lt;br /&gt;
 sudo apt-get -y install xutils-dev&lt;br /&gt;
 # for imx_usb&lt;br /&gt;
 sudo apt-get -y install pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java devt===&lt;br /&gt;
{| cellspacing=&amp;quot;20&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
====Ubuntu====&lt;br /&gt;
* To compile java jamvm and gnu-classpath:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 sudo apt-get -y install gcj-jdk &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
====Debian====&lt;br /&gt;
* To compile java jamvm and gnu-classpath:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 sudo apt-get -y install java-gcj-compat-dev default-jdk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Preempt-rt&amp;diff=15160</id>
		<title>Preempt-rt</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Preempt-rt&amp;diff=15160"/>
		<updated>2025-02-20T16:53:54Z</updated>

		<summary type="html">&lt;p&gt;JulienB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;preempt-rt are a series of patches to improve Linux kernel realtime performances. This page explain how to use it.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* Depending on your board, you may have a Buildroot defconfig to apply preempt-rt patches automagically. For example for [[OPOS6UL]]:&lt;br /&gt;
&amp;lt;pre class=host&amp;gt;&lt;br /&gt;
$ make opos6ul-preempt-rt_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If no config is available, you will have to do the job yourself, by finding a kernel version compatible with preempt-rt patches from https://www.kernel.org/pub/linux/kernel/projects/rt/&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
* You can change realtime priority of tasks with &#039;&#039;chrt&#039;&#039;. For example to set process X to priority 20 in FIFO scheduling queue, you have to do:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# chrt -p -f 20 X&lt;br /&gt;
&lt;br /&gt;
pid X&#039;s current scheduling policy: SCHED_OTHER&lt;br /&gt;
pid X&#039;s current scheduling priority: 0&lt;br /&gt;
pid X&#039;s new scheduling policy: SCHED_FIFO&lt;br /&gt;
pid X&#039;s new scheduling priority: 20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The more priority you set, the more your process is prioritary.&lt;br /&gt;
* Priority queues are OTHER (no realtime), FIFO (First In First Out), RR (Round Robin time share)&lt;br /&gt;
* You can validate realtime performances of your system with &#039;&#039;cyclictest&#039;&#039;. For example to launch 10 processes triggering on timer set to 10ms with different descending priorities, you can do:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# cyclictest -t 10 -p 20 -n -i 10000 --priospread&lt;br /&gt;
&lt;br /&gt;
/dev/cpu_dma_latency set to 0us&lt;br /&gt;
policy: fifo: loadavg: 0.45 0.23 0.10 1/86 230          &lt;br /&gt;
&lt;br /&gt;
T: 0 (  219) P:99 I:10000 C:  34012 Min:     67 Act:  166 Avg:  174 Max:     536&lt;br /&gt;
T: 1 (  220) P:98 I:10500 C:  32393 Min:     76 Act:  228 Avg:  202 Max:     719&lt;br /&gt;
T: 2 (  221) P:97 I:11000 C:  30920 Min:     66 Act:  170 Avg:  197 Max:    1154&lt;br /&gt;
T: 3 (  222) P:96 I:11500 C:  29576 Min:     65 Act:  217 Avg:  194 Max:    1176&lt;br /&gt;
T: 4 (  223) P:95 I:12000 C:  28343 Min:     72 Act:  167 Avg:  194 Max:    1912&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* times are in microseconds&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/preemptrt_setup&lt;br /&gt;
* https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base&lt;br /&gt;
&lt;br /&gt;
[[Category:Real-Time]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Preempt-rt&amp;diff=15159</id>
		<title>Preempt-rt</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Preempt-rt&amp;diff=15159"/>
		<updated>2025-02-20T16:26:18Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;preempt-rt are a series of patches to improve Linux kernel realtime performances. This page explain how to use it.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* Depending on your board, you may have a Buildroot defconfig to apply preempt-rt automatically. For example for [[OPOS6UL]]:&lt;br /&gt;
&amp;lt;pre class=host&amp;gt;&lt;br /&gt;
$ make opos6ul-preempt-rt_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If no config is available, you will have to do the job yourself, by finding a kernel version compatible with preempt-rt patches from https://www.kernel.org/pub/linux/kernel/projects/rt/&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
* You can change realtime priority of tasks with &#039;&#039;chrt&#039;&#039;. For example to set process X to priority 20 in FIFO scheduling queue, you have to do:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# chrt -p -f 20 X&lt;br /&gt;
&lt;br /&gt;
pid X&#039;s current scheduling policy: SCHED_OTHER&lt;br /&gt;
pid X&#039;s current scheduling priority: 0&lt;br /&gt;
pid X&#039;s new scheduling policy: SCHED_FIFO&lt;br /&gt;
pid X&#039;s new scheduling priority: 20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The more priority you set, the more your process is prioritary.&lt;br /&gt;
* Priority queues are OTHER (no realtime), FIFO (First In First Out), RR (Round Robin time share)&lt;br /&gt;
* You can validate realtime performances of your system with &#039;&#039;cyclictest&#039;&#039;. For example to launch 10 processes triggering on timer set to 10ms with different descending priorities, you can do:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# cyclictest -t 10 -p 20 -n -i 10000 --priospread&lt;br /&gt;
&lt;br /&gt;
/dev/cpu_dma_latency set to 0us&lt;br /&gt;
policy: fifo: loadavg: 0.45 0.23 0.10 1/86 230          &lt;br /&gt;
&lt;br /&gt;
T: 0 (  219) P:99 I:10000 C:  34012 Min:     67 Act:  166 Avg:  174 Max:     536&lt;br /&gt;
T: 1 (  220) P:98 I:10500 C:  32393 Min:     76 Act:  228 Avg:  202 Max:     719&lt;br /&gt;
T: 2 (  221) P:97 I:11000 C:  30920 Min:     66 Act:  170 Avg:  197 Max:    1154&lt;br /&gt;
T: 3 (  222) P:96 I:11500 C:  29576 Min:     65 Act:  217 Avg:  194 Max:    1176&lt;br /&gt;
T: 4 (  223) P:95 I:12000 C:  28343 Min:     72 Act:  167 Avg:  194 Max:    1912&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* times are in microseconds&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/preemptrt_setup&lt;br /&gt;
* https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base&lt;br /&gt;
&lt;br /&gt;
[[Category:Real-Time]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15158</id>
		<title>Secure boot on OPOS93</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15158"/>
		<updated>2025-02-13T14:59:44Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Closing the OPOS93 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This document is a quick how-to boot a signed boot firmware on the OPOS93 SoM. It summarizes the documents provided by NXP: &lt;br /&gt;
&lt;br /&gt;
* [https://www.nxp.com/doc/an12312 AN12312]&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.1.22-2.0.0/doc/imx/ahab/introduction_ahab.txt&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.6.36-2.1.0/doc/imx/ahab/guides/mx8ulp_9x_secure_boot.txt&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== IMX CST TOOL ==&lt;br /&gt;
&lt;br /&gt;
* Download the [https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW IMX CST TOOL] and unarchive it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
tar xf IMX_CST_TOOL_NEW.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== imx-mkimage ==&lt;br /&gt;
&lt;br /&gt;
* Checkout the imx-mkimage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
git clone -b lf-6.6.36-2.1.0 https://github.com/nxp-imx/imx-mkimage.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Latest Armadeus U-Boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure you have the latest Armadeus U-Boot installed on you OPOS93 SoM. It must have the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is not available on your OPOS93 SoM, update to the latest Armadeus U-Boot.&lt;br /&gt;
&lt;br /&gt;
= Generating a PKI tree =&lt;br /&gt;
&lt;br /&gt;
* To generate your PKI tree, go to the CST TOOL directory and use the script &#039;&#039;&#039;ahab_pki_tree.sh&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd cst-3.4.1/&lt;br /&gt;
$ ./keys/ahab_pki_tree.sh&lt;br /&gt;
...&lt;br /&gt;
Do you want to use an existing CA key (y/n)?: n&lt;br /&gt;
Do you want to use Elliptic Curve Cryptography (y/n)?: y&lt;br /&gt;
Enter length for elliptic curve to be used for PKI tree:&lt;br /&gt;
Possible values p256, p384, p521:  p384&lt;br /&gt;
Enter the digest algorithm to use: sha384&lt;br /&gt;
Enter PKI tree duration (years): 5&lt;br /&gt;
Do you want the SRK certificates to have the CA flag set? (y/n)?: y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Generating SRK Table and SRK Hash =&lt;br /&gt;
&lt;br /&gt;
* Generate the SRK Table and SRK Hash with &#039;&#039;&#039;srktool&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd crts/&lt;br /&gt;
$ ../linux64/bin/srktool -a -d sha256 -s sha384 -t SRK_1_2_3_4_table.bin \&lt;br /&gt;
  -e SRK_1_2_3_4_fuse.bin -f 1 -c \&lt;br /&gt;
  SRK1_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK2_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK3_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK4_sha384_secp384r1_v3_usr_crt.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Regenerate the SRK HASH (SRK_1_2_3_4_fuse.bin) by using SHA256 with SRK_1_2_3_4_table.bin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ openssl dgst -binary -sha256 SRK_1_2_3_4_table.bin &amp;gt; SRK_1_2_3_4_fuse.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check if the hash in the SRK_1_2_3_4_fuse.bin is correct:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ hexdump -C SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&lt;br /&gt;
$ sha256sum SRK_1_2_3_4_table.bin&lt;br /&gt;
db2959f290dfc39c53394566e0b7582985e6f3b1af00983de5e804fe7a451024  SRK_1_2_3_4_table.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Signing the boot image =&lt;br /&gt;
&lt;br /&gt;
* From the images directory of the Armadeus BSP, copy the files needed to generate a boot image (SPL, U-Boot proper, ATF) into the i.MX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot-spl.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/bl31.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/lpddr4* &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/ahab-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/mx93a1-ahab-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing ATF + U-Boot proper Image container ==&lt;br /&gt;
&lt;br /&gt;
* Generate the u-boot-atf-container.img file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x0&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x110&lt;br /&gt;
        Offsets =       0x0     0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A CSF description file is needed to sign the u-boot-atf-container.img file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_uboot_atf.txt here]. In this file, update the offset you previously noted and the eventually the name and path of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;u-boot-atf-container.img&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block&lt;br /&gt;
Offsets   = 0x0               0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the u-boot-atf-container.img with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_uboot_atf.txt -o signed-u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Replace the u-boot-atf-container.img file with the signed-u-boot-atf-container.img file in the iMX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp signed-u-boot-atf-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing the boot image ==&lt;br /&gt;
&lt;br /&gt;
* Generate the flash.bin file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 flash_singleboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x400&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x490&lt;br /&gt;
        Offsets =       0x400   0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Another CSF description file is needed to sign the flash.bin file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_boot_image.txt here]. In this file, update the offset you previously noted and the eventually the name of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;/home/sszy/development/imx-mkimage/iMX93/flash.bin&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block (printed out by mkimage)&lt;br /&gt;
Offsets   = 0x400             0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the flash.bin file with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_boot_image.txt -o signed-flash.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Flashing U-Boot =&lt;br /&gt;
&lt;br /&gt;
* On your computer, copy the signed boot image into the root directory of your tftp server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
cp flash-signed.bin /tftproot/opos93-u-boot.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On your OPOS93, update U-Boot as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_uboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Burning SRK hash into the fuses =&lt;br /&gt;
&lt;br /&gt;
* On your host computer, dump the SRK hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ od -t x4 SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On the OPOS93, on U-Boot, burn the SRK hash into the fuses.&lt;br /&gt;
&#039;&#039;&#039;Obviously, don&#039;t burn these values but the ones the previous command outputs with your keys !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 0 0xdb2959f2&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 1 0x90dfc39c&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 2 0x53394566&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 3 0xe0b75829&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 4 0x85e6f3b1&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 5 0xaf00983d&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 6 0xe5e804fe&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 7 0x7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Checking = &lt;br /&gt;
&lt;br /&gt;
* Power off / on the board, and stop the boot into U-Boot. Run the ahab_status command. If everything is ok, there should be no AHAB events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Closing the OPOS93 =&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before closing your OPOS93, make sure everything is ok (double or triple check...), there is no AHAB events and you are able to boot a signed image. A missigned boot image on a closed OPOS93 will make your OPOS93 unrecoverable !}}&lt;br /&gt;
&lt;br /&gt;
* To close your OPOS93, run the &#039;&#039;&#039;ahab_close&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Reboot and check with the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000020, OEM Closed&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15157</id>
		<title>Secure boot on OPOS93</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15157"/>
		<updated>2025-02-13T14:59:27Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Checking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This document is a quick how-to boot a signed boot firmware on the OPOS93 SoM. It summarizes the documents provided by NXP: &lt;br /&gt;
&lt;br /&gt;
* [https://www.nxp.com/doc/an12312 AN12312]&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.1.22-2.0.0/doc/imx/ahab/introduction_ahab.txt&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.6.36-2.1.0/doc/imx/ahab/guides/mx8ulp_9x_secure_boot.txt&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== IMX CST TOOL ==&lt;br /&gt;
&lt;br /&gt;
* Download the [https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW IMX CST TOOL] and unarchive it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
tar xf IMX_CST_TOOL_NEW.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== imx-mkimage ==&lt;br /&gt;
&lt;br /&gt;
* Checkout the imx-mkimage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
git clone -b lf-6.6.36-2.1.0 https://github.com/nxp-imx/imx-mkimage.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Latest Armadeus U-Boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure you have the latest Armadeus U-Boot installed on you OPOS93 SoM. It must have the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is not available on your OPOS93 SoM, update to the latest Armadeus U-Boot.&lt;br /&gt;
&lt;br /&gt;
= Generating a PKI tree =&lt;br /&gt;
&lt;br /&gt;
* To generate your PKI tree, go to the CST TOOL directory and use the script &#039;&#039;&#039;ahab_pki_tree.sh&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd cst-3.4.1/&lt;br /&gt;
$ ./keys/ahab_pki_tree.sh&lt;br /&gt;
...&lt;br /&gt;
Do you want to use an existing CA key (y/n)?: n&lt;br /&gt;
Do you want to use Elliptic Curve Cryptography (y/n)?: y&lt;br /&gt;
Enter length for elliptic curve to be used for PKI tree:&lt;br /&gt;
Possible values p256, p384, p521:  p384&lt;br /&gt;
Enter the digest algorithm to use: sha384&lt;br /&gt;
Enter PKI tree duration (years): 5&lt;br /&gt;
Do you want the SRK certificates to have the CA flag set? (y/n)?: y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Generating SRK Table and SRK Hash =&lt;br /&gt;
&lt;br /&gt;
* Generate the SRK Table and SRK Hash with &#039;&#039;&#039;srktool&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd crts/&lt;br /&gt;
$ ../linux64/bin/srktool -a -d sha256 -s sha384 -t SRK_1_2_3_4_table.bin \&lt;br /&gt;
  -e SRK_1_2_3_4_fuse.bin -f 1 -c \&lt;br /&gt;
  SRK1_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK2_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK3_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK4_sha384_secp384r1_v3_usr_crt.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Regenerate the SRK HASH (SRK_1_2_3_4_fuse.bin) by using SHA256 with SRK_1_2_3_4_table.bin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ openssl dgst -binary -sha256 SRK_1_2_3_4_table.bin &amp;gt; SRK_1_2_3_4_fuse.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check if the hash in the SRK_1_2_3_4_fuse.bin is correct:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ hexdump -C SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&lt;br /&gt;
$ sha256sum SRK_1_2_3_4_table.bin&lt;br /&gt;
db2959f290dfc39c53394566e0b7582985e6f3b1af00983de5e804fe7a451024  SRK_1_2_3_4_table.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Signing the boot image =&lt;br /&gt;
&lt;br /&gt;
* From the images directory of the Armadeus BSP, copy the files needed to generate a boot image (SPL, U-Boot proper, ATF) into the i.MX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot-spl.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/bl31.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/lpddr4* &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/ahab-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/mx93a1-ahab-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing ATF + U-Boot proper Image container ==&lt;br /&gt;
&lt;br /&gt;
* Generate the u-boot-atf-container.img file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x0&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x110&lt;br /&gt;
        Offsets =       0x0     0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A CSF description file is needed to sign the u-boot-atf-container.img file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_uboot_atf.txt here]. In this file, update the offset you previously noted and the eventually the name and path of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;u-boot-atf-container.img&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block&lt;br /&gt;
Offsets   = 0x0               0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the u-boot-atf-container.img with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_uboot_atf.txt -o signed-u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Replace the u-boot-atf-container.img file with the signed-u-boot-atf-container.img file in the iMX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp signed-u-boot-atf-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing the boot image ==&lt;br /&gt;
&lt;br /&gt;
* Generate the flash.bin file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 flash_singleboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x400&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x490&lt;br /&gt;
        Offsets =       0x400   0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Another CSF description file is needed to sign the flash.bin file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_boot_image.txt here]. In this file, update the offset you previously noted and the eventually the name of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;/home/sszy/development/imx-mkimage/iMX93/flash.bin&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block (printed out by mkimage)&lt;br /&gt;
Offsets   = 0x400             0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the flash.bin file with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_boot_image.txt -o signed-flash.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Flashing U-Boot =&lt;br /&gt;
&lt;br /&gt;
* On your computer, copy the signed boot image into the root directory of your tftp server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
cp flash-signed.bin /tftproot/opos93-u-boot.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On your OPOS93, update U-Boot as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_uboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Burning SRK hash into the fuses =&lt;br /&gt;
&lt;br /&gt;
* On your host computer, dump the SRK hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ od -t x4 SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On the OPOS93, on U-Boot, burn the SRK hash into the fuses.&lt;br /&gt;
&#039;&#039;&#039;Obviously, don&#039;t burn these values but the ones the previous command outputs with your keys !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 0 0xdb2959f2&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 1 0x90dfc39c&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 2 0x53394566&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 3 0xe0b75829&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 4 0x85e6f3b1&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 5 0xaf00983d&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 6 0xe5e804fe&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 7 0x7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Checking = &lt;br /&gt;
&lt;br /&gt;
* Power off / on the board, and stop the boot into U-Boot. Run the ahab_status command. If everything is ok, there should be no AHAB events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Closing the OPOS93 =&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before closing your OPOS93, make sure everything is ok (double or triple check...), there is no AHAB events and you are able to boot a signed image. A missigned boot image on a closed OPOS93 will make your OPOS93 unrecoverable !}}&lt;br /&gt;
&lt;br /&gt;
* To close your OPOS93, run the &#039;&#039;&#039;ahab_close&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Reboot and check with the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000020, OEM Closed&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15156</id>
		<title>Secure boot on OPOS93</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15156"/>
		<updated>2025-02-13T14:59:06Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Burning SRK hash into the fuses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This document is a quick how-to boot a signed boot firmware on the OPOS93 SoM. It summarizes the documents provided by NXP: &lt;br /&gt;
&lt;br /&gt;
* [https://www.nxp.com/doc/an12312 AN12312]&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.1.22-2.0.0/doc/imx/ahab/introduction_ahab.txt&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.6.36-2.1.0/doc/imx/ahab/guides/mx8ulp_9x_secure_boot.txt&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== IMX CST TOOL ==&lt;br /&gt;
&lt;br /&gt;
* Download the [https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW IMX CST TOOL] and unarchive it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
tar xf IMX_CST_TOOL_NEW.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== imx-mkimage ==&lt;br /&gt;
&lt;br /&gt;
* Checkout the imx-mkimage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
git clone -b lf-6.6.36-2.1.0 https://github.com/nxp-imx/imx-mkimage.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Latest Armadeus U-Boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure you have the latest Armadeus U-Boot installed on you OPOS93 SoM. It must have the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is not available on your OPOS93 SoM, update to the latest Armadeus U-Boot.&lt;br /&gt;
&lt;br /&gt;
= Generating a PKI tree =&lt;br /&gt;
&lt;br /&gt;
* To generate your PKI tree, go to the CST TOOL directory and use the script &#039;&#039;&#039;ahab_pki_tree.sh&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd cst-3.4.1/&lt;br /&gt;
$ ./keys/ahab_pki_tree.sh&lt;br /&gt;
...&lt;br /&gt;
Do you want to use an existing CA key (y/n)?: n&lt;br /&gt;
Do you want to use Elliptic Curve Cryptography (y/n)?: y&lt;br /&gt;
Enter length for elliptic curve to be used for PKI tree:&lt;br /&gt;
Possible values p256, p384, p521:  p384&lt;br /&gt;
Enter the digest algorithm to use: sha384&lt;br /&gt;
Enter PKI tree duration (years): 5&lt;br /&gt;
Do you want the SRK certificates to have the CA flag set? (y/n)?: y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Generating SRK Table and SRK Hash =&lt;br /&gt;
&lt;br /&gt;
* Generate the SRK Table and SRK Hash with &#039;&#039;&#039;srktool&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd crts/&lt;br /&gt;
$ ../linux64/bin/srktool -a -d sha256 -s sha384 -t SRK_1_2_3_4_table.bin \&lt;br /&gt;
  -e SRK_1_2_3_4_fuse.bin -f 1 -c \&lt;br /&gt;
  SRK1_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK2_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK3_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK4_sha384_secp384r1_v3_usr_crt.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Regenerate the SRK HASH (SRK_1_2_3_4_fuse.bin) by using SHA256 with SRK_1_2_3_4_table.bin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ openssl dgst -binary -sha256 SRK_1_2_3_4_table.bin &amp;gt; SRK_1_2_3_4_fuse.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check if the hash in the SRK_1_2_3_4_fuse.bin is correct:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ hexdump -C SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&lt;br /&gt;
$ sha256sum SRK_1_2_3_4_table.bin&lt;br /&gt;
db2959f290dfc39c53394566e0b7582985e6f3b1af00983de5e804fe7a451024  SRK_1_2_3_4_table.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Signing the boot image =&lt;br /&gt;
&lt;br /&gt;
* From the images directory of the Armadeus BSP, copy the files needed to generate a boot image (SPL, U-Boot proper, ATF) into the i.MX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot-spl.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/bl31.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/lpddr4* &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/ahab-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/mx93a1-ahab-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing ATF + U-Boot proper Image container ==&lt;br /&gt;
&lt;br /&gt;
* Generate the u-boot-atf-container.img file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x0&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x110&lt;br /&gt;
        Offsets =       0x0     0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A CSF description file is needed to sign the u-boot-atf-container.img file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_uboot_atf.txt here]. In this file, update the offset you previously noted and the eventually the name and path of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;u-boot-atf-container.img&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block&lt;br /&gt;
Offsets   = 0x0               0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the u-boot-atf-container.img with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_uboot_atf.txt -o signed-u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Replace the u-boot-atf-container.img file with the signed-u-boot-atf-container.img file in the iMX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp signed-u-boot-atf-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing the boot image ==&lt;br /&gt;
&lt;br /&gt;
* Generate the flash.bin file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 flash_singleboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x400&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x490&lt;br /&gt;
        Offsets =       0x400   0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Another CSF description file is needed to sign the flash.bin file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_boot_image.txt here]. In this file, update the offset you previously noted and the eventually the name of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;/home/sszy/development/imx-mkimage/iMX93/flash.bin&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block (printed out by mkimage)&lt;br /&gt;
Offsets   = 0x400             0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the flash.bin file with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_boot_image.txt -o signed-flash.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Flashing U-Boot =&lt;br /&gt;
&lt;br /&gt;
* On your computer, copy the signed boot image into the root directory of your tftp server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
cp flash-signed.bin /tftproot/opos93-u-boot.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On your OPOS93, update U-Boot as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_uboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Burning SRK hash into the fuses =&lt;br /&gt;
&lt;br /&gt;
* On your host computer, dump the SRK hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ od -t x4 SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On the OPOS93, on U-Boot, burn the SRK hash into the fuses.&lt;br /&gt;
&#039;&#039;&#039;Obviously, don&#039;t burn these values but the ones the previous command outputs with your keys !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 0 0xdb2959f2&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 1 0x90dfc39c&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 2 0x53394566&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 3 0xe0b75829&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 4 0x85e6f3b1&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 5 0xaf00983d&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 6 0xe5e804fe&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 7 0x7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Checking = &lt;br /&gt;
&lt;br /&gt;
* Power off / on the board, and stop the boot into U-Boot. Run the ahab_status command. If everything is ok, there should be no AHAB events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Closing the OPOS93 =&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before closing your OPOS93, make sure everything is ok (double or triple check...), there is no AHAB events and you are able to boot a signed image. A missigned boot image on a closed OPOS93 will make your OPOS93 unrecoverable !}}&lt;br /&gt;
&lt;br /&gt;
* To close your OPOS93, run the &#039;&#039;&#039;ahab_close&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Reboot and check with the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000020, OEM Closed&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15155</id>
		<title>Secure boot on OPOS93</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15155"/>
		<updated>2025-02-13T14:57:10Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Flashing U-Boot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This document is a quick how-to boot a signed boot firmware on the OPOS93 SoM. It summarizes the documents provided by NXP: &lt;br /&gt;
&lt;br /&gt;
* [https://www.nxp.com/doc/an12312 AN12312]&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.1.22-2.0.0/doc/imx/ahab/introduction_ahab.txt&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.6.36-2.1.0/doc/imx/ahab/guides/mx8ulp_9x_secure_boot.txt&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== IMX CST TOOL ==&lt;br /&gt;
&lt;br /&gt;
* Download the [https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW IMX CST TOOL] and unarchive it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
tar xf IMX_CST_TOOL_NEW.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== imx-mkimage ==&lt;br /&gt;
&lt;br /&gt;
* Checkout the imx-mkimage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
git clone -b lf-6.6.36-2.1.0 https://github.com/nxp-imx/imx-mkimage.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Latest Armadeus U-Boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure you have the latest Armadeus U-Boot installed on you OPOS93 SoM. It must have the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is not available on your OPOS93 SoM, update to the latest Armadeus U-Boot.&lt;br /&gt;
&lt;br /&gt;
= Generating a PKI tree =&lt;br /&gt;
&lt;br /&gt;
* To generate your PKI tree, go to the CST TOOL directory and use the script &#039;&#039;&#039;ahab_pki_tree.sh&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd cst-3.4.1/&lt;br /&gt;
$ ./keys/ahab_pki_tree.sh&lt;br /&gt;
...&lt;br /&gt;
Do you want to use an existing CA key (y/n)?: n&lt;br /&gt;
Do you want to use Elliptic Curve Cryptography (y/n)?: y&lt;br /&gt;
Enter length for elliptic curve to be used for PKI tree:&lt;br /&gt;
Possible values p256, p384, p521:  p384&lt;br /&gt;
Enter the digest algorithm to use: sha384&lt;br /&gt;
Enter PKI tree duration (years): 5&lt;br /&gt;
Do you want the SRK certificates to have the CA flag set? (y/n)?: y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Generating SRK Table and SRK Hash =&lt;br /&gt;
&lt;br /&gt;
* Generate the SRK Table and SRK Hash with &#039;&#039;&#039;srktool&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd crts/&lt;br /&gt;
$ ../linux64/bin/srktool -a -d sha256 -s sha384 -t SRK_1_2_3_4_table.bin \&lt;br /&gt;
  -e SRK_1_2_3_4_fuse.bin -f 1 -c \&lt;br /&gt;
  SRK1_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK2_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK3_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK4_sha384_secp384r1_v3_usr_crt.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Regenerate the SRK HASH (SRK_1_2_3_4_fuse.bin) by using SHA256 with SRK_1_2_3_4_table.bin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ openssl dgst -binary -sha256 SRK_1_2_3_4_table.bin &amp;gt; SRK_1_2_3_4_fuse.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check if the hash in the SRK_1_2_3_4_fuse.bin is correct:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ hexdump -C SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&lt;br /&gt;
$ sha256sum SRK_1_2_3_4_table.bin&lt;br /&gt;
db2959f290dfc39c53394566e0b7582985e6f3b1af00983de5e804fe7a451024  SRK_1_2_3_4_table.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Signing the boot image =&lt;br /&gt;
&lt;br /&gt;
* From the images directory of the Armadeus BSP, copy the files needed to generate a boot image (SPL, U-Boot proper, ATF) into the i.MX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot-spl.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/bl31.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/lpddr4* &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/ahab-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/mx93a1-ahab-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing ATF + U-Boot proper Image container ==&lt;br /&gt;
&lt;br /&gt;
* Generate the u-boot-atf-container.img file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x0&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x110&lt;br /&gt;
        Offsets =       0x0     0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A CSF description file is needed to sign the u-boot-atf-container.img file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_uboot_atf.txt here]. In this file, update the offset you previously noted and the eventually the name and path of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;u-boot-atf-container.img&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block&lt;br /&gt;
Offsets   = 0x0               0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the u-boot-atf-container.img with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_uboot_atf.txt -o signed-u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Replace the u-boot-atf-container.img file with the signed-u-boot-atf-container.img file in the iMX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp signed-u-boot-atf-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing the boot image ==&lt;br /&gt;
&lt;br /&gt;
* Generate the flash.bin file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 flash_singleboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x400&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x490&lt;br /&gt;
        Offsets =       0x400   0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Another CSF description file is needed to sign the flash.bin file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_boot_image.txt here]. In this file, update the offset you previously noted and the eventually the name of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;/home/sszy/development/imx-mkimage/iMX93/flash.bin&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block (printed out by mkimage)&lt;br /&gt;
Offsets   = 0x400             0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the flash.bin file with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_boot_image.txt -o signed-flash.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Flashing U-Boot =&lt;br /&gt;
&lt;br /&gt;
* On your computer, copy the signed boot image into the root directory of your tftp server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
cp flash-signed.bin /tftproot/opos93-u-boot.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On your OPOS93, update U-Boot as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_uboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Burning SRK hash into the fuses =&lt;br /&gt;
&lt;br /&gt;
* On your host computer, dump the SRK hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ od -t x4 SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On the OPOS93, on U-Boot, burn the SRK hash into the fuses.&lt;br /&gt;
&#039;&#039;&#039;Obviously, don&#039;t burn these values but the ones the previous command outputs with your keys !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 0 0xdb2959f2&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 1 0x90dfc39c&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 2 0x53394566&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 3 0xe0b75829&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 4 0x85e6f3b1&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 5 0xaf00983d&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 6 0xe5e804fe&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 7 0x7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Checking = &lt;br /&gt;
&lt;br /&gt;
* Power off / on the board, and stop the boot into U-Boot. Run the ahab_status command. If everything is ok, there should be no AHAB events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Closing the OPOS93 =&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before closing your OPOS93, make sure everything is ok (double or triple check...), there is no AHAB events and you are able to boot a signed image. A missigned boot image on a closed OPOS93 will make your OPOS93 unrecoverable !}}&lt;br /&gt;
&lt;br /&gt;
* To close your OPOS93, run the &#039;&#039;&#039;ahab_close&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Reboot and check with the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000020, OEM Closed&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15154</id>
		<title>Secure boot on OPOS93</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Secure_boot_on_OPOS93&amp;diff=15154"/>
		<updated>2025-02-13T14:56:08Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Latest Armadeus U-Boot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This document is a quick how-to boot a signed boot firmware on the OPOS93 SoM. It summarizes the documents provided by NXP: &lt;br /&gt;
&lt;br /&gt;
* [https://www.nxp.com/doc/an12312 AN12312]&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.1.22-2.0.0/doc/imx/ahab/introduction_ahab.txt&lt;br /&gt;
* https://github.com/nxp-imx/uboot-imx/blob/lf-6.6.36-2.1.0/doc/imx/ahab/guides/mx8ulp_9x_secure_boot.txt&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== IMX CST TOOL ==&lt;br /&gt;
&lt;br /&gt;
* Download the [https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW IMX CST TOOL] and unarchive it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
tar xf IMX_CST_TOOL_NEW.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== imx-mkimage ==&lt;br /&gt;
&lt;br /&gt;
* Checkout the imx-mkimage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
git clone -b lf-6.6.36-2.1.0 https://github.com/nxp-imx/imx-mkimage.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Latest Armadeus U-Boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure you have the latest Armadeus U-Boot installed on you OPOS93 SoM. It must have the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;opos&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is not available on your OPOS93 SoM, update to the latest Armadeus U-Boot.&lt;br /&gt;
&lt;br /&gt;
= Generating a PKI tree =&lt;br /&gt;
&lt;br /&gt;
* To generate your PKI tree, go to the CST TOOL directory and use the script &#039;&#039;&#039;ahab_pki_tree.sh&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd cst-3.4.1/&lt;br /&gt;
$ ./keys/ahab_pki_tree.sh&lt;br /&gt;
...&lt;br /&gt;
Do you want to use an existing CA key (y/n)?: n&lt;br /&gt;
Do you want to use Elliptic Curve Cryptography (y/n)?: y&lt;br /&gt;
Enter length for elliptic curve to be used for PKI tree:&lt;br /&gt;
Possible values p256, p384, p521:  p384&lt;br /&gt;
Enter the digest algorithm to use: sha384&lt;br /&gt;
Enter PKI tree duration (years): 5&lt;br /&gt;
Do you want the SRK certificates to have the CA flag set? (y/n)?: y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Generating SRK Table and SRK Hash =&lt;br /&gt;
&lt;br /&gt;
* Generate the SRK Table and SRK Hash with &#039;&#039;&#039;srktool&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd crts/&lt;br /&gt;
$ ../linux64/bin/srktool -a -d sha256 -s sha384 -t SRK_1_2_3_4_table.bin \&lt;br /&gt;
  -e SRK_1_2_3_4_fuse.bin -f 1 -c \&lt;br /&gt;
  SRK1_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK2_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK3_sha384_secp384r1_v3_usr_crt.pem,\&lt;br /&gt;
  SRK4_sha384_secp384r1_v3_usr_crt.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Regenerate the SRK HASH (SRK_1_2_3_4_fuse.bin) by using SHA256 with SRK_1_2_3_4_table.bin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ openssl dgst -binary -sha256 SRK_1_2_3_4_table.bin &amp;gt; SRK_1_2_3_4_fuse.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check if the hash in the SRK_1_2_3_4_fuse.bin is correct:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ hexdump -C SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&lt;br /&gt;
$ sha256sum SRK_1_2_3_4_table.bin&lt;br /&gt;
db2959f290dfc39c53394566e0b7582985e6f3b1af00983de5e804fe7a451024  SRK_1_2_3_4_table.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Signing the boot image =&lt;br /&gt;
&lt;br /&gt;
* From the images directory of the Armadeus BSP, copy the files needed to generate a boot image (SPL, U-Boot proper, ATF) into the i.MX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/u-boot-spl.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/bl31.bin &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/lpddr4* &amp;lt;path to imx-mkimage&amp;gt;/iMX93/&lt;br /&gt;
$ cp &amp;lt;path to BSP Armadeus&amp;gt;/images/ahab-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/mx93a1-ahab-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing ATF + U-Boot proper Image container ==&lt;br /&gt;
&lt;br /&gt;
* Generate the u-boot-atf-container.img file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x0&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x110&lt;br /&gt;
        Offsets =       0x0     0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A CSF description file is needed to sign the u-boot-atf-container.img file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_uboot_atf.txt here]. In this file, update the offset you previously noted and the eventually the name and path of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;u-boot-atf-container.img&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block&lt;br /&gt;
Offsets   = 0x0               0x110&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the u-boot-atf-container.img with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_uboot_atf.txt -o signed-u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Replace the u-boot-atf-container.img file with the signed-u-boot-atf-container.img file in the iMX93 directory of the imx-mkimage tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cp signed-u-boot-atf-container.img &amp;lt;path to imx-mkimage&amp;gt;/iMX93/u-boot-atf-container.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Signing the boot image ==&lt;br /&gt;
&lt;br /&gt;
* Generate the flash.bin file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to imx-mkimage&amp;gt;&lt;br /&gt;
$ make SOC=iMX9 flash_singleboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note the offset the imx-mkimage tool outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
CST: CONTAINER 0 offset: 0x400&lt;br /&gt;
CST: CONTAINER 0: Signature Block: offset is at 0x490&lt;br /&gt;
        Offsets =       0x400   0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Another CSF description file is needed to sign the flash.bin file. You can download it [https://github.com/nxp-imx/uboot-imx/raw/refs/tags/lf-6.6.36-2.1.0/doc/imx/ahab/csf_examples/csf_boot_image.txt here]. In this file, update the offset you previously noted and the eventually the name of the keys:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Source = &amp;quot;../crts/SRK1_sha384_secp384r1_v3_ca_crt.pem&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
[Authenticate Data]&lt;br /&gt;
# Binary to be signed generated by mkimage&lt;br /&gt;
File = &amp;quot;/home/sszy/development/imx-mkimage/iMX93/flash.bin&amp;quot;&lt;br /&gt;
# Offsets = Container header  Signature block (printed out by mkimage)&lt;br /&gt;
Offsets   = 0x400             0x490&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sign the flash.bin file with the CST TOOL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ cd &amp;lt;path to CST TOOL&amp;gt;&lt;br /&gt;
$ ./linux64/bin/cst -i ~/Downloads/csf_boot_image.txt -o signed-flash.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Flashing U-Boot =&lt;br /&gt;
&lt;br /&gt;
* On your computer, copy the signed boot image into the root directory of your tftp server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
cp flash-signed.bin /tftproot/opos93-u-boot.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On your OPOS93, update U-Boot as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_uboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Burning SRK hash into the fuses =&lt;br /&gt;
&lt;br /&gt;
* On your host computer, dump the SRK hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ od -t x4 SRK_1_2_3_4_fuse.bin&lt;br /&gt;
0000000 db2959f2 90dfc39c 53394566 e0b75829&lt;br /&gt;
0000020 85e6f3b1 af00983d e5e804fe 7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On the OPOS93, on U-Boot, burn the SRK hash into the fuses.&lt;br /&gt;
&#039;&#039;&#039;Obviously, don&#039;t burn these values but the ones the previous command outputs with your keys !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 0 0xdb2959f2&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 1 0x90dfc39c&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 2 0x53394566&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 3 0xe0b75829&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 4 0x85e6f3b1&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 5 0xaf00983d&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 6 0xe5e804fe&lt;br /&gt;
BIOS&amp;gt; fuse prog 16 7 0x7a451024&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Checking = &lt;br /&gt;
&lt;br /&gt;
* Power off / on the board, and stop the boot into U-Boot. Run the ahab_status command. If everything is ok, there should be no AHAB events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000008, OEM Open&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Closing the OPOS93 =&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before closing your OPOS93, make sure everything is ok (double or triple check...), there is no AHAB events and you are able to boot a signed image. A missigned boot image on a closed OPOS93 will make your OPOS93 unrecoverable !}}&lt;br /&gt;
&lt;br /&gt;
* To close your OPOS93, run the &#039;&#039;&#039;ahab_close&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Reboot and check with the &#039;&#039;&#039;ahab_status&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; ahab_status&lt;br /&gt;
Lifecycle: 0x00000020, OEM Closed&lt;br /&gt;
&lt;br /&gt;
        No Events Found!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=U-Boot_Splash_Screen&amp;diff=15153</id>
		<title>U-Boot Splash Screen</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=U-Boot_Splash_Screen&amp;diff=15153"/>
		<updated>2025-01-17T13:20:16Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
On this page you will learn how to activate LCD support in U-Boot and display a Splash Screen at boot.&lt;br /&gt;
{{Note|The following instructions have only be tested on [[OPOS6UL]].}}&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
* Save your image as BMP file (in Gimp use Run-Length (RLE) encoding, no alpha channel and no color informations (compatibility options). If the RLE option is grayed out, go to Image &amp;gt; Mode and select Indexed...)&lt;br /&gt;
* Activate LCD in U-Boot (here ST0700, must be done by default in recent BSP):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv videomode video=ctfb:x:800,y:480,depth:18,pclk:30030,le:30,ri:210,up:23,lo:22,hs:16,vs:1,sync:1073741824,vmode:0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Test it=&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; tftpboot ${loadaddr} xxx.bmp&lt;br /&gt;
BIOS&amp;gt; bmp info ${loadaddr}&lt;br /&gt;
Image size    : 296 x 72&lt;br /&gt;
Bits per pixel: 8&lt;br /&gt;
Compression   : 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; bmp display ${loadaddr} 100 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Deploy it=&lt;br /&gt;
* Here we assume that logo is stored in &#039;&#039;/boot&#039;&#039; directory of rootfs eMMC partition as &#039;&#039;logo.bmp&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv splashimage 0x80000000&lt;br /&gt;
BIOS&amp;gt; setenv splashfile /boot/logo.bmp&lt;br /&gt;
BIOS&amp;gt; setenv splashsource mmc_fs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Continuity with Linux Boot Logo=&lt;br /&gt;
* If you want Linux to keep your U-Boot Logo during boot process, then some tweaks are needed:&lt;br /&gt;
** define CONFIG_SYS_MEM_TOP_HIDE in U-Boot configuration file, here we reserve 2MBytes: &amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#define CONFIG_SYS_MEM_TOP_HIDE         (2 &amp;lt;&amp;lt; 20)&amp;lt;/source&amp;gt;&lt;br /&gt;
* Force framebuffer RAM address in U-Boot LCD driver ([[OPOS6UL]] has 256MBytes (0x10000000) RAM starting at physical 0x80000000):&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;@@ -197,8 +197,8 @@&lt;br /&gt;
 	panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;&lt;br /&gt;
 &lt;br /&gt;
 	/* Allocate framebuffer */&lt;br /&gt;
-	fb = memalign(ARCH_DMA_MINALIGN,&lt;br /&gt;
-		      roundup(panel.memSize, ARCH_DMA_MINALIGN));&lt;br /&gt;
+	fb = (void *)0x8fe00000; /*memalign(ARCH_DMA_MINALIGN,&lt;br /&gt;
+		      roundup(panel.memSize, ARCH_DMA_MINALIGN));*/&lt;br /&gt;
 	if (!fb) {&lt;br /&gt;
 		printf(&amp;quot;MXSFB: Error allocating framebuffer!\n&amp;quot;);&lt;br /&gt;
 		return NULL;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Tell Linux to not print cursor on Framebuffer and to not use last 2M of RAM: &amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;BIOS&amp;gt; setenv extrabootargs vt.global_cursor_default=0 mem=248M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Force framebuffer RAM address to same value in Linux LCD driver: &amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;@@ -825,17 +824,18 @@&lt;br /&gt;
        var-&amp;gt;vmode = FB_VMODE_NONINTERLACED;&lt;br /&gt;
&lt;br /&gt;
        /* Memory allocation for framebuffer */&lt;br /&gt;
+#define FORCED_FB_ADDR 0x8fe00000&lt;br /&gt;
        fb_size = SZ_2M;&lt;br /&gt;
-       fb_virt = dma_alloc_wc(dev, PAGE_ALIGN(fb_size), &amp;amp;fb_phys, GFP_KERNEL);&lt;br /&gt;
+       fb_virt = ioremap_wc(FORCED_FB_ADDR, fb_size);&lt;br /&gt;
        if (!fb_virt)&lt;br /&gt;
                return -ENOMEM;&lt;br /&gt;
&lt;br /&gt;
+       fb_phys = FORCED_FB_ADDR;&lt;br /&gt;
        fb_info-&amp;gt;fix.smem_start = fb_phys;&lt;br /&gt;
        fb_info-&amp;gt;screen_base = fb_virt;&lt;br /&gt;
        fb_info-&amp;gt;screen_size = fb_info-&amp;gt;fix.smem_len = fb_size;&lt;br /&gt;
&lt;br /&gt;
-       if (mxsfb_restore_mode(host, vmode))&lt;br /&gt;
-               memset(fb_virt, 0, fb_size);&lt;br /&gt;
+       mxsfb_restore_mode(host, vmode);&lt;br /&gt;
&lt;br /&gt;
        return 0;&lt;br /&gt;
 }&amp;lt;/source&amp;gt;&lt;br /&gt;
* Remove following options of your Linux config file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;-CONFIG_FRAMEBUFFER_CONSOLE=y&lt;br /&gt;
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y&lt;br /&gt;
-CONFIG_FONTS=y&lt;br /&gt;
-CONFIG_FONT_8x8=y&lt;br /&gt;
-CONFIG_FONT_8x16=y&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Reflash all that on your board and... That&#039;s it ! ;-)&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
* http://www.denx.de/wiki/DULG/UBootSplashScreen&lt;br /&gt;
&lt;br /&gt;
[[Category:Boot Logo]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Debian_on_APF&amp;diff=15152</id>
		<title>Debian on APF</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Debian_on_APF&amp;diff=15152"/>
		<updated>2025-01-17T10:50:27Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Copying the filesystem on the APF */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details how to install Debian on an [[APF27]] / [[APF28]] / [[APF51]] / [[APF6]] / [[OPOS6UL]].&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
* an APF/OPOS SOM (with corresponding docking/devt board)&lt;br /&gt;
* a development PC running linux&lt;br /&gt;
* the debootstrap program installed on the development PC&lt;br /&gt;
* the ARM qemu-user, statically linked on the development PC&lt;br /&gt;
* about an hour of free time&lt;br /&gt;
&lt;br /&gt;
==Lazy guys==&lt;br /&gt;
* For the lazy one and also beholder of an [[APF6]], you can find an image here: [http://dl.free.fr/j283bzIbH apf6_debian_wheezy_rootfs.ext4].&lt;br /&gt;
* For the lazy one and also beholder of an [[OPOS6UL]], you can find an image here: [http://dl.free.fr/onh3mtEbn opos6ul_debian_jessie_rootfs.ext4].&lt;br /&gt;
* Download it and put it in your TFTP directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp xxx_debian_wheezy_rootfs.ext4 /tftpboot/xxx-rootfs.ext4    (where xxx is the name of you module)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reflash your rootfs from U-Boot (if you have 512 Mbytes of RAM):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* or use [[U-Boot_UMS_on_APF_%26_OPOS|UMS mode]] otherwise.&lt;br /&gt;
* Then you can reset your board and directly skip to [[Debian_on_APF#First_login| &amp;quot;First login&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
==Preparing the development PC==&lt;br /&gt;
* In this tutorial, we use Ubuntu on the development PC. Any other distribution can be used with some adjustments but of course, Debian based distributions are recommended.&lt;br /&gt;
&lt;br /&gt;
* Let&#039;s first install all the packages that will be used :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt-get install debootstrap qemu-user-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then get in a root shell and prepare a work folder:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd anywhere_you_have_free_space&lt;br /&gt;
# mkdir apf_debian&lt;br /&gt;
# cd apf_debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bootstrapping the Debian filesystem==&lt;br /&gt;
&lt;br /&gt;
* The debootstrap command is generating a base debian filesystem by downloading all debian base packages and unpacking them in a folder, in order to build a fresh debian root filesystem.&lt;br /&gt;
* Installing deb packages is not only extracting archive files, it also consists in running scripts after unpacking the files. Running these scripts is handled by the script interpreters that have been unpacked in the generated folders. Therefore generating an ARM debian filesystem on an x86 based computer requires to do this in two steps.&lt;br /&gt;
* Let&#039;s run the first step. That one consists in downloading all the deb packages and unpacking the files, but without running the scripts :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# debootstrap --foreign --arch=armel bookworm rootfs http://ftp.debian.org/debian &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The &#039;&#039;--foreign&#039;&#039; option makes debootstrap stop right after unpacking.&lt;br /&gt;
* The &#039;&#039;--arch&#039;&#039; option specifies the architecture we want to make a rootfs for, &#039;&#039;armel&#039;&#039; is the name of the ARM port of debian for processors without FPU. &lt;br /&gt;
{{Note|On [[APF6]] &amp;amp; [[OPOS6UL]] you might want to use &#039;&#039;armhf&#039;&#039; (i.MX6 has an FPU) instead of &#039;&#039;armel&#039;&#039;.}}&lt;br /&gt;
* &#039;&#039;jessie&#039;&#039; is the name of the debian version we want to get (latest stable one). &#039;&#039;rootfs&#039;&#039; is the name of the subfolder where debootstrap will work. Finally we give the URL of the debian mirror we want to use (you can use another one which sits in your country, to make it faster).&lt;br /&gt;
* This process may take a while: it will download all the debian base packages from the mirror and unpack them in the &#039;&#039;rootfs/&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
== second stage of debootstrap ==&lt;br /&gt;
* The next step is to run the second stage of debootstrap. That stage consists in finalizing the installation of the package by running the configuration scripts we mentionned earlier. Since these scripts will be executed using the interpreter who is in the new filesystem, and not by the interpreter from your development PC, we are now facing a problem : the interpreter in that new filesystem is an ARM program, and won&#039;t run on an x86 system. To overcome this, we will make use of &#039;&#039;qemu&#039;&#039;, who allows to run foreign architecture Linux programs through emulation.&lt;br /&gt;
* First, we need to copy the qemu binary into the new filesystem :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp /usr/bin/qemu-arm-static rootfs/usr/bin/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then we can launch the second stage of debootstrap; qemu will automatically run the ARM binaries :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot rootfs debootstrap/debootstrap --second-stage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* This process may also take a while: it will run the scripts of each package, in order to finalize the package installation.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
I: Base system installed successfully.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tweaking the filesystem==&lt;br /&gt;
&lt;br /&gt;
* After the file system has been generated by debootstrap, some adjustments need to be done.&lt;br /&gt;
* First, we need to have debian run a getty on the console serial port (replace &#039;&#039;ttyXXX&#039;&#039; with &#039;&#039;ttymxc2&#039;&#039; on [[APF51]], &#039;&#039;ttySMX0&#039;&#039; on [[APF27]], &#039;&#039;ttymxc3&#039;&#039; on [[APF6]], &#039;&#039;ttymxc0&#039;&#039; on [[OPOS6UL]]), otherwise no login prompt will be available on the console port :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;T0:23:respawn:/sbin/getty -L ttyXXX 115200 vt100&#039; &amp;gt;&amp;gt; rootfs/etc/inittab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;If not already done&#039;, the debian mirror also has to be specified in the APT configuration, in order to install new debian packages later :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;deb http://ftp.debian.org/debian bookworm main&#039; &amp;gt; rootfs/etc/apt/sources.list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The hostname of the debian system has to be set properly (here &#039;&#039;apf6&#039;&#039;, change it accordingly to your board):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;apf6&#039; &amp;gt; rootfs/etc/hostname&lt;br /&gt;
# echo &#039;127.0.1.1 apf6&#039; &amp;gt;&amp;gt; rootfs/etc/hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Remove root password (for first login):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# sed -i -e &#039;s/root:\*:/root::/&#039; rootfs/etc/shadow&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Add &#039;&#039;eth0&#039;&#039; network interface configuration:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\nauto eth0\nallow-hotplug eth0\niface eth0 inet dhcp\n&amp;quot; &amp;gt;&amp;gt; rootfs/etc/network/interfaces&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Copy kernel image and modules:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# export ARMADEUS_BSP_PATH=your_armadeus_bsp_path&lt;br /&gt;
# cp -r ${ARMADEUS_BSP_PATH}/buildroot/output/target/boot rootfs/&lt;br /&gt;
# cp -r ${ARMADEUS_BSP_PATH}/buildroot/output/target/lib/modules rootfs/lib/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Finally we can clean the APT cache (we no longer need the deb files, and that will save quite some disk space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# chroot rootfs apt-get clean&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Copying the filesystem on the APF==&lt;br /&gt;
* Now that the debian filesystem is ready, it must be transferred to the APF. You have 2 solutions:&lt;br /&gt;
&lt;br /&gt;
===1] Overwriting default rootfs on Flash (APF6/OPOS6UL)===&lt;br /&gt;
* The [[APF6]]/[[OPOS6UL]] eMMC has enough space to run debian directly on it.&lt;br /&gt;
* To finalize installation you will need &#039;&#039;resize2fs&#039;&#039; tool (recent version of Armadeus BSP), so copy it to Debian rootfs (Armadeus binaries for [[APF6]]/[[OPOS6UL]] are compatible with Debian armhf port):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp $ARMADEUS_BSP_PATH/buildroot/output/target/sbin/resize2fs rootfs/sbin/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* To generate a .ext4 image from the &#039;&#039;rootfs/&#039;&#039; directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# $ARMADEUS_BSP_PATH/buildroot/output/host/usr/sbin/mkfs.ext4 -d ./rootfs/ -r 1 -N 0 -m 5 -L &amp;quot;rootfs&amp;quot; -I 256 -O ^64bit,^metadata_csum,uninit_bg opos_debian_bookworm_rootfs.ext4 384M&lt;br /&gt;
&lt;br /&gt;
# PATH=$PATH:$ARMADEUS_BSP_PATH/buildroot/output/host/usr/bin/:$ARMADEUS_BSP_PATH/buildroot/output/host/usr/sbin/ \&lt;br /&gt;
    mke2img -G 4 -R 1 -d ./rootfs/ -o apf_debian_jessie_rootfs.ext4&lt;br /&gt;
# cp apf_debian_jessie_rootfs.ext4 /tftpboot/XXX-rootfs.ext4      (where XXX is the name of your module)&lt;br /&gt;
# chmod a+rw /tftpboot/opos6ul-rootfs.ext4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Now on your board, boot into U-Boot and:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If the rootfs image is too big for your SoM RAM size, you can also use [[U-Boot_UMS_on_APF_%26_OPOS|UMS]] USB mode of U-Boot to flash this image.&lt;br /&gt;
* Congratulations, you can go to [[Debian_on_APF#First_login|first login]]&lt;br /&gt;
&lt;br /&gt;
===2] Using Debian on Flash while keeping default rootfs (APF6/APF51)===&lt;br /&gt;
&lt;br /&gt;
* This tutorial will describe a method that will allow to keep the original Armadeus system on the board, and that will permit to choose which system to boot very easily. It is not the only way to run Debian on the APF, but it is quite convenient.&lt;br /&gt;
&lt;br /&gt;
* You need to have an [[APF51]] or an [[APF6]] running the Buildroot based original system.&lt;br /&gt;
&lt;br /&gt;
* The first step is to pack the debian filesystem that has been created on the development PC:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# tar cvf debian_arm_rootfs.tar rootfs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You will end up with a ~150 MBytes tarball&lt;br /&gt;
* Then this archive should be transferred to the APF board. You can use a USB key or a microSD for example. (or TFTP if you have a lot of free space on your APF NAND; then put the file in &#039;&#039;/root&#039;&#039; on the APF)&lt;br /&gt;
&lt;br /&gt;
* Now, on the APF, the archive should be extracted (from the media holding it to the APF NAND FLASH). &#039;&#039;&#039;Don&#039;t forget the p option of tar&#039;&#039;&#039;, which is required to properly extract permissions on files :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cd /root&lt;br /&gt;
# tar xvpf debian_arm_rootfs.tar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We will boot this distribution using &#039;&#039;chroot&#039;&#039;. We need to write a script that will be run by the kernel on startup and that will do the chroot at an early stage of the boot process, so that nothing from the original rootfs is started when we want to boot Debian. To do this, create a file called &#039;&#039;/debinit&#039;&#039; that contains the following lines :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t proc none /root/rootfs/proc&lt;br /&gt;
exec chroot /root/rootfs /sbin/init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script needs to be executable :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# chmod 755 /debinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Kernel modules and firmware files need to be copied from the default filesystem to the Debian filesystem :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp -r /lib/modules/* /root/rootfs/lib/modules&lt;br /&gt;
# cp -r /lib/firmware /root/rootfs/lib/firmware&lt;br /&gt;
# chroot /root/rootfs /sbin/depmod -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Configure U-Boot to boot debian ====&lt;br /&gt;
* Finally, we need to configure U-Boot so it tells the kernel to use that script on bootup. Reboot your board, press a key to interrupt the automatic boot in U-Boot, then do :&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;depboot definition depending on board&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF51 || APF6&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv debboot &#039;setenv extrabootargs ${extrabootargs} init=/debinit; run ubifsboot&#039;&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv debboot &#039;setenv extrabootargs ${extrabootargs} init=/debinit; run emmcboot&#039;&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* That&#039;s all. Now you board will keep booting the original system but if you want to boot debian instead, you can interrupt the autoboot of U-Boot and run the command :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run debboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In case you want the board to boot debian automatically, you can do so by running :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv bootcmd run debboot&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* You can then switch back to the original Armadeus system by running :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv bootcmd run ubifsboot&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==First login==&lt;br /&gt;
Whaoouh ! It booted ! ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
Debian GNU/Linux 8 apfxx/opos6ul ttySMX0/ttymxc2|0&lt;br /&gt;
&lt;br /&gt;
apfxx/opos6ul login:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Login as root with no password&lt;br /&gt;
&lt;br /&gt;
* If rootfs is mounted read-only, then remount it rw:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# mount -o remount,rw /dev/mmcblk2p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# mount -o remount,rw /dev/mmcblk0p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* You might also definitely change this behavior (rootfs mounted read-only), by modifying U-Boot&#039;s &#039;&#039;mmcroot&#039;&#039; variable: replace ro with rw:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# reboot&lt;br /&gt;
BIOS&amp;gt; setenv mmcroot /dev/mmcblk2p2 rw&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# reboot&lt;br /&gt;
BIOS&amp;gt; setenv mmcroot /dev/mmcblk0p2 rw&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On modules with eMMC &#039;&#039;&#039;only&#039;&#039;&#039;, if you replaced the default rootfs, you might want to use all eMMC space for debian:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# /usr/sbin/resize2fs /dev/mmcblk2p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# /usr/sbin/resize2fs /dev/mmcblk0p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* If &#039;&#039;/etc/mtab&#039;&#039; is absent, regenerate it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# grep -v rootfs /proc/mounts &amp;gt; /etc/mtab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Update packages (network should be up and running):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get update&lt;br /&gt;
root@apfxx:~# apt-get upgrade&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the keyboard layout doesn&#039;t suite yours, you can change it with (keyboard type, then keymap):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# dpkg-reconfigure keyboard-configuration&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup system and RTC date:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# date 012011552010&lt;br /&gt;
Wed Jan 20 11:55:00 UTC 2010&lt;br /&gt;
root@apfxx:~# hwclock -wu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you don&#039;t have any RTC chip (or no RTC backup cell) on your development board but have Internet access, then it could be a good idea to install &#039;&#039;ntpdate&#039;&#039; and use it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install ntpdate&lt;br /&gt;
...&lt;br /&gt;
root@apfxx:~# ntpdate-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To configure TimeZone:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# dpkg-reconfigure tzdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change root password:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a user (&#039;&#039;armadeus&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# adduser armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove x86 qemu used during installation to get some free space:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:/tmp# rm /usr/bin/qemu-arm-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you want remote network/SSH access to your board:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf|oposxx:~# apt-get install dropbear&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Other packages that may also be useful (for development):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install build-essential gcc-4.8 tftp vim strace i2c-tools iw psmisc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you want an X server (requires ~60 MBytes of free space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xserver-xorg              (xserver-xfbdev ?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want some apps for X (requires ~20 MBytes of free space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install x11-apps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want a graphical login manager:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xdm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* if you want a touchscreen calibrator and a virtual keyboard:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xinput-calibrator xvkbd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* if you want a lightweight Web browser:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install netsurf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want a desktop manager (requires &amp;gt;300 MBytes o_O):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xfce4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You might also want to try another &amp;quot;lightweight&amp;quot; desktop manager (&amp;gt;600 MBytes o_O&amp;lt;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install lxde&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known issues==&lt;br /&gt;
===APF27===&lt;br /&gt;
* Xorg won&#039;t start. (compatibility problem with framebuffer driver)&lt;br /&gt;
&lt;br /&gt;
===APF51===&lt;br /&gt;
* There&#039;s a kernel oops during the boot process. This is related to the SPI driver.&lt;br /&gt;
* Booting takes quite some time because udev has an issue with the SPI port and it takes some time before it timeouts and continues the boot.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* &#039;&#039;hcitool lescan&#039;&#039; command is reported to not work. Use &#039;&#039;bluetoothctl&#039;&#039; instead.&lt;br /&gt;
&lt;br /&gt;
===OPOS6UL===&lt;br /&gt;
* onboard Wi-Fi chip doesn&#039;t seem operational.&lt;br /&gt;
* to have Wi-Fi firmware on Debian Jessie:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# vim /etc/apt/sources.list&lt;br /&gt;
                   add non-free&lt;br /&gt;
root@opos6ul:~# apt-get update&lt;br /&gt;
root@opos6ul:~# apt-get install firmware-brcm80211&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Console Port Issues===&lt;br /&gt;
In some cases the boot crashes and errors like these appear&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
init: Id &amp;quot;T0&amp;quot; respawning too fast: disabled for 5 minutes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It means that the /dev folder haven&#039;t been populated with your console serial port.&lt;br /&gt;
&lt;br /&gt;
To fix this, you need to reboot the apf and run armadeus system, then you need to do the following commands :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp -r /dev/ttymxc0 /root/rootfs/dev/ttymxc0 (for apf51)&lt;br /&gt;
# cp -r /dev/ttySMX0 /root/rootfs/dev/ttySMX0 (for apf27)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to check that the file /root/rootfs/etc/securetty contains the console serial port (ttymxc0 for APF51 and ttySMX0 for APF27) if not :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;ttymxc0&#039; &amp;gt;&amp;gt; /root/rootfs/etc/securetty (for apf51)&lt;br /&gt;
# echo &#039;ttySMX0&#039; &amp;gt;&amp;gt; /root/rootfs/etc/securetty (for apf27)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It will allow the root user to login via this serial console.&lt;br /&gt;
&lt;br /&gt;
It could also affects other ports and you will need to do the same procedure for them (ttyX, fbX, input, ttymxcX, ttySMXX, etc.)&lt;br /&gt;
&lt;br /&gt;
==Automatically starts your custom application==&lt;br /&gt;
* Edit a shell script named &#039;&#039;/etc/init.d/myapp&#039;&#039;, here we suppose your application is named &#039;&#039;/root/myapp&#039;&#039;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
### BEGIN INIT INFO&lt;br /&gt;
# Provides:        myapp&lt;br /&gt;
# Required-Start:  $network $remote_fs $syslog&lt;br /&gt;
# Required-Stop:   $network $remote_fs $syslog&lt;br /&gt;
# Default-Start:   2 3 4 5&lt;br /&gt;
# Default-Stop: &lt;br /&gt;
# Short-Description: Start my application&lt;br /&gt;
### END INIT INFO&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin&lt;br /&gt;
&lt;br /&gt;
. /lib/lsb/init-functions&lt;br /&gt;
&lt;br /&gt;
MY_APP=/root/myapp&lt;br /&gt;
&lt;br /&gt;
test -x $MY_APP || exit 5&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
        start)&lt;br /&gt;
                log_daemon_msg &amp;quot;Starting my app&amp;quot;&lt;br /&gt;
                $MY_APP &amp;amp;&lt;br /&gt;
                ;;&lt;br /&gt;
        stop)&lt;br /&gt;
                log_daemon_msg &amp;quot;Stopping my app&amp;quot;&lt;br /&gt;
                ;;&lt;br /&gt;
        restart)&lt;br /&gt;
                $0 stop &amp;amp;&amp;amp; sleep 2 &amp;amp;&amp;amp; $0 start&lt;br /&gt;
                ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo &amp;quot;Usage: $0 {start|stop|restart}&amp;quot;&lt;br /&gt;
                exit 2&lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* make it executable:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# chmod a+x /etc/init.d/myapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* create a symlink to start the previous script in runlevel 5:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# ln -sf /etc/init.d/myapp /etc/rc5.d/S99myapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reboot and check that you application is successfully started ;-)&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://www.debian.org/releases/stable/i386/apds03.html.en Installing Debian GNU/Linux from a Unix/Linux System]&lt;br /&gt;
* http://free-electrons.com/blog/embdebian-with-multistrap/&lt;br /&gt;
* http://wiki.debian.org/Xfce&lt;br /&gt;
* [http://fr.scribd.com/doc/123130564/Installation-de-Debian-sur-la-carte-Armadeus-APF28 Enhanced french tutorial to install Debian on an APF28 board]&lt;br /&gt;
* [[Buildroot_inside_Debian_on_APF]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Distribution]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Debian_on_APF&amp;diff=15151</id>
		<title>Debian on APF</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Debian_on_APF&amp;diff=15151"/>
		<updated>2025-01-16T17:23:50Z</updated>

		<summary type="html">&lt;p&gt;JulienB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details how to install Debian on an [[APF27]] / [[APF28]] / [[APF51]] / [[APF6]] / [[OPOS6UL]].&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
* an APF/OPOS SOM (with corresponding docking/devt board)&lt;br /&gt;
* a development PC running linux&lt;br /&gt;
* the debootstrap program installed on the development PC&lt;br /&gt;
* the ARM qemu-user, statically linked on the development PC&lt;br /&gt;
* about an hour of free time&lt;br /&gt;
&lt;br /&gt;
==Lazy guys==&lt;br /&gt;
* For the lazy one and also beholder of an [[APF6]], you can find an image here: [http://dl.free.fr/j283bzIbH apf6_debian_wheezy_rootfs.ext4].&lt;br /&gt;
* For the lazy one and also beholder of an [[OPOS6UL]], you can find an image here: [http://dl.free.fr/onh3mtEbn opos6ul_debian_jessie_rootfs.ext4].&lt;br /&gt;
* Download it and put it in your TFTP directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp xxx_debian_wheezy_rootfs.ext4 /tftpboot/xxx-rootfs.ext4    (where xxx is the name of you module)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reflash your rootfs from U-Boot (if you have 512 Mbytes of RAM):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* or use [[U-Boot_UMS_on_APF_%26_OPOS|UMS mode]] otherwise.&lt;br /&gt;
* Then you can reset your board and directly skip to [[Debian_on_APF#First_login| &amp;quot;First login&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
==Preparing the development PC==&lt;br /&gt;
* In this tutorial, we use Ubuntu on the development PC. Any other distribution can be used with some adjustments but of course, Debian based distributions are recommended.&lt;br /&gt;
&lt;br /&gt;
* Let&#039;s first install all the packages that will be used :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt-get install debootstrap qemu-user-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then get in a root shell and prepare a work folder:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd anywhere_you_have_free_space&lt;br /&gt;
# mkdir apf_debian&lt;br /&gt;
# cd apf_debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bootstrapping the Debian filesystem==&lt;br /&gt;
&lt;br /&gt;
* The debootstrap command is generating a base debian filesystem by downloading all debian base packages and unpacking them in a folder, in order to build a fresh debian root filesystem.&lt;br /&gt;
* Installing deb packages is not only extracting archive files, it also consists in running scripts after unpacking the files. Running these scripts is handled by the script interpreters that have been unpacked in the generated folders. Therefore generating an ARM debian filesystem on an x86 based computer requires to do this in two steps.&lt;br /&gt;
* Let&#039;s run the first step. That one consists in downloading all the deb packages and unpacking the files, but without running the scripts :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# debootstrap --foreign --arch=armel bookworm rootfs http://ftp.debian.org/debian &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The &#039;&#039;--foreign&#039;&#039; option makes debootstrap stop right after unpacking.&lt;br /&gt;
* The &#039;&#039;--arch&#039;&#039; option specifies the architecture we want to make a rootfs for, &#039;&#039;armel&#039;&#039; is the name of the ARM port of debian for processors without FPU. &lt;br /&gt;
{{Note|On [[APF6]] &amp;amp; [[OPOS6UL]] you might want to use &#039;&#039;armhf&#039;&#039; (i.MX6 has an FPU) instead of &#039;&#039;armel&#039;&#039;.}}&lt;br /&gt;
* &#039;&#039;jessie&#039;&#039; is the name of the debian version we want to get (latest stable one). &#039;&#039;rootfs&#039;&#039; is the name of the subfolder where debootstrap will work. Finally we give the URL of the debian mirror we want to use (you can use another one which sits in your country, to make it faster).&lt;br /&gt;
* This process may take a while: it will download all the debian base packages from the mirror and unpack them in the &#039;&#039;rootfs/&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
== second stage of debootstrap ==&lt;br /&gt;
* The next step is to run the second stage of debootstrap. That stage consists in finalizing the installation of the package by running the configuration scripts we mentionned earlier. Since these scripts will be executed using the interpreter who is in the new filesystem, and not by the interpreter from your development PC, we are now facing a problem : the interpreter in that new filesystem is an ARM program, and won&#039;t run on an x86 system. To overcome this, we will make use of &#039;&#039;qemu&#039;&#039;, who allows to run foreign architecture Linux programs through emulation.&lt;br /&gt;
* First, we need to copy the qemu binary into the new filesystem :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp /usr/bin/qemu-arm-static rootfs/usr/bin/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then we can launch the second stage of debootstrap; qemu will automatically run the ARM binaries :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot rootfs debootstrap/debootstrap --second-stage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* This process may also take a while: it will run the scripts of each package, in order to finalize the package installation.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
I: Base system installed successfully.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tweaking the filesystem==&lt;br /&gt;
&lt;br /&gt;
* After the file system has been generated by debootstrap, some adjustments need to be done.&lt;br /&gt;
* First, we need to have debian run a getty on the console serial port (replace &#039;&#039;ttyXXX&#039;&#039; with &#039;&#039;ttymxc2&#039;&#039; on [[APF51]], &#039;&#039;ttySMX0&#039;&#039; on [[APF27]], &#039;&#039;ttymxc3&#039;&#039; on [[APF6]], &#039;&#039;ttymxc0&#039;&#039; on [[OPOS6UL]]), otherwise no login prompt will be available on the console port :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;T0:23:respawn:/sbin/getty -L ttyXXX 115200 vt100&#039; &amp;gt;&amp;gt; rootfs/etc/inittab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;If not already done&#039;, the debian mirror also has to be specified in the APT configuration, in order to install new debian packages later :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;deb http://ftp.debian.org/debian bookworm main&#039; &amp;gt; rootfs/etc/apt/sources.list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The hostname of the debian system has to be set properly (here &#039;&#039;apf6&#039;&#039;, change it accordingly to your board):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;apf6&#039; &amp;gt; rootfs/etc/hostname&lt;br /&gt;
# echo &#039;127.0.1.1 apf6&#039; &amp;gt;&amp;gt; rootfs/etc/hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Remove root password (for first login):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# sed -i -e &#039;s/root:\*:/root::/&#039; rootfs/etc/shadow&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Add &#039;&#039;eth0&#039;&#039; network interface configuration:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\nauto eth0\nallow-hotplug eth0\niface eth0 inet dhcp\n&amp;quot; &amp;gt;&amp;gt; rootfs/etc/network/interfaces&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Copy kernel image and modules:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# export ARMADEUS_BSP_PATH=your_armadeus_bsp_path&lt;br /&gt;
# cp -r ${ARMADEUS_BSP_PATH}/buildroot/output/target/boot rootfs/&lt;br /&gt;
# cp -r ${ARMADEUS_BSP_PATH}/buildroot/output/target/lib/modules rootfs/lib/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Finally we can clean the APT cache (we no longer need the deb files, and that will save quite some disk space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# chroot rootfs apt-get clean&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Copying the filesystem on the APF==&lt;br /&gt;
* Now that the debian filesystem is ready, it must be transferred to the APF. You have 2 solutions:&lt;br /&gt;
&lt;br /&gt;
===1] Overwriting default rootfs on Flash (APF6/OPOS6UL)===&lt;br /&gt;
* The [[APF6]]/[[OPOS6UL]] eMMC has enough space to run debian directly on it.&lt;br /&gt;
* To finalize installation you will need &#039;&#039;resize2fs&#039;&#039; tool (recent version of Armadeus BSP), so copy it to Debian rootfs (Armadeus binaries for [[APF6]]/[[OPOS6UL]] are compatible with Debian armhf port):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp $ARMADEUS_BSP_PATH/buildroot/output/target/sbin/resize2fs rootfs/sbin/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* To generate a .ext4 image from the &#039;&#039;rootfs/&#039;&#039; directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# PATH=$PATH:$ARMADEUS_BSP_PATH/buildroot/output/host/usr/bin/:$ARMADEUS_BSP_PATH/buildroot/output/host/usr/sbin/ \&lt;br /&gt;
    mke2img -G 4 -R 1 -d ./rootfs/ -o apf_debian_jessie_rootfs.ext4&lt;br /&gt;
# cp apf_debian_jessie_rootfs.ext4 /tftpboot/XXX-rootfs.ext4      (where XXX is the name of your module)&lt;br /&gt;
# chmod a+rw /tftpboot/opos6ul-rootfs.ext4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Now on your board, boot into U-Boot and:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If the rootfs image is too big for your SoM RAM size, you can also use [[U-Boot_UMS_on_APF_%26_OPOS|UMS]] USB mode of U-Boot to flash this image.&lt;br /&gt;
* Congratulations, you can go to [[Debian_on_APF#First_login|first login]]&lt;br /&gt;
&lt;br /&gt;
===2] Using Debian on Flash while keeping default rootfs (APF6/APF51)===&lt;br /&gt;
&lt;br /&gt;
* This tutorial will describe a method that will allow to keep the original Armadeus system on the board, and that will permit to choose which system to boot very easily. It is not the only way to run Debian on the APF, but it is quite convenient.&lt;br /&gt;
&lt;br /&gt;
* You need to have an [[APF51]] or an [[APF6]] running the Buildroot based original system.&lt;br /&gt;
&lt;br /&gt;
* The first step is to pack the debian filesystem that has been created on the development PC:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# tar cvf debian_arm_rootfs.tar rootfs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You will end up with a ~150 MBytes tarball&lt;br /&gt;
* Then this archive should be transferred to the APF board. You can use a USB key or a microSD for example. (or TFTP if you have a lot of free space on your APF NAND; then put the file in &#039;&#039;/root&#039;&#039; on the APF)&lt;br /&gt;
&lt;br /&gt;
* Now, on the APF, the archive should be extracted (from the media holding it to the APF NAND FLASH). &#039;&#039;&#039;Don&#039;t forget the p option of tar&#039;&#039;&#039;, which is required to properly extract permissions on files :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cd /root&lt;br /&gt;
# tar xvpf debian_arm_rootfs.tar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We will boot this distribution using &#039;&#039;chroot&#039;&#039;. We need to write a script that will be run by the kernel on startup and that will do the chroot at an early stage of the boot process, so that nothing from the original rootfs is started when we want to boot Debian. To do this, create a file called &#039;&#039;/debinit&#039;&#039; that contains the following lines :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t proc none /root/rootfs/proc&lt;br /&gt;
exec chroot /root/rootfs /sbin/init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script needs to be executable :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# chmod 755 /debinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Kernel modules and firmware files need to be copied from the default filesystem to the Debian filesystem :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp -r /lib/modules/* /root/rootfs/lib/modules&lt;br /&gt;
# cp -r /lib/firmware /root/rootfs/lib/firmware&lt;br /&gt;
# chroot /root/rootfs /sbin/depmod -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Configure U-Boot to boot debian ====&lt;br /&gt;
* Finally, we need to configure U-Boot so it tells the kernel to use that script on bootup. Reboot your board, press a key to interrupt the automatic boot in U-Boot, then do :&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;depboot definition depending on board&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF51 || APF6&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv debboot &#039;setenv extrabootargs ${extrabootargs} init=/debinit; run ubifsboot&#039;&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv debboot &#039;setenv extrabootargs ${extrabootargs} init=/debinit; run emmcboot&#039;&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* That&#039;s all. Now you board will keep booting the original system but if you want to boot debian instead, you can interrupt the autoboot of U-Boot and run the command :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run debboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In case you want the board to boot debian automatically, you can do so by running :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv bootcmd run debboot&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* You can then switch back to the original Armadeus system by running :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv bootcmd run ubifsboot&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==First login==&lt;br /&gt;
Whaoouh ! It booted ! ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
Debian GNU/Linux 8 apfxx/opos6ul ttySMX0/ttymxc2|0&lt;br /&gt;
&lt;br /&gt;
apfxx/opos6ul login:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Login as root with no password&lt;br /&gt;
&lt;br /&gt;
* If rootfs is mounted read-only, then remount it rw:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# mount -o remount,rw /dev/mmcblk2p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# mount -o remount,rw /dev/mmcblk0p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* You might also definitely change this behavior (rootfs mounted read-only), by modifying U-Boot&#039;s &#039;&#039;mmcroot&#039;&#039; variable: replace ro with rw:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# reboot&lt;br /&gt;
BIOS&amp;gt; setenv mmcroot /dev/mmcblk2p2 rw&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# reboot&lt;br /&gt;
BIOS&amp;gt; setenv mmcroot /dev/mmcblk0p2 rw&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On modules with eMMC &#039;&#039;&#039;only&#039;&#039;&#039;, if you replaced the default rootfs, you might want to use all eMMC space for debian:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# /usr/sbin/resize2fs /dev/mmcblk2p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# /usr/sbin/resize2fs /dev/mmcblk0p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* If &#039;&#039;/etc/mtab&#039;&#039; is absent, regenerate it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# grep -v rootfs /proc/mounts &amp;gt; /etc/mtab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Update packages (network should be up and running):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get update&lt;br /&gt;
root@apfxx:~# apt-get upgrade&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the keyboard layout doesn&#039;t suite yours, you can change it with (keyboard type, then keymap):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# dpkg-reconfigure keyboard-configuration&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup system and RTC date:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# date 012011552010&lt;br /&gt;
Wed Jan 20 11:55:00 UTC 2010&lt;br /&gt;
root@apfxx:~# hwclock -wu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you don&#039;t have any RTC chip (or no RTC backup cell) on your development board but have Internet access, then it could be a good idea to install &#039;&#039;ntpdate&#039;&#039; and use it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install ntpdate&lt;br /&gt;
...&lt;br /&gt;
root@apfxx:~# ntpdate-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To configure TimeZone:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# dpkg-reconfigure tzdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change root password:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a user (&#039;&#039;armadeus&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# adduser armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove x86 qemu used during installation to get some free space:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:/tmp# rm /usr/bin/qemu-arm-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you want remote network/SSH access to your board:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf|oposxx:~# apt-get install dropbear&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Other packages that may also be useful (for development):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install build-essential gcc-4.8 tftp vim strace i2c-tools iw psmisc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you want an X server (requires ~60 MBytes of free space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xserver-xorg              (xserver-xfbdev ?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want some apps for X (requires ~20 MBytes of free space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install x11-apps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want a graphical login manager:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xdm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* if you want a touchscreen calibrator and a virtual keyboard:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xinput-calibrator xvkbd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* if you want a lightweight Web browser:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install netsurf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want a desktop manager (requires &amp;gt;300 MBytes o_O):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xfce4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You might also want to try another &amp;quot;lightweight&amp;quot; desktop manager (&amp;gt;600 MBytes o_O&amp;lt;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install lxde&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known issues==&lt;br /&gt;
===APF27===&lt;br /&gt;
* Xorg won&#039;t start. (compatibility problem with framebuffer driver)&lt;br /&gt;
&lt;br /&gt;
===APF51===&lt;br /&gt;
* There&#039;s a kernel oops during the boot process. This is related to the SPI driver.&lt;br /&gt;
* Booting takes quite some time because udev has an issue with the SPI port and it takes some time before it timeouts and continues the boot.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* &#039;&#039;hcitool lescan&#039;&#039; command is reported to not work. Use &#039;&#039;bluetoothctl&#039;&#039; instead.&lt;br /&gt;
&lt;br /&gt;
===OPOS6UL===&lt;br /&gt;
* onboard Wi-Fi chip doesn&#039;t seem operational.&lt;br /&gt;
* to have Wi-Fi firmware on Debian Jessie:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# vim /etc/apt/sources.list&lt;br /&gt;
                   add non-free&lt;br /&gt;
root@opos6ul:~# apt-get update&lt;br /&gt;
root@opos6ul:~# apt-get install firmware-brcm80211&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Console Port Issues===&lt;br /&gt;
In some cases the boot crashes and errors like these appear&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
init: Id &amp;quot;T0&amp;quot; respawning too fast: disabled for 5 minutes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It means that the /dev folder haven&#039;t been populated with your console serial port.&lt;br /&gt;
&lt;br /&gt;
To fix this, you need to reboot the apf and run armadeus system, then you need to do the following commands :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp -r /dev/ttymxc0 /root/rootfs/dev/ttymxc0 (for apf51)&lt;br /&gt;
# cp -r /dev/ttySMX0 /root/rootfs/dev/ttySMX0 (for apf27)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to check that the file /root/rootfs/etc/securetty contains the console serial port (ttymxc0 for APF51 and ttySMX0 for APF27) if not :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;ttymxc0&#039; &amp;gt;&amp;gt; /root/rootfs/etc/securetty (for apf51)&lt;br /&gt;
# echo &#039;ttySMX0&#039; &amp;gt;&amp;gt; /root/rootfs/etc/securetty (for apf27)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It will allow the root user to login via this serial console.&lt;br /&gt;
&lt;br /&gt;
It could also affects other ports and you will need to do the same procedure for them (ttyX, fbX, input, ttymxcX, ttySMXX, etc.)&lt;br /&gt;
&lt;br /&gt;
==Automatically starts your custom application==&lt;br /&gt;
* Edit a shell script named &#039;&#039;/etc/init.d/myapp&#039;&#039;, here we suppose your application is named &#039;&#039;/root/myapp&#039;&#039;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
### BEGIN INIT INFO&lt;br /&gt;
# Provides:        myapp&lt;br /&gt;
# Required-Start:  $network $remote_fs $syslog&lt;br /&gt;
# Required-Stop:   $network $remote_fs $syslog&lt;br /&gt;
# Default-Start:   2 3 4 5&lt;br /&gt;
# Default-Stop: &lt;br /&gt;
# Short-Description: Start my application&lt;br /&gt;
### END INIT INFO&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin&lt;br /&gt;
&lt;br /&gt;
. /lib/lsb/init-functions&lt;br /&gt;
&lt;br /&gt;
MY_APP=/root/myapp&lt;br /&gt;
&lt;br /&gt;
test -x $MY_APP || exit 5&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
        start)&lt;br /&gt;
                log_daemon_msg &amp;quot;Starting my app&amp;quot;&lt;br /&gt;
                $MY_APP &amp;amp;&lt;br /&gt;
                ;;&lt;br /&gt;
        stop)&lt;br /&gt;
                log_daemon_msg &amp;quot;Stopping my app&amp;quot;&lt;br /&gt;
                ;;&lt;br /&gt;
        restart)&lt;br /&gt;
                $0 stop &amp;amp;&amp;amp; sleep 2 &amp;amp;&amp;amp; $0 start&lt;br /&gt;
                ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo &amp;quot;Usage: $0 {start|stop|restart}&amp;quot;&lt;br /&gt;
                exit 2&lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* make it executable:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# chmod a+x /etc/init.d/myapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* create a symlink to start the previous script in runlevel 5:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# ln -sf /etc/init.d/myapp /etc/rc5.d/S99myapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reboot and check that you application is successfully started ;-)&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://www.debian.org/releases/stable/i386/apds03.html.en Installing Debian GNU/Linux from a Unix/Linux System]&lt;br /&gt;
* http://free-electrons.com/blog/embdebian-with-multistrap/&lt;br /&gt;
* http://wiki.debian.org/Xfce&lt;br /&gt;
* [http://fr.scribd.com/doc/123130564/Installation-de-Debian-sur-la-carte-Armadeus-APF28 Enhanced french tutorial to install Debian on an APF28 board]&lt;br /&gt;
* [[Buildroot_inside_Debian_on_APF]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Distribution]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Debian_on_APF&amp;diff=15150</id>
		<title>Debian on APF</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Debian_on_APF&amp;diff=15150"/>
		<updated>2025-01-16T17:03:51Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details how to install Debian on an [[APF27]] / [[APF28]] / [[APF51]] / [[APF6]] / [[OPOS6UL]].&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
* an APF/OPOS SOM (with corresponding docking/devt board)&lt;br /&gt;
* a development PC running linux&lt;br /&gt;
* the debootstrap program installed on the development PC&lt;br /&gt;
* the ARM qemu-user, statically linked on the development PC&lt;br /&gt;
* about an hour of free time&lt;br /&gt;
&lt;br /&gt;
==Lazy guys==&lt;br /&gt;
* For the lazy one and also beholder of an [[APF6]], you can find an image here: [http://dl.free.fr/j283bzIbH apf6_debian_wheezy_rootfs.ext4].&lt;br /&gt;
* For the lazy one and also beholder of an [[OPOS6UL]], you can find an image here: [http://dl.free.fr/onh3mtEbn opos6ul_debian_jessie_rootfs.ext4].&lt;br /&gt;
* Download it and put it in your TFTP directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp xxx_debian_wheezy_rootfs.ext4 /tftpboot/xxx-rootfs.ext4    (where xxx is the name of you module)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reflash your rootfs from U-Boot (if you have 512 Mbytes of RAM):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* or use [[U-Boot_UMS_on_APF_%26_OPOS|UMS mode]] otherwise.&lt;br /&gt;
* Then you can reset your board and directly skip to [[Debian_on_APF#First_login| &amp;quot;First login&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
==Preparing the development PC==&lt;br /&gt;
* In this tutorial, we use Ubuntu on the development PC. Any other distribution can be used with some adjustments but of course, Debian based distributions are recommended.&lt;br /&gt;
&lt;br /&gt;
* Let&#039;s first install all the packages that will be used :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt-get install debootstrap qemu-user-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then get in a root shell and prepare a work folder:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd anywhere_you_have_free_space&lt;br /&gt;
# mkdir apf_debian&lt;br /&gt;
# cd apf_debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bootstrapping the Debian filesystem==&lt;br /&gt;
&lt;br /&gt;
* The debootstrap command is generating a base debian filesystem by downloading all debian base packages and unpacking them in a folder, in order to build a fresh debian root filesystem.&lt;br /&gt;
* Installing deb packages is not only extracting archive files, it also consists in running scripts after unpacking the files. Running these scripts is handled by the script interpreters that have been unpacked in the generated folders. Therefore generating an ARM debian filesystem on an x86 based computer requires to do this in two steps.&lt;br /&gt;
* Let&#039;s run the first step. That one consists in downloading all the deb packages and unpacking the files, but without running the scripts :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# debootstrap --foreign --arch=armel jessie rootfs http://ftp.debian.org/debian &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The &#039;&#039;--foreign&#039;&#039; option makes debootstrap stop right after unpacking.&lt;br /&gt;
* The &#039;&#039;--arch&#039;&#039; option specifies the architecture we want to make a rootfs for, &#039;&#039;armel&#039;&#039; is the name of the ARM port of debian for processors without FPU. &lt;br /&gt;
{{Note|On [[APF6]] &amp;amp; [[OPOS6UL]] you might want to use &#039;&#039;armhf&#039;&#039; (i.MX6 has an FPU) instead of &#039;&#039;armel&#039;&#039;.}}&lt;br /&gt;
* &#039;&#039;jessie&#039;&#039; is the name of the debian version we want to get (latest stable one). &#039;&#039;rootfs&#039;&#039; is the name of the subfolder where debootstrap will work. Finally we give the URL of the debian mirror we want to use (you can use another one which sits in your country, to make it faster).&lt;br /&gt;
* This process may take a while: it will download all the debian base packages from the mirror and unpack them in the &#039;&#039;rootfs/&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
== second stage of debootstrap ==&lt;br /&gt;
* The next step is to run the second stage of debootstrap. That stage consists in finalizing the installation of the package by running the configuration scripts we mentionned earlier. Since these scripts will be executed using the interpreter who is in the new filesystem, and not by the interpreter from your development PC, we are now facing a problem : the interpreter in that new filesystem is an ARM program, and won&#039;t run on an x86 system. To overcome this, we will make use of &#039;&#039;qemu&#039;&#039;, who allows to run foreign architecture Linux programs through emulation.&lt;br /&gt;
* First, we need to copy the qemu binary into the new filesystem :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# cp /usr/bin/qemu-arm-static rootfs/usr/bin/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then we can launch the second stage of debootstrap; qemu will automatically run the ARM binaries :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot rootfs debootstrap/debootstrap --second-stage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* This process may also take a while: it will run the scripts of each package, in order to finalize the package installation.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
I: Base system installed successfully.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tweaking the filesystem==&lt;br /&gt;
&lt;br /&gt;
* After the file system has been generated by debootstrap, some adjustments need to be done.&lt;br /&gt;
* First, we need to have debian run a getty on the console serial port (replace &#039;&#039;ttyXXX&#039;&#039; with &#039;&#039;ttymxc2&#039;&#039; on [[APF51]], &#039;&#039;ttySMX0&#039;&#039; on [[APF27]], &#039;&#039;ttymxc3&#039;&#039; on [[APF6]], &#039;&#039;ttymxc0&#039;&#039; on [[OPOS6UL]]), otherwise no login prompt will be available on the console port :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;T0:23:respawn:/sbin/getty -L ttyXXX 115200 vt100&#039; &amp;gt;&amp;gt; rootfs/etc/inittab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The debian mirror also has to be specified in the APT configuration, in order to install new debian packages later :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;deb http://ftp.debian.org/debian jessie main&#039; &amp;gt; rootfs/etc/apt/sources.list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The hostname of the debian system has to be set properly (here &#039;&#039;apf6&#039;&#039;, change it accordingly to your board):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;apf6&#039; &amp;gt; rootfs/etc/hostname&lt;br /&gt;
# echo &#039;127.0.1.1 apf6&#039; &amp;gt;&amp;gt; rootfs/etc/hosts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Remove root password (for first login):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# sed -i -e &#039;s/root:\*:/root::/&#039; rootfs/etc/shadow&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Add &#039;&#039;eth0&#039;&#039; network interface configuration:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\nauto eth0\nallow-hotplug eth0\niface eth0 inet dhcp\n&amp;quot; &amp;gt;&amp;gt; rootfs/etc/network/interfaces&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Copy kernel image and modules:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# export YOUR_BSP_PATH=your_armadeus_bsp_path&lt;br /&gt;
# cp -r ${YOUR_BSP_PATH}/buildroot/output/target/boot rootfs/&lt;br /&gt;
# cp -r ${YOUR_BSP_PATH}/buildroot/output/target/lib/modules rootfs/lib/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Finally we can clean the APT cache (we no longer need the deb files, and that will save quite some disk space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# chroot rootfs apt-get clean&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Copying the filesystem on the APF==&lt;br /&gt;
* Now that the debian filesystem is ready, it must be transferred to the APF. You have 2 solutions:&lt;br /&gt;
&lt;br /&gt;
===1] Overwriting default rootfs on Flash (APF6/OPOS6UL)===&lt;br /&gt;
* The [[APF6]]/[[OPOS6UL]] eMMC has enough space to run debian directly on it.&lt;br /&gt;
* To finalize installation you will need &#039;&#039;resize2fs&#039;&#039; tool (recent version of Armadeus BSP), so copy it to Debian rootfs (Armadeus binaries for [[APF6]]/[[OPOS6UL]] are compatible with Debian armhf port):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# YOUR_BSP_PATH=your_armadeus_bsp_path&lt;br /&gt;
# cp $YOUR_BSP_PATH/buildroot/output/target/sbin/resize2fs rootfs/sbin/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* To generate a .ext4 image from the &#039;&#039;rootfs/&#039;&#039; directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# YOUR_BSP_PATH=your_armadeus_bsp_path&lt;br /&gt;
# PATH=$PATH:$YOUR_BSP_PATH/buildroot/output/host/usr/bin/:$YOUR_BSP_PATH/buildroot/output/host/usr/sbin/ \&lt;br /&gt;
    mke2img -G 4 -R 1 -d ./rootfs/ -o apf_debian_jessie_rootfs.ext4&lt;br /&gt;
# cp apf_debian_jessie_rootfs.ext4 /tftpboot/XXX-rootfs.ext4      (where XXX is the name of your module)&lt;br /&gt;
# chmod a+rw /tftpboot/opos6ul-rootfs.ext4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Now on your board, boot into U-Boot and:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run update_rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If the rootfs image is too big for your SoM RAM size, you can also use [[U-Boot_UMS_on_APF_%26_OPOS|UMS]] USB mode of U-Boot to flash this image.&lt;br /&gt;
* Congratulations, you can go to [[Debian_on_APF#First_login|first login]]&lt;br /&gt;
&lt;br /&gt;
===2] Using Debian on Flash while keeping default rootfs (APF6/APF51)===&lt;br /&gt;
&lt;br /&gt;
* This tutorial will describe a method that will allow to keep the original Armadeus system on the board, and that will permit to choose which system to boot very easily. It is not the only way to run Debian on the APF, but it is quite convenient.&lt;br /&gt;
&lt;br /&gt;
* You need to have an [[APF51]] or an [[APF6]] running the Buildroot based original system.&lt;br /&gt;
&lt;br /&gt;
* The first step is to pack the debian filesystem that has been created on the development PC:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# tar cvf debian_arm_rootfs.tar rootfs/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You will end up with a ~150 MBytes tarball&lt;br /&gt;
* Then this archive should be transferred to the APF board. You can use a USB key or a microSD for example. (or TFTP if you have a lot of free space on your APF NAND; then put the file in &#039;&#039;/root&#039;&#039; on the APF)&lt;br /&gt;
&lt;br /&gt;
* Now, on the APF, the archive should be extracted (from the media holding it to the APF NAND FLASH). &#039;&#039;&#039;Don&#039;t forget the p option of tar&#039;&#039;&#039;, which is required to properly extract permissions on files :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cd /root&lt;br /&gt;
# tar xvpf debian_arm_rootfs.tar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We will boot this distribution using &#039;&#039;chroot&#039;&#039;. We need to write a script that will be run by the kernel on startup and that will do the chroot at an early stage of the boot process, so that nothing from the original rootfs is started when we want to boot Debian. To do this, create a file called &#039;&#039;/debinit&#039;&#039; that contains the following lines :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t proc none /root/rootfs/proc&lt;br /&gt;
exec chroot /root/rootfs /sbin/init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script needs to be executable :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# chmod 755 /debinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Kernel modules and firmware files need to be copied from the default filesystem to the Debian filesystem :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp -r /lib/modules/* /root/rootfs/lib/modules&lt;br /&gt;
# cp -r /lib/firmware /root/rootfs/lib/firmware&lt;br /&gt;
# chroot /root/rootfs /sbin/depmod -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Configure U-Boot to boot debian ====&lt;br /&gt;
* Finally, we need to configure U-Boot so it tells the kernel to use that script on bootup. Reboot your board, press a key to interrupt the automatic boot in U-Boot, then do :&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;depboot definition depending on board&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! APF51 || APF6&lt;br /&gt;
|---&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv debboot &#039;setenv extrabootargs ${extrabootargs} init=/debinit; run ubifsboot&#039;&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv debboot &#039;setenv extrabootargs ${extrabootargs} init=/debinit; run emmcboot&#039;&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* That&#039;s all. Now you board will keep booting the original system but if you want to boot debian instead, you can interrupt the autoboot of U-Boot and run the command :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; run debboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In case you want the board to boot debian automatically, you can do so by running :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv bootcmd run debboot&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* You can then switch back to the original Armadeus system by running :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv bootcmd run ubifsboot&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==First login==&lt;br /&gt;
Whaoouh ! It booted ! ;-)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
Debian GNU/Linux 8 apfxx/opos6ul ttySMX0/ttymxc2|0&lt;br /&gt;
&lt;br /&gt;
apfxx/opos6ul login:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Login as root with no password&lt;br /&gt;
&lt;br /&gt;
* If rootfs is mounted read-only, then remount it rw:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# mount -o remount,rw /dev/mmcblk2p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# mount -o remount,rw /dev/mmcblk0p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* You might also definitely change this behavior (rootfs mounted read-only), by modifying U-Boot&#039;s &#039;&#039;mmcroot&#039;&#039; variable: replace ro with rw:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# reboot&lt;br /&gt;
BIOS&amp;gt; setenv mmcroot /dev/mmcblk2p2 rw&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# reboot&lt;br /&gt;
BIOS&amp;gt; setenv mmcroot /dev/mmcblk0p2 rw&lt;br /&gt;
BIOS&amp;gt; saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* On modules with eMMC &#039;&#039;&#039;only&#039;&#039;&#039;, if you replaced the default rootfs, you might want to use all eMMC space for debian:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[APF6]] !! [[OPOS6UL]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6:~# /usr/sbin/resize2fs /dev/mmcblk2p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# /usr/sbin/resize2fs /dev/mmcblk0p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* If &#039;&#039;/etc/mtab&#039;&#039; is absent, regenerate it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# grep -v rootfs /proc/mounts &amp;gt; /etc/mtab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Update packages (network should be up and running):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get update&lt;br /&gt;
root@apfxx:~# apt-get upgrade&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the keyboard layout doesn&#039;t suite yours, you can change it with (keyboard type, then keymap):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# dpkg-reconfigure keyboard-configuration&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup system and RTC date:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# date 012011552010&lt;br /&gt;
Wed Jan 20 11:55:00 UTC 2010&lt;br /&gt;
root@apfxx:~# hwclock -wu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you don&#039;t have any RTC chip (or no RTC backup cell) on your development board but have Internet access, then it could be a good idea to install &#039;&#039;ntpdate&#039;&#039; and use it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install ntpdate&lt;br /&gt;
...&lt;br /&gt;
root@apfxx:~# ntpdate-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To configure TimeZone:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# dpkg-reconfigure tzdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change root password:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a user (&#039;&#039;armadeus&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# adduser armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove x86 qemu used during installation to get some free space:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:/tmp# rm /usr/bin/qemu-arm-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you want remote network/SSH access to your board:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf|oposxx:~# apt-get install dropbear&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Other packages that may also be useful (for development):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install build-essential gcc-4.8 tftp vim strace i2c-tools iw psmisc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you want an X server (requires ~60 MBytes of free space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xserver-xorg              (xserver-xfbdev ?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want some apps for X (requires ~20 MBytes of free space):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install x11-apps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want a graphical login manager:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xdm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* if you want a touchscreen calibrator and a virtual keyboard:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xinput-calibrator xvkbd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* if you want a lightweight Web browser:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install netsurf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want a desktop manager (requires &amp;gt;300 MBytes o_O):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install xfce4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You might also want to try another &amp;quot;lightweight&amp;quot; desktop manager (&amp;gt;600 MBytes o_O&amp;lt;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apfxx:~# apt-get install lxde&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known issues==&lt;br /&gt;
===APF27===&lt;br /&gt;
* Xorg won&#039;t start. (compatibility problem with framebuffer driver)&lt;br /&gt;
&lt;br /&gt;
===APF51===&lt;br /&gt;
* There&#039;s a kernel oops during the boot process. This is related to the SPI driver.&lt;br /&gt;
* Booting takes quite some time because udev has an issue with the SPI port and it takes some time before it timeouts and continues the boot.&lt;br /&gt;
&lt;br /&gt;
===APF6===&lt;br /&gt;
* &#039;&#039;hcitool lescan&#039;&#039; command is reported to not work. Use &#039;&#039;bluetoothctl&#039;&#039; instead.&lt;br /&gt;
&lt;br /&gt;
===OPOS6UL===&lt;br /&gt;
* onboard Wi-Fi chip doesn&#039;t seem operational.&lt;br /&gt;
* to have Wi-Fi firmware on Debian Jessie:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# vim /etc/apt/sources.list&lt;br /&gt;
                   add non-free&lt;br /&gt;
root@opos6ul:~# apt-get update&lt;br /&gt;
root@opos6ul:~# apt-get install firmware-brcm80211&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Console Port Issues===&lt;br /&gt;
In some cases the boot crashes and errors like these appear&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
init: Id &amp;quot;T0&amp;quot; respawning too fast: disabled for 5 minutes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It means that the /dev folder haven&#039;t been populated with your console serial port.&lt;br /&gt;
&lt;br /&gt;
To fix this, you need to reboot the apf and run armadeus system, then you need to do the following commands :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp -r /dev/ttymxc0 /root/rootfs/dev/ttymxc0 (for apf51)&lt;br /&gt;
# cp -r /dev/ttySMX0 /root/rootfs/dev/ttySMX0 (for apf27)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to check that the file /root/rootfs/etc/securetty contains the console serial port (ttymxc0 for APF51 and ttySMX0 for APF27) if not :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo &#039;ttymxc0&#039; &amp;gt;&amp;gt; /root/rootfs/etc/securetty (for apf51)&lt;br /&gt;
# echo &#039;ttySMX0&#039; &amp;gt;&amp;gt; /root/rootfs/etc/securetty (for apf27)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It will allow the root user to login via this serial console.&lt;br /&gt;
&lt;br /&gt;
It could also affects other ports and you will need to do the same procedure for them (ttyX, fbX, input, ttymxcX, ttySMXX, etc.)&lt;br /&gt;
&lt;br /&gt;
==Automatically starts your custom application==&lt;br /&gt;
* Edit a shell script named &#039;&#039;/etc/init.d/myapp&#039;&#039;, here we suppose your application is named &#039;&#039;/root/myapp&#039;&#039;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
### BEGIN INIT INFO&lt;br /&gt;
# Provides:        myapp&lt;br /&gt;
# Required-Start:  $network $remote_fs $syslog&lt;br /&gt;
# Required-Stop:   $network $remote_fs $syslog&lt;br /&gt;
# Default-Start:   2 3 4 5&lt;br /&gt;
# Default-Stop: &lt;br /&gt;
# Short-Description: Start my application&lt;br /&gt;
### END INIT INFO&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin&lt;br /&gt;
&lt;br /&gt;
. /lib/lsb/init-functions&lt;br /&gt;
&lt;br /&gt;
MY_APP=/root/myapp&lt;br /&gt;
&lt;br /&gt;
test -x $MY_APP || exit 5&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
        start)&lt;br /&gt;
                log_daemon_msg &amp;quot;Starting my app&amp;quot;&lt;br /&gt;
                $MY_APP &amp;amp;&lt;br /&gt;
                ;;&lt;br /&gt;
        stop)&lt;br /&gt;
                log_daemon_msg &amp;quot;Stopping my app&amp;quot;&lt;br /&gt;
                ;;&lt;br /&gt;
        restart)&lt;br /&gt;
                $0 stop &amp;amp;&amp;amp; sleep 2 &amp;amp;&amp;amp; $0 start&lt;br /&gt;
                ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo &amp;quot;Usage: $0 {start|stop|restart}&amp;quot;&lt;br /&gt;
                exit 2&lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* make it executable:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# chmod a+x /etc/init.d/myapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* create a symlink to start the previous script in runlevel 5:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@opos6ul:~# ln -sf /etc/init.d/myapp /etc/rc5.d/S99myapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reboot and check that you application is successfully started ;-)&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://www.debian.org/releases/stable/i386/apds03.html.en Installing Debian GNU/Linux from a Unix/Linux System]&lt;br /&gt;
* http://free-electrons.com/blog/embdebian-with-multistrap/&lt;br /&gt;
* http://wiki.debian.org/Xfce&lt;br /&gt;
* [http://fr.scribd.com/doc/123130564/Installation-de-Debian-sur-la-carte-Armadeus-APF28 Enhanced french tutorial to install Debian on an APF28 board]&lt;br /&gt;
* [[Buildroot_inside_Debian_on_APF]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Distribution]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Power_management&amp;diff=15149</id>
		<title>Power management</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Power_management&amp;diff=15149"/>
		<updated>2024-12-10T17:43:37Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==APF9328==&lt;br /&gt;
===APF9328 alone===&lt;br /&gt;
Power consumption measurements have been done on an APF9328 board. &lt;br /&gt;
The results are available in the [[APF9328]] datasheet.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===APF9328 connected to a DevLight board===&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;How to reduce chips power consumption&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot;&lt;br /&gt;
! &#039;&#039;&#039;Functionnality&#039;&#039;&#039; || &#039;&#039;&#039; power needed @ 5V&#039;&#039;&#039; || &#039;&#039;&#039;how to reduce it&#039;&#039;&#039;&lt;br /&gt;
|----------------&lt;br /&gt;
| FPGA || xxxmA || don&#039;t configure it&lt;br /&gt;
|----------------&lt;br /&gt;
| Ethernet ||  || ifconfig eth0 down&lt;br /&gt;
|----------------&lt;br /&gt;
| i.MXL (proc + SDRAM + Flash) ||  || &lt;br /&gt;
|----------------&lt;br /&gt;
| LCD  ||  || &lt;br /&gt;
|----------------&lt;br /&gt;
|  ||  || &lt;br /&gt;
|----------------&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==APF27/APF28/APF51==&lt;br /&gt;
&lt;br /&gt;
===Linux configuration===&lt;br /&gt;
{{Note| now done by default in latest apf kernel configs}}&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
[*] Power management options  ---&amp;gt;&lt;br /&gt;
     [*] Power Management support&lt;br /&gt;
     [*]   Power Management Debug Support&lt;br /&gt;
     [*]     Verbose Power Management debugging&lt;br /&gt;
[*] Suspend to RAM and standby&lt;br /&gt;
     [ ]   Test suspend/resume and wakealarm during bootup&lt;br /&gt;
&amp;lt; &amp;gt; Advanced Power Management Emulation&lt;br /&gt;
[ ] Use D14 LED of the APF27Dev for suspend signaling&lt;br /&gt;
[ ] Use S1 switch of the APF27Dev to resume after a suspend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the apf27, power management handling is done in &#039;&#039;arch/arm/mach-mx2/pm_imx27.c&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* if you put the APF27 in suspend mode, it could be interesting to be able to wake it with the &amp;quot;User button&amp;quot;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
[*] Power management options  ---&amp;gt;&lt;br /&gt;
     [*] Power Management support&lt;br /&gt;
     [*]   Power Management Debug Support&lt;br /&gt;
     [*]     Verbose Power Management debugging&lt;br /&gt;
[*] Suspend to RAM and standby&lt;br /&gt;
     [ ]   Test suspend/resume and wakealarm during bootup&lt;br /&gt;
&amp;lt; &amp;gt; Advanced Power Management Emulation&lt;br /&gt;
[ ] Use D14 LED of the APF27Dev for suspend signaling&lt;br /&gt;
[*] Use S1 switch of the APF27Dev to resume after a suspend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if you put the [[APF28]] in suspend mode, you can use the power button to wake up the board.&lt;br /&gt;
&lt;br /&gt;
===To know if driver is launched===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# dmesg | grep Power&lt;br /&gt;
Power Management for Freescale i.MX2x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Ethernet==&lt;br /&gt;
for the [[APF27]] the &#039;&#039;fec_old&#039;&#039; driver currently do not implement CONFIG_PM stuff...&lt;br /&gt;
&lt;br /&gt;
===Power-up===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ifconfig eth0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Power-down===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ifconfig eth0 down   --&amp;gt;&amp;gt; ~ -400 mW&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other devices==&lt;br /&gt;
Should comply to suspend/resume device drive mechanism.&lt;br /&gt;
&lt;br /&gt;
===List available suspend modes===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cat /sys/power/state&lt;br /&gt;
standby mem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enter standby mode (i.MX in Doze mode)===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo standby &amp;gt; /sys/power/state&lt;br /&gt;
PM: Syncing filesystems ... done.&lt;br /&gt;
PM: Preparing system for standby sleep&lt;br /&gt;
Freezing user space processes ... (elapsed 0.00 seconds) done.&lt;br /&gt;
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.&lt;br /&gt;
PM: Entering standby sleep&lt;br /&gt;
Suspending console(s) (use no_console_suspend to debug)&lt;br /&gt;
imx-uart imx-uart.0: preparing suspend&lt;br /&gt;
imx-uart imx-uart.2: preparing suspend&lt;br /&gt;
mxc_nand mxc_nand.0: preparing suspend&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enter suspend to memory mode (i.MX in Sleep mode)===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # echo mem &amp;gt; /sys/power/state&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
only an external interrupt can now wake up the i.MX27&lt;br /&gt;
&lt;br /&gt;
{{Warning| The mode &#039;mem&#039; is not implemented in the kernel 2.6.35 for the [[APF28]].  please use the &#039;standby&#039; mode}}&lt;br /&gt;
&lt;br /&gt;
Only few interrupts can wake up the  i.MX51 from this mode. please check the mx51 reference manual for further information.&lt;br /&gt;
&lt;br /&gt;
===Wake up the board from sleep mode===&lt;br /&gt;
&lt;br /&gt;
* For the [[APF28]] you can use the power button, any active interrupt or the RTC.&lt;br /&gt;
* For the [[APF27]] you will have to use an external interrupt.&lt;br /&gt;
* For the [[APF51]] the RTC or an external interrupt can wake up the board.&lt;br /&gt;
&lt;br /&gt;
===Debugging suspend/resume===&lt;br /&gt;
* pass &#039;&#039;&#039;no_console_suspend&#039;&#039;&#039; as boot parameter:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv extrabootargs no_console_suspend&lt;br /&gt;
BIOS&amp;gt; boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known problems ==&lt;br /&gt;
&lt;br /&gt;
* [[APF27]] USB: usb cause system warning :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo standby &amp;gt; /sys/power/state&lt;br /&gt;
PM: Syncing filesystems ... done.&lt;br /&gt;
Freezing user space processes ... (elapsed 0.01 seconds) done.&lt;br /&gt;
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.&lt;br /&gt;
___ apf27_pm_suspend&lt;br /&gt;
___ apf27_pm_resume&lt;br /&gt;
------------[ cut here ]------------&lt;br /&gt;
WARNING: at kernel/hrtimer.c:625 hres_timers_resume+0x3c/0x60()&lt;br /&gt;
hres_timers_resume() called with IRQs enabled!Modules linked in: gpio&lt;br /&gt;
[&amp;lt;c002c0d8&amp;gt;] (dump_stack+0x0/0x14) from [&amp;lt;c003c148&amp;gt;] (warn_slowpath+0x70/0x8c)&lt;br /&gt;
[&amp;lt;c003c0d8&amp;gt;] (warn_slowpath+0x0/0x8c) from [&amp;lt;c0055dfc&amp;gt;] (hres_timers_resume+0x3c/0x60)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Suspend to disk==&lt;br /&gt;
&lt;br /&gt;
Another solution to spare energy, if your board has an ON/OFF functionality, would be to activate suspend to disk mode. In this mode all currently used memory is copied by the Linux kernel to a swap partition (preferably on a eMMC). Consumption in this mode is like in OFF mode and boot-up is then faster that normal power-down/up sequence.&lt;br /&gt;
&lt;br /&gt;
Prerequisites are:&lt;br /&gt;
* a lot of RAM (at least double of maximum used as time of suspend launch)&lt;br /&gt;
* a storage device big/resilient enough to have a swap partition&lt;br /&gt;
&lt;br /&gt;
===Swap partition===&lt;br /&gt;
* Create a spare partition on your SOM with fdisk and set it to type 0x82 (SWAP)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Format this partition as swap&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [[Linux_Dynamic_Frequency_Scaling| Another good way of decreasing mA is to use frequency scaling]]&lt;br /&gt;
* [http://www.linuxjournal.com/article/6699 Power Management in Linux-Based Systems (Linux Journal)]&lt;br /&gt;
* [http://wiki.davincidsp.com/index.php?title=Startup_shutdown_and_power_management BlackFin way of doing]&lt;br /&gt;
&lt;br /&gt;
[[Category:Power Management]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Power_management&amp;diff=15148</id>
		<title>Power management</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Power_management&amp;diff=15148"/>
		<updated>2024-12-10T17:33:22Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Wake up the board from sleep mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==APF9328==&lt;br /&gt;
===APF9328 alone===&lt;br /&gt;
Power consumption measurements have been done on an APF9328 board. &lt;br /&gt;
The results are available in the [[APF9328]] datasheet.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===APF9328 connected to a DevLight board===&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;How to reduce chips power consumption&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#efefef;&amp;quot;&lt;br /&gt;
! &#039;&#039;&#039;Functionnality&#039;&#039;&#039; || &#039;&#039;&#039; power needed @ 5V&#039;&#039;&#039; || &#039;&#039;&#039;how to reduce it&#039;&#039;&#039;&lt;br /&gt;
|----------------&lt;br /&gt;
| FPGA || xxxmA || don&#039;t configure it&lt;br /&gt;
|----------------&lt;br /&gt;
| Ethernet ||  || ifconfig eth0 down&lt;br /&gt;
|----------------&lt;br /&gt;
| i.MXL (proc + SDRAM + Flash) ||  || &lt;br /&gt;
|----------------&lt;br /&gt;
| LCD  ||  || &lt;br /&gt;
|----------------&lt;br /&gt;
|  ||  || &lt;br /&gt;
|----------------&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==APF27/APF28/APF51==&lt;br /&gt;
&lt;br /&gt;
===Linux configuration===&lt;br /&gt;
{{Note| now done by default in latest apf kernel configs}}&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
[*] Power management options  ---&amp;gt;&lt;br /&gt;
     [*] Power Management support&lt;br /&gt;
     [*]   Power Management Debug Support&lt;br /&gt;
     [*]     Verbose Power Management debugging&lt;br /&gt;
[*] Suspend to RAM and standby&lt;br /&gt;
     [ ]   Test suspend/resume and wakealarm during bootup&lt;br /&gt;
&amp;lt; &amp;gt; Advanced Power Management Emulation&lt;br /&gt;
[ ] Use D14 LED of the APF27Dev for suspend signaling&lt;br /&gt;
[ ] Use S1 switch of the APF27Dev to resume after a suspend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the apf27, power management handling is done in &#039;&#039;arch/arm/mach-mx2/pm_imx27.c&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* if you put the APF27 in suspend mode, it could be interesting to be able to wake it with the &amp;quot;User button&amp;quot;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
[*] Power management options  ---&amp;gt;&lt;br /&gt;
     [*] Power Management support&lt;br /&gt;
     [*]   Power Management Debug Support&lt;br /&gt;
     [*]     Verbose Power Management debugging&lt;br /&gt;
[*] Suspend to RAM and standby&lt;br /&gt;
     [ ]   Test suspend/resume and wakealarm during bootup&lt;br /&gt;
&amp;lt; &amp;gt; Advanced Power Management Emulation&lt;br /&gt;
[ ] Use D14 LED of the APF27Dev for suspend signaling&lt;br /&gt;
[*] Use S1 switch of the APF27Dev to resume after a suspend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if you put the [[APF28]] in suspend mode, you can use the power button to wake up the board.&lt;br /&gt;
&lt;br /&gt;
===To know if driver is launched===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# dmesg | grep Power&lt;br /&gt;
Power Management for Freescale i.MX2x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Ethernet==&lt;br /&gt;
for the [[APF27]] the &#039;&#039;fec_old&#039;&#039; driver currently do not implement CONFIG_PM stuff...&lt;br /&gt;
&lt;br /&gt;
===Power-up===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ifconfig eth0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Power-down===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ifconfig eth0 down   --&amp;gt;&amp;gt; ~ -400 mW&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other devices==&lt;br /&gt;
Should comply to suspend/resume device drive mechanism.&lt;br /&gt;
&lt;br /&gt;
===List available suspend modes===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cat /sys/power/state&lt;br /&gt;
standby mem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enter standby mode (i.MX in Doze mode)===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo standby &amp;gt; /sys/power/state&lt;br /&gt;
PM: Syncing filesystems ... done.&lt;br /&gt;
PM: Preparing system for standby sleep&lt;br /&gt;
Freezing user space processes ... (elapsed 0.00 seconds) done.&lt;br /&gt;
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.&lt;br /&gt;
PM: Entering standby sleep&lt;br /&gt;
Suspending console(s) (use no_console_suspend to debug)&lt;br /&gt;
imx-uart imx-uart.0: preparing suspend&lt;br /&gt;
imx-uart imx-uart.2: preparing suspend&lt;br /&gt;
mxc_nand mxc_nand.0: preparing suspend&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enter suspend to memory mode (i.MX in Sleep mode)===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # echo mem &amp;gt; /sys/power/state&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
only an external interrupt can now wake up the i.MX27&lt;br /&gt;
&lt;br /&gt;
{{Warning| The mode &#039;mem&#039; is not implemented in the kernel 2.6.35 for the [[APF28]].  please use the &#039;standby&#039; mode}}&lt;br /&gt;
&lt;br /&gt;
Only few interrupts can wake up the  i.MX51 from this mode. please check the mx51 reference manual for further information.&lt;br /&gt;
&lt;br /&gt;
===Wake up the board from sleep mode===&lt;br /&gt;
&lt;br /&gt;
* For the [[APF28]] you can use the power button, any active interrupt or the RTC.&lt;br /&gt;
* For the [[APF27]] you will have to use an external interrupt.&lt;br /&gt;
* For the [[APF51]] the RTC or an external interrupt can wake up the board.&lt;br /&gt;
&lt;br /&gt;
===Debugging suspend/resume===&lt;br /&gt;
* pass &#039;&#039;&#039;no_console_suspend&#039;&#039;&#039; as boot parameter:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv extrabootargs no_console_suspend&lt;br /&gt;
BIOS&amp;gt; boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known problems ==&lt;br /&gt;
&lt;br /&gt;
* [[APF27]] USB: usb cause system warning :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo standby &amp;gt; /sys/power/state&lt;br /&gt;
PM: Syncing filesystems ... done.&lt;br /&gt;
Freezing user space processes ... (elapsed 0.01 seconds) done.&lt;br /&gt;
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.&lt;br /&gt;
___ apf27_pm_suspend&lt;br /&gt;
___ apf27_pm_resume&lt;br /&gt;
------------[ cut here ]------------&lt;br /&gt;
WARNING: at kernel/hrtimer.c:625 hres_timers_resume+0x3c/0x60()&lt;br /&gt;
hres_timers_resume() called with IRQs enabled!Modules linked in: gpio&lt;br /&gt;
[&amp;lt;c002c0d8&amp;gt;] (dump_stack+0x0/0x14) from [&amp;lt;c003c148&amp;gt;] (warn_slowpath+0x70/0x8c)&lt;br /&gt;
[&amp;lt;c003c0d8&amp;gt;] (warn_slowpath+0x0/0x8c) from [&amp;lt;c0055dfc&amp;gt;] (hres_timers_resume+0x3c/0x60)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [[Linux_Dynamic_Frequency_Scaling| Another good way of decreasing mA is to use frequency scaling]]&lt;br /&gt;
* [http://www.linuxjournal.com/article/6699 Power Management in Linux-Based Systems (Linux Journal)]&lt;br /&gt;
* [http://wiki.davincidsp.com/index.php?title=Startup_shutdown_and_power_management BlackFin way of doing]&lt;br /&gt;
&lt;br /&gt;
[[Category:Power Management]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15142</id>
		<title>LinuxInstall</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=LinuxInstall&amp;diff=15142"/>
		<updated>2024-01-30T14:12:12Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Get Armadeus software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;How-To install Armadeus Software Development Kit (SDK) on Linux systems. This SDK is currently based on the (excellent) [http://buildroot.net/ Buildroot].&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation was successfully tested on the following distributions:&lt;br /&gt;
* Debian Lenny (5.0),  Squeeze (6.0.x), Wheezy (7.2), Jessie (8.0)&lt;br /&gt;
* X/KUbuntu Edgy Eft (6.10), Gutsy Gibbon (7.10), Hardy Heron (8.04) &amp;amp; Jaunty Jackalope (9.04)&lt;br /&gt;
* Ubuntu  Lucid Lynx (10.04) (32 &amp;amp; 64bits), 12.04 LTS (32 &amp;amp; 64bits), 13.10 (32 &amp;amp; 64bits), 14.04, 15.04 &amp;amp; 16.04&lt;br /&gt;
* LUbuntu 17.10&lt;br /&gt;
* Mandriva 2006&lt;br /&gt;
* Fedora Core 3 &amp;amp; 4, Fedora 10, Laughlin (14)&lt;br /&gt;
* Red Hat Enterprise 5.2&lt;br /&gt;
* Gentoo 10.0 (32 &amp;amp; 64 bits)&lt;br /&gt;
* SuSE 10.1, OpenSUSE 11.3 - 12.3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The installation may fail on:&#039;&#039;&#039;&lt;br /&gt;
* Ubuntu Karmic Koala (9.10): tslib fails to build&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;APF28 requirements:&#039;&#039;&#039;&lt;br /&gt;
* APF28 board requires a Linux distribution with (GNU) tar version 1.20 or later to compile the Linux Kernel - Please update or upgrade your Linux distribution. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites for Linux installation==&lt;br /&gt;
{{Note|From here we assume that your Linux system has a &#039;&#039;make&#039;&#039; version &#039;&#039;&#039;greater or equal to&#039;&#039;&#039; 3.81. To check it: &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make -v&lt;br /&gt;
GNU Make 3.81&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
For armadeus up to 3.4, make should be &#039;&#039;&#039;strictly&#039;&#039;&#039; make-3.81 (make-3.82 is too strict). A Fedora (14 and 15) -specific solution can be found later; other recent distributions such as mageia1 also have make-3.82, and a generic solution, based on configure&amp;amp;&amp;amp; make&amp;amp;&amp;amp; sudo make install can be used to install make-3.81 (which can be retrieved from http://ftp.gnu.org/gnu/make/make-6.81.tar.gz) in /usr/local/bin (and , according to one&#039;s PATH, make 3-81 can be invoked directly or as /usr/local/bin/make). &lt;br /&gt;
 &lt;br /&gt;
Depending on your distribution, some additional packages are required:&lt;br /&gt;
&lt;br /&gt;
===Debian/Ubuntu based systems===&lt;br /&gt;
[[Ubuntu/Debian installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Mandriva based systems=== &lt;br /&gt;
[[Mandriva installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===RPM-based systems (RedHat, Fedora, CentOS)===&lt;br /&gt;
[[RedHat/Fedora installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===OpenSuse based systems===&lt;br /&gt;
[[OpenSuse installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
===Gentoo based systems===&lt;br /&gt;
[[Gentoo installation prerequisites]]&lt;br /&gt;
&lt;br /&gt;
==Get Armadeus software==&lt;br /&gt;
* &#039;&#039;&#039;If you are a &amp;quot;careful&amp;quot; user&#039;&#039;&#039;, then download [https://gitlab.com/armadeus/armadeus-bsp/-/tags the latest stable installation tarball from gitlab] and detar it wherever you want:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ tar xjvf armadeus-7.0.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;If you want the latest snapshot or if you have a recent SOM ([[OPOS6UL]]/[[OPOS8MM]])&#039;&#039;&#039;, the whole development tree can be checked out from our [[GIT]] repository.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* depending on your previous choice, a directory named &#039;&#039;armadeus/&#039;&#039; or &#039;&#039;armadeus-7.0/&#039;&#039; will be created on your hard-disk and will contain all the files you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remarks&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;&#039;Do not use spaces&#039;&#039;&#039; in the directory name !&lt;br /&gt;
* &#039;&#039;&#039;Do not use a directory path beginning with /usr.&#039;&#039;&#039; It is a known bug of Buildroot (until BR2012.11, at 2012-12).&lt;br /&gt;
* GIT write/push accesses are limited to the integrators ([[User:JulienB|JulienB]], [[User:SebastienSz|SebastienSz]], [[User:Jorasse|Jorasse]], [[User:FabienM|FabienM]], [[User:SebastienR|SebastienR]])&lt;br /&gt;
&lt;br /&gt;
==Configure SDK/BSP options==&lt;br /&gt;
{{Note|If you are new to Armadeus and have troubles compiling armadeus-5.x/armadeus-6.x using the following instructions, you may find some hints here: [[Releases]]}}&lt;br /&gt;
*Go to the directory where you put the Armadeus sources:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd armadeus/  (or armadeus-7.0/)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*The first time you compile an Armadeus distribution you have to specify the target (here the [[APF9328]]) to work with. &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ make apf9328_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command reloads the default configuration to support your target and automatically start a Buildroot&#039;s configuration menu.&lt;br /&gt;
&lt;br /&gt;
* Current valid default configurations are:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
apf9328_defconfig  apf27_defconfig  pps_defconfig  apf28_defconfig  apf51_defconfig  pps51_defconfig apf6_defconfig apf6legacy_defconfig opos6ul_defconfig opos6ulnano_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note| To get the full list of available config just type make, it will download buildroot and print following message :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
[...]&lt;br /&gt;
 System not configured. Use make &amp;lt;board&amp;gt;_defconfig &lt;br /&gt;
 armadeus valid configurations are:                &lt;br /&gt;
     opos6ul_legacy_defconfig opos6ulnano-preempt-rt_defconfig apf6_defconfig pps_defconfig opos6ultest_defconfig apf51_defconfig opos6ulsp_defconfig apf6dawnsmalllinux_defconfig apf27preempt-rt_defconfig apf27test_defconfig apf27_defconfig apf28legacytest_defconfig opos6ullegacy-4.14_defconfig opos6ulnano_defconfig apf28legacy_defconfig apf6mainline-4.19_defconfig opos6ul_defconfig apf6legacy_defconfig apf6xenomai_defconfig apf51test_defconfig opos6ul-preempt-rt_defconfig apf6legacy-preempt-rt_defconfig apf6legacy-4.1_defconfig pps51_defconfig apf6mainline-4.9_defconfig apf28test_defconfig apf28_defconfig apf6mediacenter_defconfig opos6ullegacy-4.9_defconfig opos6ul_recovery_defconfig apf6failsafe_defconfig apf6test_defconfig opos6ullegacy-4.1_defconfig apf27xenomai_defconfig&lt;br /&gt;
                                                   &lt;br /&gt;
Makefile:129: recipe for target &#039;/usr/local/projects/apf6_sp_419/buildroot/.configured&#039; failed&lt;br /&gt;
make: *** [/usr/local/projects/apf6_sp_419/buildroot/.configured] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For PPS boards, please see [[APF27_PPS]] or [[PPS51]] Wiki pages, as these boards have specific build.&lt;br /&gt;
&lt;br /&gt;
* After some downloads, you will get the Buildroot configuration interface:&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ever made changes during the following steps, at any time, you can reload the default configuration with:&lt;br /&gt;
 $ make xxx_defconfig       (xxx depending on your module name)}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Menuconfig3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
*If you are not familiar with Buildroot here are some tips:&lt;br /&gt;
*# you can move the highlighted item with the &amp;quot;up&amp;quot;/&amp;quot;down&amp;quot; arrow keys&lt;br /&gt;
*# with the &amp;quot;left&amp;quot;/&amp;quot;right&amp;quot; arrow keys you can choose between &amp;quot;Select&amp;quot;, &amp;quot;Exit&amp;quot; or &amp;quot;Help&amp;quot; buttons&lt;br /&gt;
*# &amp;quot;space&amp;quot;/&amp;quot;enter&amp;quot;:&lt;br /&gt;
*#* selects the currently highlighted item if you are on the &amp;quot;Select&amp;quot; button&lt;br /&gt;
*#* go back in previous menu if you are on &amp;quot;Exit&amp;quot; button&lt;br /&gt;
*#* show you some Help for current item if you are on &amp;quot;Help&amp;quot; button&lt;br /&gt;
*# for more Help about Buildroot commands, select &amp;quot;Help&amp;quot; in the main configuration screen&lt;br /&gt;
&lt;br /&gt;
* Update the memory configuration of your board (&#039;&#039;&#039;if needed&#039;&#039;&#039;; by default BSP is configured for the minimal memory configuration available on the corresponding board):&lt;br /&gt;
&lt;br /&gt;
:In menu:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;System configuration  ---&amp;gt;    [*] Armadeus Device Support  ---&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:you can check and change the quantity of RAM available on your Armadeus board:&lt;br /&gt;
:[[Image:Build_config_memory.png]]&lt;br /&gt;
:For [[APF9328]] the memory can be either 16 or 32MiB (be sure to select 1 RAM chip)&lt;br /&gt;
:For [[APF27]] it could be either 64MiB or 128MiB (2 x 64MiB) (in that case be sure to select 2 chips of 64MiB instead of 1 chip of 128MiB).&lt;br /&gt;
:For [[APF51]] it could be either 256MiB or 512MiB (2x256MiB) (in such case be sure to select 2 chips of 256MiB instead of 1 chip of 512).&lt;br /&gt;
:For [[APF28]] The memory can be 128, 256, 512 or 1024MiB (be sure to select 1 RAM chip).&lt;br /&gt;
:For [[APF6]]/[[APF6SP]] The memory can be 512 Mbytes or 1Gbytes with ram chip size of 512Mbytes.&lt;br /&gt;
:For [[OPOS6UL]]/[[OPOS6UL_NANO]] The memory size is automatically detected so you don&#039;t care ;-)&lt;br /&gt;
&lt;br /&gt;
* You may decrease the compilation time by increasing the number of parallel jobs running simultaneously on your system (the result is not guaranteed). This option is located in:&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build Options ---&amp;gt;    (0) Number of jobs to run simultaneously&amp;lt;/pre&amp;gt;&lt;br /&gt;
0 means that Buildroot will try to guess automatically how much parallel jobs it can launch.&lt;br /&gt;
&lt;br /&gt;
* During the SDK/BSP build, a lot of software archives are downloaded from Internet. The downloaded files are put by default in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. &#039;&#039;&#039;If you have several views or plan to build the toolchain several times&#039;&#039;&#039;, we advise you to put all the downloaded files in &#039;&#039;/local/downloads&#039;&#039; (for example). This is done by configuring Buildroot to use this directory for all your views. Nevertheless, Buildroot will be downloaded separately for each build environment you set up.&lt;br /&gt;
:&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;Build options  ---&amp;gt;    (...) Download dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
:[[Image:Build_config_download.png]]&lt;br /&gt;
{{Note|Of course, &#039;&#039;/local/downloads&#039;&#039; should exists on your system and you should have writing rights on it !}}&lt;br /&gt;
* In recent Buildroot you can also use the following method:&lt;br /&gt;
 export BR2_DL_DIR=/local/downloads&lt;br /&gt;
&lt;br /&gt;
* After the build, we advise you to copy all the files in &#039;&#039;downloads/&#039;&#039; / &#039;&#039;/local/downloads&#039;&#039; on a removable medium, in case you want to install the development tools on other systems, without to have to reload all the archives.&lt;br /&gt;
&lt;br /&gt;
* Now, Exit the configuration tool and save your configuration&lt;br /&gt;
&lt;br /&gt;
* You can come back to this configuration menu, by typing (your changes will be kept): &lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launch build==&lt;br /&gt;
 $ make&lt;br /&gt;
The toolchain and the full distribution are automatically built. During this procedure, several files are downloaded from Internet. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please wait for a while.... it takes at least one hour for the first run!&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
By default, the downloaded files/tarball are put in the &#039;&#039;armadeus/downloads/&#039;&#039; directory. Please see the previous chapter to know how to optimize that if you plan to build several views or want to build faster.&lt;br /&gt;
&lt;br /&gt;
==Enjoy the result==&lt;br /&gt;
The generated binary files can be found in the subdirectory &#039;&#039;buildroot/output/images&#039;&#039;:&lt;br /&gt;
*&#039;&#039;apf9328-u-boot.brec&#039;&#039; (only on [[APF9328]]): BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working (see [[BootLoader]] page)&lt;br /&gt;
*&#039;&#039;xxx-u-boot.bin&#039;&#039;: U-Boot image file to be used with U-Boot itself, (see [[BootLoader#Update_U-Boot | updating U-Boot]])&lt;br /&gt;
*&#039;&#039;xxx-linux.bin&#039;&#039;: Linux image to use with U-Boot, (see [[Target_Software_Installation#Linux_kernel_installation | updating Linux]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.jffs2&#039;&#039;: JFFS2 filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ubi&#039;&#039; (not supported on [[APF9328]]): [[UBIFS|UBI]] filesystem/rootfs image to use with U-Boot, (see [[Target_Software_Installation#Linux_rootfs_installation | updating rootfs]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.ext4&#039;&#039;: EXT4 filesystem/rootfs image to use with U-Boot, (on [[APF6]] and [[OPOS6UL]])&lt;br /&gt;
*&#039;&#039;xxx-rootfs.tar&#039;&#039;: for an NFS/MMC based rootfs, (see [[Network_Configuration#Boot_from_NFS | Booting from NFS]] &amp;amp; [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note the new naming convention of binary files and directories (since Armadeus 4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;buildroot/output/build&#039;&#039;: contains all the build results for target root filesystem, Linux, Busybox and U-Boot...&lt;br /&gt;
*&#039;&#039;buildroot/output/toolchain/&#039;&#039;: cross compilation toolchain&#039;s build dir. Binaries usable for cross-compilation are in &#039;&#039;buildroot/output/host/usr/bin&#039;&#039;.&lt;br /&gt;
*&#039;&#039;buildroot/output/target/&#039;&#039;: target filessytem before generating rootfs images&lt;br /&gt;
&lt;br /&gt;
More information is available in the  [http://buildroot.uclibc.org/buildroot.html Buildroot&#039;s documentation]&lt;br /&gt;
&lt;br /&gt;
* Note: Previous versions (3.x) of Armadeus SDK stored the generated binary files at a different place: &#039;&#039; &#039;&#039;buildroot/binaries/XX/&#039;&#039; (where XX was the name of your board).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You then copy the binary image to your server directory:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==To keep your local copy/repository up-to-date with the armadeus GIT repository==&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will update your working directory to the latest release.&lt;br /&gt;
&lt;br /&gt;
Note: if &amp;quot;git pull&amp;quot; fails because a directory or a file already exists, then do:&lt;br /&gt;
 $ rm -rf &amp;lt;this-directory/file&amp;gt;&lt;br /&gt;
 $ git pull&lt;br /&gt;
&lt;br /&gt;
You can do a:&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
to have the latest features automatically activated.&lt;br /&gt;
&lt;br /&gt;
You have to do a &#039;&#039;&#039;make&#039;&#039;&#039; to rebuild binary files and then upload the binary files to your target.&lt;br /&gt;
&lt;br /&gt;
Note: if definitively everything goes wrong while it worked before the last update.&lt;br /&gt;
You can apply the following procedure (all your modifications in buildroot will be lost):&lt;br /&gt;
 $ rm -rf buildroot/&lt;br /&gt;
 $ rm Makefile&lt;br /&gt;
 $ git pull&lt;br /&gt;
 $ make apfXX_defconfig&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cp buildroot/output/images/* /tftpboot&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=WiFi&amp;diff=15141</id>
		<title>WiFi</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=WiFi&amp;diff=15141"/>
		<updated>2024-01-30T13:24:16Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Common operations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Pre-requites==&lt;br /&gt;
{{Note| To configure Wi-Fi you need to [[Wireless Tools| install wireless tools]] first (done by default for APF27 / PPS / APF51 / APF6 / OPOS6UL) and of course also need to have a running Wi-Fi interface like: the [[Libertas_driver|one on APW extension board, APF51Dev or PPS devt boards]], the [[Wl12xx_driver|one on APF6]], the one on [[OPOS6UL]] or a [[USB_to_WiFi_adapter|USB to Wi-Fi adapter]], with corresponding Linux drivers loaded.}}&lt;br /&gt;
&lt;br /&gt;
==Common operations==&lt;br /&gt;
====List network interfaces supporting Wi-Fi====&lt;br /&gt;
{|&lt;br /&gt;
! Old BSPs !! New BSPs&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 sit0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wmaster0  no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wlan0     IEEE 802.11bg  ESSID:&amp;quot;&amp;quot;  &lt;br /&gt;
           Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   &lt;br /&gt;
           Tx-Power=0 dBm   &lt;br /&gt;
           Retry min limit:7   RTS thr:off   Fragment thr=2352 B   &lt;br /&gt;
           Encryption key:off&lt;br /&gt;
           Power Management:off&lt;br /&gt;
           Link Quality:0/100  Signal level:112/146  Noise level:0/0&lt;br /&gt;
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
| &amp;lt;pre class=apf&amp;gt;# iw dev&lt;br /&gt;
phy#0&lt;br /&gt;
        Interface wlan0&lt;br /&gt;
                ifindex 3&lt;br /&gt;
                wdev 0x1&lt;br /&gt;
                addr 74:7a:90:e7:e0:d5&lt;br /&gt;
                type managed&lt;br /&gt;
                channel 34 (5170 MHz), width: 20 MHz, center1: 5170 MHz&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|Here our Wi-Fi network interface is called &#039;&#039;wlan0&#039;&#039;. Depending on the number of your network interfaces or their model, this name could change. For example if using the Libertas drivers, the interface may be called &#039;&#039;eth1&#039;&#039; (if &#039;&#039;eth0&#039;&#039; is already used). In that case replace &#039;&#039;wlan0&#039;&#039; with your interface name.}}&lt;br /&gt;
&lt;br /&gt;
====Activate the WLAN interface====&lt;br /&gt;
{|&lt;br /&gt;
! Old BSPs !! New BSPs&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ifconfig wlan0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ip link set wlan0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Show all Access Points (AP) available for your APF (here with wlan0 interface) ====&lt;br /&gt;
{|&lt;br /&gt;
! Old BSPs !! New BSPs&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iwlist wlan0 scan&lt;br /&gt;
&lt;br /&gt;
wlan0     Scan completed :&lt;br /&gt;
          Cell 01 - Address: XX:XX:XX:66:47:48&lt;br /&gt;
                    ESSID:&amp;quot;TOTO&amp;quot;&lt;br /&gt;
                    Mode:Master&lt;br /&gt;
                    Channel:1&lt;br /&gt;
                    Frequency:2.412 GHz (Channel 1)&lt;br /&gt;
                    Quality=88/100  Signal level:25/100&lt;br /&gt;
                    Encryption key:on&lt;br /&gt;
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s&lt;br /&gt;
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s&lt;br /&gt;
                              48 Mb/s; 54 Mb/s&lt;br /&gt;
                    Extra:tsf=00000009d398fec8&lt;br /&gt;
                    Extra: Last beacon: 1390ms ago&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iw wlan0 scan&lt;br /&gt;
&lt;br /&gt;
BSS XX:XX:XX:ed:c5:b0(on wlan0)&lt;br /&gt;
        last seen: 1805.540s [boottime]&lt;br /&gt;
        TSF: 0 usec (0d, 00:00:00)&lt;br /&gt;
        freq: 2462&lt;br /&gt;
        beacon interval: 120 TUs&lt;br /&gt;
        capability: ESS Privacy ShortSlotTime RadioMeasure (0x1411)&lt;br /&gt;
        signal: -90.00 dBm&lt;br /&gt;
        last seen: 0 ms ago&lt;br /&gt;
        SSID: TOTO&lt;br /&gt;
        Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 &lt;br /&gt;
        DS Parameter set: channel 11&lt;br /&gt;
        ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Connect to an unencrypted AP ====&lt;br /&gt;
{|&lt;br /&gt;
! Old BSPs !! New BSPs&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iwconfig wlan0 essid AP_NAME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Check it:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iwconfig wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iw dev wlan0 connect AP_NAME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Check it:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iw dev wlan0 link&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Get an IP address ====&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# udhcpc -i wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Encryption settings==&lt;br /&gt;
When configuring Wi-Fi cryptography, only WEP can be setup easily from a terminal with single commands. For a Wi-Fi network with a WPA/WPA2 protection system, you should install and configure [[WPA supplicant|wpa_supplicant]].&lt;br /&gt;
&lt;br /&gt;
{{Warning| The Wi-Fi Alliance defined WPA/WPA2 protection protocol in response to serious weaknesses researchers had found in the previous system, WEP (Wired Equivalent Privacy). Therefore, we strongly recommend you to use WPA/WPA2 to protect your network. Our [[WPA supplicant|wpa_supplicant]] wiki page provides the procedure to configure a WPA/WPA2 access to your network &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== WEP configuration ====&lt;br /&gt;
&lt;br /&gt;
This example is given for a Wi-Fi Access Point named &#039;&#039;armadeus&#039;&#039;, the encoding key used here is not recommended, of course ;) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # iwconfig wlan0 essid armadeus&lt;br /&gt;
 # iwconfig wlan0 key 12345678901234567890&lt;br /&gt;
 # ifconfig wlan0 up             (if interface is not already up)&lt;br /&gt;
 ADDRCONF(NETDEV_UP): wlan0: link is not ready&lt;br /&gt;
 # ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, the Wi-Fi adapter is ready and attached :&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 sit0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wmaster0  no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wlan0     IEEE 802.11bg  ESSID:&amp;quot;armadeus&amp;quot;  &lt;br /&gt;
           Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1B:2F:E7:E4:08   &lt;br /&gt;
           Bit Rate=2 Mb/s   Tx-Power=7 dBm   &lt;br /&gt;
           Retry min limit:7   RTS thr:off   Fragment thr=2352 B   &lt;br /&gt;
           Encryption key:XXXXXXXXXXXXXXXXXXXXXXXXXX   Security mode:restricted&lt;br /&gt;
           Power Management:off&lt;br /&gt;
           Link Quality:0/100  Signal level:73/146  Noise level:0/0&lt;br /&gt;
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing outside world==&lt;br /&gt;
We can manually configure the network to access Internet via the Wi-Fi interface instead of the Ethernet one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ifconfig eth0 down&lt;br /&gt;
 # ifconfig wlan0 192.168.0.212&lt;br /&gt;
 # route add default gw 192.168.0.1 dev wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And configure the nameserver in /etc/resolv.conf&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 domain dev.null&lt;br /&gt;
 nameserver 192.168.0.207&lt;br /&gt;
 ~                   &lt;br /&gt;
 ~&lt;br /&gt;
 ~&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a DHCP server on your network, you can also use it and previous steps (route+resolv.conf) will be done automatically:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# udhcpc -i wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can now ping the best website in the world :&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ping www.armadeus.org&lt;br /&gt;
 PING www.armadeus.org (213.186.33.5): 56 data bytes&lt;br /&gt;
 64 bytes from 213.186.33.5: seq=0 ttl=122 time=66.735 ms&lt;br /&gt;
 64 bytes from 213.186.33.5: seq=1 ttl=122 time=50.392 ms&lt;br /&gt;
 ^C&lt;br /&gt;
 --- www.armadeus.org ping statistics ---&lt;br /&gt;
 2 packets transmitted, 2 packets received, 0% packet loss&lt;br /&gt;
 round-trip min/avg/max = 50.392/58.563/66.735 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Surf on the net ==&lt;br /&gt;
&lt;br /&gt;
To surf on the web, you can use (for example) &#039;&#039;links&#039;&#039; software :&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # links www.armadeus.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s an ASCII internet browser. [[Links| For more informations about Links]].&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [[Wireless_Tools|Wireless Tools installation]]&lt;br /&gt;
* [[USB_to_WiFi_adapter|USB to Wi-Fi adapters tested with Armadeus boards]]&lt;br /&gt;
* [[Network_interface_bandwidth_measurement| Measure the bandwidth of your network interface]]&lt;br /&gt;
* [[WPA_supplicant|WPA_supplicant]]&lt;br /&gt;
* [[APF as Wi-Fi Access Point]]&lt;br /&gt;
&lt;br /&gt;
[[Category:WiFi]]&lt;br /&gt;
[[Category:Wireless]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=WiFi&amp;diff=15140</id>
		<title>WiFi</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=WiFi&amp;diff=15140"/>
		<updated>2024-01-30T12:11:50Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Common operations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Pre-requites==&lt;br /&gt;
{{Note| To configure Wi-Fi you need to [[Wireless Tools| install wireless tools]] first (done by default for APF27 / PPS / APF51 / APF6 / OPOS6UL) and of course also need to have a running Wi-Fi interface like: the [[Libertas_driver|one on APW extension board, APF51Dev or PPS devt boards]], the [[Wl12xx_driver|one on APF6]], the one on [[OPOS6UL]] or a [[USB_to_WiFi_adapter|USB to Wi-Fi adapter]], with corresponding Linux drivers loaded.}}&lt;br /&gt;
&lt;br /&gt;
==Common operations==&lt;br /&gt;
====List network interfaces supporting Wi-Fi====&lt;br /&gt;
{|&lt;br /&gt;
! Old BSPs !! New BSPs&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 sit0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wmaster0  no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wlan0     IEEE 802.11bg  ESSID:&amp;quot;&amp;quot;  &lt;br /&gt;
           Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   &lt;br /&gt;
           Tx-Power=0 dBm   &lt;br /&gt;
           Retry min limit:7   RTS thr:off   Fragment thr=2352 B   &lt;br /&gt;
           Encryption key:off&lt;br /&gt;
           Power Management:off&lt;br /&gt;
           Link Quality:0/100  Signal level:112/146  Noise level:0/0&lt;br /&gt;
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
| &amp;lt;pre class=apf&amp;gt;# iw dev&lt;br /&gt;
phy#0&lt;br /&gt;
        Interface wlan0&lt;br /&gt;
                ifindex 3&lt;br /&gt;
                wdev 0x1&lt;br /&gt;
                addr 74:7a:90:e7:e0:d5&lt;br /&gt;
                type managed&lt;br /&gt;
                channel 34 (5170 MHz), width: 20 MHz, center1: 5170 MHz&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|Here our Wi-Fi network interface is called &#039;&#039;wlan0&#039;&#039;. Depending on the number of your network interfaces or their model, this name could change. For example if using the Libertas drivers, the interface may be called &#039;&#039;eth1&#039;&#039; (if &#039;&#039;eth0&#039;&#039; is already used). In that case replace &#039;&#039;wlan0&#039;&#039; with your interface name.}}&lt;br /&gt;
&lt;br /&gt;
====Activate the WLAN interface====&lt;br /&gt;
{|&lt;br /&gt;
! Old BSPs !! New BSPs&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ifconfig wlan0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ip link set wlan0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Show all Access Points (AP) available for your APF (here with wlan0 interface) ====&lt;br /&gt;
{|&lt;br /&gt;
! Old BSPs !! New BSPs&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iwlist wlan0 scan&lt;br /&gt;
&lt;br /&gt;
wlan0     Scan completed :&lt;br /&gt;
          Cell 01 - Address: XX:XX:XX:66:47:48&lt;br /&gt;
                    ESSID:&amp;quot;TOTO&amp;quot;&lt;br /&gt;
                    Mode:Master&lt;br /&gt;
                    Channel:1&lt;br /&gt;
                    Frequency:2.412 GHz (Channel 1)&lt;br /&gt;
                    Quality=88/100  Signal level:25/100&lt;br /&gt;
                    Encryption key:on&lt;br /&gt;
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s&lt;br /&gt;
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s&lt;br /&gt;
                              48 Mb/s; 54 Mb/s&lt;br /&gt;
                    Extra:tsf=00000009d398fec8&lt;br /&gt;
                    Extra: Last beacon: 1390ms ago&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iw wlan0 scan&lt;br /&gt;
&lt;br /&gt;
BSS XX:XX:XX:ed:c5:b0(on wlan0)&lt;br /&gt;
        last seen: 1805.540s [boottime]&lt;br /&gt;
        TSF: 0 usec (0d, 00:00:00)&lt;br /&gt;
        freq: 2462&lt;br /&gt;
        beacon interval: 120 TUs&lt;br /&gt;
        capability: ESS Privacy ShortSlotTime RadioMeasure (0x1411)&lt;br /&gt;
        signal: -90.00 dBm&lt;br /&gt;
        last seen: 0 ms ago&lt;br /&gt;
        SSID: TOTO&lt;br /&gt;
        Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 &lt;br /&gt;
        DS Parameter set: channel 11&lt;br /&gt;
        ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Connect to an unencrypted AP ====&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iwconfig wlan0 essid AP_NAME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Check it:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# iwconfig wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Get an IP address ====&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# udhcpc -i wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Encryption settings==&lt;br /&gt;
When configuring Wi-Fi cryptography, only WEP can be setup easily from a terminal with single commands. For a Wi-Fi network with a WPA/WPA2 protection system, you should install and configure [[WPA supplicant|wpa_supplicant]].&lt;br /&gt;
&lt;br /&gt;
{{Warning| The Wi-Fi Alliance defined WPA/WPA2 protection protocol in response to serious weaknesses researchers had found in the previous system, WEP (Wired Equivalent Privacy). Therefore, we strongly recommend you to use WPA/WPA2 to protect your network. Our [[WPA supplicant|wpa_supplicant]] wiki page provides the procedure to configure a WPA/WPA2 access to your network &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== WEP configuration ====&lt;br /&gt;
&lt;br /&gt;
This example is given for a Wi-Fi Access Point named &#039;&#039;armadeus&#039;&#039;, the encoding key used here is not recommended, of course ;) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # iwconfig wlan0 essid armadeus&lt;br /&gt;
 # iwconfig wlan0 key 12345678901234567890&lt;br /&gt;
 # ifconfig wlan0 up             (if interface is not already up)&lt;br /&gt;
 ADDRCONF(NETDEV_UP): wlan0: link is not ready&lt;br /&gt;
 # ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, the Wi-Fi adapter is ready and attached :&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 sit0      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wmaster0  no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wlan0     IEEE 802.11bg  ESSID:&amp;quot;armadeus&amp;quot;  &lt;br /&gt;
           Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1B:2F:E7:E4:08   &lt;br /&gt;
           Bit Rate=2 Mb/s   Tx-Power=7 dBm   &lt;br /&gt;
           Retry min limit:7   RTS thr:off   Fragment thr=2352 B   &lt;br /&gt;
           Encryption key:XXXXXXXXXXXXXXXXXXXXXXXXXX   Security mode:restricted&lt;br /&gt;
           Power Management:off&lt;br /&gt;
           Link Quality:0/100  Signal level:73/146  Noise level:0/0&lt;br /&gt;
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing outside world==&lt;br /&gt;
We can manually configure the network to access Internet via the Wi-Fi interface instead of the Ethernet one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ifconfig eth0 down&lt;br /&gt;
 # ifconfig wlan0 192.168.0.212&lt;br /&gt;
 # route add default gw 192.168.0.1 dev wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And configure the nameserver in /etc/resolv.conf&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 domain dev.null&lt;br /&gt;
 nameserver 192.168.0.207&lt;br /&gt;
 ~                   &lt;br /&gt;
 ~&lt;br /&gt;
 ~&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a DHCP server on your network, you can also use it and previous steps (route+resolv.conf) will be done automatically:&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
# udhcpc -i wlan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can now ping the best website in the world :&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # ping www.armadeus.org&lt;br /&gt;
 PING www.armadeus.org (213.186.33.5): 56 data bytes&lt;br /&gt;
 64 bytes from 213.186.33.5: seq=0 ttl=122 time=66.735 ms&lt;br /&gt;
 64 bytes from 213.186.33.5: seq=1 ttl=122 time=50.392 ms&lt;br /&gt;
 ^C&lt;br /&gt;
 --- www.armadeus.org ping statistics ---&lt;br /&gt;
 2 packets transmitted, 2 packets received, 0% packet loss&lt;br /&gt;
 round-trip min/avg/max = 50.392/58.563/66.735 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Surf on the net ==&lt;br /&gt;
&lt;br /&gt;
To surf on the web, you can use (for example) &#039;&#039;links&#039;&#039; software :&lt;br /&gt;
&amp;lt;pre class=apf&amp;gt;&lt;br /&gt;
 # links www.armadeus.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s an ASCII internet browser. [[Links| For more informations about Links]].&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [[Wireless_Tools|Wireless Tools installation]]&lt;br /&gt;
* [[USB_to_WiFi_adapter|USB to Wi-Fi adapters tested with Armadeus boards]]&lt;br /&gt;
* [[Network_interface_bandwidth_measurement| Measure the bandwidth of your network interface]]&lt;br /&gt;
* [[WPA_supplicant|WPA_supplicant]]&lt;br /&gt;
* [[APF as Wi-Fi Access Point]]&lt;br /&gt;
&lt;br /&gt;
[[Category:WiFi]]&lt;br /&gt;
[[Category:Wireless]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Microcom&amp;diff=15139</id>
		<title>Microcom</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Microcom&amp;diff=15139"/>
		<updated>2023-12-07T11:20:12Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Microcom is an embedded terminal that can be installed on APF/OPOS SOMs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Installed by default on recent Armadeus BSPs.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To connect a tty do this :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# microcom -s 115200 /dev/ttymxc1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Press Ctrl-X to quit the terminal.&lt;br /&gt;
&lt;br /&gt;
[[Category: terminal]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Microcom&amp;diff=15138</id>
		<title>Microcom</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Microcom&amp;diff=15138"/>
		<updated>2023-12-07T11:19:48Z</updated>

		<summary type="html">&lt;p&gt;JulienB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Microcom is an embedded terminal that can be installed on APF/OPOS SOMs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Installed by default on recent Armadeus BSPs.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To connect a tty do this :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
$ microcom -s 115200 /dev/ttymxc1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Press Ctrl-X to quit the terminal.&lt;br /&gt;
&lt;br /&gt;
[[Category: terminal]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Microcom&amp;diff=15137</id>
		<title>Microcom</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Microcom&amp;diff=15137"/>
		<updated>2023-12-07T11:19:14Z</updated>

		<summary type="html">&lt;p&gt;JulienB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: terminal]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Microcom is an embedded terminal that can be installed on APF/OPOS SOMs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Installed by default on recent Armadeus BSPs.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To connect a tty do this :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
$ microcom -s 115200 /dev/ttymxc1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Press Ctrl-X to quit the terminal.&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=GSM/GPRS&amp;diff=15136</id>
		<title>GSM/GPRS</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=GSM/GPRS&amp;diff=15136"/>
		<updated>2023-08-17T13:23:31Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will summarize informations to use the GSM/GPRS/3G module of the [[Wireless_extension_board|APF27Wireless board]], [[APF51Dev]] (optional), the [[APF6Dev]] (optional) or the RPi compatible Hats connected to OPOSxxDev RPi connector.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
GSM/GPRS are generally driven through the RS-232 bus. AT commands are used to dialog with the module.&lt;br /&gt;
* GSM MODEM of the [[Wireless_extension_board|APF27Wireless extension board (APW)]] is connected to the UART2 (/dev/ttySMX1) of the [[APF27]].&lt;br /&gt;
* GSM/3G MODEM of the [[APF51Dev]] is connected to the i.MX processor through an UART implemented in the FPGA. So the corresponding bitfile has to loaded before trying to access the MODEM.&lt;br /&gt;
* GSM/3G MODEM of the [[APF6Dev]] is connected to the UART3 of the i.MX6 processor. &lt;br /&gt;
They are all using a Sagem&#039;s Hilo module. Hilo AT commands can be found [http://support.sagemcom.com/site/livret/URD1_OTL_5725_1_008_72807_-_AT_Command_Set_for_SAGEMCOM_Modules__Ed_14_06_dated_11_May_2012.pdf here]&lt;br /&gt;
* RPi Hats with dedicated module (mostly SIMCOM one&#039;s) are connected through UART2 of RPi connector of OPOSxxDev boards.&lt;br /&gt;
&lt;br /&gt;
==Linux configuration (APF27Dev only)==&lt;br /&gt;
* Linux will have to be configured in order to tell that an APW is connected to your [[APF27Dev]]:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
System Type  ---&amp;gt;&lt;br /&gt;
    Freescale MXC Implementations  ---&amp;gt;&lt;br /&gt;
            ...&lt;br /&gt;
            Extension board (Wireless (APW))  ---&amp;gt;&lt;br /&gt;
       [*] GSM/GPRS Modem (NEW)&lt;br /&gt;
       [ ] Bluetooth &amp;amp; WiFi module (NEW)&lt;br /&gt;
       [ ] CSI (Camera) pass-through (NEW)&lt;br /&gt;
       [ ] GPS module (NEW)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reflash you Linux kernel&lt;br /&gt;
&lt;br /&gt;
==Configure serial port==&lt;br /&gt;
====APF27====&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttySMX1              (or /dev/ttymxc1 on recent kernels)&lt;br /&gt;
# stty -F $GSM_DEVICE raw -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====APF51Dev====&lt;br /&gt;
	&lt;br /&gt;
{{Note|Don&#039;t forget to put &amp;quot;Wireless&amp;quot; J42 jumper (near microSD connector) &#039;&#039;&#039;AND&#039;&#039;&#039; power on FPGA Bank 3 (with corresponding J39 jumper).}}&lt;br /&gt;
* On APF51Dev, GSM/3G module is accessed through serial ports synthetized in APF51&#039;s FPGA. So we have to load it first. (Needed dual UARTs FPGA firmware can be found under armadeus-4.0 distribution in &#039;&#039;firmware/pod_scripts&#039;&#039; directory, with the [[POD]] script needed to regenerate it, and is by default installed in rootfs).&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# load_fpga /lib/firmware/fpga/apf51_gsm_gps_firmware.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Once firmware loaded, drivers related to FPGA can be used :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe irq_ocore&lt;br /&gt;
# modprobe 8250&lt;br /&gt;
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
# modprobe twin_uarts_irq_mng&lt;br /&gt;
# modprobe twin_uarts_16750&lt;br /&gt;
serial8250.0: ttyS0 at MMIO 0xb8000020 (irq = 320) is a TI16750&lt;br /&gt;
serial8250.0: ttyS1 at MMIO 0xb8000040 (irq = 321) is a TI16750&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Bring MODEM out of reset state (POK_IN/PWON pin, connected to [[APF51_PMIC#GPIO|PMIC GPIO6]]):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe wm831x-gpio&lt;br /&gt;
# echo 245 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio245/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio245/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Configure serial port:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ls /dev/ttyS*&lt;br /&gt;
/dev/ttyS0  /dev/ttyS1  /dev/ttyS2  /dev/ttyS3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the /dev/ttyS[0-1] files don&#039;t exist, create it/them with &#039;&#039;mknod&#039;&#039; :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mknod /dev/ttyS0 c 4 64&lt;br /&gt;
# mknod /dev/ttyS1 c 4 65&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttyS0&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200 crtscts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====APF6Dev====&lt;br /&gt;
* Power up the chip. (GSM_PWR_EN is connected to the GPIO7_13)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo 205 &amp;gt; /sys/class/gpio/export &lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio205/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio205/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Start it by setting a low level pulse during about 2 seconds on the POKIN line (POKIN is connected to the GPIO1_4).&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo 4 &amp;gt; /sys/class/gpio/export &lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio4/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio4/value&lt;br /&gt;
# sleep 2&lt;br /&gt;
# echo 0 &amp;gt; /sys/class/gpio/gpio4/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure the serial port&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttymxc2&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====OPOSxxDev with RPi connector====&lt;br /&gt;
* Configure the serial port&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttymxc1&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
===Sending AT commands &amp;quot;manually&amp;quot;===&lt;br /&gt;
* Sending AT commands with &#039;&#039;minicom/microcom&#039;&#039; utility (one of the command coming with [[busybox]]):   &lt;br /&gt;
&lt;br /&gt;
{{Note|minicom has been removed in recent BSP, so use microcom instead}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# microcom $GSM_DEVICE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
( To exit &#039;&#039;microcom&#039;&#039; you will have to type &#039;&#039;&#039;&amp;lt;CTRL-x&amp;gt;&#039;&#039;&#039; )&lt;br /&gt;
* Check module presence:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATI3&lt;br /&gt;
SAGEM HiC,A.005.00&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| If no echo are printed on serial console: you can&#039;t see what you&#039;re typing. In that case, to reactivate the echo, use:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATE1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note| By default, the module starts in auto baudrate. This mays result in loss of communication with baud rate higher than 19200 bauds. To avoid problems, the baud rate has to be fixed (here to 115200 bauds):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+IPR=115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* Get constructor name:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CGMI&lt;br /&gt;
SAGEM&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get model name:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CGMM&lt;br /&gt;
HILO GPRS&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Enter PIN code (here 0000). &#039;&#039;&#039;!! Use your own and beware that you will only get 3 tries !!:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPIN=&amp;quot;0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Check PIN code status:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPIN?&lt;br /&gt;
+CPIN: READY&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note|Don&#039;t launch further AT commands if PIN code wasn&#039;t entered successfully}}&lt;br /&gt;
&lt;br /&gt;
* Check module status (0 Ready, 1 Unavailable, 2 Status unknown, 3 Ringing, 4 Call in progress, 5 Asleep):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPAS&lt;br /&gt;
+CPAS: 0&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get Indicator control (&amp;lt;battchg&amp;gt;[0-4],&amp;lt;signal&amp;gt;[0-4],&amp;lt;service&amp;gt;0/1,&amp;lt;message&amp;gt;0/1,&amp;lt;call&amp;gt;0/1,&amp;lt;smsfull&amp;gt;0/1):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CIND?&lt;br /&gt;
+CIND: 0,4,1,0,0,0,1&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get signal quality (should be better than 12/99):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CSQ&lt;br /&gt;
+CSQ: 24,99&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Voice call &amp;quot;123456789&amp;quot; (; is important here to signify a voice call, otherwise a data call is tried and may fail if you don&#039;t have the right subscribe)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATD&amp;quot;123456789&amp;quot;;&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Terminate current call:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATH&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sending AT commands in shell scripts===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
GSM_DEVICE=/dev/ttyXXX&lt;br /&gt;
send_at_cmd()&lt;br /&gt;
{&lt;br /&gt;
        echo -e -n &amp;quot;$1\015&amp;quot; &amp;gt; $GSM_DEVICE&lt;br /&gt;
        sleep 1      # Adjustable ! (usleep)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
send_at_cmd AT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See &#039;&#039;target/test/test_gsm.sh&#039;&#039; for more details&lt;br /&gt;
&lt;br /&gt;
==Sending SMS==&lt;br /&gt;
* Supposing you are already connected to the modem with cu&lt;br /&gt;
* Check if you can send SMS with your SIM card (you should get +CMGF: (0,1))&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMGF=?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If OK, switch to SMS sending mode:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMGF=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Write a message for 0661234567 phone number:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CMGW=&amp;quot;0661326109&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Hey ! How are you doing ??&lt;br /&gt;
&amp;gt;                    &amp;lt;-- Ctrl+z to end SMS here&lt;br /&gt;
&lt;br /&gt;
+CMGW: 8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* +CMGW give you the number of your SMS saved in SIM card or phone memory&lt;br /&gt;
* Then, at anytime, you can send your SMS with (pass previous number as parameter):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMSS=8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tools to look at==&lt;br /&gt;
* http://www.developershome.com/sms/freeLibForSMS.asp&lt;br /&gt;
* http://www.gnokii.org/&lt;br /&gt;
* http://www.alamin.org/en/index.html&lt;br /&gt;
* http://www.gammu.org/wiki/index.php?title=Gammu:Main_Page&lt;br /&gt;
* http://gatling.ikk.sztaki.hu/~kissg/gsm/index.html&lt;br /&gt;
&lt;br /&gt;
==Data tranfers (EDGE/3G)==&lt;br /&gt;
&lt;br /&gt;
===PPP installation (done by default on APF51)===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Device Drivers  ---&amp;gt;&lt;br /&gt;
    [*] Network device support  ---&amp;gt;&lt;br /&gt;
        &amp;lt;M&amp;gt;   PPP (point-to-point protocol) support&lt;br /&gt;
        [ ]     PPP multilink support (EXPERIMENTAL)&lt;br /&gt;
        [ ]     PPP filtering&lt;br /&gt;
        &amp;lt;M&amp;gt;     PPP support for async serial ports&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP support for sync tty ports&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP Deflate compression&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP BSD-Compress compression&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP MPPE compression (encryption) (EXPERIMENTAL)&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP over Ethernet (EXPERIMENTAL)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking applications  ---&amp;gt;&lt;br /&gt;
        [*] pppd&lt;br /&gt;
        [ ]   filtering&lt;br /&gt;
        [ ]   radius&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux &amp;amp;&amp;amp; make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* reflash kernel &amp;amp; rootfs&lt;br /&gt;
&lt;br /&gt;
===PPP configuration===&lt;br /&gt;
{{Note|Following instructions are given for the French operator &amp;quot;Bouygtel&amp;quot; and may need to be ajusted accordingly, depending on your operator/country}}&lt;br /&gt;
&lt;br /&gt;
* Create a &amp;quot;chat&amp;quot; script that will be used to initiate MODEM dialup (here we use the &amp;quot;cat &amp;gt; xxxx &amp;lt;&amp;lt; EOF trick&amp;quot; to automatically create the file, but you can also manually edit it with &#039;&#039;vi&#039;&#039; or &#039;&#039;nano&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/chatscripts/&lt;br /&gt;
# cat &amp;gt; /etc/chatscripts/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
ABORT BUSY ABORT &#039;NO CARRIER&#039; ABORT VOICE ABORT &#039;NO DIALTONE&#039; ABORT &#039;NO ANSWER&#039; ABORT DELAYED ABORT ERROR&lt;br /&gt;
&#039;&#039; AT&lt;br /&gt;
OK AT+IPR=115200&lt;br /&gt;
OK AT+CPIN=&amp;quot;0000&amp;quot;&lt;br /&gt;
OK AT+CFUN=1&lt;br /&gt;
OK AT+COPS?&lt;br /&gt;
OK AT+CSQ&lt;br /&gt;
OK &#039;AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;ebouygtel.com&amp;quot;,&amp;quot;&amp;quot;,0,0&#039;&lt;br /&gt;
OK &#039;AT&amp;amp;FE0Q0V1&#039;&lt;br /&gt;
OK &#039;ATD*99#&#039;&lt;br /&gt;
CONNECT &amp;quot;&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Don&#039;t forget to set the baudrate (default: 115200) to have a stable communication between the modem and the processor&lt;br /&gt;
* Don&#039;t forget to update &amp;quot;AT+CPIN=&amp;quot; with your real PIN code and &amp;quot;AT+CGDCONT&amp;quot; and &amp;quot;ATD*99#&amp;quot; with your operator parameters.&lt;br /&gt;
* If you want to test your chat script (verbose mode -v, on console -s, with 5 second timeout by default for commands -t 5), then launch:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# /usr/sbin/chat -v -s -t 5 -f /etc/chatscripts/bouygtel &amp;gt; $GSM_DEVICE &amp;lt; $GSM_DEVICE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If this test was OK, you may have to poweroff/poweron the MODEM to bring it to its initial state and go further.&lt;br /&gt;
&lt;br /&gt;
====For &#039;&#039;&#039;APF51&#039;&#039;&#039;====&lt;br /&gt;
* create the PPPd config files (&#039;&#039;/etc/ppp/peers/bouygtel&#039;&#039; and &#039;&#039;/etc/ppp/options.ttyS0&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/ppp/peers/&lt;br /&gt;
# cat &amp;gt; /etc/ppp/peers/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
noauth&lt;br /&gt;
connect &amp;quot;/usr/sbin/chat -v -t 5 -f /etc/chatscripts/bouygtel&amp;quot;&lt;br /&gt;
debug&lt;br /&gt;
ttyS0&lt;br /&gt;
defaultroute&lt;br /&gt;
noipdefault&lt;br /&gt;
usepeerdns&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# cat &amp;gt; /etc/ppp/options.ttyS0 &amp;lt;&amp;lt;EOF&lt;br /&gt;
115200&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====For &#039;&#039;&#039;APF27&#039;&#039;&#039;====&lt;br /&gt;
{{Note| Check if /dev/ttySMX1 exists, if not create it with :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
mknod /dev/ttySMX1 c 204 42&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
* create the PPPd config files (&#039;&#039;/etc/ppp/peers/bouygtel&#039;&#039; and &#039;&#039;/etc/ppp/options.ttySMX1&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/ppp/peers/&lt;br /&gt;
# cat &amp;gt; /etc/ppp/peers/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
noauth&lt;br /&gt;
connect &amp;quot;/usr/sbin/chat -v -t 5 -f /etc/chatscripts/bouygtel&amp;quot;&lt;br /&gt;
debug&lt;br /&gt;
ttySMX1&lt;br /&gt;
defaultroute&lt;br /&gt;
noipdefault&lt;br /&gt;
usepeerdns&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# cat &amp;gt; /etc/ppp/options.ttySMX1 &amp;lt;&amp;lt;EOF&lt;br /&gt;
115200&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PPP Usage===&lt;br /&gt;
* Load PPP module:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe ppp          (APF27)&lt;br /&gt;
or&lt;br /&gt;
# modprobe ppp_async    (APF51)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setup serial port name depending on your platform (&#039;&#039;/dev/ttyS0&#039;&#039; on APF51, &#039;&#039;/dev/ttySMX1&#039;&#039; on APF27)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttyS0&lt;br /&gt;
or&lt;br /&gt;
# export GSM_DEVICE=/dev/ttySMX1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Launch the beast:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# pppd $GSM_DEVICE 115200 call bouygtel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ping www.google.fr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshots ===&lt;br /&gt;
* Might be needed after a successful IP setup:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp /etc/ppp/resolv.conf /etc/resolv.conf&lt;br /&gt;
# route add default ppp0     (due to defaultroute option in ppp ?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To see what happened after having launched &#039;&#039;pppd&#039;&#039; or &#039;&#039;chat&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# tail -f /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GSM Muxing==&lt;br /&gt;
===Why ?===&lt;br /&gt;
* By default AT commands usage is single threaded, ie only one program can open MODEM serial port and send AT commands at a given time. However it could be interesting to be able to send multiple AT commands from multiple programs at the same time, for example in order to: have a PPP link, send SMS and monitor network signal quality.&lt;br /&gt;
* This can be done by a &amp;quot;GSM mux&amp;quot;, if your MODEM support the GSM 07.10 muxing norm (which is the case with our HiLo modules).&lt;br /&gt;
===Build gsmmux===&lt;br /&gt;
* To build GSM mux (if not already done):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Hardware handling  ---&amp;gt;&lt;br /&gt;
        [*] gsmmux&lt;br /&gt;
              Version to use (sagem)  ---&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use it===&lt;br /&gt;
* If you have access to Sagem&#039;s version (you will get as much as virtual serial port as times you pass &#039;&#039;/dev/ptmx&#039;&#039; to the daemon):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gsmMuxd -p $GSM_DEVICE -b 115200 -x /dev/ptmx /dev/ptmx /dev/ptmx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Virtual serial ports will be created in &#039;&#039;/dev/pts/&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
/dev/pts/0 /dev/pts/1 /dev/pts/2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* to know how &#039;&#039;/dev/ptmx&#039;&#039; &amp;amp; &#039;&#039;/dev/pts/x&#039;&#039; is working: [http://linux.die.net/man/4/ptmx]&lt;br /&gt;
* If you have telnet or SSH sessions running &#039;&#039;/dev/pts/0&#039;&#039; may already be used ans so virtual serial ports will be allocated from &#039;&#039;/dev/pts/1&#039;&#039;, etc...&lt;br /&gt;
&lt;br /&gt;
===Going further===&lt;br /&gt;
* In recent Linux kernels, there is also a driver to hanlde GSM muxing: n_gsm&lt;br /&gt;
* People wanting to do a &amp;quot;real&amp;quot; phone can take a look at [http://ofono.org/documentation ofono]&lt;br /&gt;
&lt;br /&gt;
==SMS using SMS server tools 3==&lt;br /&gt;
Simple AT commands can be used to send SMS. If you need more flexibility or advanced management of your SMS, you can use SMS Server Tools 3.&lt;br /&gt;
SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones.&lt;br /&gt;
&lt;br /&gt;
===Build SMS Server Tools3===&lt;br /&gt;
* To build SMS Server Tools 3:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking applications  ---&amp;gt;&lt;br /&gt;
        [*] smstools3&lt;br /&gt;
        (1)   Number of modems to support&lt;br /&gt;
        [*]   Start SMS Server Tools at system boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The SMS server can be configured by using a configuration file &#039;&#039;/etc/smsd.conf&#039;&#039;.&lt;br /&gt;
The following parameters have to be verified:&lt;br /&gt;
* device: UART port used to communicate with the modem. If GSMUX is used, then this parameter is of form &#039;&#039;/dev/pts/x&#039;&#039; where is x is the number of the virtual port&lt;br /&gt;
* baudrate: baudrate of the UART port&lt;br /&gt;
* rtscts: must be yes if your modem needs CTS/RTS controls&lt;br /&gt;
* incoming: say yes if you want to receive SMS&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
Start the smsd deamon (if not already done at boot):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/init.d/S50smsd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then put a SMS file in the &#039;&#039;/var/spool/sms/outgoing/&#039;&#039; directory. Once placed a SMS will be sent. SMS file should be of the format defined [http://smstools3.kekekasvi.com/index.php?p=fileformat here].&lt;br /&gt;
&lt;br /&gt;
Incoming SMS can be read in the &#039;&#039;/var/spool/sms/incoming/&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
Reports and logs are also generated (&#039;&#039;/var/log/smsd.log&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==SMS using gnokii==&lt;br /&gt;
&lt;br /&gt;
[[Gnokii | See gnokii page]].&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://support.sagemcom.com/site/modele_fax.php?page=produit&amp;amp;numero_type=22&amp;amp;produit=877 HiLo 3G documentation at Sagem]&lt;br /&gt;
* [http://www.libelium.com/tienda/catalog/images/arduino/AT_Commands.pdf HiLo AT Commands]&lt;br /&gt;
* [http://www.developershome.com/sms/ SMS tutorial]&lt;br /&gt;
* http://wiki.openmoko.org/wiki/Neo_1973_and_Neo_FreeRunner_gsm_modem&lt;br /&gt;
* [http://www.anotherurl.com/library/at_test.htm AT Test commands]&lt;br /&gt;
* http://www.gsm-modem.de/gsm-faq.html&lt;br /&gt;
* [http://www.technologuepro.com/gsm/commande_at.htm Les commandes AT]&lt;br /&gt;
* [http://smstools3.kekekasvi.com SMS Server Tools 3]&lt;br /&gt;
&lt;br /&gt;
[[Category:Wireless]]&lt;br /&gt;
[[Category:Telephony]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=GSM/GPRS&amp;diff=15135</id>
		<title>GSM/GPRS</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=GSM/GPRS&amp;diff=15135"/>
		<updated>2023-08-17T13:21:35Z</updated>

		<summary type="html">&lt;p&gt;JulienB: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will summarize informations to use the GSM/GPRS/3G module of the [[Wireless_extension_board|APF27Wireless board]], [[APF51Dev]] (optional), the [[APF6Dev]] (optional) or the RPi compatible Hats connected to OPOSxxDev RPi connector.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
GSM/GPRS are generally driven through the RS-232 bus. AT commands are used to dialog with the module.&lt;br /&gt;
* GSM MODEM of the [[Wireless_extension_board|APF27Wireless extension board (APW)]] is connected to the UART2 (/dev/ttySMX1) of the [[APF27]].&lt;br /&gt;
* GSM/3G MODEM of the [[APF51Dev]] is connected to the i.MX processor through an UART implemented in the FPGA. So the corresponding bitfile has to loaded before trying to access the MODEM.&lt;br /&gt;
* GSM/3G MODEM of the [[APF6Dev]] is connected to the UART3 of the i.MX6 processor. &lt;br /&gt;
They are all using a Sagem&#039;s Hilo module. Hilo AT commands can be found [http://support.sagemcom.com/site/livret/URD1_OTL_5725_1_008_72807_-_AT_Command_Set_for_SAGEMCOM_Modules__Ed_14_06_dated_11_May_2012.pdf here]&lt;br /&gt;
&lt;br /&gt;
==Linux configuration (APF27Dev only)==&lt;br /&gt;
* Linux will have to be configured in order to tell that an APW is connected to your [[APF27Dev]]:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
System Type  ---&amp;gt;&lt;br /&gt;
    Freescale MXC Implementations  ---&amp;gt;&lt;br /&gt;
            ...&lt;br /&gt;
            Extension board (Wireless (APW))  ---&amp;gt;&lt;br /&gt;
       [*] GSM/GPRS Modem (NEW)&lt;br /&gt;
       [ ] Bluetooth &amp;amp; WiFi module (NEW)&lt;br /&gt;
       [ ] CSI (Camera) pass-through (NEW)&lt;br /&gt;
       [ ] GPS module (NEW)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reflash you Linux kernel&lt;br /&gt;
&lt;br /&gt;
==Configure serial port==&lt;br /&gt;
====APF27====&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttySMX1              (or /dev/ttymxc1 on recent kernels)&lt;br /&gt;
# stty -F $GSM_DEVICE raw -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====APF51Dev====&lt;br /&gt;
	&lt;br /&gt;
{{Note|Don&#039;t forget to put &amp;quot;Wireless&amp;quot; J42 jumper (near microSD connector) &#039;&#039;&#039;AND&#039;&#039;&#039; power on FPGA Bank 3 (with corresponding J39 jumper).}}&lt;br /&gt;
* On APF51Dev, GSM/3G module is accessed through serial ports synthetized in APF51&#039;s FPGA. So we have to load it first. (Needed dual UARTs FPGA firmware can be found under armadeus-4.0 distribution in &#039;&#039;firmware/pod_scripts&#039;&#039; directory, with the [[POD]] script needed to regenerate it, and is by default installed in rootfs).&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# load_fpga /lib/firmware/fpga/apf51_gsm_gps_firmware.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Once firmware loaded, drivers related to FPGA can be used :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe irq_ocore&lt;br /&gt;
# modprobe 8250&lt;br /&gt;
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
# modprobe twin_uarts_irq_mng&lt;br /&gt;
# modprobe twin_uarts_16750&lt;br /&gt;
serial8250.0: ttyS0 at MMIO 0xb8000020 (irq = 320) is a TI16750&lt;br /&gt;
serial8250.0: ttyS1 at MMIO 0xb8000040 (irq = 321) is a TI16750&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Bring MODEM out of reset state (POK_IN/PWON pin, connected to [[APF51_PMIC#GPIO|PMIC GPIO6]]):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe wm831x-gpio&lt;br /&gt;
# echo 245 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio245/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio245/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Configure serial port:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ls /dev/ttyS*&lt;br /&gt;
/dev/ttyS0  /dev/ttyS1  /dev/ttyS2  /dev/ttyS3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the /dev/ttyS[0-1] files don&#039;t exist, create it/them with &#039;&#039;mknod&#039;&#039; :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mknod /dev/ttyS0 c 4 64&lt;br /&gt;
# mknod /dev/ttyS1 c 4 65&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttyS0&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200 crtscts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====APF6Dev====&lt;br /&gt;
* Power up the chip. (GSM_PWR_EN is connected to the GPIO7_13)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo 205 &amp;gt; /sys/class/gpio/export &lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio205/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio205/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Start it by setting a low level pulse during about 2 seconds on the POKIN line (POKIN is connected to the GPIO1_4).&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo 4 &amp;gt; /sys/class/gpio/export &lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio4/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio4/value&lt;br /&gt;
# sleep 2&lt;br /&gt;
# echo 0 &amp;gt; /sys/class/gpio/gpio4/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure the serial port&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttymxc2&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====OPOSxxDev with RPi connector====&lt;br /&gt;
* Configure the serial port&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttymxc1&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
===Sending AT commands &amp;quot;manually&amp;quot;===&lt;br /&gt;
* Sending AT commands with &#039;&#039;minicom/microcom&#039;&#039; utility (one of the command coming with [[busybox]]):   &lt;br /&gt;
&lt;br /&gt;
{{Note|minicom has been removed in recent BSP, so use microcom instead}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# microcom $GSM_DEVICE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
( To exit &#039;&#039;microcom&#039;&#039; you will have to type &#039;&#039;&#039;&amp;lt;CTRL-x&amp;gt;&#039;&#039;&#039; )&lt;br /&gt;
* Check module presence:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATI3&lt;br /&gt;
SAGEM HiC,A.005.00&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| If no echo are printed on serial console: you can&#039;t see what you&#039;re typing. In that case, to reactivate the echo, use:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATE1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note| By default, the module starts in auto baudrate. This mays result in loss of communication with baud rate higher than 19200 bauds. To avoid problems, the baud rate has to be fixed (here to 115200 bauds):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+IPR=115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* Get constructor name:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CGMI&lt;br /&gt;
SAGEM&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get model name:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CGMM&lt;br /&gt;
HILO GPRS&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Enter PIN code (here 0000). &#039;&#039;&#039;!! Use your own and beware that you will only get 3 tries !!:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPIN=&amp;quot;0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Check PIN code status:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPIN?&lt;br /&gt;
+CPIN: READY&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note|Don&#039;t launch further AT commands if PIN code wasn&#039;t entered successfully}}&lt;br /&gt;
&lt;br /&gt;
* Check module status (0 Ready, 1 Unavailable, 2 Status unknown, 3 Ringing, 4 Call in progress, 5 Asleep):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPAS&lt;br /&gt;
+CPAS: 0&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get Indicator control (&amp;lt;battchg&amp;gt;[0-4],&amp;lt;signal&amp;gt;[0-4],&amp;lt;service&amp;gt;0/1,&amp;lt;message&amp;gt;0/1,&amp;lt;call&amp;gt;0/1,&amp;lt;smsfull&amp;gt;0/1):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CIND?&lt;br /&gt;
+CIND: 0,4,1,0,0,0,1&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get signal quality (should be better than 12/99):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CSQ&lt;br /&gt;
+CSQ: 24,99&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Voice call &amp;quot;123456789&amp;quot; (; is important here to signify a voice call, otherwise a data call is tried and may fail if you don&#039;t have the right subscribe)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATD&amp;quot;123456789&amp;quot;;&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Terminate current call:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATH&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sending AT commands in shell scripts===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
GSM_DEVICE=/dev/ttyXXX&lt;br /&gt;
send_at_cmd()&lt;br /&gt;
{&lt;br /&gt;
        echo -e -n &amp;quot;$1\015&amp;quot; &amp;gt; $GSM_DEVICE&lt;br /&gt;
        sleep 1      # Adjustable ! (usleep)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
send_at_cmd AT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See &#039;&#039;target/test/test_gsm.sh&#039;&#039; for more details&lt;br /&gt;
&lt;br /&gt;
==Sending SMS==&lt;br /&gt;
* Supposing you are already connected to the modem with cu&lt;br /&gt;
* Check if you can send SMS with your SIM card (you should get +CMGF: (0,1))&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMGF=?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If OK, switch to SMS sending mode:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMGF=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Write a message for 0661234567 phone number:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CMGW=&amp;quot;0661326109&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Hey ! How are you doing ??&lt;br /&gt;
&amp;gt;                    &amp;lt;-- Ctrl+z to end SMS here&lt;br /&gt;
&lt;br /&gt;
+CMGW: 8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* +CMGW give you the number of your SMS saved in SIM card or phone memory&lt;br /&gt;
* Then, at anytime, you can send your SMS with (pass previous number as parameter):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMSS=8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tools to look at==&lt;br /&gt;
* http://www.developershome.com/sms/freeLibForSMS.asp&lt;br /&gt;
* http://www.gnokii.org/&lt;br /&gt;
* http://www.alamin.org/en/index.html&lt;br /&gt;
* http://www.gammu.org/wiki/index.php?title=Gammu:Main_Page&lt;br /&gt;
* http://gatling.ikk.sztaki.hu/~kissg/gsm/index.html&lt;br /&gt;
&lt;br /&gt;
==Data tranfers (EDGE/3G)==&lt;br /&gt;
&lt;br /&gt;
===PPP installation (done by default on APF51)===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Device Drivers  ---&amp;gt;&lt;br /&gt;
    [*] Network device support  ---&amp;gt;&lt;br /&gt;
        &amp;lt;M&amp;gt;   PPP (point-to-point protocol) support&lt;br /&gt;
        [ ]     PPP multilink support (EXPERIMENTAL)&lt;br /&gt;
        [ ]     PPP filtering&lt;br /&gt;
        &amp;lt;M&amp;gt;     PPP support for async serial ports&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP support for sync tty ports&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP Deflate compression&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP BSD-Compress compression&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP MPPE compression (encryption) (EXPERIMENTAL)&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP over Ethernet (EXPERIMENTAL)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking applications  ---&amp;gt;&lt;br /&gt;
        [*] pppd&lt;br /&gt;
        [ ]   filtering&lt;br /&gt;
        [ ]   radius&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux &amp;amp;&amp;amp; make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* reflash kernel &amp;amp; rootfs&lt;br /&gt;
&lt;br /&gt;
===PPP configuration===&lt;br /&gt;
{{Note|Following instructions are given for the French operator &amp;quot;Bouygtel&amp;quot; and may need to be ajusted accordingly, depending on your operator/country}}&lt;br /&gt;
&lt;br /&gt;
* Create a &amp;quot;chat&amp;quot; script that will be used to initiate MODEM dialup (here we use the &amp;quot;cat &amp;gt; xxxx &amp;lt;&amp;lt; EOF trick&amp;quot; to automatically create the file, but you can also manually edit it with &#039;&#039;vi&#039;&#039; or &#039;&#039;nano&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/chatscripts/&lt;br /&gt;
# cat &amp;gt; /etc/chatscripts/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
ABORT BUSY ABORT &#039;NO CARRIER&#039; ABORT VOICE ABORT &#039;NO DIALTONE&#039; ABORT &#039;NO ANSWER&#039; ABORT DELAYED ABORT ERROR&lt;br /&gt;
&#039;&#039; AT&lt;br /&gt;
OK AT+IPR=115200&lt;br /&gt;
OK AT+CPIN=&amp;quot;0000&amp;quot;&lt;br /&gt;
OK AT+CFUN=1&lt;br /&gt;
OK AT+COPS?&lt;br /&gt;
OK AT+CSQ&lt;br /&gt;
OK &#039;AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;ebouygtel.com&amp;quot;,&amp;quot;&amp;quot;,0,0&#039;&lt;br /&gt;
OK &#039;AT&amp;amp;FE0Q0V1&#039;&lt;br /&gt;
OK &#039;ATD*99#&#039;&lt;br /&gt;
CONNECT &amp;quot;&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Don&#039;t forget to set the baudrate (default: 115200) to have a stable communication between the modem and the processor&lt;br /&gt;
* Don&#039;t forget to update &amp;quot;AT+CPIN=&amp;quot; with your real PIN code and &amp;quot;AT+CGDCONT&amp;quot; and &amp;quot;ATD*99#&amp;quot; with your operator parameters.&lt;br /&gt;
* If you want to test your chat script (verbose mode -v, on console -s, with 5 second timeout by default for commands -t 5), then launch:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# /usr/sbin/chat -v -s -t 5 -f /etc/chatscripts/bouygtel &amp;gt; $GSM_DEVICE &amp;lt; $GSM_DEVICE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If this test was OK, you may have to poweroff/poweron the MODEM to bring it to its initial state and go further.&lt;br /&gt;
&lt;br /&gt;
====For &#039;&#039;&#039;APF51&#039;&#039;&#039;====&lt;br /&gt;
* create the PPPd config files (&#039;&#039;/etc/ppp/peers/bouygtel&#039;&#039; and &#039;&#039;/etc/ppp/options.ttyS0&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/ppp/peers/&lt;br /&gt;
# cat &amp;gt; /etc/ppp/peers/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
noauth&lt;br /&gt;
connect &amp;quot;/usr/sbin/chat -v -t 5 -f /etc/chatscripts/bouygtel&amp;quot;&lt;br /&gt;
debug&lt;br /&gt;
ttyS0&lt;br /&gt;
defaultroute&lt;br /&gt;
noipdefault&lt;br /&gt;
usepeerdns&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# cat &amp;gt; /etc/ppp/options.ttyS0 &amp;lt;&amp;lt;EOF&lt;br /&gt;
115200&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====For &#039;&#039;&#039;APF27&#039;&#039;&#039;====&lt;br /&gt;
{{Note| Check if /dev/ttySMX1 exists, if not create it with :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
mknod /dev/ttySMX1 c 204 42&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
* create the PPPd config files (&#039;&#039;/etc/ppp/peers/bouygtel&#039;&#039; and &#039;&#039;/etc/ppp/options.ttySMX1&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/ppp/peers/&lt;br /&gt;
# cat &amp;gt; /etc/ppp/peers/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
noauth&lt;br /&gt;
connect &amp;quot;/usr/sbin/chat -v -t 5 -f /etc/chatscripts/bouygtel&amp;quot;&lt;br /&gt;
debug&lt;br /&gt;
ttySMX1&lt;br /&gt;
defaultroute&lt;br /&gt;
noipdefault&lt;br /&gt;
usepeerdns&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# cat &amp;gt; /etc/ppp/options.ttySMX1 &amp;lt;&amp;lt;EOF&lt;br /&gt;
115200&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PPP Usage===&lt;br /&gt;
* Load PPP module:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe ppp          (APF27)&lt;br /&gt;
or&lt;br /&gt;
# modprobe ppp_async    (APF51)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setup serial port name depending on your platform (&#039;&#039;/dev/ttyS0&#039;&#039; on APF51, &#039;&#039;/dev/ttySMX1&#039;&#039; on APF27)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttyS0&lt;br /&gt;
or&lt;br /&gt;
# export GSM_DEVICE=/dev/ttySMX1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Launch the beast:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# pppd $GSM_DEVICE 115200 call bouygtel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ping www.google.fr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshots ===&lt;br /&gt;
* Might be needed after a successful IP setup:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp /etc/ppp/resolv.conf /etc/resolv.conf&lt;br /&gt;
# route add default ppp0     (due to defaultroute option in ppp ?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To see what happened after having launched &#039;&#039;pppd&#039;&#039; or &#039;&#039;chat&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# tail -f /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GSM Muxing==&lt;br /&gt;
===Why ?===&lt;br /&gt;
* By default AT commands usage is single threaded, ie only one program can open MODEM serial port and send AT commands at a given time. However it could be interesting to be able to send multiple AT commands from multiple programs at the same time, for example in order to: have a PPP link, send SMS and monitor network signal quality.&lt;br /&gt;
* This can be done by a &amp;quot;GSM mux&amp;quot;, if your MODEM support the GSM 07.10 muxing norm (which is the case with our HiLo modules).&lt;br /&gt;
===Build gsmmux===&lt;br /&gt;
* To build GSM mux (if not already done):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Hardware handling  ---&amp;gt;&lt;br /&gt;
        [*] gsmmux&lt;br /&gt;
              Version to use (sagem)  ---&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use it===&lt;br /&gt;
* If you have access to Sagem&#039;s version (you will get as much as virtual serial port as times you pass &#039;&#039;/dev/ptmx&#039;&#039; to the daemon):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gsmMuxd -p $GSM_DEVICE -b 115200 -x /dev/ptmx /dev/ptmx /dev/ptmx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Virtual serial ports will be created in &#039;&#039;/dev/pts/&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
/dev/pts/0 /dev/pts/1 /dev/pts/2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* to know how &#039;&#039;/dev/ptmx&#039;&#039; &amp;amp; &#039;&#039;/dev/pts/x&#039;&#039; is working: [http://linux.die.net/man/4/ptmx]&lt;br /&gt;
* If you have telnet or SSH sessions running &#039;&#039;/dev/pts/0&#039;&#039; may already be used ans so virtual serial ports will be allocated from &#039;&#039;/dev/pts/1&#039;&#039;, etc...&lt;br /&gt;
&lt;br /&gt;
===Going further===&lt;br /&gt;
* In recent Linux kernels, there is also a driver to hanlde GSM muxing: n_gsm&lt;br /&gt;
* People wanting to do a &amp;quot;real&amp;quot; phone can take a look at [http://ofono.org/documentation ofono]&lt;br /&gt;
&lt;br /&gt;
==SMS using SMS server tools 3==&lt;br /&gt;
Simple AT commands can be used to send SMS. If you need more flexibility or advanced management of your SMS, you can use SMS Server Tools 3.&lt;br /&gt;
SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones.&lt;br /&gt;
&lt;br /&gt;
===Build SMS Server Tools3===&lt;br /&gt;
* To build SMS Server Tools 3:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking applications  ---&amp;gt;&lt;br /&gt;
        [*] smstools3&lt;br /&gt;
        (1)   Number of modems to support&lt;br /&gt;
        [*]   Start SMS Server Tools at system boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The SMS server can be configured by using a configuration file &#039;&#039;/etc/smsd.conf&#039;&#039;.&lt;br /&gt;
The following parameters have to be verified:&lt;br /&gt;
* device: UART port used to communicate with the modem. If GSMUX is used, then this parameter is of form &#039;&#039;/dev/pts/x&#039;&#039; where is x is the number of the virtual port&lt;br /&gt;
* baudrate: baudrate of the UART port&lt;br /&gt;
* rtscts: must be yes if your modem needs CTS/RTS controls&lt;br /&gt;
* incoming: say yes if you want to receive SMS&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
Start the smsd deamon (if not already done at boot):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/init.d/S50smsd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then put a SMS file in the &#039;&#039;/var/spool/sms/outgoing/&#039;&#039; directory. Once placed a SMS will be sent. SMS file should be of the format defined [http://smstools3.kekekasvi.com/index.php?p=fileformat here].&lt;br /&gt;
&lt;br /&gt;
Incoming SMS can be read in the &#039;&#039;/var/spool/sms/incoming/&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
Reports and logs are also generated (&#039;&#039;/var/log/smsd.log&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==SMS using gnokii==&lt;br /&gt;
&lt;br /&gt;
[[Gnokii | See gnokii page]].&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://support.sagemcom.com/site/modele_fax.php?page=produit&amp;amp;numero_type=22&amp;amp;produit=877 HiLo 3G documentation at Sagem]&lt;br /&gt;
* [http://www.libelium.com/tienda/catalog/images/arduino/AT_Commands.pdf HiLo AT Commands]&lt;br /&gt;
* [http://www.developershome.com/sms/ SMS tutorial]&lt;br /&gt;
* http://wiki.openmoko.org/wiki/Neo_1973_and_Neo_FreeRunner_gsm_modem&lt;br /&gt;
* [http://www.anotherurl.com/library/at_test.htm AT Test commands]&lt;br /&gt;
* http://www.gsm-modem.de/gsm-faq.html&lt;br /&gt;
* [http://www.technologuepro.com/gsm/commande_at.htm Les commandes AT]&lt;br /&gt;
* [http://smstools3.kekekasvi.com SMS Server Tools 3]&lt;br /&gt;
&lt;br /&gt;
[[Category:Wireless]]&lt;br /&gt;
[[Category:Telephony]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=GSM/GPRS&amp;diff=15134</id>
		<title>GSM/GPRS</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=GSM/GPRS&amp;diff=15134"/>
		<updated>2023-08-17T13:20:24Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* APF6Dev */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will summarize informations to use the GSM/GPRS/3G module of the [[Wireless_extension_board|APF27Wireless board]], [[APF51Dev]] (optional) and the [[APF6Dev]] (optional).&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
GSM/GPRS are generally driven through the RS-232 bus. AT commands are used to dialog with the module.&lt;br /&gt;
* GSM MODEM of the [[Wireless_extension_board|APF27Wireless extension board (APW)]] is connected to the UART2 (/dev/ttySMX1) of the [[APF27]].&lt;br /&gt;
* GSM/3G MODEM of the [[APF51Dev]] is connected to the i.MX processor through an UART implemented in the FPGA. So the corresponding bitfile has to loaded before trying to access the MODEM.&lt;br /&gt;
* GSM/3G MODEM of the [[APF6Dev]] is connected to the UART3 of the i.MX6 processor. &lt;br /&gt;
They are all using a Sagem&#039;s Hilo module. Hilo AT commands can be found [http://support.sagemcom.com/site/livret/URD1_OTL_5725_1_008_72807_-_AT_Command_Set_for_SAGEMCOM_Modules__Ed_14_06_dated_11_May_2012.pdf here]&lt;br /&gt;
&lt;br /&gt;
==Linux configuration (APF27Dev only)==&lt;br /&gt;
* Linux will have to be configured in order to tell that an APW is connected to your [[APF27Dev]]:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
System Type  ---&amp;gt;&lt;br /&gt;
    Freescale MXC Implementations  ---&amp;gt;&lt;br /&gt;
            ...&lt;br /&gt;
            Extension board (Wireless (APW))  ---&amp;gt;&lt;br /&gt;
       [*] GSM/GPRS Modem (NEW)&lt;br /&gt;
       [ ] Bluetooth &amp;amp; WiFi module (NEW)&lt;br /&gt;
       [ ] CSI (Camera) pass-through (NEW)&lt;br /&gt;
       [ ] GPS module (NEW)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* reflash you Linux kernel&lt;br /&gt;
&lt;br /&gt;
==Configure serial port==&lt;br /&gt;
====APF27====&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttySMX1              (or /dev/ttymxc1 on recent kernels)&lt;br /&gt;
# stty -F $GSM_DEVICE raw -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====APF51Dev====&lt;br /&gt;
	&lt;br /&gt;
{{Note|Don&#039;t forget to put &amp;quot;Wireless&amp;quot; J42 jumper (near microSD connector) &#039;&#039;&#039;AND&#039;&#039;&#039; power on FPGA Bank 3 (with corresponding J39 jumper).}}&lt;br /&gt;
* On APF51Dev, GSM/3G module is accessed through serial ports synthetized in APF51&#039;s FPGA. So we have to load it first. (Needed dual UARTs FPGA firmware can be found under armadeus-4.0 distribution in &#039;&#039;firmware/pod_scripts&#039;&#039; directory, with the [[POD]] script needed to regenerate it, and is by default installed in rootfs).&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# load_fpga /lib/firmware/fpga/apf51_gsm_gps_firmware.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Once firmware loaded, drivers related to FPGA can be used :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe irq_ocore&lt;br /&gt;
# modprobe 8250&lt;br /&gt;
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
# modprobe twin_uarts_irq_mng&lt;br /&gt;
# modprobe twin_uarts_16750&lt;br /&gt;
serial8250.0: ttyS0 at MMIO 0xb8000020 (irq = 320) is a TI16750&lt;br /&gt;
serial8250.0: ttyS1 at MMIO 0xb8000040 (irq = 321) is a TI16750&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Bring MODEM out of reset state (POK_IN/PWON pin, connected to [[APF51_PMIC#GPIO|PMIC GPIO6]]):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe wm831x-gpio&lt;br /&gt;
# echo 245 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio245/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio245/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Configure serial port:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ls /dev/ttyS*&lt;br /&gt;
/dev/ttyS0  /dev/ttyS1  /dev/ttyS2  /dev/ttyS3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the /dev/ttyS[0-1] files don&#039;t exist, create it/them with &#039;&#039;mknod&#039;&#039; :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mknod /dev/ttyS0 c 4 64&lt;br /&gt;
# mknod /dev/ttyS1 c 4 65&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttyS0&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200 crtscts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====APF6Dev====&lt;br /&gt;
* Power up the chip. (GSM_PWR_EN is connected to the GPIO7_13)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo 205 &amp;gt; /sys/class/gpio/export &lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio205/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio205/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Start it by setting a low level pulse during about 2 seconds on the POKIN line (POKIN is connected to the GPIO1_4).&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# echo 4 &amp;gt; /sys/class/gpio/export &lt;br /&gt;
# echo out &amp;gt; /sys/class/gpio/gpio4/direction&lt;br /&gt;
# echo 1 &amp;gt; /sys/class/gpio/gpio4/value&lt;br /&gt;
# sleep 2&lt;br /&gt;
# echo 0 &amp;gt; /sys/class/gpio/gpio4/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure the serial port&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttymxc2&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====OPOSxxDev with RPi connector====&lt;br /&gt;
* Configure the serial port&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttymxc1&lt;br /&gt;
# stty -F $GSM_DEVICE -echo -echoe -echok 115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
===Sending AT commands &amp;quot;manually&amp;quot;===&lt;br /&gt;
* Sending AT commands with &#039;&#039;minicom/microcom&#039;&#039; utility (one of the command coming with [[busybox]]):   &lt;br /&gt;
&lt;br /&gt;
{{Note|minicom has been removed in recent BSP, so use microcom instead}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# microcom $GSM_DEVICE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
( To exit &#039;&#039;microcom&#039;&#039; you will have to type &#039;&#039;&#039;&amp;lt;CTRL-x&amp;gt;&#039;&#039;&#039; )&lt;br /&gt;
* Check module presence:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATI3&lt;br /&gt;
SAGEM HiC,A.005.00&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| If no echo are printed on serial console: you can&#039;t see what you&#039;re typing. In that case, to reactivate the echo, use:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATE1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note| By default, the module starts in auto baudrate. This mays result in loss of communication with baud rate higher than 19200 bauds. To avoid problems, the baud rate has to be fixed (here to 115200 bauds):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+IPR=115200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* Get constructor name:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CGMI&lt;br /&gt;
SAGEM&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get model name:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CGMM&lt;br /&gt;
HILO GPRS&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Enter PIN code (here 0000). &#039;&#039;&#039;!! Use your own and beware that you will only get 3 tries !!:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPIN=&amp;quot;0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Check PIN code status:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPIN?&lt;br /&gt;
+CPIN: READY&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note|Don&#039;t launch further AT commands if PIN code wasn&#039;t entered successfully}}&lt;br /&gt;
&lt;br /&gt;
* Check module status (0 Ready, 1 Unavailable, 2 Status unknown, 3 Ringing, 4 Call in progress, 5 Asleep):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CPAS&lt;br /&gt;
+CPAS: 0&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get Indicator control (&amp;lt;battchg&amp;gt;[0-4],&amp;lt;signal&amp;gt;[0-4],&amp;lt;service&amp;gt;0/1,&amp;lt;message&amp;gt;0/1,&amp;lt;call&amp;gt;0/1,&amp;lt;smsfull&amp;gt;0/1):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CIND?&lt;br /&gt;
+CIND: 0,4,1,0,0,0,1&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Get signal quality (should be better than 12/99):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CSQ&lt;br /&gt;
+CSQ: 24,99&lt;br /&gt;
&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Voice call &amp;quot;123456789&amp;quot; (; is important here to signify a voice call, otherwise a data call is tried and may fail if you don&#039;t have the right subscribe)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATD&amp;quot;123456789&amp;quot;;&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Terminate current call:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
ATH&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sending AT commands in shell scripts===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
GSM_DEVICE=/dev/ttyXXX&lt;br /&gt;
send_at_cmd()&lt;br /&gt;
{&lt;br /&gt;
        echo -e -n &amp;quot;$1\015&amp;quot; &amp;gt; $GSM_DEVICE&lt;br /&gt;
        sleep 1      # Adjustable ! (usleep)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
send_at_cmd AT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See &#039;&#039;target/test/test_gsm.sh&#039;&#039; for more details&lt;br /&gt;
&lt;br /&gt;
==Sending SMS==&lt;br /&gt;
* Supposing you are already connected to the modem with cu&lt;br /&gt;
* Check if you can send SMS with your SIM card (you should get +CMGF: (0,1))&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMGF=?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If OK, switch to SMS sending mode:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMGF=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Write a message for 0661234567 phone number:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
AT+CMGW=&amp;quot;0661326109&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Hey ! How are you doing ??&lt;br /&gt;
&amp;gt;                    &amp;lt;-- Ctrl+z to end SMS here&lt;br /&gt;
&lt;br /&gt;
+CMGW: 8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* +CMGW give you the number of your SMS saved in SIM card or phone memory&lt;br /&gt;
* Then, at anytime, you can send your SMS with (pass previous number as parameter):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 AT+CMSS=8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tools to look at==&lt;br /&gt;
* http://www.developershome.com/sms/freeLibForSMS.asp&lt;br /&gt;
* http://www.gnokii.org/&lt;br /&gt;
* http://www.alamin.org/en/index.html&lt;br /&gt;
* http://www.gammu.org/wiki/index.php?title=Gammu:Main_Page&lt;br /&gt;
* http://gatling.ikk.sztaki.hu/~kissg/gsm/index.html&lt;br /&gt;
&lt;br /&gt;
==Data tranfers (EDGE/3G)==&lt;br /&gt;
&lt;br /&gt;
===PPP installation (done by default on APF51)===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Device Drivers  ---&amp;gt;&lt;br /&gt;
    [*] Network device support  ---&amp;gt;&lt;br /&gt;
        &amp;lt;M&amp;gt;   PPP (point-to-point protocol) support&lt;br /&gt;
        [ ]     PPP multilink support (EXPERIMENTAL)&lt;br /&gt;
        [ ]     PPP filtering&lt;br /&gt;
        &amp;lt;M&amp;gt;     PPP support for async serial ports&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP support for sync tty ports&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP Deflate compression&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP BSD-Compress compression&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP MPPE compression (encryption) (EXPERIMENTAL)&lt;br /&gt;
        &amp;lt; &amp;gt;     PPP over Ethernet (EXPERIMENTAL)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking applications  ---&amp;gt;&lt;br /&gt;
        [*] pppd&lt;br /&gt;
        [ ]   filtering&lt;br /&gt;
        [ ]   radius&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux &amp;amp;&amp;amp; make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* reflash kernel &amp;amp; rootfs&lt;br /&gt;
&lt;br /&gt;
===PPP configuration===&lt;br /&gt;
{{Note|Following instructions are given for the French operator &amp;quot;Bouygtel&amp;quot; and may need to be ajusted accordingly, depending on your operator/country}}&lt;br /&gt;
&lt;br /&gt;
* Create a &amp;quot;chat&amp;quot; script that will be used to initiate MODEM dialup (here we use the &amp;quot;cat &amp;gt; xxxx &amp;lt;&amp;lt; EOF trick&amp;quot; to automatically create the file, but you can also manually edit it with &#039;&#039;vi&#039;&#039; or &#039;&#039;nano&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/chatscripts/&lt;br /&gt;
# cat &amp;gt; /etc/chatscripts/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
ABORT BUSY ABORT &#039;NO CARRIER&#039; ABORT VOICE ABORT &#039;NO DIALTONE&#039; ABORT &#039;NO ANSWER&#039; ABORT DELAYED ABORT ERROR&lt;br /&gt;
&#039;&#039; AT&lt;br /&gt;
OK AT+IPR=115200&lt;br /&gt;
OK AT+CPIN=&amp;quot;0000&amp;quot;&lt;br /&gt;
OK AT+CFUN=1&lt;br /&gt;
OK AT+COPS?&lt;br /&gt;
OK AT+CSQ&lt;br /&gt;
OK &#039;AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;ebouygtel.com&amp;quot;,&amp;quot;&amp;quot;,0,0&#039;&lt;br /&gt;
OK &#039;AT&amp;amp;FE0Q0V1&#039;&lt;br /&gt;
OK &#039;ATD*99#&#039;&lt;br /&gt;
CONNECT &amp;quot;&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Don&#039;t forget to set the baudrate (default: 115200) to have a stable communication between the modem and the processor&lt;br /&gt;
* Don&#039;t forget to update &amp;quot;AT+CPIN=&amp;quot; with your real PIN code and &amp;quot;AT+CGDCONT&amp;quot; and &amp;quot;ATD*99#&amp;quot; with your operator parameters.&lt;br /&gt;
* If you want to test your chat script (verbose mode -v, on console -s, with 5 second timeout by default for commands -t 5), then launch:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# /usr/sbin/chat -v -s -t 5 -f /etc/chatscripts/bouygtel &amp;gt; $GSM_DEVICE &amp;lt; $GSM_DEVICE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If this test was OK, you may have to poweroff/poweron the MODEM to bring it to its initial state and go further.&lt;br /&gt;
&lt;br /&gt;
====For &#039;&#039;&#039;APF51&#039;&#039;&#039;====&lt;br /&gt;
* create the PPPd config files (&#039;&#039;/etc/ppp/peers/bouygtel&#039;&#039; and &#039;&#039;/etc/ppp/options.ttyS0&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/ppp/peers/&lt;br /&gt;
# cat &amp;gt; /etc/ppp/peers/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
noauth&lt;br /&gt;
connect &amp;quot;/usr/sbin/chat -v -t 5 -f /etc/chatscripts/bouygtel&amp;quot;&lt;br /&gt;
debug&lt;br /&gt;
ttyS0&lt;br /&gt;
defaultroute&lt;br /&gt;
noipdefault&lt;br /&gt;
usepeerdns&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# cat &amp;gt; /etc/ppp/options.ttyS0 &amp;lt;&amp;lt;EOF&lt;br /&gt;
115200&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====For &#039;&#039;&#039;APF27&#039;&#039;&#039;====&lt;br /&gt;
{{Note| Check if /dev/ttySMX1 exists, if not create it with :&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
mknod /dev/ttySMX1 c 204 42&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
* create the PPPd config files (&#039;&#039;/etc/ppp/peers/bouygtel&#039;&#039; and &#039;&#039;/etc/ppp/options.ttySMX1&#039;&#039;):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# mkdir -p /etc/ppp/peers/&lt;br /&gt;
# cat &amp;gt; /etc/ppp/peers/bouygtel &amp;lt;&amp;lt;EOF&lt;br /&gt;
noauth&lt;br /&gt;
connect &amp;quot;/usr/sbin/chat -v -t 5 -f /etc/chatscripts/bouygtel&amp;quot;&lt;br /&gt;
debug&lt;br /&gt;
ttySMX1&lt;br /&gt;
defaultroute&lt;br /&gt;
noipdefault&lt;br /&gt;
usepeerdns&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# cat &amp;gt; /etc/ppp/options.ttySMX1 &amp;lt;&amp;lt;EOF&lt;br /&gt;
115200&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PPP Usage===&lt;br /&gt;
* Load PPP module:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# modprobe ppp          (APF27)&lt;br /&gt;
or&lt;br /&gt;
# modprobe ppp_async    (APF51)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setup serial port name depending on your platform (&#039;&#039;/dev/ttyS0&#039;&#039; on APF51, &#039;&#039;/dev/ttySMX1&#039;&#039; on APF27)&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# export GSM_DEVICE=/dev/ttyS0&lt;br /&gt;
or&lt;br /&gt;
# export GSM_DEVICE=/dev/ttySMX1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Launch the beast:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# pppd $GSM_DEVICE 115200 call bouygtel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# ping www.google.fr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshots ===&lt;br /&gt;
* Might be needed after a successful IP setup:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# cp /etc/ppp/resolv.conf /etc/resolv.conf&lt;br /&gt;
# route add default ppp0     (due to defaultroute option in ppp ?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To see what happened after having launched &#039;&#039;pppd&#039;&#039; or &#039;&#039;chat&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# tail -f /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GSM Muxing==&lt;br /&gt;
===Why ?===&lt;br /&gt;
* By default AT commands usage is single threaded, ie only one program can open MODEM serial port and send AT commands at a given time. However it could be interesting to be able to send multiple AT commands from multiple programs at the same time, for example in order to: have a PPP link, send SMS and monitor network signal quality.&lt;br /&gt;
* This can be done by a &amp;quot;GSM mux&amp;quot;, if your MODEM support the GSM 07.10 muxing norm (which is the case with our HiLo modules).&lt;br /&gt;
===Build gsmmux===&lt;br /&gt;
* To build GSM mux (if not already done):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Hardware handling  ---&amp;gt;&lt;br /&gt;
        [*] gsmmux&lt;br /&gt;
              Version to use (sagem)  ---&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use it===&lt;br /&gt;
* If you have access to Sagem&#039;s version (you will get as much as virtual serial port as times you pass &#039;&#039;/dev/ptmx&#039;&#039; to the daemon):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# gsmMuxd -p $GSM_DEVICE -b 115200 -x /dev/ptmx /dev/ptmx /dev/ptmx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Virtual serial ports will be created in &#039;&#039;/dev/pts/&#039;&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
/dev/pts/0 /dev/pts/1 /dev/pts/2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* to know how &#039;&#039;/dev/ptmx&#039;&#039; &amp;amp; &#039;&#039;/dev/pts/x&#039;&#039; is working: [http://linux.die.net/man/4/ptmx]&lt;br /&gt;
* If you have telnet or SSH sessions running &#039;&#039;/dev/pts/0&#039;&#039; may already be used ans so virtual serial ports will be allocated from &#039;&#039;/dev/pts/1&#039;&#039;, etc...&lt;br /&gt;
&lt;br /&gt;
===Going further===&lt;br /&gt;
* In recent Linux kernels, there is also a driver to hanlde GSM muxing: n_gsm&lt;br /&gt;
* People wanting to do a &amp;quot;real&amp;quot; phone can take a look at [http://ofono.org/documentation ofono]&lt;br /&gt;
&lt;br /&gt;
==SMS using SMS server tools 3==&lt;br /&gt;
Simple AT commands can be used to send SMS. If you need more flexibility or advanced management of your SMS, you can use SMS Server Tools 3.&lt;br /&gt;
SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones.&lt;br /&gt;
&lt;br /&gt;
===Build SMS Server Tools3===&lt;br /&gt;
* To build SMS Server Tools 3:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking applications  ---&amp;gt;&lt;br /&gt;
        [*] smstools3&lt;br /&gt;
        (1)   Number of modems to support&lt;br /&gt;
        [*]   Start SMS Server Tools at system boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
The SMS server can be configured by using a configuration file &#039;&#039;/etc/smsd.conf&#039;&#039;.&lt;br /&gt;
The following parameters have to be verified:&lt;br /&gt;
* device: UART port used to communicate with the modem. If GSMUX is used, then this parameter is of form &#039;&#039;/dev/pts/x&#039;&#039; where is x is the number of the virtual port&lt;br /&gt;
* baudrate: baudrate of the UART port&lt;br /&gt;
* rtscts: must be yes if your modem needs CTS/RTS controls&lt;br /&gt;
* incoming: say yes if you want to receive SMS&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
Start the smsd deamon (if not already done at boot):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/init.d/S50smsd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then put a SMS file in the &#039;&#039;/var/spool/sms/outgoing/&#039;&#039; directory. Once placed a SMS will be sent. SMS file should be of the format defined [http://smstools3.kekekasvi.com/index.php?p=fileformat here].&lt;br /&gt;
&lt;br /&gt;
Incoming SMS can be read in the &#039;&#039;/var/spool/sms/incoming/&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
Reports and logs are also generated (&#039;&#039;/var/log/smsd.log&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==SMS using gnokii==&lt;br /&gt;
&lt;br /&gt;
[[Gnokii | See gnokii page]].&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://support.sagemcom.com/site/modele_fax.php?page=produit&amp;amp;numero_type=22&amp;amp;produit=877 HiLo 3G documentation at Sagem]&lt;br /&gt;
* [http://www.libelium.com/tienda/catalog/images/arduino/AT_Commands.pdf HiLo AT Commands]&lt;br /&gt;
* [http://www.developershome.com/sms/ SMS tutorial]&lt;br /&gt;
* http://wiki.openmoko.org/wiki/Neo_1973_and_Neo_FreeRunner_gsm_modem&lt;br /&gt;
* [http://www.anotherurl.com/library/at_test.htm AT Test commands]&lt;br /&gt;
* http://www.gsm-modem.de/gsm-faq.html&lt;br /&gt;
* [http://www.technologuepro.com/gsm/commande_at.htm Les commandes AT]&lt;br /&gt;
* [http://smstools3.kekekasvi.com SMS Server Tools 3]&lt;br /&gt;
&lt;br /&gt;
[[Category:Wireless]]&lt;br /&gt;
[[Category:Telephony]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=WPA_supplicant&amp;diff=15133</id>
		<title>WPA supplicant</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=WPA_supplicant&amp;diff=15133"/>
		<updated>2023-05-04T21:33:58Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When dealing with &amp;quot;strong&amp;quot; encryption of Wi-Fi networks, you have to setup a WPA or WPA2 configuration.&lt;br /&gt;
To handle the requirements of these protocols during association, a userspace daemon is needed: it is called a &amp;quot;WPA supplicant&amp;quot;.&lt;br /&gt;
The most used one on Linux is &#039;&#039;wpa_supplicant&#039;&#039;; we will see here how to install and configure it.&lt;br /&gt;
&lt;br /&gt;
{{Note|&#039;&#039;wpa_supplicant&#039;&#039; is also able to handle WEP or unencrypted connections}}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* Done by default if your board supports Wi-Fi connectivity. Otherwise:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;config&amp;quot;&amp;gt;&lt;br /&gt;
Package Selection for the target  ---&amp;gt;&lt;br /&gt;
    Networking  ---&amp;gt;&lt;br /&gt;
        [*]   wpa_supplicant&lt;br /&gt;
        [ ]     Enable WPA with EAP&lt;br /&gt;
        [*]     Install wpa_cli binary&lt;br /&gt;
        [*]     Install wpa_passphrase binary&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
EAP is only needed if you plan to use WPA in Enterprise mode == with a Radius server.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&#039;&#039;wpa_supplicant&#039;&#039; needs a configuration file in &#039;&#039;/etc/wpa_supplicant.conf&#039;&#039;.&lt;br /&gt;
For your convience a generic &#039;&#039;/etc/wpa_supplicant.conf&#039;&#039; is already installed in the Armadeus BSP (releases &amp;gt; 5.2).&lt;br /&gt;
Here is an example (WPA pre-shared key (TKIP)):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel&lt;br /&gt;
update_config=1&lt;br /&gt;
network={&lt;br /&gt;
	ssid=&amp;quot;&#039;&#039;SSID&#039;&#039;&amp;quot;&lt;br /&gt;
	scan_ssid=1  # only if ssid is hidden&lt;br /&gt;
	proto=WPA&lt;br /&gt;
	key_mgmt=WPA-PSK&lt;br /&gt;
	pairwise=TKIP&lt;br /&gt;
	psk=&amp;quot;&#039;&#039;PASSPHRASE&#039;&#039;&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can adapt &#039;&#039;/etc/wpa_supplicant.conf&#039;&#039; manually.&lt;br /&gt;
* If your key needs to be encrypted, use the &#039;&#039;wpa_passphrase&#039;&#039; tool to add your network (SSID/PASSPHRASE) automatically:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # wpa_passphrase &amp;quot;mynetworkSSID&amp;quot; &amp;quot;mynetworkPASSPHRASE&amp;quot; &amp;gt;&amp;gt; /etc/wpa_supplicant.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Be sure to have your Wi-Fi chipset driver loaded:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # modprobe libertas_sdio&lt;br /&gt;
or&lt;br /&gt;
 # modprobe wlcore_sdio&lt;br /&gt;
or&lt;br /&gt;
 # modprobe rt73usb&lt;br /&gt;
 # modprobe rt2800_usb&lt;br /&gt;
 # modprobe zd1211rw&lt;br /&gt;
 # modprobe rtl8187&lt;br /&gt;
 # modprobe r8712u&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Bring up the wireless interface:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # ip link set dev wlan0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or (as you prefer):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # ifconfig wlan0 up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you can create the Wi-Fi connection with WPA Supplicant:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # wpa_supplicant -Dnl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you want a script executed each time Wi-Fi Association is done:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # wpa_cli -B -a /etc/wpa_supplicant/wpa_cli-action.sh&lt;br /&gt;
 # /etc/wpa_supplicant/wpa_cli-action.sh wlan0 CONNECTED # to force ip renewal if needed (first time)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Then you can check your Wi-Fi interface is available:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# iwconfig wlan0&lt;br /&gt;
wlan0     IEEE 802.11abgn  ESSID:&amp;quot;xxxx_xxxx&amp;quot;  &lt;br /&gt;
          Mode:Managed  Frequency:5.2 GHz  Access Point: 00:xx:xx:xx:xx:xx   &lt;br /&gt;
          Bit Rate=24 Mb/s   Tx-Power=20 dBm   &lt;br /&gt;
          Retry  long limit:7   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:on&lt;br /&gt;
          Link Quality=29/70  Signal level=-81 dBm  &lt;br /&gt;
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
# ifconfig wlan0&lt;br /&gt;
wlan0     Link encap:Ethernet  HWaddr 00:xx:xx:xx:xx:xx  &lt;br /&gt;
          inet addr:192.168.0.20  Bcast:192.168.0.255  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: 2a01:e35:2e35:f60:219:88ff:fe15:4237/64 Scope:Global&lt;br /&gt;
          inet6 addr: fe80::219:88ff:fe15:4237/64 Scope:Link&lt;br /&gt;
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
          RX packets:80 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1000 &lt;br /&gt;
          RX bytes:14238 (13.9 KiB)  TX bytes:2797 (2.7 KiB)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Automate things at startup==&lt;br /&gt;
===Standard method===&lt;br /&gt;
* In default BSP you have a &#039;&#039;/etc/init.d/S40Network&#039;&#039; script which will automatically starts all network interfaces configured in &#039;&#039;/etc/network/interfaces&#039;&#039;.&lt;br /&gt;
* All you have to do is to add your Wi-Fi interface configuration in &#039;&#039;/etc/network/interfaces&#039;&#039;, like for example on [[OPOS6UL]]:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
auto wlan0&lt;br /&gt;
iface wlan0 inet dhcp&lt;br /&gt;
        pre-up modprobe brcmfmac&lt;br /&gt;
        pre-up sleep 3&lt;br /&gt;
        pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other methods===&lt;br /&gt;
* You can also choose to use a custom startup script. Here is an init script example, to adapt to your Wi-Fi driver (update WIFIDRIVERS in the source) and to place into &#039;&#039;/etc/init.d/S61wifi&#039;&#039; (do not forget to give it execution rigths with &#039;&#039;chmod a+x /etc/init.d/S61wifi&#039;&#039;):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Starts Wi-Fi services&lt;br /&gt;
#&lt;br /&gt;
# do not forget to update your wpa_supplicant configuration&lt;br /&gt;
# wpa_passphrase &amp;quot;mynetworrssid&amp;quot; &amp;quot;mynetworkpassphrase&amp;quot; &amp;gt;&amp;gt; /etc/wpa_supplicant.conf&lt;br /&gt;
# &lt;br /&gt;
export WIFIDRIVERS=libertas_sdio&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		echo &amp;quot;Starting Wi-Fi&amp;quot;&lt;br /&gt;
		modprobe $WIFIDRIVERS&lt;br /&gt;
		ip link set dev wlan0 up&lt;br /&gt;
		wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B&lt;br /&gt;
		wpa_cli -B -a /etc/wpa_supplicant/wpa_cli-action.sh&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	stop)&lt;br /&gt;
                echo &amp;quot;Stoping Wi-Fi&amp;quot;&lt;br /&gt;
		wpa_cli -i wlan0 disconnect&lt;br /&gt;
		wpa_cli -i wlan0 terminate&lt;br /&gt;
		ip link set dev wlan0 down&lt;br /&gt;
		rmmod -a $WIFIDRIVERS&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	restart)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		$0 start&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	*)&lt;br /&gt;
		echo &amp;quot;Usage: $0 {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Stop it==&lt;br /&gt;
To stop WPA Supplicant daemon and switch off the connexion, you can use this command:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # wpa_cli terminate&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or by using the S61wifi script here above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
 # /etc/init.d/S61wifi stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=blob_plain;f=wpa_supplicant/README wpa_supplicant README]&lt;br /&gt;
* [http://hostap.epitest.fi/wpa_supplicant/ wpa_supplicant Webpage]&lt;br /&gt;
&lt;br /&gt;
[[Category:Wireless]]&lt;br /&gt;
[[Category:Security]]&lt;br /&gt;
[[Category:WiFi]]&lt;br /&gt;
[[Category:Network]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=APF6Dev&amp;diff=15130</id>
		<title>APF6Dev</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=APF6Dev&amp;diff=15130"/>
		<updated>2023-01-20T12:48:26Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: APF6]]&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This is the Armadeus System&#039;s standard development board/baseboard for the [[APF6]] module.&lt;br /&gt;
&lt;br /&gt;
The following options are available:&lt;br /&gt;
* [[GPS]]&lt;br /&gt;
* [[Gsm|GSM]]&lt;br /&gt;
&lt;br /&gt;
==Errata==&lt;br /&gt;
* As the board is also used for [[APF6_SP]] module (APF6+FPGA), you might experience some miscellaneous FPGA LED blinking (beside &amp;quot;FPGA_SW&amp;quot; button) when no FPGA is present.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
* [[Datasheet#APF6Dev | Datasheet and schematics]]&lt;br /&gt;
* [http://www.armadeus.com/english/products-development_boards-apf6_dev.html Product page on Armadeus Systems website]&lt;br /&gt;
&lt;br /&gt;
==Feature list==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;5&amp;quot; summary=&amp;quot;Hardware Add-Ons by functionnalities&amp;quot;&lt;br /&gt;
|----------------&lt;br /&gt;
|- style=&amp;quot;background:#f4f4f4; color:black; -moz-border-radius:18px;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
===Audio===&lt;br /&gt;
* [[SGTL5000]]: audio in/out&lt;br /&gt;
* [[ALSA]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Video Out===&lt;br /&gt;
* [[LCD]]&lt;br /&gt;
* [[BackLight]]&lt;br /&gt;
* [[FrameBuffer]]&lt;br /&gt;
* HDMI&lt;br /&gt;
&lt;br /&gt;
===Video In===&lt;br /&gt;
*[[Camera interface]]&lt;br /&gt;
||&lt;br /&gt;
===User Input===&lt;br /&gt;
* [[Tslib|Touchscreen]] (SX8654)&lt;br /&gt;
&lt;br /&gt;
===Wired communication===&lt;br /&gt;
* [[Uart|UART]]&lt;br /&gt;
* [[SPI]]&lt;br /&gt;
* [[I2C]]&lt;br /&gt;
* [[USB Host]] &lt;br /&gt;
* [[USB_OTG]]&lt;br /&gt;
* [[USB_Gadget]]&lt;br /&gt;
* [[CAN_bus_Linux_driver|CAN bus]]&lt;br /&gt;
* [[PCIE]]&lt;br /&gt;
&lt;br /&gt;
===Storage===&lt;br /&gt;
* [[MultiMediaCard]]&lt;br /&gt;
* [[SATA]]&lt;br /&gt;
||&lt;br /&gt;
===Realtime clock===&lt;br /&gt;
* [[RTC]]&lt;br /&gt;
&lt;br /&gt;
===Wireless communication===&lt;br /&gt;
* [[Wifi|WiFi usage on Linux]]&lt;br /&gt;
* [[Bluetooth|Bluetooth usage on Linux]]&lt;br /&gt;
&lt;br /&gt;
=== FPGA connections ===&lt;br /&gt;
&lt;br /&gt;
* [[HSMC | HSMC connector]]&lt;br /&gt;
* [[JTAG]]&lt;br /&gt;
* [[Button]]&lt;br /&gt;
* [[Led]]&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
* [[PWM]]: PWM3 output is on J2 pin 26 &amp;lt;br&amp;gt;(2.8V output), but also used by LCD backlight !&lt;br /&gt;
* [[GPIOlib]]&lt;br /&gt;
* [[JTAG]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Connectors==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
[[File:APF6Dev.jpeg| align=left]]&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
    {| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;APF6Dev connectors&amp;quot;&lt;br /&gt;
    |- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
    ! Name !! Function&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J17 || Gigabit Ethernet&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J15 || HDMI&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J33 || Audio (Out/Up, In/Down)&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J29 || Power (12V)&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J36 || JTAG&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J5 || Extension 1&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J18 || Extension 2&lt;br /&gt;
    |}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
===U-Boot===&lt;br /&gt;
* To use 7&amp;quot; 800x480 LCD with 3.10/3.14/4.1 legacy kernels:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv extrabootargs video=mxcfb0:dev=lcd,800x480@60,if=RGB666,bpp=32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, after having booted Linux, do:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6 ~ # fbset &amp;gt; /etc/fb.modes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Activating HDMI console with USB keyboard in U-Boot (since armadeus-6.0):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; usb start&lt;br /&gt;
BIOS&amp;gt; setenv stdout serial,vga&lt;br /&gt;
BIOS&amp;gt; setenv stderr serial,vga&lt;br /&gt;
BIOS&amp;gt; setenv stdin serial,usbkbd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
keyboard map is english one and it seems not possible to change it (U-Boot 2014.07) ?&lt;br /&gt;
&lt;br /&gt;
* Use APF6Dev &amp;quot;User&amp;quot; LED in U-Boot scripts:&lt;br /&gt;
If you have a recent U-Boot, supporting gpio command:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; gpio set 204&lt;br /&gt;
...&lt;br /&gt;
BIOS&amp;gt; gpio clear 204&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Otherwise, you can do it &#039;the old way&#039;; declare GPIO Port 7 Pin 12 (connected to the LED) as GPIO:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; md.l 0x020b4004 1&lt;br /&gt;
020b4004: 00000100&lt;br /&gt;
BIOS&amp;gt; mw.l 0x020b4004 0x00001100    (set bit 12)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Switch LED on:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; md.l 0x020b4000 1&lt;br /&gt;
020b4000: 00000f04&lt;br /&gt;
BIOS&amp;gt; mw.l 0x020b4000 0x00001f04    (set bit 12)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Switch LED off:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; mw.l 0x020b4000 0x00000f04    (clear bit 12)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Use APF6Dev &amp;quot;User&amp;quot; Button (GPIO Port 1 Pin 9) in U-Boot scripts:&lt;br /&gt;
If you have a recent U-Boot, supporting &#039;&#039;gpio&#039;&#039; command:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv user_button &#039;gpio input 204&#039;&lt;br /&gt;
BIOS&amp;gt; if run user_button; then echo &amp;quot;Button pressed&amp;quot;; fi&lt;br /&gt;
gpio: pin 9 (gpio 9) value is 0       (if pressed)&lt;br /&gt;
Button pressed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Otherwise, you can do it &#039;the old way&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv user_button &#039;setexpr.l toto *0x0209c000 \\&amp;amp; 0x200; if itest ${toto} -eq 0; then true; else false; fi&#039;&lt;br /&gt;
BIOS&amp;gt; if run user_button; then echo &amp;quot;Button pressed&amp;quot;; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Detect USB OTG cable presence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv usb_cable &#039;setexpr.l toto *0x020c81c0 \\&amp;amp; 0xf; if itest ${toto} -eq 0xe; then true; else false; fi&#039;&lt;br /&gt;
BIOS&amp;gt; if run usb_cable; then echo &amp;quot;USB detected&amp;quot;; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
* to activate login in Framebuffer console, please uncomment (or add) &#039;&#039;/etc/inittab&#039;&#039; line 35 this way:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# Set up a getty on LCD&lt;br /&gt;
tty1::respawn:/sbin/getty 38400 tty1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:DevelopmentBoards]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=APF6Dev&amp;diff=15129</id>
		<title>APF6Dev</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=APF6Dev&amp;diff=15129"/>
		<updated>2023-01-20T12:47:18Z</updated>

		<summary type="html">&lt;p&gt;JulienB: /* Connectors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: APF6]]&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This is the Armadeus System&#039;s standard development board/baseboard for the [[APF6]] module.&lt;br /&gt;
&lt;br /&gt;
The following options are available:&lt;br /&gt;
* [[GPS]]&lt;br /&gt;
* [[Gsm|GSM]]&lt;br /&gt;
&lt;br /&gt;
==Errata==&lt;br /&gt;
* As the board is also used for [[APF6_SP]] module (APF6+FPGA), you might experience some miscellaneous FPGA LED blinking (beside &amp;quot;FPGA_SW&amp;quot; button) when no FPGA is present.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
* [[Datasheet#APF6Dev | Datasheet and schematics]]&lt;br /&gt;
* [http://www.armadeus.com/english/products-development_boards-apf6_dev.html Product page on Armadeus Systems website]&lt;br /&gt;
&lt;br /&gt;
==Feature list==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;5&amp;quot; summary=&amp;quot;Hardware Add-Ons by functionnalities&amp;quot;&lt;br /&gt;
|----------------&lt;br /&gt;
|- style=&amp;quot;background:#f4f4f4; color:black; -moz-border-radius:18px;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
===Audio===&lt;br /&gt;
* [[SGTL5000]]: audio in/out&lt;br /&gt;
* [[ALSA]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Video Out===&lt;br /&gt;
* [[LCD]]&lt;br /&gt;
* [[BackLight]]&lt;br /&gt;
* [[FrameBuffer]]&lt;br /&gt;
* HDMI&lt;br /&gt;
&lt;br /&gt;
===Video In===&lt;br /&gt;
*[[Camera interface]]&lt;br /&gt;
||&lt;br /&gt;
===User Input===&lt;br /&gt;
* [[Tslib|Touchscreen]] (SX8654)&lt;br /&gt;
&lt;br /&gt;
===Wired communication===&lt;br /&gt;
* [[Uart|UART]]&lt;br /&gt;
* [[SPI]]&lt;br /&gt;
* [[I2C]]&lt;br /&gt;
* [[USB Host]] &lt;br /&gt;
* [[USB_OTG]]&lt;br /&gt;
* [[USB_Gadget]]&lt;br /&gt;
* [[CAN_bus_Linux_driver|CAN bus]]&lt;br /&gt;
* [[PCIE]]&lt;br /&gt;
&lt;br /&gt;
===Storage===&lt;br /&gt;
* [[MultiMediaCard]]&lt;br /&gt;
* [[SATA]]&lt;br /&gt;
||&lt;br /&gt;
===Realtime clock===&lt;br /&gt;
* [[RTC]]&lt;br /&gt;
&lt;br /&gt;
===Wireless communication===&lt;br /&gt;
* [[Wifi|WiFi usage on Linux]]&lt;br /&gt;
* [[Bluetooth|Bluetooth usage on Linux]]&lt;br /&gt;
&lt;br /&gt;
=== FPGA connections ===&lt;br /&gt;
&lt;br /&gt;
* [[HSMC | HSMC connector]]&lt;br /&gt;
* [[JTAG]]&lt;br /&gt;
* [[Button]]&lt;br /&gt;
* [[Led]]&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
* [[PWM]]: PWM3 output is on J2 pin 26 &amp;lt;br&amp;gt;(2.8V output), but also used by LCD backlight !&lt;br /&gt;
* [[GPIOlib]]&lt;br /&gt;
* [[JTAG]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Connectors==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
[[File:APF6Dev.jpeg| align=left]]&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
    {| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; summary=&amp;quot;APF6Dev connectors&amp;quot;&lt;br /&gt;
    |- style=&amp;quot;background:#efefef;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
    ! Name !! Function&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J17 || Gigabit Ethernet&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J15 || HDMI&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J33 || Audio (Out/Up, In/Down)&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J29 || Power (12V)&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J36 || JTAG&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J5 || Extension 1&lt;br /&gt;
    |- align=&amp;quot;center&amp;quot;&lt;br /&gt;
    | J18 || Extension 2&lt;br /&gt;
    |}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
===U-Boot===&lt;br /&gt;
* To use 7&amp;quot; 800x480 LCD with 3.10/3.14/4.1 legacy kernels:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv extrabootargs video=mxcfb0:dev=lcd,800x480@60,if=RGB666,bpp=32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, after having booted Linux, do:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
root@apf6 ~ # fbset &amp;gt; /etc/fb.modes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Activating HDMI console with USB keyboard in U-Boot (since armadeus-6.0):&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; usb start&lt;br /&gt;
BIOS&amp;gt; setenv stdout serial,vga&lt;br /&gt;
BIOS&amp;gt; setenv stderr serial,vga&lt;br /&gt;
BIOS&amp;gt; setenv stdin serial,usbkbd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
keyboard map is english one and it seems not possible to change it (U-Boot 2014.07) ?&lt;br /&gt;
&lt;br /&gt;
* Use APF6Dev &amp;quot;User&amp;quot; LED in U-Boot scripts:&lt;br /&gt;
If you have a recent U-Boot, supporting gpio command:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; gpio set 204&lt;br /&gt;
...&lt;br /&gt;
BIOS&amp;gt; gpio clear 204&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Otherwise, you can do it &#039;the old way&#039;; declare GPIO Port 7 Pin 12 (connected to the LED) as GPIO:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; md.l 0x020b4004 1&lt;br /&gt;
020b4004: 00000100&lt;br /&gt;
BIOS&amp;gt; mw.l 0x020b4004 0x00001100    (set bit 12)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Switch LED on:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; md.l 0x020b4000 1&lt;br /&gt;
020b4000: 00000f04&lt;br /&gt;
BIOS&amp;gt; mw.l 0x020b4000 0x00001f04    (set bit 12)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Switch LED off:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; mw.l 0x020b4000 0x00000f04    (clear bit 12)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Use APF6Dev &amp;quot;User&amp;quot; Button (GPIO Port 1 Pin 9) in U-Boot scripts:&lt;br /&gt;
If you have a recent U-Boot, supporting &#039;&#039;gpio&#039;&#039; command:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv user_button &#039;gpio input 204&#039;&lt;br /&gt;
BIOS&amp;gt; if run user_button; then echo &amp;quot;Button pressed&amp;quot;; fi&lt;br /&gt;
gpio: pin 9 (gpio 9) value is 0       (if pressed)&lt;br /&gt;
Button pressed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Otherwise, you can do it &#039;the old way&#039;:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv user_button &#039;setexpr.l toto *0x0209c000 \\&amp;amp; 0x200; if itest ${toto} -eq 0; then true; else false; fi&#039;&lt;br /&gt;
BIOS&amp;gt; if run user_button; then echo &amp;quot;Button pressed&amp;quot;; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Detect USB OTG cable presence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
BIOS&amp;gt; setenv usb_cable &#039;setexpr.l toto *0x020c81c0 \\&amp;amp; 0xf; if itest ${toto} -eq 0xe; then true; else false; fi&#039;&lt;br /&gt;
BIOS&amp;gt; if run usb_cable; then echo &amp;quot;USB detected&amp;quot;; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
* to activate login in Framebuffer console, please uncomment &#039;&#039;/etc/inittab&#039;&#039; line 35 this way:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;apf&amp;quot;&amp;gt;&lt;br /&gt;
# Set up a getty on LCD&lt;br /&gt;
tty1::respawn:/sbin/getty 38400 tty1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:DevelopmentBoards]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
</feed>