This document aims to provide the information needed to integrate the Nitrogen
R
board into your
application. As such, it addresses both hardware and software integration.
Note that this manual contains many references to outside projects which have a life of their own,
so it should generally be used as a starting point for how a Nitrogen
R
may be used.
Please contact Boundary Devices with any questions.
3Overview of features
The following are highlights of the Nitrogen
• Freescale i.MX515 800MHz ARM Cortex A8
• Freescale MC13892VL Power Management and User Interface IC
• Up to 512MB DDR2 Memory
• Full featured Boot Loader for custom startup
• Board Dimensions: 4” x 2.5”
• Up to 8MB Serial Flash
• Directly interfaces to 4.3” and 7” LCD Displays
• LED Backlight Driver Circuitry
R
board.
• 44 KHz Stereo 16-bit Audio Output
• 44 KHz Monaural Audio Input (microphone)
• 3 RS-232 Serial ports
• 1 High-Speed USB 2.0 Master Port
• 1 High-Speed USB 2.0 OTG
• Built-in 5MP Camera Support
• Touch-Screen Support
• SPI/I2C Interface
• microSD Slot for Expanded Storage
• General Purpose I/O for Device Control
• Dry Contact Output
• On-board interface to Symbol 1D/2D Barcode Scanner
• Supports Windows CE, Ubuntu Linux, or Android Operating Systems
board contains a wide variety of I/O options for use in your
application. Note that some of these may not be populated on an evaluation or production board.
March 10, 2011Revision 1.5
Figure 1: Nitrogen board
4.2Mounting6
0.00
34.30
57.15
65.00
0.008.0096.98
Alldimensions in mm
116.00
4.2Mounting
Including protrusions for connectors, the Nitrogen
R
board measures 4.5” by 2.5”, the same size as
the Hydrogen board. This allows the use of both the 7” and 4.3” enclosures with VESA-mounts as
well as the Kiosk and in-wall enclosures.
The board is designed to be mounted using the four mounting holes as shown in figure 2.
Figure 2: Nitrogen-E mounting
March 10, 2011Revision 1.5
5Software features
7
As provided by Boundary Devices, the Nitrogen
R
board supports either the Windows CE 6R or
Linux operating systems. There are currently two shipping versions of Linux:
1. Busybox - A small Linux userland, and
2. Ubuntu - A full-featured X-Windows based installation
To simplify the installation of either, the U-Boot boot loader is installed on our evaluation boards,
and one or more MMC cards are shipped to allow the use of either operating system.
5.1Internal ROM boot loader and boot flow
The i.MX51 processor contains an internal boot loader in ROM that supports boot from serial
EEPROM, SD card, USB, NAND or NOR flash. Freescale has a number of documents about how
this process is done. In this document, we’ll describe how the demonstration images are currently
configured.
To begin with, the Nitrogen
internal ROM loads code from offset 0x400 (1k) and executes it. Note that this first set of code is
placed in non file-system area, so it must be loaded to disk using a tool such as dd under Linux.
The current incarnation of U-Boot then loads its’ environment settings from offset 0x1c00 (block
14) of the SD card. This is also in space before the first partition.
R
is configured to boot from SD card. As shown in figure 3, the
The next steps depend primarily on the values found in the environment, especially the bootcmd
variable.
Note that future iterations of the Nitrogen
R
will likely place both U-Boot and the environment
variable in serial EEPROM.
5.2Das U-Boot
The U-Boot Boot Loader is a full-featured loader for either Linux or Windows CE that supports a
wide variety of options for loading your Operating System and application.
The U-Boot Boot Loader is a very capable loader with support for USB and network boot, including
BOOTP/DHCP, and NFS mounting support.
Please refer to the U-Boot website for details of the operation. The sections which follow will
describe typical usage for various operating systems and variants.
In general, though, our O/S releases will have the following features.
Serial console Releases from Boundary Devices will be configured to allow access to the U-Boot
command-line on the primary serial port1with a baud rate of 115200, no parity, 8 data bits. They’ll
be configured to stop the boot process on any input character on the console.
bootcmd in persistent environment
1
COM1: under CE, /dev/ttymxc0 under Linux
March 10, 2011Revision 1.5
5.2Das U-Boot8
March 10, 2011Revision 1.5
Figure 3: Nitrogen boot flow
5.2Das U-Boot9
The U-Boot variable bootcmd will be stored in persistent memory2and loaded at boot time. The
content of this command will be executed if no character is received on the console within a time
frame defined by the bootdelay variable.
Environment variables can be saved using the saveenv command.
U-Boot> set bootcmd ‘mmcinit && fatload mmc 0 92000000 NK6.nb0 && go 92000000’
U-Boot> savee
U-Boot> print
In the U-Boot shell, single-quotes do not perform variable expansion of the quoted item, but
double-quotes do.
The print command in U-Boot is used to display the content of all environment variables.
5.2.1Using U-Boot with Linux
When using U-Boot to load Linux, there are two typical use cases for the bootcmd settings to boot
with or without a RAM-disk. In general, we recommend the use of a RAM-disk whenever booting
to SD card so that the RAM disk, or initrd can perform filesystem checking. The Freescale
Ubuntu image is not currently set up to do so. If you’re using an NFS root filesystem, you also
won’t want a RAM disk.
Generally, we’ll set up bootcmd as follows when using a RAM disk:
• bootm 92000000 92400000 - Boot Linux with kernel at 92000000 and initrd at 92400000
2
SD card or serial EEPROM
March 10, 2011Revision 1.5
5.2Das U-Boot10
To boot without a RAM disk, we’ll just skip loading it and only supply a single argument to the
bootm command. In this case, the filesystem root should be specified on the kernel command-line
(bootargs U-Boot variable.
U-Boot> set bootcmd ’mmcinit &&
fatload mmc 0 92000000 uImage &&
bootm 92000000’
U-Boot> saveenv
Whenever you’re booting Linux, these are some key kernel command-line variables you may want
to set:
• video= - Specifies the video resolution and output form. See section 5.8 for details.
• console=ttymxc0,115200 - Sets /dev/console to the first UART, the same as U-Boot uses
If you’re booting over NFS, you’ll need to add these clauses:
ip=dhcpThis tells the kernel to perform a DHCP to get an IP
address. You’ll also need kernel support for DHCP
to use this. Check with the Linux command zcat
/proc/config.gz | grep DHCP.
rootwaitThis clause tells the kernel not to expect that a RAM
disk is immediately available.
root=/dev/nfsThis clause tells the kernel that the root device is
NFS.
nfsroot=10.0.0.1:/path/to/rootfsThis clause tells the NFS device driver what server
and path to use as the root filesystem.
5.2.2Using U-Boot with Windows CE
Using U-Boot to load Windows CE is simpler, since it uses neither bootargs nor a RAM disk and
currently has compiled-in display settings.
Consequently, the command line is typically this to load CE from SD card:
U-Boot> setenv bootcmd ’mmcinit &&
fatload mmc 0 90200000 NK6-nitrogen e.nb0
&& go 90200000’
U-Boot> saveenv
If you want to load CE over TFTP, a suitable command-line might be this:
U-Boot> set bootcmd ’dhcp 90200000 192.168.0.251:NK6-nitrogen e.nb0
&& go 90200000’
U-Boot> saveenv
Note that each of these is using the go command and not bootm.
March 10, 2011Revision 1.5
5.3Windows CE11
5.3Windows CE
As mentioned earlier, the Nitrogen
R
board ships with a runnable Windows CE 6.0 image on MMC
card. A Board Support Package is also available and necessary to tailor the operating system for
a given application.
March 10, 2011Revision 1.5
5.4Linux Kernel12
5.4Linux Kernel
The sources for the Linux kernel for Boundary Devices boards are available on our git server.
We’re currently using branch buntu for Ubuntu support and branch watchie6 for Busybox development.
We also supply the source code used to build a given kernel on SD cards in directory /linux-bd.
5.4.1Kernel configurations
We currently use configuration nitrogen defconfig for compiling Busybox kernels, and configuration nitrogen ubuntu defconfig for Ubuntu builds.
5.4.2Kernel compilation for the impatient
For Busybox:
~/linux-bd $ make ARCH=arm CROSS COMPILE=arm-none-linux-gnueabi- nitrogen defconfig
~/linux-bd $ make ARCH=arm CROSS COMPILE=arm-none-linux-gnueabi- uImage modules
For Ubuntu:
~/linux-bd $ make ARCH=arm CROSS COMPILE=arm-none-linux-gnueabi- nitrogen ubuntu defconfig
~/linux-bd $ make ARCH=arm CROSS COMPILE=arm-none-linux-gnueabi- uImage modules
In each case, the U-Boot-wrapped kernel (uImage) is located in arch/arm/boot.
You can install the modules into an initrd or nfs filesystem by using the modules install target
and the INSTALL MOD PATH environment variable:
~/linux-bd $ make ARCH=arm CROSS COMPILE=arm-none-linux-gnueabi- \
INSTALL MOD PATH=~/ubuntu-initrd/ \
modules install
5.5Linux Toolchains
We’re currently using CodeSourcery
Busybox applications and the native compiler from Ubuntu.
R
’s toolchain arm-2010q1 for compilation of our kernels and
5.6Busybox
Describe Busybox platform here.
March 10, 2011Revision 1.5
5.7Ubuntu13
5.7Ubuntu
Our Ubuntu builds are “Live” images so they’re set up for read-only access to the SD cards. We put
together a document, available on our web-site that describes much of what we’ve done to make
this happen.
March 10, 2011Revision 1.5
5.8Linux display setup14
5.8Linux display setup
Our current version of U-Boot does not have display support, but it can be used to configure the
kernel’s display until we get proper display support.
The lcdpanel command is currently used to define an environment variable panel that can be
used to construct the kernel command line arguments3. The command contains support for most
panels shipped by Boundary Devices as well as support for Discrete Monitor Timings (dmt) and
the VESA Generalized Timing Formula.
It may be used in one of the following ways:
command stringdescription
lcdp ?Show the list of currently supported lcd panels
lcdp panelnameSelect and initialize a known panel by name
lcdp vesa:WxH@FREQSelect and initialize a VESA GTF panel with specified Width, Height, and FREQuency(inHz)
lcdp +Add a new panel (prompts for all of the details)
lcdp name:field,field...Specify a panel name in all it’s gory details
As mentioned earlier, this command does not currently configure the display adapter on the Nitrogen board. It simply sets the panel environment variable for use in constructing a bootargs
variable.
To rehash previous comments, the bootargs variable contains the Linux kernel command-line.
The Linux kernel display driver contains support for initializing the display adapter through the
use of the ’video=mxcfb:’ kernel parameter. To enable arbitrary displays, we added support for a
raw specifier that matches our previous use of the lcdpanel U-Boot command.
To complicate matters, we also added support for three I/O widths to support the physical connections to two internal connectors and the HDMI adapter: