The embedded Linux quick start guide lab notes



Similar documents
Buildroot Workshop. Libre Software Meeting Thomas Petazzoni Free Electrons

Pwn Plug Community Edition 1.1 Installation Guide

VoIP Laboratory B How to re flash an IP04

Getting started with ARM-Linux

Procedure to Create and Duplicate Master LiveUSB Stick

SheevaPlug Development Kit README Rev. 1.2

Application Development Kit for Android Installation Guide

Building an audio player using the Texas Instruments OMAP-L137

PBX DIGITAL TELEPHONE EXCHANGE MAINTENANCE GUIDE

Track One Building a connected home automation device with the Digi ConnectCore Wi-i.MX51 using LinuxLink

Quick Start Guide. Quick Start Guide. taskit GmbH. for Portux920T EU / SW Portux Mini-PC Portux Panel-PC Panel-Card MoLUX Stamp

Version 1.0. File System. Network Settings

[HOW TO RECOVER AN INFINITI/EVOLUTION MODEM IDX ] 1

Network/IP Camera Set up and Re-programming. Leopard Imaging Inc. Jan, 2013.

APPLICATION NOTE. How to build pylon applications for ARM

Embedded Linux development training 4 days session

Changing Password for Ingate Firewalls/SIParators Rickard Nilsson

AVR32737: AVR32 AP7 Linux Getting Started. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

Building a Penetration Testing Virtual Computer Laboratory

Update on filesystems for flash storage

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

opensuse for ARM On Your Device Sonntag, 21. Oktober 12

USB 2.0 Flash Drive User Manual

The Embedded Linux Quick Start Guide In the Beginning... Embedded Linux Conference Europe 2010

Matrix 510/520 User Guide

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

HotelTV. Client Software Update REV A0.10 D October. Web : Mail : support@vestek.com.tr Tel :

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

3.1 Connecting to a Router and Basic Configuration

Create a virtual machine at your assigned virtual server. Use the following specs

Software Prerequisites Linux Ubuntu LTS. Estimated completion time: 15min. The goal of this hands-on is to:

RMLL Hello. thank you for coming

How Do I Recover infiniti Remotes and Line Cards?

Update on filesystems for flash storage

Virtual machine W4M- Galaxy: Installation guide

Wireless Mobile Broadband Setup Guide for Linux OS

AXE027 PICAXE USB CABLE

HOWTO configure Xinu under Virtual Box

HotelTV1. Client Software Update REV A0.6 D October. Web : Mail : support@vestek.com.tr Tel :

BeagleBone Black: Installing Operating Systems

An Embedded Wireless Mini-Server with Database Support

EDS1100/2100. VMware Image for Linux Software Developers Kit (SDK) Quick Start Guide

file://d:\webs\touch-base.com\htdocs\documentation\androidplatformnotes52.htm

Update Firmware from GUI

Introduction to Operating Systems

CDH installation & Application Test Report

PARALLELS SERVER 4 BARE METAL README

Embedded Linux Systems

Survey of Filesystems for Embedded Linux. Presented by Gene Sally CELF

SETTING UP A LAMP SERVER REMOTELY

INASP: Effective Network Management Workshops

Buildroot for Vortex86EX (2016/04/20)

NetPoint Configuration Guide. for thin clients

Partek Flow Installation Guide

Sistemi ad agenti Principi di programmazione di sistema

Comodo MyDLP Software Version 2.0. Installation Guide Guide Version Comodo Security Solutions 1255 Broad Street Clifton, NJ 07013

FRM301 SNMP Upgrade Procedure

Cosmic Board for phycore AM335x System on Module and Carrier Board. Application Development User Manual

Embedded Linux Training. Lab Book. free electrons

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

PARALLELS SERVER BARE METAL 5.0 README

Atcom IP-04 User Manual

Accessing RCS IBM Console in Windows Using Linux Virtual Machine

Administrasi dan Manajemen Jaringan 2. File Transfer Protocol (FTP)

Embedded Linux Systems

How to install PowerChute Network Shutdown on VMware ESXi 3.5, 4.0 and 4.1

This techno knowledge paper can help you if: You need to setup a WAN connection between a Patton Router and a NetGuardian.

Reboot the ExtraHop System and Test Hardware with the Rescue USB Flash Drive

Using Network Attached Storage with Linux. by Andy Pepperdine

Howto: Changing Password for an Ingate Firewall 1450/1500/1550/1600/1650/1900 or Ingate SIParator 45/50/55/60/65/90

Basic Router and Switch Instructions (Cisco Devices)

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

How to Create, Setup, and Configure an Ubuntu Router with a Transparent Proxy.

Syncplicity On-Premise Storage Connector

