Archive

Posts Tagged ‘Linux’

Atmel SAMA5D3 Xplained Board Unboxing and Quick Start Guide

April 16th, 2014 No comments

Atmel SAMA5D3 Xplained is an evaluation board running Linux powered by SAMA5D36 ARM Cortex A5 micro-processor with 256 MB DDR2, 256 MB flash, two Ethernet ports, 3 USB connectors, and more. This embedded board targets industrial automation, networks, robotics, control panels and wearable applications. The only video output is an LCD connector so it is reserved for headless or flat panel based applications. You can check full specs on my Atmel SAMA5D3 Xplained announcement post. The company kindly sent me a sample, so that I can share my experience with the board. I’ll first post some unboxing pictures, show how to get started with the pre-installed image, and build my own Linux image.

The board can be purchased for $79 from Atmel e-Store, as well as several distributors (P/N: ATSAMA5D3-XPLD).

Atmel SAMA5D3 Xplained Unboxing

I’ve been sent the board via DHL in the following package, which gives  a short desscription of the board, and what it is used for. There’s also a QR core, but it just returns the board name of some production numbers and dates, no links.

Atmel_SAMA5D3_Xplained_PackageIn the package you’ve got the board, a micro USB to USB cable for power and programming, and a small card entitled “Overview and Compliance Information” which gives a list of key features, a link to get started http://www.atmel.com/sama5d3xplained, which I’ll use later, and some EU compliance informations regarding RoHS2 and EMC. The board is compliant with both CE and FCC standards.

Atmel SAMA5D3 Xplained Package Content (Click to Enlarge)

Atmel SAMA5D3 Xplained Package Content (Click to Enlarge)

Let’s check the board in details.

Top of Atmel SAMA5D3 Xplained Board (Click to Enlarge)

Top of Atmel SAMA5D3 Xplained Board (Click to Enlarge)

On the top of the board, we’ll find the 2 USB host connectors, and 2 Ethernet connectors (GMAC and EMAC) on the right, the micro USB port, as well as pads to solder an external power supply and a micro SD slot on the left, reset, wake up and user buttons, as well as JTAG, LCD, and debug (serial) connectors at the bottom, and around the MPU and memories, the Arduino UNO R3 compatible headers with the names of the different pins. Bear in mind these only support 3.3V, not 5V.

Bottom of Atmel SAMA5D3 Xplained (Click to Enlarge)

Bottom of Atmel SAMA5D3 Xplained (Click to Enlarge)

On the back we’ll find the SD card slot, and again, the markings for the Arduino compatible connectors.

I’ve also shot an unboxing video for those interested.

Atmel SAMA5D3 Xplained Quick Start Guide

From the link provided on the “Overview card”, you can download SAMA5D3 MPU datasheet,  the board brief, design and manufacturing files, and user’s guide, as well as a Getting Started Guide, which I’ll try out in this post.

The board comes pre-loaded with a Linux distribution (poky) built with the Yocto Project comprised of bootloaders (AT91Bootstrap and U-boot), the Linux kernel, and a custom lightweight rootfs. To get started simply connect the micro USB to USB cable to your computer to boot the system, you should see a blue LED lit up and blink. There’s no display, but there are three ways to access the board from Linux or Windows computers:

  • Using the USB connection your PC.  In Linux, run dmesg to check the latest kernel messages:
    [92045.134415] usb 1-1.4.4: new high-speed USB device number 23 using ehci-pci
    [92045.227589] usb 1-1.4.4: New USB device found, idVendor=0525, idProduct=a4a7
    [92045.227598] usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [92045.227603] usb 1-1.4.4: Product: Gadget Serial v2.4
    [92045.227607] usb 1-1.4.4: Manufacturer: Linux 3.10.0-yocto-standard with atmel_usba_udc
    [92045.334096] cdc_acm 1-1.4.4:2.0: This device cannot do calls on its own. It is not a modem.
    [92045.334265] cdc_acm 1-1.4.4:2.0: ttyACM0: USB ACM device

    In my case the interface is /dev/ttyACM0. Run you favorite terminal emulator program, such as minicom, picocom, screen, PuTTY, etc… I’ve used minicom, and configured it to access /dev/TTYACM0 using 115200 8/N/1 configuration. Instructions for Windows can be found in the company’s Getting Started Guide.

  • Via a USB to Serial board connected via J23 header’s Tx, Rx and GND pins. I’ve also done this in minicom with /dev/ttyUSB0 and the same 115200 8/N/1 configuration.
  • Via SSH. The demo image in the board is running sshd, so provided you’ve connected one or two of the Ethernet ports on a LAN with a DHCP server, you should be able to connect with the IP of the board. In Linux: ssh root@ip_address

You can login with the board using the root account without password. The USB and SSH methods are the most convenience since you don’t need to connect extra hardware, but you won’t be able to access the bootloader that way, debugging the Linux kernel, if needed, will be difficult, and each time, the board is rebooted, the connection will be lost. So for development, you should really get a serial to USB debug board.

Here’s the complete boot log for reference:

AT91Bootstrap 3.6.1-00078-g5415d4e (Tue Feb  4 15:36:46 CET 2014)

