User Guide Linux for AT91CAP9-STK Version 1.1. User Guide LINUX FOR AT91CAP9-STK VERSION: 1.1 1/11

Similar documents
AT91SAM9RL64 Hands-on 03: Deploy an application thanks to the AT91SAM9RL64 BootROM loaders and at91bootstrap

AT91SAM9G45-EVK Linux. User Manual

MBC-SAM9G25 Core Board Overview

GadgetPC Single Board Computer. System Restore Guide. Document Revision: 1.04 Date: 31 January, 2010

AT91SAM9G45-EVK WinCE User Manual

Pengwyn Documentation

Release Notes V SAM-BA Release version: 2.10 Release date: 2010,July. 1 Overview

400AP Application Note Uploading Firmware Images to 400AP NAND Flash Models

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

SAM9-L9261 User Manual. All boards produced by Olimex are ROHS compliant. Rev.C, September 2009 Copyright(c) 2009, OLIMEX Ltd, All rights reserved

First Steps. esom/sk5 esom/3517 Embedded Linux Starter Kit

First Steps. esom/sk4 esom/3517 Embedded Linux Starter Kit

Lab 1. OMAP5912 Starter Kit (OSK5912)

DTK2410 Specification

Linux. For BCT RE2G2. User Guide. Document Reference: BCTRE2G2 Linux User Guide. Document Issue: Associated SDK release: 1.

CSE A225 Linux with Beagle xm

Getting Started with PetaLinux SDK

Release Notes of the QNX BSP for Centrality Atlas II EVB Trunk#

Zephyr Kernel Installation & Setup Manual

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

SparkGate7 Quick startup guide

First Steps. DNP/SK18 Embedded Linux Starter Kit

MB/ Starter Kit: First Steps

In this video, I will be covering DM385 IPNC RDK out of box demo-- Here, I'll be showing flashing the uboot using prebuilt binaries available in RDK--

QuickStart Instructions. Programming Embedded Linux on phycore-lpc3180

SAMA5D3x-CM Instruction to program images with PEEDI

LTC Data Converter Board For The Arrow SoCKit Linux Application User s Guide

Linux as primary Operating System

Embedded System Design

Release Notes of the QNX BSP for AMCC PPC440 EP/GR Evaluation Kit (EVK) Trunk#

Development Environment Embedded Linux Primer Ch 1&2

EAN-ARM-Application-Development

Itron Riva Dev Software Development Getting Started Guide

MYD-SAM9X5 Dev Board

AT91SAM9G45 EVK Board

MCAM335x Linux User's Guide

MYD-SAMA5D3X Development Board

PNP/5280 µclinux Starter Kit: First Steps

DNP/2110 Linux Starter Kit: First Steps

MYD-IMX28X Development Board

About Voipac i.mx53 Development kit. Packing List Connector Locations Connecting the components and cables. First Step

Release Notes for the QNX Neutrino BSP for Freescale i.mx25 3DS PDK 1.0.0#

Oxalis Getting Started

1. Conventions in this tutorial Introduction Check and change configuration settings as needed Start Digi ESP...


Xinu on Intel Galileo User Manual

Upgrading the MSA1000 for Enhanced Features

Labs instructions for Enabling BeagleBone with TI SDK 5.x

Introduction of Linux

TQ2440 Development Platform Manual

How to download a new Linux O/S Image File

First Steps. DNP/SK30 Embedded Linux Starter Kit

About Voipac i.mx25 Development kit. Packing List Connector Locations Connecting the components and cables. First Step

# Atmel SAMA5 Software Package. ## Version ### Fixes. - Fix build of generic targets (used for SAM-BA applets) ## Version 2.

MYD-JA5D2X Development Board

Using colinux to develop under Windows XP

Release Notes for the QNX Neutrino BSP for Atmel AT91SAM9260-EK Board#

Installation of RedHawk 6.5-r24.2 on the Jetson TX1 Development Board Release Notes. September 19 th, 2017

Development of BSP for ARM9 Evaluation Board

MYD-SAM9X5 Development Board

W90N745 BSP Quick Start Guide

SCM EVK (SCM120

Description: Write VHDL code for full_adder.vhd with inputs from switches and outputs to LEDs.

Release Notes for QNX Neutrino BSP for Renesas SH7780 EDOSK 1.0.0#

Linux Essentials Objectives Topics:

DIL/NetPC ADNP/1520 Board Revision 2.1 Installing an SSH Connection User Manual

MYD-IMX28X Development Board

10/02/2015 PetaLinux Linux Image Network Connection

GIGABYTE. Software Reference Guide for MP30 (APM) Platform R01. Document Version:

Install and Configure wxwidgets on Ubuntu

USER GUIDE. ATWILC1000 Getting Started with SAMA5D3 Xplained Board. Atmel SmartConnect. Introduction. Features

Release Notes for the QNX Neutrino BSP for Atmel At91sam9263 EK trunk#

Assignment 1: Build Environment

RELEASE NOTES. for QNX SP1 BSP for the Karo TX6DL (Freescale i.mx6 Dual Lite)

ITEC451 Network Design & Analysis Laboratory Guide: Appendix

DIL/NetPC DNP/5280 Board Revision 1.0 Installing a PPP Connection User Manual

This guide is used as an entry point into the Petalinux tool. This demo shows the following:

User Manual. DIL/NetPC DNP/2110 Installing an SSH Connection

Stop all processes and then reboot - same as above startx. Log in as superuser from current login exit

PM9263 Getting Started with Windows CE 6.0

About Voipac i.mx51 Development kit. Packing List Connector Locations Connecting the components and cables. First Step

Localization Software Setup Manual

Getting Started with TargetOS on the ZedBoard 1 Introduction

DIL/NetPC DNP/9200 Board Revision 1.1 Installing an SSH Connection User Manual

LS9200 User Guide LinkSprite Technologies, Inc.

Glomation. Embedded Single Board Computer GESBC-3130S User s Manual

Matrix 500 Quick Installation Guide

Future Designs, Inc.

NovTech Evaluation Board NOVPEK CVLite

NovTech Evaluation Board NOVPEK CVLite

A Simple File Development System for the GESBC Paul H. Muller - Documatrix

Bring-up Cisco NCS 1002

Configuring and Building Palacios/Linux

Once your USB drive is formatted for the FAT32 file system it can be mounted and tested on the GESBC To do this, use the following command:

Using echo command in shell script

10/02/2015 PetaLinux Image with Custom Application

Developing Environment for Intel Mainstone Board

SPPEXA TEACHLET: GETTING STARTED WITH L4RE CARSTEN WEINHOLD

TMS320DM642 Evalaution. Technical Modul e Reference DSPDevelopment Systems OSK5912. User's Guide. MontaVista Linux Preview CD-ROM

QEMU Basic. Create the Hardware System

Transcription:

User Guide LINUX FOR AT91CAP9-STK VERSION: 1.1 1/11

History of Changes Revision Issue Date Descripion Author Ver 1.0 2009-04-24 First version of the document Olivier Arnal Ver 1.1 2009-04-27 Minor modification (SAM-BA patch) Olivier Arnal 2/11

Table of Contents 1 Scope... 4 2 Requirements... 5 2.1 Hardware requirements... 5 2.2 Software requirements... 5 3 Linux on AT91CAP9-STK architecture... 6 3.1 Supported features... 6 3.2 Boot sequence... 7 3.3 NandFlash memory map... 7 4 Installation... 8 4.1 NandFlash installation... 8 5 Rebuild from source... 9 6 Develop a sample Linux application... 10 7 References... 11 3/11

1 Scope This document is a getting starting guide describing how to put a running embedded Linux distribution on an AT91CAP9-STK board. Chapter 2 of this document details the hardware and software requirements. Chapter 3 explains how the AT91CAP9-STK board boots and how the different binaries are installed into the flash memories. Chapter 4 details the installation instructions, letting you install the delivered binaries on the board. Chapter 5 explains how to rebuild all the binaries from source, in case you want to customize some of them. Chapter 6 shows how to develop a sample Linux application and run it on the board. The procedure is heavily based on the work done for AT91SAM systems, and the reading of the information which can be found at http://www.linux4sam.org is strongly recommended. 4/11

2 Requirements 2.1 Hardware requirements an AT91CAP9 starter kit (AT91CAP9-STK), composed of: AT91CAP9-STK board ; 5V power supply ; USB Device Cable (type A-B connector); serial Cross Cable (Female-Female) ; a serial terminal emulator (HyperTerminal, minicom, etc.) a Windows XP host (or above) to run the SAM-BA tool. a Linux host to rebuild the binaries (if wanted) 2.2 Software requirements a serial terminal emulator (HyperTerminal, minicom, etc.) the AT91CAP9-STK Linux package, containing: AT91 ISP 1.12 (or higher) ; containing the SAM-BA tool at91-isp_1.12b_patch.zip : SAM-BA patch for new Nand memory support prebuilt binaries for AT91Bootstrap, u-boot, Linux kernel, root filesystem sources and patches for AT91Bootstrap, u-boot and Linux kernel cross-compiler for rebuilding the binaries 5/11

3 Linux on AT91CAP9-STK architecture 3.1 Supported features The AT91CAP9STK supported features are listed below. U-Boot features : SDRAM Serial port DBGU Timer PIT Nand Flash with ECC soft Ethernet Linux kernel features : SDRAM Interrupt Controller AIC Timer PIT Serial port DBGU LEDs USB Host OHCI USB High Speed Device SPI TWI MCI : handles SD card Nand Flash with ECC soft LCDC Ethernet Touchscreen RTC (using RTT) 6/11

3.2 Boot sequence The AT91CAP9-STK board has only boot configuration, boot from NandFlash. BMS is always high level (BMS=1). The only one bootable memory present on the board is a NandFlash. A jumper is present on the board for the NandFlash chip select line. At power on, the ROM Code contained in the embedded ROM is executed. The ROM Code : initializes the hardware tries to locate a bootable program in a bootable memory (NandFlash, SDcard, DataFlash/SerialFlash, TWI eeprom) if the bootable program is found, it is downloaded into the SRAM and started if no bootable program is found, the SAM-BA monitor is executed. SAM-BA monitor waits for transactions on the USB device port or on the DBGU serial port. The SAM-BA application running on a PC can then be used to program flash memories. The Linux boot sequence on the AT91CAP9-STK involves several binaries: ROM Code Bootstrap: a small (need to be small enough to be downloaded into the 32 KB SRAM of the AT91CAP9) bootstrap code which does basic hardware initializations (flash and SDRAM), downloads a bigger binary from the external flash into the external SDRAM and launches it. U-Boot: this is the standard Linux boot loader, an interactive program which downloads the Linux kernel from the flash or from the network (using the TFTP protocol) into the SDRAM, pass some parameters to the kernel and launches it. Linux Kernel: the kernel does the full hardware initializations and loads the applications from a root file-system. Root file-system: this is a standard Linux file-system containing user applications. 3.3 NandFlash memory map Name Start offset Size Bootstrap 0x0000_0000 0x4000 U-Boot 0x0002_0000 0x30000 U-Boot environment 1 0x0006_0000 0x20000 U-Boot environment 2 0x0008_0000 0x20000 Linux kernel 0x000A_0000 0x200040 Linux root file-system 0x002A_0000 0x5C0000 7/11

4 Installation 4.1 NandFlash installation 1. Insert the AT91CAP9-STK Linux CD in the CDROM drive, and extract the linux-at91cap9stkbinary.zip file contents somewhere on your hard drive. 2. Install SAM-BA 1.12 (part of AT91 ISP tools) on the Windows PC. Install the SAM-BA patch (at91-isp_1.12b_patch.zip). Please refer to http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3883 for further instructions, as well as the SAM-BA User Manual. 3. Launch the serial terminal emulator, set it for handling connections at 115200 8N1 (115200 bps, 8 bits data connection, no parity, 1 stop bit) 4. Connect the AT91CAP9-STK evaluation board components: connect the 5V power supply on the AT91CAP9-STK board ; connect the serial cable between the DBGU port on the AT91CAP9-STK board and a serial port on the PC; connect the USB device cable between the HI-SPEED USB port on the AT91CAP9-STK board and a USB host port on the PC; 5. Ensure the jumper J66 (NandFlash Chip Select) is opened 6. Press the FORCE ON button (S4) 7. The USB connection between the PC and the board should establish (ATMEL AT91xxxxx Test Board does appear in taskbar notification area) ; 8. Close jumper J66. 9. Double-click on one of the scripts in the linux-at91cap9stk-binary folder (where you extracted the zip file). You can choose between: at91cap9stk-console-nd.bat : installs a text (console based) embedded Linux in the NAND flash ; at91cap9stk-x11-nd.bat : installs a graphical embedded Linux in the NAND flash ; 10. Wait a few minutes for the flash to be written ; 11. When the logfile.log appears, remove the USB cable ; 12. Power cycle the board ; 13. The Linux demo will automatically start, you can follow the progress in the serial terminal. If you have installed the graphical Linux image you can proceed with the calibration of the LCD screen (follow the on screen instructions) ; 14. You can log into the system on the serial terminal using the root account (no password) ; 15. Once logged, you can activate the network using (replace with your own MAC and IP addresses): ifconfig eth0 hw ether 00:01:02:03:04:05 192.168.1.42 8/11

5 Rebuild from source You can easily rebuild the provided binaries (Bootstrap, U-Boot, Linux kernel) on a Linux machine (the development was done on an Ubuntu 7.10 machine, but any recent Linux distribution should work, provided the development packages are installed). 1. Insert the AT91CAP9-STK Linux CD in the CDROM drive, and extract the linux-at91cap9stksource.zip file contents somewhere on your hard drive: $ mkdir ~/at91cap9 $ cd ~/at91cap9 $ unzip /media/cdrom/linux-at91cap9stk-source.zip $ cd linux-at91cap9stk-source 2. At the top of the directory where you extracted the file you'll find a Makefile file. Using a standard editor (vi, emacs) you can modify at the top of this file the location where temporary files will be placed (BUILD) and the location where the result of the compile process will be stored (CROSS): $ emacs Makefile 3. Type make and wait a few minutes for the compile to end ; $ make 4. CROSS contains a full cross-compiler installation you can use to develop Linux applications for the AT91CAP9-STK board. You can copy this cross-compiler to a system-wide location for further use: $ su - # cp -r /tmp/cross /usr/local/at91cap9stk 5. You will find the Bootstrap, U-Boot and Linux kernel binaries in the target subdirectory of CROSS: $ ls /usr/local/at91cap9stk/target/ 6. If you want to rebuild the root file-system, you need to follow the instructions at http://www.linux4sam.org. 9/11

6 Develop a sample Linux application A sample demo application is provided on the CD and can serve as a basis for developing your Linux application. 1. Install the cross-compiler as seen in Chapter 5 ; 2. Make sure the cross-compiler binaries are in your PATH, for example if your shell is bash: $ export PATH=$PATH:/usr/local/at91cap9stk/bin You will probably want to make this setting permanent by modifiying your shell's startup files (~/.bashrc). 3. Insert the AT91CAP9-STK Linux CD in the CDROM drive, and extract the linux-at91cap9stkhelloworld.zip file contents somewhere on your hard drive: $ mkdir ~/at91cap9 $ cd ~/at91cap9 $ unzip /media/cdrom/linux-at91cap9stk-helloworld.zip $ cd linux-at91cap9stk-helloworld 7. Compile the example using the Makefile file: $ make 8. Copy the binary to the AT91CAP9-STK board over the network: first, start the network on the AT91CAP9-STK board: at91cap9 $ ifconfig eth0 hw ether 00:01:02:03:04:05 192.168.1.42 then assign a password to the root user on the AT91CAP9-STK board: at91cap9 $ passwd and finally copy the binary from the PC to the AT91CAP9-STK board: $ scp helloworld root@192.168.1.42:/home/root/ 9. Alternatively, if using a NFS mounted root file system, you can simply copy the binary to the destination: $ cp helloworld /nfsroot/angstrom-x11-image-demo-glibc/home/root 10. On the AT91CAP9-STK board, execute the binary: at91cap9 $ cd /home/root at91cap9 $./helloworld 11. If you want helloworld to be run on each boot, create a sample boot script: at91cap9 $ echo #! /bin/sh > /etc/init.d/helloworld.sh at91cap9 $ echo /home/root/helloworld & >> /etc/init.d/helloworld.sh at91cap9 $ chmod +x /etc/init.d/helloworld.sh at91cap9 $ update-rc.d helloworld.sh defaults 99 10/11

7 References Linux on AT91SAM products: http://www.linux4sam.org CodeSourcery cross-compiler: http://www.codesourcery.com/gnu_toolchains/arm U-Boot manual: http://www.denx.de/wiki/dulg/manual Linux kernel distribution site: http://www.kernel.org/ Linux Angstrom distribution: http://www.angstrom-distribution.org/ 11/11