Chipsee Embedded Industrial Computer Android User Manual V1.0.1

Accessing I2C devices with Digi Embedded Linux 5.2 example on Digi Connect ME 9210

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

February Fabric OS. Password Recovery Notes. Supporting Fabric OS v6.x, v5.x, v4.x, v3.x, v2.6.x

NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

Lab 3 Routing Information Protocol (RIPv1) on a Cisco Router Network

Remote Unix Lab Environment (RULE)

USB Stick Driver Installation Instructions

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

Moxa Device Manager 2.0 User s Guide

Yocto Project Eclipse plug-in and Developer Tools Hands-on Lab

Honeywell Internet Connection Module

INF-110. GPFS Installation

AlienVault. Unified Security Management x Offline Update and Software Restoration Procedures

Evaluating the Balabit Shell Control Box

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

IBM Security QRadar Version Installing QRadar with a Bootable USB Flash-drive Technical Note

Ubuntu Linux Operating System Installation Guide

Plexxi Control Installation Guide Release 2.1.0

Pearl Echo Installation Checklist

Ultra Thin Client TC-401 TC-402. Users s Guide

NI Real-Time Hypervisor for Windows

Workshop Intel Galileo Board

Deploy the ExtraHop Discover Appliance with Hyper-V

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

Transcription:

The embedded Linux quick start guide lab notes Embedded Linux Conference Europe 2010 Date: Tuesday 26th October Location: DeVere University of Arms Hotel, Cambridge Room: Churchill Suite Presenter: Chris Simmonds, chis@2net.co.uk Copyright 2010, 2net Limited 1. Overview These notes are to help you get up and running with embedded Linux on the LPC3250 stick. They were tested using Ubuntu 10.04 Desktop i386: they will probably work on other configurations as well, with a little tweaking... At this point, you should have A laptop with a version of Linux installed, for example Ubuntu 10.04, with these packages patch ncurses-devel nfs-kernel-server tftpd-hpa minicom 1 Ethernet cross-over cable Set the IP address of the Ethernet port to be 192.168.1.1. You should have downloaded these files: http://www.embedded-linux.co.uk/downloads/elce-2010-linux-quickstart.tar.bz2 and either: http://www.angstrom-distribution.org/toolchains/angstrom-2010.4-test-20100422- i686-linux-armv5te-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2 or: http://www.angstrom-distribution.org/toolchains/angstrom-2010.4-test-20100421- x86_64-linux-armv5te-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2-1 -

2. Install the tool chain Embedded Linux quick start guide lab notes First you need to install a tool chain for the target processor, which is an ARM926JE so you need a compiler that will generate armv5te instructions. For 32-bit Linux install it like so (assuming that the file is in your ~/Downloads directory): cd / sudo tar xjf ~/Downloads/angstrom-2010.4-test-20100422-i686-linux-armv5telinux-gnueabi-toolchain-qte-4.6.2.tar.bz2 For 64-bit Linux: cd / sudo tar xjf ~/Downloads/angstrom-2010.4-test-20100421-x86_64-linuxarmv5te-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2 Add this line to.profile or.bash_profile PATH=/usr/local/angstrom/arm/bin/:$PATH Then log out and back in to pick up the change in your current session. Test that it works Compile a small program, called hello-arm.c in this example, to make sure everything is set up correctly. arm-angstrom-linux-gnueabi-gcc hello-arm.c -o hello-arm Then: $ file hello-arm hello-arm: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped 3. Compile the kernel Extract the files for the target board into your home directory: cd ~ tar xjf ~/Downloads/elce-2010-linux-quickstart.tar.bz2 Extract the kernel and apply the board support package: cd ~ tar xjf ~/elce-2010-linux-quickstart/linux-2.6.34.tar.bz2 cd linux-2.6.34 patch -p 1 < ~/elce-2010-linux-quickstart/linux-2.6.34-lpc3250-bsp.patch Copy the mkimage utility that is needed to create the U-Boot header sudo cp ~/elce-2010-linux-quickstart/mkimage /usr/local/angstrom/arm/bin - 2 -

Select the default configuration for the target and build a kernel with the U-Boot header: export ARCH=arm export CROSS_COMPILE=arm-angstrom-linux-gnueabimake lpc3250stick_defconfig make oldconfig make uimage Check: vmlinux size = 36145312 uimage size = 1672876 Later on you will load the kernel onto the target using the tftp daemon that you (should have) installed earlier, so copy uimage from arch/arm/boot to the top-level directory of the tftp server. If you are using Ubuntu and the tftpd-hpa package, that will be /var/lib/tftpboot so the command will be sudo cp arch/arm/boot/uimage /var/lib/tftpboot Other tftp daemons or Linux distributions may use a different directory. Typing ps ax grep tdtpd should give you a clue. 4. Create the root file system Finally, extract the Ångström root file system cd ~ mkdir rootdir cd rootdir sudo tar xjf ~/elce-2010-linux-quickstart/rootdir-lpc3250-stick.tar.bz2 You will be using NFS to mount it; you should have installed the nfs server earlier. Now you need to export the root directory for the project, so edit the /etc/exports (you will need root permissions) and add the path as shown below, replacing [your user name] with your actual user name: /home/[your user name]/rootdir *(rw,sync,no_subtree_check,no_root_squash) Restart the server sudo /etc/init.d/nfs-kernel-server restart 5. Boot up! Load the FTDI USB-serial driver with the vendor and product IDs used by the LPC3250 stick: sudo modprobe ftdi_sio vendor=0x0640 product=0x0026 Type minicom -s to start it in setup mode. Select serial port setup and press 'a' to change the Serial Device to /dev/ttyusb1. Press 'e' and select speed 115200 no parity - 3 -

8 data bits, one stop bit (1152008N1) and press enter. Select No hardware flow control and no software flow control. Press enter, then select Save setup as dfl and press enter again. Finally Exit from Minicom. Plug the LPC stick into the COM board and plug your Ethernet cross-over cable between the COM board and your laptop, as shown: Plug the LPC stick into a USB port, wait for a couple of seconds to allow udev to create the device node /dev/ttyusb1 and then start minicom with line-wrap turned on using the command minicom -w. You should see these messages: LPCStick 3250 Board Build date: Oct 8 2010 09:53:50 U-Boot 2009.03-rc1 (Sep 24 2010-05:09:44) DRAM: 64 MB NAND: 128 MiB In: serial Out: serial Err: serial Hit any key to stop autoboot: 3 Configure U-Boot to load uimage and boot Linux, mounting the root file system over NFS: setenv ipaddr 192.168.1.101 setenv serverip 192.168.1.1 setenv npath /home/[your name]/rootdir setenv console console=ttys0,115200n8 setenv bootargs ${console} root=/dev/nfs rw nfsroot=${serverip}:${npath} ip=${ipaddr} ethaddr=${ethaddr} saveenv - 4 -

Load the kernel to RAM address 0x80100000 and boot it: tftp 80100000 uimage bootm 80100000 If all goes well, you should see the kernel load, boot and mount its root and finally print a login prompt on the console. Note: there seems to be a problem logging in on the serial console in the current version of the BSP. Instead, log on over the network using ssh: Log on ssh root@192.168.1.101 Log on as root, no password, and have a look round, for example: What is the kernel command line? (cat /proc/cmdline) What type of CPU? (cat /proc/cpuinfo) What processes are running? (ps) How much free memory? (free) What type of file systems are mounted? (cat /proc/mounts) On your laptop, copy your hello-arm program to ~/rootdir/usr/bin and run it on the target. 6. Put the kernel into flash On your laptop, copy uimage to ~/rootdir On the target, install the mtdutils package, which includes the flash_eraseall command that you will use next: opkg install /ipk/mtd-utils_1.3.1-r0.5_armv5te.ipk Then, flash_eraseall /dev/mtd0 nandwrite -p /dev/mtd0 /uimage reboot In U-Boot setenv bootcmd nand read 80100000 1000000 200000\;bootm 80100000 saveenv boot The stick should boot up as before, but this time without loading the uimage file via tftp. - 5 -

7. Put the root file system into flash On your laptop cd ~/rootdir sudo tar cf rootdir.tar * On the target, from a Linux shell flash_eraseall /dev/mtd1 mount -t jffs2 mtd1 /mnt cd /mnt tar xf /rootdir.tar reboot Then in U-Boot, setenv bootargs console=ttys0,115200n8 root=/dev/mtdblock1 rw rootfstype=jffs2 setenv bootcmd nand read 80100000 1000000 200000\;bootm 80100000 saveenv boot Now the stick should boot up entirely from flash: you should be able to remove the Ethernet cable and boot it by typing reboot. 8. Other things to try Using the Angstrom package feeds You will need to connect your LPC Stick to the Internet, which is as simple as connecting to a network with a DHPC server because, as you will see if you look at /etc/network/interfaces, eth0 is defined as iface eth0 inet dhcp. This rule is not executed if you mount the root file system over NFS, but once you have put the root into flash memory it will be. Then you need to load the package meta information with: opkg update And then you can list all packages and those installed with opkg list opkg list_installed Some packages that you may find useful gdbserver For remote debugging using gdb oprofile System profiling tools procps Full versions of process utilities, including ps strace System trace utilty thttpd A small web server - 6 -