NAND: ONFI flash detected
NAND: Manufacturer ID: 0x2c Chip ID: 0×32
NAND: Disable On-Die ECC
NAND: Initialize PMECC params, cap: 0×4, sector: 0×200
NAND: Image: Copy 0×80000 bytes from 0×40000 to 0x26f00000
NAND: Done to load image

U-Boot 2013.07 (Feb 04 2014 – 15:36:32)

CPU: SAMA5D36
Crystal frequency:       12 MHz
CPU clock        :      528 MHz
Master clock     :      132 MHz
DRAM:  256 MiB
NAND:  256 MiB
MMC:   mci: 0, mci: 1
*** Warning – bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   gmac0
Warning: failed to set MAC address
, macb0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0

NAND read: device 0 offset 0×180000, size 0×80000
524288 bytes read: OK

NAND read: device 0 offset 0×200000, size 0×600000
6291456 bytes read: OK
Kernel image @ 0×22000000 [ 0x000000 - 0x33be28 ]
## Flattened Device Tree blob at 21000000
Booting using the fdt blob at 0×21000000
Loading Device Tree to 2bb12000, end 2bb1a046 … OK

Starting kernel …

Uncompressing Linux… done, booting the kernel.
Booting Linux on physical CPU 0×0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.0-yocto-standard (nferre@tenerife) (gcc version 4.8.1 (GCC) 4
CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=50c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Atmel SAMA5 (Device Tree), model: SAMA5D3 Xplained
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
AT91: Detected soc type: sama5d3
AT91: Detected soc subtype: sama5d36
AT91: sram at 0×300000 of 0×20000 mapped at 0xfef58000
CPU: All CPU(s) started in SVC mode.
Clocks: CPU 528 MHz, master 132 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(s
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
allocated 524288 bytes of page_cgroup
please try ‘cgroup_disable=memory’ option if you don’t want memory cgroups
Memory: 256MB = 256MB total
Memory: 252736k/252736k available, 9408k reserved, 0K highmem
Virtual kernel memory layout:
vector  : 0xffff0000 – 0xffff1000   (   4 kB)
fixmap  : 0xfff00000 – 0xfffe0000   ( 896 kB)
vmalloc : 0xd0800000 – 0xff000000   ( 744 MB)
lowmem  : 0xc0000000 – 0xd0000000   ( 256 MB)
modules : 0xbf800000 – 0xc0000000   (   8 MB)
.text : 0xc0008000 – 0xc05b4fc8   (5812 kB)
.init : 0xc05b5000 – 0xc05d2d60   ( 120 kB)
.data : 0xc05d4000 – 0xc063a9f8   ( 411 kB)
.bss : 0xc063a9f8 – 0xc0663820   ( 164 kB)
NR_IRQS:16 nr_irqs:16 16
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80×30
Calibrating delay loop… 351.43 BogoMIPS (lpj=1757184)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0350648 – 0xc0350694
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
AT91: Power Management
gpio-at91 fffff200.gpio: at address fefff200
gpio-at91 fffff400.gpio: at address fefff400
gpio-at91 fffff600.gpio: at address fefff600
gpio-at91 fffff800.gpio: at address fefff800
gpio-at91 fffffa00.gpio: at address fefffa00
pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver
bio: create slab <bio-0> at 0
at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 chas
at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 chas
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
of_dma_request_slave_channel: dma-names property missing or empty
at91_i2c f0014000.i2c: can’t get a DMA channel for tx
at91_i2c f0014000.i2c: can’t use DMA
at91_i2c f0014000.i2c: AT91 i2c bus driver.
at91_i2c f0018000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f0018000.i2c: AT91 i2c bus driver.
at91_i2c f801c000.i2c: can’t get a DMA channel for tx
at91_i2c f801c000.i2c: can’t use DMA
at91_i2c f801c000.i2c: AT91 i2c bus driver.
media: Linux media interface: v0.10
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
Bluetooth: Core ver 2.16
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 493
io scheduler noop registered (default)
f001c000.serial: ttyS1 at MMIO 0xf001c000 (irq = 23) is a ATMEL_SERIAL
f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 24) is a ATMEL_SERIAL
f0024000.serial: ttyS5 at MMIO 0xf0024000 (irq = 25) is a ATMEL_SERIAL
ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 39) is a ATMEL_SERIAL
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
brd: module loaded
loop: module loaded
atmel_nand_nfc 70000000.nfc: NFC is probed.
atmel_nand: Use On Flash BBT
atmel_nand 60000000.nand: Using dma0chan2 for DMA transfers.
ONFI param page 0 valid
ONFI flash detected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 254
atmel_nand 60000000.nand: ONFI params, minimum required ECC: 4 bits in 512 bytes
atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
atmel_nand 60000000.nand: Using NFC Sram read and write
Bad block table found at page 131008, version 0×01
Bad block table found at page 130944, version 0×01
nand_read_bbt: bad block at 0x000000c80000
nand_read_bbt: bad block at 0x000000ca0000
8 cmdlinepart partitions found on MTD device atmel_nand
Creating 8 MTD partitions on “atmel_nand”:
0×000000000000-0×000000040000 : “bootstrap”
0×000000040000-0x0000000c0000 : “uboot”
0x0000000c0000-0×000000100000 : “env”
0×000000100000-0×000000140000 : “evn_redundent”
0×000000140000-0×000000180000 : “spare”
0×000000180000-0×000000200000 : “dtb”
0×000000200000-0×000000800000 : “kernel”
0×000000800000-0×000010000000 : “rootfs”
atmel_spi f0004000.spi: version: 0×213
atmel_spi f0004000.spi: Using dma0chan3 (tx) and dma0chan4 (rx) for DMA transfes
atmel_spi f0004000.spi: Atmel SPI Controller at 0xf0004000 (irq 18)
atmel_spi f0004000.spi: master is unqueued, this is deprecated
atmel_spi f8008000.spi: version: 0×213
atmel_spi f8008000.spi: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfes
atmel_spi f8008000.spi: Atmel SPI Controller at 0xf8008000 (irq 28)
atmel_spi f8008000.spi: master is unqueued, this is deprecated
CAN device driver interface
at91_can f000c000.can: device registered (reg_base=d08ea000, irq=19)
at91_can f8010000.can: device registered (reg_base=d08ec000, irq=29)
macb f0028000.ethernet (unregistered net_device): invalid hw address, using ranm
libphy: MACB_mii_bus: probed
macb f0028000.ethernet eth0: Cadence GEM at 0xf0028000 irq 26 (4e:68:35:cc:0c:8)
macb f0028000.ethernet eth0: attached PHY driver [Micrel KSZ9031 Gigabit PHY] ()
macb f802c000.ethernet (unregistered net_device): invalid hw address, using ranm
libphy: MACB_mii_bus: probed
macb f802c000.ethernet eth1: Cadence MACB at 0xf802c000 irq 33 (ca:99:58:69:7f:)
macb f802c000.ethernet eth1: attached PHY driver [Micrel KSZ8081 or KSZ8091] (m)
ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
atmel-ehci 700000.ehci: EHCI Host Controller
atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
atmel-ehci 700000.ehci: irq 47, io mem 0×00700000
atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 3.10.0-yocto-standard ehci_hcd
usb usb1: SerialNumber: 700000.ehci
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
at91_ohci 600000.ohci: AT91 OHCI
at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
at91_ohci 600000.ohci: irq 47, io mem 0×00600000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: AT91 OHCI
usb usb2: Manufacturer: Linux 3.10.0-yocto-standard ohci_hcd
usb usb2: SerialNumber: at91
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
Driver for 1-wire Dallas network protocol.
cpuidle: using governor ladder
leds-gpio leds.4: pins are not configured from the driver
atmel_aes f8038000.aes: version: 0×135
atmel_aes f8038000.aes: Atmel AES – Using dma1chan2, dma1chan3 for DMA transfers
atmel_tdes f803c000.tdes: version: 0×701
atmel_tdes f803c000.tdes: using dma1chan4, dma1chan5 for DMA transfers
atmel_tdes f803c000.tdes: Atmel DES/TDES
atmel_sha f8034000.sha: version: 0×410
atmel_sha f8034000.sha: using dma1chan6 for DMA transfers
atmel_sha f8034000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512
hidraw: raw HID events driver (C) Jiri Kosina
iio iio:device0: Resolution used: 12 bits
iio iio:device0: ADC Touch screen is disabled.
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
ThumbEE CPU extension supported.
Registering SWP/SWPB emulation handler
UBI: attaching mtd7 to ubi0
atmel_nand 60000000.nand: Bit flip in data area, byte_pos: 1552, bit_pos: 7, 0xf
atmel_nand 60000000.nand: Bit flip in data area, byte_pos: 315, bit_pos: 0, 0xff
UBI: scanning is finished
UBI: attached mtd7 (name “rootfs”, size 248 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 1978, bad PEBs: 6, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 321
UBI: available PEBs: 0, total reserved PEBs: 1978, PEBs reserved for bad PEB ha4
UBI: background thread “ubi_bgt0d” started, PID 681
input: gpio_keys.3 as /devices/gpio_keys.3/input/input0
at91_rtc fffffeb0.rtc: setting system clock to 2014-02-05 09:22:13 UTC (1391592)
atmel_mci f0000000.mmc: version: 0×505
atmel_mci f0000000.mmc: using dma0chan5 for DMA transfers
atmel_mci f0000000.mmc: Atmel MCI controller at 0xf0000000 irq 17, 1 slots
atmel_mci f8000000.mmc: version: 0×505
atmel_mci f8000000.mmc: using dma1chan7 for DMA transfers
atmel_mci f8000000.mmc: Atmel MCI controller at 0xf8000000 irq 27, 1 slots
ALSA device list:
No soundcards found.
UBIFS: mounted UBI device 0, volume 0, name “rootfs”, R/O mode
UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2s
UBIFS: FS size: 244936704 bytes (233 MiB, 1929 LEBs), journal size 9023488 byte)
UBIFS: reserved for root: 0 bytes (0 KiB)
UBIFS: media format: w4/r0 (latest is w4/r0), UUID 5CA0915B-7DF9-4652-92C0-71B9l
VFS: Mounted root (ubifs filesystem) readonly on device 0:12.
devtmpfs: mounted
Freeing unused kernel memory: 116K (c05b5000 – c05d2000)
atmel_nand 60000000.nand: Bit flip in data area, byte_pos: 1933, bit_pos: 5, 0xb
INIT: version 2.88 booting
Starting udev
udevd[717]: starting version 182
UBI error: ubi_open_volume: cannot open device 0, volume 0, error -16
atmel_usba_udc 500000.gadget: MMIO registers at 0xf8030000 mapped at d09a8000
atmel_usba_udc 500000.gadget: FIFO at 0×00500000 mapped at d2400000
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
UBIFS: background thread “ubifs_bgt0_0″ started, PID 782
Starting Bootlog daemon: bootlogd.
g_serial gadget: high-speed config #2: CDC ACM config
Configuring network interfaces… IPv6: ADDRCONF(NETDEV_UP): eth0: link is not y
udhcpc (v1.21.1) started
Sending discover…
macb f0028000.ethernet eth0: link up (100/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover…
Sending select for 192.168.0.108…
Lease of 192.168.0.108 obtained, lease time 7200
/etc/udhcpc.d/50default: Adding DNS 192.168.0.1
done.
Starting rpcbind daemon…done.
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
Starting atd: OK
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd
done.
creating NFS state directory: done
NFS daemon support not enabled in kernel
Starting system log daemon…0
Starting kernel log daemon…0
Starting Telephony daemon
Starting Lighttpd Web Server: lighttpd.
Starting crond: OK
Stopping Bootlog daemon: bootlogd.

Poky (Yocto Project Reference Distro) 1.5.1 sama5d3_xplained /dev/ttyS0

sama5d3_xplained login: root
root@sama5d3_xplained:~#

For some reasons the Gigabit Ethernet port failed to get a link from my 10/100M switch. I had no problem with the 10/100M Ethernet port.

Let’s have a quick look at the kernel version and memory usage:

# uname -a
Linux sama5d3_xplained 3.10.0-yocto-standard #1 Wed Feb 5 10:03:20 CET 2014 armv7l GNU/Linux
# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          216M   80M  136M  37% /
ubi0:rootfs     216M   80M  136M  37% /
devtmpfs        124M     0  124M   0% /dev
tmpfs           124M  112K  124M   1% /run
tmpfs           124M  112K  124M   1% /var/volatile
# free -m
             total       used       free     shared    buffers     cached
Mem:           246         21        225          0          0          8
-/+ buffers/cache:         12        234
Swap:            0          0          0

So the board runs Linux 3.10 built with Yocto, has 136M free on the rootfs, and 21MB used out of 246 MB RAM.

Building the demo image for Atmel SAMA5D3 Xplained

Atmel Getting Started document mentions the software components in the NAND Flash have been compiled following instructions found on the Linux4SAM website, but instead I’ve followed the build procedure found in github.

git clone git://git.yoctoproject.org/poky
cd poky
git checkout dora-10.0.1 -b my_branch
git clone git://git.openembedded.org/meta-openembedded
cd meta-openembedded
git checkout 6572316557e742c2dc93848e4d560242bf0c3995 -b my_branch
cd ..
git clone http://github.com/linux4sam/meta-atmel
  • Initialize the build directory
source oe-init-build-env build-atmel
  • Add meta-atmel layers conf/bblayer configuration file (Lines in bold):
BBLAYERS ?= " \
  /home/jaufranc/edev/Atmel/SAMA5D3/poky/meta \
  /home/jaufranc/edev/Atmel/SAMA5D3/poky/meta-yocto \
  /home/jaufranc/edev/Atmel/SAMA5D3/poky/meta-yocto-bsp \
  /home/jaufranc/edev/Atmel/SAMA5D3/poky/meta-atmel \
  /home/jaufranc/edev/Atmel/SAMA5D3/poky/meta-openembedded/meta-oe \
  /home/jaufranc/edev/Atmel/SAMA5D3/poky/meta-openembedded/meta-networking \
  "
  • Edit conf/local.conf to specify the SAMA5D3 Xplained board, and change the package type to ipk:
[...]
MACHINE ??= "sama5d3_xplained"
[...]
PACKAGE_CLASSES ?= "package_ipk"
  • Build the demo image
bitbake atmel-xplained-demo-image

This step will take a while, and you’ll find the binary images in tmp/deploy/images/sama5d3_xplained/ including the bootloaders, the kernel, modules, device tree files, and rootfs.

  • You can also optionally build the bootloaders separately with:
bitbake at91bootstrap
bitbake u-boot

Flashing the Image

After you’ve built the image you may want to install them. You can also download the pre-built Yocto/Poky demo. I’ll use the files I’ve built, but the scripts from the pre-built demo zip file (linux4sam-poky-sama5d3_xplained-4.3.zip), since I could not find it anywhere else.

First you’ll need to install SAM-BA tool to flash the images. In Ubuntu 64-bit:

sudo apt-get install linux-image-generic linux-headers-generic ia32-libs

Download SAM-BA 2.12 for Linux and SAM-BA 2.12 Patch 6 for Linux using your web browser (registration or form filling required), and install it as follows

unzip sam-ba_2.12.zip
cp patch6.gz sam-ba_cdc_cdc_linux/
cd sam-ba_cdc_cdc_linux/
gzip -d patch6.gz
patch -p1 --binary < patch6
chmod +x sam-ba

Add sam-ba to your PATH, e.g.:

export PATH=$PATH:~/edev/Atmel/SAMA5D3/sam-ba_cdc_cdc_linux/

You’ll then need to add yourself into the dialout group inside /etc/group:

dialout:x:20:myusername

Logout and login.

Now copy demo_linux_nandflash.sh, demo_linux_nandflash.tcl and demo_script_linux_nandflash.tcl scripts from the zip file to tmp/deploy/images/sama5d3_xplained/ directory, and if needed, edit demo_linux_nandflash.tcl to match your newly built filenames:

set bootstrapFile      "sama5d3_xplained-nandflashboot-uboot-3.6.2.bin"
set ubootFile          "u-boot-sama5d3_xplained-v2013.07-at91-r2.bin"
set kernelFile         "zImage-sama5d3_xplained.bin"
set rootfsFile         "atmel-xplained-demo-image-sama5d3_xplained.ubi"

We’ve now ready for the flash procedure itself:

  1. Make sure your board is running connected to your computer via the micro USB port
  2. Remove JP5 (NAND CS, upper left of Atmel MPU) jumper to disable NAND Flash memory access
  3. Press BP2 reset button (bottom left) to boot from on-chip Boot ROM
  4. Close JP5 to enable NAND Flash memory access
  5. Change the name of copy the device tree blob file as follows:
    cp zImage-at91-sama5d3_xplained.dtb at91-sama5d3_xplained.dtb
  6. Run the flash script:
    chmod +x demo_linux_nandflash.sh
    ./demo_linux_nandflash.sh
  7. It will take a little while, and once completed you can login to the baord and verify you’ve got a brand new kernel and rootfs:
    root@sama5d3_xplained:~# uname -a                                               
    Linux sama5d3_xplained 3.10.0-custom #1 Wed Apr 16 09:31:12 ICT 2014 armv7l GNUx
    root@sama5d3_xplained:~# cat /etc/version                                       
    201404160759

You can check the flashing log in logfile.log in case something went wrong. You can find some more info on Linux4Sam SAMA5D3 Xplained page.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

How to Upgrade Firmware in Amlogic S802 Devices

April 16th, 2014 8 comments

Shenzhen Tomato has finally sent me an updated firmware (password: 17r0) for M8 / TM8 Android TV box powered by Amlogic S802. This firmware is rooted, and adds support for Google Apps (Play Store, Gmail and so on), among others things. So it’s a good time to try out and write about the firmware update instructions which are very similar to AML8726-MX firmware instructions. Bear in mind that firmware is usually specific to a given hardware platform, and if you try it on another non-compatible S802 TV box, you may brick your device.

Standard “OTA” Method

Any Windows, Mac OS, Linux computer or even your own Android device should be able to handle is as you just need to download, extract and copy files to an SD card. I’ve done the procedure from a computer running Ubuntu 13.04:

  1. Download the firmware (e.g. TM8 ap6330_03102014A_0410_ROOT.rar), and extract it
  2. Copy the files (factory_update_param.aml, k200-ota-20140410.zip, and recovery.img) to the root of an SD card formatted with FAT32
  3. Insert the SD card in your S802 device.
  4. Using a sharp non-conductive object to press the recovery button, In M8 (aka TM8), this is located in the AV connector, and I used a toothpick to press the button. Keep pressing, and connect the power, waiting for an animated Android with a progress bar showing firmware upgrade is in progress.
  5. The box will then automatically reboot, and start with the new firmware. You’ll then go through a wizard to select your language (simplified Chinese, English, or traditional Chinese), adjust the screen size, and configure the network (Wi-Fi or Ethernet)

This method might also work with any Amlogic S802 based device. However, even though Tronsmart Vega S89 hardware also features the same type of recovery button via the AV ouput, GeekBuying has provided another, Windows only, method requiring you to use a tool called BootcardMaker that makes the SD card bootable, before you copy the above files + u-boot.bin to the SD card before proceeding to the firmware upgrade, also using the recovery button.

Firmware upgrade with USB Burning Tool

Most firmware distributed online will probably use the method above, but if you’ve been given a single firmware file, often using img extension, you need to use another Windows tool called USB Burning Tool. If for some reasons, your firmware is badly damaged, and can’t access the recovery mode, that may be the only way to unbrick your board.. Here’s how to proceed. (I haven’t tried myself).

  1. Download amlogic_tools.rar
  2. You may also want to install Moborobo to make sure you’ve got the right drivers.
  3. Extract USB_Burning_Tool_v2.0.0.140306_Alpha_x86.rar from amlogic_tools.rar and click on setup_v2.0.0.140306_Alpha_x86.exe to install the tool
  4. Start the USB burning tool
  5. S802_USB_Burning_Tool_OrigClick on File->Import image and select your .img firmware.
  6. make sure your S802 device is powered powered off, with the USB OTG port connected to your PC. Use a toothpick to press the recovery button, and power the device. The USB burning tool should automatically detect your device. (If not, install the moborobo tool).
  7. Now click on the Start button button to proceed with the firmware update which should last several minutes.

 

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Mixtile LOFT-Q Board and LOFT Kit mini PC Powered by AllWinner A31

April 13th, 2014 5 comments

Recently most development around AllWinner, at least for Linux, is focusing on AllWinner A20, and there are several AllWinner A20 board and development platforms available on the market such as Cubieboard2, A20-OLinuXino, IBOX and more. But apart from the team at Free Electrons, few people seem to be working on AllWinner A31, so there are few development platform available, if we exclude consumer products such as tablets and Android TV Boxes. There’s now an AllWinner A31 development board thanks to Mixtile LOFT-Q board, which also comes in LOFT Kit to make a complete mini PC with enclosure.

Mixtile LOFT-Q Board

Mixtile LOFT-Q Board

Mixtile LOFT-Q specifications:

  • SoC – Allwinner A31 quad core ARM Cortex-A7 processor with PowerVR SGX544 MP2 GPU
  • System Memory – 2GB 64-bit DDR3
  • Storage – 8GB eMMC (ver 4.51), SATA III connector for 2.5″ drives, and SD card Slot
  • Video Output – HDMI 1.4 up to 1080p
  • Audio I/O – HDMI, 1 headphone/TOSLINK composite jack, 2 onboard MIC
  • Connectivity – 10/100/1000M Ethernet, WiFi 802.11 a/g/n, Bluetooth 4.0, and Zigbee (TBC – Confimed)
  • USB – 4x USB 2.0 host post, 1x micro USB 3.0 device port
  • Debugging – UART debug connector, JTAG connector
  • Expansion header – 180-pin header with access to I2C, SPI, LCD, MIPI DSI, RGB/LVDS, CSI, MIPI CSI, ADC, CTP, RTP, SPDIF-OUT, SPDIF-IN, GPIO, etc…
  • Sensor – Acceleration sensor, IR receiver
  • Misc- Battery slot for RTC
  • Power – 12V/4A (48W)

The company says the board is running an open source version of U-Boot and the Linux Kernel, the board can decode 4K videos, and support Blu-ray video playback. It can be used as an external USB hard drive when connected via the micro USB 3.0 port. The binary images and source code are not there yet, but they should eventually show up in http://www.mixtile.com/downloads/, as they did with their previous Garage board powered by Exynos 4412. Documentation for the previous board appears to be limited, but they still released the schematics (PDF).

Mixtile Loft Kit

Mixtile Loft Kit

The board will also be available as part of a kit called LOFT Kit adding a tempered glass cover, an aluminum frame and baseplate, 2 silicon rubber pads and a thermal pad, an hard disk holder, a 12V/4A power adapter, and an assembly manual.

There’s no word about pricing nor availability at this stage, but you can find some more information on Mixtile website, and the board will probably first show up for sale on that taobao store.

Thanks to Nanik for the tip.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Raspberry Pi Compute Module is a $30 Raspberry Pi Compatible System-on-Module

April 9th, 2014 No comments

Albeit the initial goal of the Raspberry Pi board was to address computer science education, it has become extremely popular with hobbyists, has made its way in many different kinds of hardware, and is now clearly the number 1 low cost ARM Linux development board. The Raspberry Pi foundation has then decided to design and sell a system-on-module called Raspberry Pi Compute that people can use in actual products.

Raspberry Pi Compute (Left) and Raspberry Pi Board (Right)

Raspberry Pi Compute (Left) and Raspberry Pi Board (Right)

Since the module will be mostly software compatible with the original Raspberry Pi board, the specs are similar:

  • SoC – Broadcom BCM2835 ARM 11 processor @ 700 MHz with Videocore IV GPU
  • System Memory – 512MB RAM
  • Storage – 4GB eMMC Flash
  • SoM Connector – DDR2 200-pins SODIMM
  • Dimensions – 67.6x30mm board which fits into a standard DDR2 SODIMM connector

The main difference is they’ve replaced the SD card slot found in the board, by an eMMC module which is more appropriate, and should provide better performance, for products. The foundation has also made a baseboard called “IO Board” for the Compute Module, in order to kickstart development while your custom PCB is being designed. It includes an HDMI output, a full sized USB port, 2 micro USB ports, some flat headers for camera and LCD displays, and two 2×30 pin headers to easily access the signals available via the SODIMM connectors.

Raspberry Pi IO Board and Compute Module

Raspberry Pi IO Board and Compute Module

The module will most probably support all distributions available for the RPi (Raspbian, Fedora, Arch Linux ARM,  etc..) as source code and tools should be identical too. The IO board will be open source. For now the foundation has only released the schematics of the IO Board and Compute module in PDF format, but more documents will be released soon.

A “Raspberry Pi Compute Module Development Kit” comprised of the Compute Module and IO Board should be available from RS and Element14 in June. The price of the devkit has not been disclosed, but the Compute Module will start selling in the summer for $30 per unit in batches of 100. Individual orders will also be possible at an higher price.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

MYIR MYD-AM335X Development Boards & MYC-AM335X CPU Modules

April 4th, 2014 No comments

MYIR has recently introduced MYD-AM335X development boards and MYC-AM335X CPU modules powered by Texas Instruments Sitara AM335x ARM Cortex A8 SoCs, (AM3352, AM3354, AM3356, AM3357, AM3358, and AM3359) that come with 512 MB RAM, 512 MB Flash, and a Gigabit Ethernet PHY. The boards and modules target home automation, industrial automation, enterprise/educational tablets, portable navigation devices and networking applications.

MYC-AM335X CPU Modules

MYC-AM335X_CPU_Module
MYC-AM335X CoM specifications:

  • SoCTexas Instruments AM3352, AM3354, AM3356, AM3357, AM3358, AM3359  ARM Cortex-A8 up to 1GHz with SGX530 GPU (AM3354/AM3358/AM3359 only)
  • System Memory – 512MB DDR3 SDRAM
  • Storage – 512MB NAND Flash
  • Connectivity – On-board Gigabit Ethernet PHY
  • Headers:
    • 2x  2.0mm pitch 60-pin expansion connectors to connect the SoM to a baseboard with the following signals: 2x USB2.0 OTG ports, 6x Serial ports, 2x I2C, 1x SPI, 7x ADC, 2x PWM, 3x SDIO
    • 1x 2.0mm pitch 26-pin expansion interface
    • 1x 2.54mm pitch 10-pin expansion interface
  • Misc – 1x power indicator (Red LED), 1x  user LED (Green)
  • Power supply – +3.3V/0.8A
  • Dimensions – 70×50 mm (6 layer PCB)
  • Operating Temperature Range – 0~70 Celsius (commercial grade) or -40~85 Celsius (industrial grade)

The company provides Linux 3.1.0, Android 2.3.4 and Windows Embedded CE 7 BSPs for these modules.

MYD-AM335X development boards

MYIR also provides a baseboard, which when used with their MYC-AM335x CoMs is called MYD-AM335x.

MYD-AM335X Development Board (Click to Enlarge)

MYD-AM335X Development Board (Click to Enlarge)

MYD-AM335X development boards comes with the following ports and headers:

  • Serial ports – 1x 3-wire RS232 Debug serial port (DB9), 1x 3-wire RS232 serial port (UART1), 1x RS485 (with isolation)
  • CAN – 1x CAN interface with isolation
  • USB – 4x USB 2.0 Host ports, 1x USB 2.0 OTG port
  • Connectivity – 2x 10/100/1000Mbps Ethernet interfaces
  • Storage – 1x TF card slot
  • Video Output – 1x HDMI interface, 1x LCD interface (16-bit true color, supports optional 4.3-inch and 7-inch TFT LCD), 1x 4-wire resistive touch screen interface
  • Audio I/Os – 1x Audio input port (3.5mm jack), 1x Stereo Audio output port (3.5mm jack),
  • Expansion headers – 2 x 2.0mm 20-pin expansion connectors with 7x ADC, 1x SPI, 2x I2C, 4x UART
  • Misc – 1x reset button, 3x user buttons, 1x power indicator (Red LED)
  • Power Supply – 5V/2A
  • Dimensions – 130 mm x 100mm (4 layer PCB)

The board is sold as part of MYD-AM335X development kit that also includes  an Ethernet cable, a USB cable, a 5V power adapter, and a product DVD. Optional 4.3″ or 7″ LCD/TSP are also available.

The development kits and CPU modules are available now starting at $68 per unit for the CoM and $139 for the development board per 1k order. You can visit MYIR’s MYC-AM335X CPU module page for more information about the CoMs and development boards.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Novena Open Source Hardware ARM Laptop Gets Crowdfunded for $1995

April 4th, 2014 2 comments

In 2012, Andrew Huang (“Bunnie”) decided to build an open source hardware and software laptop codenamed Novena powered by Freescale i.MX6 as a side project. The goal of the project was to be fully open source, both in terms of hardware and software, and the components have been selected so that the datasheets can be downloaded without NDA. Design has now been completed, and a crowdfunding campaign has now been launched on Crowd Supply, but since finding low cost part was not priority, you’ll have to fork $1,995 to get the complete laptop, $1,195 will get you the desktop version, and $500 the motherboard only. There’s also a version of the laptop called “Heirloom Laptop” with a hand-crafted wood and aluminum case that goes for $5,000.

Novena_Open_Source_Hardware_Laptop

Novena Laptop

Let’s go through the board specs first:

  • SoC – Freescale iMX6 Quad-core Cortex A9 CPU with NEON FPU @ 1.2 GHz. – NDA-free datasheet and programming manual
  • System Memory – 64-bit, DDR3-1066 SO-DIMM slot. 4GB DDR3 SO-DIMM will be installed in the shipped products.
  • Storage – Boots from microSD firmware, SATA-II (3Gbps) connector
  • Internal ports & sensors:
    • mini PCI-express slot
    • UIM slot for mPCIx mobile data card support
    • Dual-channel LVDS LCD connector with USB2.0 side-channel for a display-side camera
    • Resistive touchscreen controller
    • Stereo 1.1W, 8-ohm internal speaker connectors
    • 2x USB2.0 internal connectors for keyboard and mouse/trackpad
    • Digital microphone (optional, not populated by default)
    • 3-axis accelerometer
    • 3x internal UART ports
  • External ports:
    • HDMI
    • SD card reader
    • headphone + mic port (compatible with most mobile phone headsets, supports sensing in-line cable buttons)
    • 2x USB 2.0 ports, supporting high-current (1.5A) device charging
    • 1Gbit ethernet
  • Other features:
    • 100 Mbit ethernet – dual Ethernet capability allows laptop to be used as an in-line packet filter or router
    • USB OTG – enables laptop to spoof/fuzz ethernet, serial, etc. over USB via gadget interface to other USB hosts
    • Utility serial EEPROM – for storing crash logs and other bits of handy data
    • Spartan-6 CSG324-packaged FPGA – has several interfaces to the CPU, including a 2Gbit/s (peak) RAM-like bus — for your bitcoin mining needs. Or whatever else you might want to toss in an FPGA.
    • High-speed I/O expansion header – useful for implementing a wide variety of functions, from simple GPIO breakouts to high-performance analog data sampling front-ends

Beside the 4GB RAM, the board with also come with a microSD card with basic Debian install, Ath9k (blob-free firmware) mPCIe wifi card, 802.11n b/g 1T1R and a 16V, 3.75A power supply (100-240V 50/60Hz input).

The desktop version will come with a gen-2 hacker case, a 13.3″ TFT  LCD (1080P), an LVDS to eDP adapter board, and some other accessories such as cables.

The laptop version will features all hardware from the desktop version but add a battery controller board, a 240 GB SSD, a 3000mAh 3-cell lithium battery pack, measure 330 mm x 225 mm x 27mm and weight 1.36 kg. The keyboard is not included.

$5,000 Heirloom Laptop

$5,000 Heirloom Laptop

Since these laptops and desktop PC are fully open source, you can download the hardware design files, get the source code, and build the Linux distribution yourself without binary blobs.

The board should ship in November 2014, the All-in-one desktop in December 2014, the laptop in January 2015, and Heirloom laptop in February 2015.

Via Liliputing

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Ingenic Newton Platform for Wearables is Powered by MIPS Based JZ4775 SoC

April 2nd, 2014 1 comment

Imagination Technologies has published a blog post about Newton, a tiny reference design for wearables based on Ingenic JZ4775 MIPS SoC found in some recent smartwatches such as SmartQ Z1 (The CPU not the module). This module targets wearables, IoT, healthcare, home appliances, security, industrial control, consumer electronics and more.

Ingenic_Newton

Newton Specifications:

  • SoC – Ingenic JZ4775 MIPS Xburst processor @ 1 GHz with 2D GPU, and VPU supporting 720p@30fps for MPEG-2, MPEG-4, VC-1, H.264, VP8, and RV9 codecs.
  • System Memory -  Up to 3GB mobile DDR3/DDR2/LPDDR1
  • Storage – Up to 32 GB eMCP eMMC flash
  • Display Support – LCD or EPD, with touch panel and  backlight
  • Audio – Digital MIC and Speaker
  • Connectivity – 4-in-1 combo with Wi-Fi (802.11 a/b/g/n at 2.4/5 GHz), Bluetooth 4.0 + EDR (including Bluetooth LE support), NFC, and FM
  • Sensors – 3-axis gyroscope, accelerometer magnetometer, pressure, humidity and temperature, bio-signal detection and processing
  • USB – USB OTG signals
  • Expansion ports – UART, I2C, USB, GPIO, and “motor” support (PWM?)
  • Power Supply – USB (5V) or Battery (3.7 to 4.2V) with PMU  and charger
  • Power Consumption – Standby power:  4mW,  MP3 playback: 100mW on average,  with peak power consumption at ~260mW.
  • Dimensions – 21.6mm x 38.4mm x 3.2mm (But hardware manual: Max size is 41.4mm x 21.6mm)

Ingenic_JZ4775_Newton

Linux 3.0.8, Android 4.4 KitKat and several real-time operating systems have already been ported to the Newton platform, and developers/customers can access the open source drivers. Ingenic can also provide software packages for voice or gesture control for user interfaces.

During Google recent Android Wear announcement, Google mentioned Broadcom, Intel, Mediatek and Qualcomm, as well as Imagination Technolgies as key SoC and IP partners, so this module might also be used in devices running Android Wear. This was strongly implied in Imagination’s blog post, but they never explicitly confirmed Ingenic Newton was an Android Wear platform.

PD_JZ4775_NEWTON Board Description (Click to Enlarge)

PD_JZ4775_NEWTON Board Description (Click to Enlarge)

Neither pricing and availability have been disclosed. Since they will only provide source code to “customers”, I doubt this type of module will be available to hobbyists. Further details about the module, including an hardware reference manual, are available on Ingenic Newton page.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter