ARM Hands on Workshop - Getting Started with Linux 1 - 1
Getting Started with Linux
Copyright © 2010 Texas Instruments. All rights reserved.
Getting Started with LinuxGetting Started with LinuxOn TIOn TI’’s ARM Processorss ARM Processors
Texas InstrumentsTexas InstrumentsApplication ProcessorsApplication ProcessorsOMAP
OMAP35x
™
™
DaVinciDM35x/DM64xx
™
Sitara™
®ARM
Learning Objectives Workshop Goal and Objectives
Describe three basic parts of LinuxList various Linux distro’s available for TI processorsDescribe where to find Linux distributions for TI processors ( such as the AM3517 )Chart boot process for TI processors running LinuxBoot AM3517 to Gnome desktop; both local & remoteExamine Linux networking
Set Linux network configurationsSetup and transfer via NFS and SambaHost (and access) an HTTP server
“Get an introduction to Linuxrunning on the AM3517 EVM.”
Welcome
1 - 2 ARM Hands on Workshop - Getting Started with Linux
Topics Getting Started with Linux....................................................................................................................... 1-1
Welcome.................................................................................................................................................. 1-3 Workshop Outline .............................................................................................................................. 1-3 Where To Go For More Info .............................................................................................................. 1-4
Device and Tools Overview .................................................................................................................... 1-6 TI ARM and ARM+DSP Devices and Families................................................................................. 1-6
Overview........................................................................................................................................ 1-6 Sitara (AM) .................................................................................................................................... 1-7 OMAP/DaVinci (DM).................................................................................................................... 1-9 Summary .......................................................................................................................................1-10
Tools Overview .................................................................................................................................1-11 Hardware Development Kits .........................................................................................................1-11 Software Development Kits (SDK)...............................................................................................1-12 SDK 4.x.........................................................................................................................................1-13
Investigating Linux.................................................................................................................................1-14 What Is It? .........................................................................................................................................1-14
1. Linux Boot ................................................................................................................................1-14 2. Linux Kernel .............................................................................................................................1-15 3. Linux Root Filesystem ..............................................................................................................1-15
Where Do I Get It? ............................................................................................................................1-16 What Are Distributions?................................................................................................................1-16 Operation System (O/S) Choices ..................................................................................................1-18 Community Options ......................................................................................................................1-19 DIY Linux .....................................................................................................................................1-21 Commercial Options .....................................................................................................................1-23 Commercial vs Community ..........................................................................................................1-23
How Do I Build Linux – and Why?...................................................................................................1-26 Don’t .............................................................................................................................................1-26 Build Default Linux ......................................................................................................................1-26 Build ‘Custom’ Linux Kernel........................................................................................................1-27 Linux Kernel – Static vs Dynamic ................................................................................................1-28
TI Customer (Linux) Support ............................................................................................................1-29 Basic Linux Commands.....................................................................................................................1-30
Boot Linux..............................................................................................................................................1-31 Overview ...........................................................................................................................................1-31 Customizing UBL / Xloader – for your board ...................................................................................1-32
Das U-Boot ...................................................................................................................................1-32 Where are the U-boot, Kernel and Filesystem Found?......................................................................1-34
Working with Linux................................................................................................................................1-39 X Window, X, or x11 ........................................................................................................................1-39 Desktop Manager (GNOME) ............................................................................................................1-40 Remote/Exporting Desktop ...............................................................................................................1-41
Hands-On Lab Exercises .......................................................................................................................1-43 Lab Descriptions................................................................................................................................1-43 Lab Diagrams ....................................................................................................................................1-44
Welcome
ARM Hands on Workshop - Getting Started with Linux 1 - 3
Welcome
Workshop Outline Getting Started with Linux Workshop
Copyright © 2010 Texas Instruments. All rights reserved.
Welcome Workshop GoalsAgendaWhere to Get More Info
Device/Tools Overview TI Devices with Linux SupportHardware Development PlatformsSoftware Development Kits
Linux What Is It?Where Do I Get It?How Do I Build It?
Booting Linux Tracing the Boot ProcessCustomizing Boot for Your BoardDas U-Boot
Working In Linux X-WindowsGNOMENetworking
Copyright © 2010 Texas Instruments. All rights reserved.
Lab ExercisesLab 1: Connect and boot the AM3517 EVM
Boot the AM3517 from an SD/MMC card.Lab 2: Start Gnome (Linux GUI) desktop running on the AM3517 EVM
There are four parts to this lab which correspond to the four different ways that you can invoke Gnome:
a. Automatically start GNOME on the AM3517 EVM’s LCDb. Manually start GNOME on the AM3517 EVM’s LCDc. Display the GNOME GUI remotely on the host PC via secure SSH connectiond. Export the GNOME GUI onto the host PC
Lab 3: Running video (and audio) on the AM3517a. Play a .wmv video movie trailerb. (Take Home Lab) View video from a USB Webcam c. (Take Home Lab) Listen to audio via USB speakers
Lab 4: Investigating Linux Networking with the AM3517a. Configure Linux Ethernet connection, both temporarily and permanentlyb. Configure a Samba Serverc. Configure an HTML Server
Welcome
1 - 4 ARM Hands on Workshop - Getting Started with Linux
Where To Go For More Info Where can I get additional skills? (from TI)
C6000 Optimization Workshop (4-days)www.ti.com/training
Developing Algo’s for C6x DSP’s( Are you writing/optimizing algorithms for latest C64x+ or C674x DSP’s CPU’s )
Texas Instruments Curriculum
DaVinci Open-Source Linux Mail Listhttp://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Gstreamer and other projectshttp://linux.davincidsp.com or https://gforge.ti.com/gf/TI Softwarehttp://www.ti.com/dvevmupdates, http://www.ti.com/dmshttp://www.ti.com/myregisteredsoftware
Online Resources:
OMAP / Sitara / DaVinci Wikihttp://processors.wiki.ti.com
TI E2E Community (videos, forums, blogs)http://e2e.ti.com
This workshop presentation & exercises
System Integration Workshop using DSP/BIOS(4-days)www.ti.com/training
Building BIOS based Systems( DSP processors )
DaVinci / OMAP / Sitara System Integration Workshop using Linux (4-days)www.ti.com/training
Building Linux based Systems( ARM or ARM+DSP processors )
http://processors.wiki.ti.com/index.php /AM3517_On-line_Workshop
Where can I get additional skills? (Non-TI)
“Building Embedded Linux Systems”, by Karim Yaghmour“Embedded Linux Primer”, by Christopher Hallinanfree-electrons.com/training
Embedded Linux
“Beginning Linux Programming” Third Edition, by Neil Matthew and Richard StonesLinux Application Programming
“The Art of Digital Video”, John Watkinson“Digital Television”, H. Benoit“Video Demystified”, Keith Jack “Video Compression Demystified”, Peter Symes
Video
http://www.arm.com/ARM Programming(not required for Linux based designs)
“Linux Device Drivers” Third Edition, by Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman http://lwn.net/Kernel/LDD3/www.adeneo.com
Writing Linux Drivers
A few references, to get you started:Non-TI Curriculum“Linux For Dummies”, by Dee-Ann LeBlanc “Linux Pocket Guide”, by Daniel J. Barrettfree-electrons.com/trainingwww.linux-tutorial.info/index.phpwww.oreilly.com/pub/topic/linuxThe Linux Documentation Project: www.tldp.orgRute Linux Tutorial: http://rute.2038bug.com/index.html.gz
Linux
Welcome
ARM Hands on Workshop - Getting Started with Linux 1 - 5
Other TechDay Sessions
Find These Workshop Materials
http://processors.wiki.ti.com/index.php/AM3517_On-line_Workshop
Device and Tools Overview
1 - 6 ARM Hands on Workshop - Getting Started with Linux
Device and Tools Overview
TI ARM and ARM+DSP Devices and Families
Overview
TI Embedded Processors Portfolio
32-bit ARMCortex™-M3
MCUs
16-bit ultra-low power
MCUs
High-performance
DSPs
ARM Cortex-A8
MPUsLow-power
DSPs
Stellaris®
ARM® Cortex™-M3 C5000™MSP430™Sitara™
ARM® Cortex™-A8& ARM9
C6000™
DaVinci™
TI Embedded ProcessorsDigital Signal Processors (DSPs)Microcontrollers (MCUs) ARM®-Based Processors
OMAP™
Software & Dev. Tools
Up to 100 MHz
Flash64 KB to 256 KB
USB, ENET MAC+PHYCAN, ADC, PWM, SPI
Connectivity, Security,Motion Control, HMI,Industrial Automation
$1.00 to $8.00
300MHz to >1GHz
Cache, RAM, ROMUSB, CAN,PCIe, EMAC
Industrial computing, POS & portable
data terminals$5.00 to $20.00
Up to 25 MHz
Flash1 KB to 256 KB Analog I/O, ADCLCD, USB, RFMeasurement,
Sensing, General Purpose
$0.49 to $9.00
Up to 300 MHz+Accelerator
Up to 320KB RAMUp to 128KB ROM
USB, ADC McBSP, SPI, I2C
Port. Telecom, audio, medical monitor & diag, industrial$3.00 to $10.00
300MHz to >1GHz+Accelerator
CacheRAM, ROM
USB, ENET, PCIe, SATA, SPI
Test & Meas., Video, audio, security ,
imaging, infrastructure $5.00 to $200.00
32-bit real-time
MCUs
C2000™
Delfino™
Piccolo™
40MHz to 300 MHz Flash, RAM
16 KB to 512 KB
PWM, ADC, CAN, SPI, I2CMotor Control, Digital Power,
Lighting, Ren. Energy$1.50 to $20.00
Preliminary - Subject to Change
OMAP™ 3 Processors Roadmap
Incr
ease
d Pe
rfor
man
ce
2009
AMxxxNext
500 MHz Cortex -A83D GraphicsDDR2/EMAC/CAN/USB PHY/3.3V I/OProduction-1Q10
720MHz Cortex -A8C64x+ DSP w/ Video Accelerator3D GraphicsSampling-Dec 09
OMAP3530ARM+DSP+Gfx
600 MHz Cortex A8 (720MHz option)C64x+ DSP w/ Video Accelerator3D GraphicsIn production now
AM/DM37xARM+DSP+Gfx
2010
DM NextARM+DSP+Gfx
20112008
AM NextARM+Gfx+Acc.
AM3517ARM + Gfx
450+MHz ARM
Future
Sampling
In Development
In Production
Commercial temp range speeds are shown
Brand TransitionOMAP Sitara – AM
Digital Media – DM
Device and Tools Overview
ARM Hands on Workshop - Getting Started with Linux 1 - 7
Sitara (AM)
TI Confidential – NDA Required
Sitara® offersScalability• Largest software compatible ARM MCU &
Embedded MPU portfolio• Scale from ARM only to ARM + accelerator
functionality while reusing both SW and HW designs
• Scale by leveraging our extensive portfolio of embedded ARM devices to maximize your product’s changing needs
Performance• 345 MHz ARM9 to >1GHz Cortex-A8 devices• Industry’s first widely available Cortex-A8 devices - 2 DMIPs per MHz• Graphics Acceleration for 18+ Mpolygons/sperformance for advanced user interface • High speed DDR2 memory performance
Connectivity• Ethernet• CAN 2.0 and High speed USB interface• Multiple serial port options per device• Lowest cost processor with SATA interface• Flexible LCD controller for up to 1024 x 720 resolution• Industrial peripheral support (Industrial ENET, etc via TI programmable real time unit (PRU))
• Free and easy access to software• Low cost development tools with reference
code• Application specific and advanced
development kits • Aggressive Linux community, WinCE, and
RTOS ecosystem of development partners• Driver software available for most high level
operating systems
Strength of Software
7
Sitara™ ARM® Microprocessors
OMAP3503/3515AM3505/3517
Advanced Cortex-A8 with flexible peripherals
• High performance general purpose processor
• Extensive peripheral integration for reduced eBOM costs
• Integrated graphics for rich user interface functions
ARM Cortex-A8
In Development
AM3703/3715 (2Q10)AM3x Next (2011)AM1x Next (2011)
Advanced Cortex-A8 with flexible peripherals
• Higher performance• Power efficient• Enhanced graphics/UI• Enhanced integrated
peripherals- 1G Ethernet, PCIe
• Application scalability
ARM Cortex-A8
AM1705 (1Q10)AM1707 (1Q10)AM1806 (1Q10)AM1808 (1Q10)
Low power ARM9 with Integrated peripherals• Power efficient• Cost efficient• Flexible industrial I/O• Integrated peripherals
- 10/100 Ethernet, USB, CAN• Low system cost
ARM9
Available Now
Device and Tools Overview
1 - 8 ARM Hands on Workshop - Getting Started with Linux
Preliminary - Subject to Change
AM3517(05) ProcessorApplications include:
Digital Signage, Industrial Computing, Networking Processor, Remote Controls, Human Machine Interface
BENEFITSLaptop-like performance at green computing power levelsIntuitive cutting edge User Interfaces enabled by 3D graphics accelerationHigh-levels of system integration yield lower BOM costs for Industrial applications.
FeaturesCore
Cortex™A-8 w/NEON™ SIMD Coprocessor, 500 MHz2D/3D Graphics Engine-Up to 10M polygons per second
MemoryARM®: 16 kB I-Cache; 16 kB D-Cache; 256kB L2On Chip: 64kB SRAM; 128kB ROM
Peripheral HighlightsSupport for LPDDR, DDR2USB 2.0 HS Compliant Host and OTG Controllers RMII EMAC controllerHECC – Can ControllerNative 3.3V IO interfacesDisplay subsystem with PIP, color space conversion, rotation, and resizing support
Packages: Samples now, Production 1Q10ZCN: 17 x 17 mm 0.65 mm pitch Via Channel™ Array (0.8mm pitch plus design rules).ZER: 23 x 23 mm 1.00 mm pitch
ARM®
Cortex™-A8CPU
L3/L4 Interconnect
Peripherals
Program/Data StorageI2Cx3
Seria l Interfaces
Display Su bsystem
Connectivity
MMC/SD/
SDIOx3
USB 2.0 HSOTG PHYController
GPMC
SDRCUARTx3
UARTw/IRDA
McBSPx5
McSPIx4
TimersGP x12WDT x1
POWERVR SGX™
Graphics
HDQ /1-wire
10 b it DAC10 b it DAC
LCDCont-roller
EMACUSB 2.0 HSControl ler
VideoEnc
HECC
16-bit VideoInp ut
Video Processing F ron t End
DDR2
USB Phy
EMAC
Native3.3 V I/O
InterfacesHECC CANController
POWERVR SGX™ 3D eng ine is lic ense d fr om Ima gina tion Tec h. L td.
Preliminary - Subject to Change
AM3517(05) Processor
ARM®
Cortex™-A8CPU
L3/L4 Interconnect
Peripherals
DisplaySubsystem
POWERVR SGX™Graphics
10 bit DAC10 bit DAC
LCDCo ntroller
VideoEnc
16-bit VideoInput
Video ProcessingFront End
USB Phy
EMAC
Native3.3 V I/O
InterfacesHECC CANController
POWERVR SGX™ 3D eng ine is lic ense d fr om Ima gina tion Tec h. L td.
Program/Data Storage
I2Cx3
Serial Interfaces
Connectivity
MMC/SD/
SDIOx3
USB 2.0 HSOTG PHYController
GPMC
SDRCUARTx3
UARTw/IRDA
McBSPx5
McSPIx4
TimersGP x12WDT x1
HDQ /1-wire
EMACUSB 2.0 HSController
HECC
DDR2
AM1808/06 Processors Unmatched Connectivity & Integration for Power-Efficient Processors
Example Applications:• Industrial Automation• Home Automation• Test & Measurement• Portable Data Terminals
Benefits:• Multiple connectivity and
interface options• Rich, intuitive user
interfaces• High system integration• Reduced system cost
ARM9 Subsystem
ARM926EJ-S
CPU
Switched Central Resource (SCR) / EDMA
Program/Data Storage
I2C(2)
Serial Interfaces
Connectivity
WDTimer
System
PWM(3)
SATAUHPI USB2.0HS
UART (3)McASPSPI
(2)MMC/SD
(2)
Video IN/Out
USB 1.1
EMAC
LCD Controller
uPP
McBSP(2)
AsyncEMIF16-bit
mDDR/ DDR2/SDRAM16-bit
128KB RAM
PRU
The boxes with yellow border are features found in AM1808 and not in AM1806 AM1808/06
processors
Peripherals
Device and Tools Overview
ARM Hands on Workshop - Getting Started with Linux 1 - 9
ARM9 Subsystem
ARM926EJ-S
CPU
Switched Central Resource (SCR) / EDMA
Program/Data Storage
I2C(2)
Serial Interfaces
Connectivity
WDTimer
System
PWM(3)
SATAUHPI USB2.0HS
UART (3)McASPSPI
(2)MMC/SD
(2)
Video IN/Out
USB 1.1
EMAC
LCD Controller
uPP
McBSP(2)
AsyncEMIF16-bit
mDDR/ DDR2/SDRAM16-bit
128KB RAM
PRU
The boxes with yellow border are features found in AM1808 and not in AM1806 AM1808/06
processors
Peripherals
AM1808/06 Processors
High Speed ADCFPGA, or DSP
interfaceVGA LCD
Bluetooth Connectivity
CPU Core- ARM926EJ-S™ (MPU) up to 450 MHz
Memory- ARM:
- 16KB – L1 Program Cache- 16KB – L1 D ata Cache
- On-chip- 128KB R AM
- mDDR, DDR2, SDRAM
Peripherals (1.8/3.3V IOs)- 10/100 Ethernet MAC- Video Port I /F – Video In/Out *BT .656)- SATA, uPP- EMIFA – DDR (m DDR/DD R2)- EMIFB – SD RAM/NAN D/FLASH
Power (1.0-1.2V core, 1.8/3.3V IOs)- Ac tive < 182mW @ 300MH z/1.2V/25C (est im ate)- Standby < 7 mW @ 1.2V/25C (es timate)
Package–13 x 13mm nFBGA (0.65mm), ZCE , 361-balls–16 x 16mm BGA (0.8mm), ZWT, 361-balls–Extended Temperature Grade Options
–Commercial (0C to 90C) –Industrial (-40C to 105C )
–Pin to pin compat ible processors:–OMAP-L138/AM1806
OMAP/DaVinci (DM)
Preliminary - Subject to Change
PerformanceHigh-performance Superscalar ARM® Cortex™-A8 featuring NEON co-processor with imm ersive 3D Graphics acceleratorHD v ideo decode utiliz ing TMS320C64x+ DSP and video hardware acceleratorsLow power utilizing T I’s SmartReflex™ technology with opt ion for integrated and discrete Power Management ICs
FeaturesCores
Cortex A-8 with NEON™ SIMD Coprocessor / DSP-based TMS320C64x+ DSP and video accelerators (m ax performance only)
720 MHz / 520 MH z @ 1.35V (operat ing limits apply)600 MHz / 430 MH z @ 1.35V (operat ing limits apply)550 MHz / 400 MH z @ 1.27V
POWERVR SGX Graphics Engine - Up to 10M polygons per secondMemory
AR M:16 kB I-Cache; 16 kB D-Cache; 256kB L2
TMS320C64x+ DSP and video acceleratorsL1 32kB Program Cache/32kB D ata Cache + 48kB SRAML2 64kB Program / Data Cache + 32 kB SR AM; 16 kB ROM
On C hip: 64kB SRAM; 112kB ROMPeripheral Highlights
Support for LPDDRSupport for NOR, NAND, SRAM, Pseudo SR AMUSB 2.0 HS Com pliant OTG Controller w/ 2 addit ional USB Host Controllers Display subsystem with LCD and TV interface. Supports PIP, color space conversion, resize and rotation.Camera I /F with CCD controller and Image-pipe (Prev iew, Resize, Stat istics
Package 1 (CBB): 12x12 mm, 0.4mm pitch, Package On Package (POP); 515 pin PBGA; product ion: now; can be used with discrete memoryPackage 2 (CUS): 16x16 mm 0.65 m m pitch. 423 pin PBGA; production: now; Utilizes Via Channel™ Array Technology with 0.8mm pitch plus des ign rules.Package 3 (CBC): 14x14 mm , 0.5 mm pitch POP; 515 pin PBGA; production: now; must use POP mem ory
ARM®
Cortex™-A8
CPU
L3/L4 Interconnect
C64x+™ DSP and video
accelerators (3525/3530 only)
Peripherals
Program/Data Storage
System
I2Cx3
Serial Interfaces
Display Subsystem
Connectivity
MMC/SD/
SDIOx3
USBHost
Control ler x3
USB 2.0 HSOTG
Controller
GPMC
SDRCUARTx2
UARTw/IRDA
McBSPx5
McSPIx4
TimersGP x12WDT x2
Image Pipe
Parallel I/F
Camera I /FPOWERVR SGX™ Graphics(3515/3530 only)
HDQ /1-wir e
OMAP35x Processor
Applications include:Automotive Infotainm ent
In-dash navigationConsumer
PNDPMPDigital Video Camera
MedicalPatient monitoringPortable ultrasound
IndustrialPoint of saleSmart white goods
10 bit DACVideoEn c 10 bit DAC
LCDCont-roller
OMAP35x processorLaptop like performance at handheld power level
Note: Peripheral limitations may apply among different packages
POWERVR SGX™ 3D eng ine is lic ense d fr om Ima gina tion Tec h. L td.
Device and Tools Overview
1 - 10 ARM Hands on Workshop - Getting Started with Linux
Preliminary - Subject to Change
ARM®
Cortex™-A8CPU
L3/L4 Interconnect
C64x+™ DSP and video
accelerators(3525/3530 only)
Peripherals System
Display Subsystem
Connectivity
Image Pipe Parallel I/F
Camera I/FPOWERVR SGX™ Graphics
(3515/3530 only)
Program/Data StorageI2Cx3
Serial Interfaces
MMC/SD/SDIO
x3
USB Host
Ctlr x3USB 2.0 HS
OTG Ctlr
GPMC
SDRCUART
x2UART
w/IRDA
McBSPx5
McSPIx4
TimersGP x12WDT x2
HDQ /1-wire
OMAP35x Processor
10 bit DACVid eoEnc 10 bit DAC
LCDCont-roller
OMAP35x processorLaptop like performance at handheld power level
Note: Peripheral limitations may apply among different packages POWERVR SGX™ 3D eng ine is lic ense d fr om Ima gina tion Tec h. L td.
Summary
Preliminary - Subject to Change
OMAP™ 3 Product Summary
DSP and Multimedia Processing
CoProcessorARM® Cortex™ -A8 Applications
Processing
PO WERVR SGX™ 3 D en gine is licens ed f rom Imagina tion Te ch. L td.
Cortex™ -A8
Cortex™ -A8
Cortex™ -A8
Cortex™ -A8
POWERVR SGX™
POWERVR SGX™
C64x+ w/ Acc.
C64x+ w/ Acc.OMAP3530
OMAP3525
OMAP3515
OMAP3503Dro
p in
com
pati
ble
Cortex™ -A8
Cortex™ -A8
POWERVR SGX™AM3517
AM3505Drop
in c
omp.
Cortex™ -A8
Cortex™ -A8
Cortex™ -A8
Cortex™ -A8
POWERVR SGX™
POWERVR SGX™
C64x+ & 720p Acc.
C64x+ & 720p Acc.
DM3730
DM3725
AM3715
AM3703
Dro
p in
com
pati
ble
Parti
al pin
com
patib
ility
Core
sof
twar
e C
ompa
tible
Device and Tools Overview
ARM Hands on Workshop - Getting Started with Linux 1 - 11
Tools Overview
Hardware Development Kits
Sitara/OMAP Evaluation/Development Kits
Tool Part Number Availability
OMAP35x EVM TMDSEVM3530 TI
AM3517 EVM TMDXEVM3517 TI
OMAP-L138 (AM1808) EVM TMDXOSKL138BET TI
Zoom OMAP35x Development Kit TMDSMEVM3530-L Logic
Zoom AM3517 Experimenter Kit SDK-XAM3517-10-256512R Logic
OMAP-L137 (AM1707) Starter Kit EVMOMAPL137 Spectrum Digital
Development Kit Contents:Eval board & documentationBSPDevelopment tools
Get Started Today
Featured SOMs and Modules
Tool Part Number Availability Beagle Board
(OMAP35x)Beagle Community
Hawkboard(OMAP-L138)
ISSPLHawk Community
OMAP35x System on Module OMAP35x SOM-LV Logic
Overo OMAP35x Computer on Module
Overo Gumstix
KBOC OMAP35x System on Module
KBOC KwikByte
How to access:Contact TI Partners for more information or click link to buy now
Get Started Today
Device and Tools Overview
1 - 12 ARM Hands on Workshop - Getting Started with Linux
Software Development Kits (SDK)
Software Development Kits
All TI ARM and DSP devices where appropriate
Linux GNU Compiler (CodeSourcery)C6000 DSP Compiler (TI)
Code Gen Tools(not really “kits” per se)
All TI SOC’s: ARM, DSP,ARM+DSP
Obviously, not all devices require all the s/w components
TI provided libraries, examples, demosCodec Engine (VISA), DSPlink, Codecs/Algos (XDM), BIOS, XDC, Linux utilities, etc.
DVSDK
OMAP3515, OMAP3530AM3517
Graphix SVSGX development kitOPENGL ES / VG demos, drivers, targetfs, Getting Started Guide
Graphics SDK
OMAP35, AM35, AM18OMAP-L1DM644x, DM6467, DM3xx
Small Linux Distro supporting TI ARM devicesLinux PSP SDK
Processor(s)DescriptionS/W Dev’l Kit
PSP is a TI specific acronym that represents the name of the group inside of Texas Instruments which “owns” the kernel and driver development activities: Platform Support Package teamWireless SDK is available independently of these other kits to support the TI WLxxxx Bluetooth/WiFi devices Wireless?
Wireless SDK : Getting started with WL1271on OMAP35x EVM
Wireless Connectivity Card• WL1271 module with integrated
TCXO • 2.4GHz chip antenna (default
configuration)• U.FL antenna connector (optional
configuration)• Plugs into EVM’s Expansion
Connector (supported on EVM Rev G)
SoftwarePre-integrated with TI’s SDKWLAN and Bluetooth® software support (FM support not included)Pre-tested against WiFi and Bluetooth® specificationsOpen Source Linux drivers
• Kernel 2.6.x• TI WLAN driver• BlueZ Bluetooth® stack
Windows® CE 6.0 drivers• Available in mid 2010• Microsoft WiFi and Bluetooth®
stacks• Adeneo’s Bluetooth Manager
User GuidesComplete API referenceApplication NotesDemo applications and sample code
Documentation
Development tools and partners
Evaluate 802.11b/g/n and Bluetooth® capability, and begin SW developmentIncluded in EVM box: Mar 2010Standalone Connectivity Card upgrade available from Mistral http://www.mistralsolutions.com/WL1271WL1271 module available from LS Research and its distributorshttp://www.lsr.com/products/radio_modules/802.11_BGN_BT/tiwi.shtml
Hardware
Compatible with EVM’stoolchainWireless Connectivity Card reference schematicsCommand Line Interface (CLI) to configure and exercise WLAN & Bluetooth® applicationsPartners
• LS Research: WL1271 module• Mistral: Linux System Integrator• Adeneo: WinCE Syst. Integrator
Device and Tools Overview
ARM Hands on Workshop - Getting Started with Linux 1 - 13
Code Generation Tools : CodeSourceryTI SDK’s recommend the CodeSourcery Lite version, although you may want to upgrade to a more complete solutionSee Code Sourcery ARM/GNU Linux datasheethttp://www.codesourcery.com/sgpp/datasheet?target_arch=ARM&target_os=GNU%2FLinuxCheck DVSDK or Linux PSP release notes for tool versions
YesYesYesGNU C/C++ CompilerYesYesYesGNU Debugger (GDB)YesYesNoEclipse IDE
YesYesYesBig Endian, Neon support
YesNoNoUnlimited SupportYesNoNoPriority Defect Correction
Free
No
NoLite
$2799$399Annual Subscription Price (per Host)
YesYesAccess to Updates, Knowledge Base
YesYes30-day Installation SupportProfessionalPersonal
SDK 4.x Tentative plans for the next generation SDK.
TI SDK 4.0 (PSP Linux : Root Filesystem)• Integrated GUI and multimedia stacks based on industry standard components:
– GUI and graphics: QT– Mutlimedia: gstreamer
• Many common Linux utilities and programs either in busybox or provided separately
Linux Kernel
CMEM kernel module
SGX Driver
Qt UI framework
2D Acceleration
library
3D Acceleration
library
gstreamerMultimedia framework
CMEM
Codec Engine
DSPLink orAccelerator
manager
BusyboxSee:
http://www.busybox.net/screenshot.html
DSPLink or Accelerator
kernel module
Other Linux packagesAlsa, binutils, curl, dosfstools, e2fsprogs, … , gdbserver, ncurses, opkg, oprofile, scp, ssh, ….
BusyboxSee:
http://www.busybox.net/screenshot.html
Investigating Linux
1 - 14 ARM Hands on Workshop - Getting Started with Linux
Investigating Linux
What Is It? Linux in Three Parts
Flash
BootloaderProvides rudimentary h/w initCalls Linux kernel and passes boot arguments
KernelInitializes the system (and device)Manages system resourcesProvides services for user programs
FilesystemSingle filesystem (/ root)Stores all system filesAfter init, kernel looks to filesystem for “what’s next”bootarg tells linux where to find root filesystem
1. Linux Boot
File System
Linux Kernel
Boot Loader
Linux Boot Process
U-Boot
Linux Kernel
Init Process
Login Prompt
Power On
ARM assembly codePasses args to Linux (bootargs)
Initialize hardware
/sbin/init – 1st process exe by kernel
Login consoleUsually one of first prog’s to run
Looking more closely at the Kernel ...
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 15
2. Linux Kernel
What’s in the Linux Kernel
RAM UARTMMC EMACCPU
Process Management
VFAT
Device Management
Memory Management
Virtual File System
Network Stack
EXT3
YAFFS
CPU support code
CPU/MMU support code
Character device drivers
Network device drivers
Storage device drivers
Kernel Mode
HTTP Server
Custom User Application
GstreamerFramework
3D Graphics Library
User Mode
A few more details about the filesystem...
3. Linux Root Filesystem
Red Hat : Root File System
/home - Storage for user’s filesEach user gets their own folder (e.g. /home/user)Similar to “My Documents” in WindowsDVSDK GSG directory for TI tools, examples, working directory“root” user is different, that user’s folder is at /root
/media – Usually find CDROM drive(s) mounted here
/mnt – Common location to mount other file systemsLinux only allows one filesystemAdd other disks (physical, network, etc) by mounting them to an empty directory in the root filesystemWindows adds new filesystems (C:, D:, etc.) rather than using a single one
/opt – Common location for programsMontaVista install MVLinux to /optakin to Windows “C:\Program Files”
/usr – Storage for user binariesX86 Compiler for Red Hat programs (gcc) is stored in here
/dev – Common location to list all device driversSome folders common to Linux:
Investigating Linux
1 - 16 ARM Hands on Workshop - Getting Started with Linux
Filesystems: Red Hat vs. MontavistaRed Hat (PC) MontaVista (ARM)
Tools/Host filesystem:location our dev’l toolsTarget filesystem:filesystem to run on TI processorsNotice the similarities between the two different Linux filesystemsWhen releasing to production, it’s common to further reduce the target filesystem to eliminate cost
Where Do I Get It?
What Are Distributions?
Build It Yourself ?
Quote from kernel.org:
If you're new to Linux, you don't want to download the kernel, which is just a component in a working Linux system. Instead, you want what is called a distribution of Linux, which is a complete Linux system.
There are numerous distributions available for download on the Internet as well as for purchase from various vendors; some are general-purpose, and some are optimized for specific uses.
In fact, using a distribution even takes quite a bit of effort
This may be a bit of an understatement – even experienced users usually use a distributionCreating a distribution takes a lot of effortMaintaining a distribution … takes even more effort
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 17
What Is a ‘Linux Distribution’A ‘Linux distribution’ is a combination of the components requiredto provide a working Linux environment for a particular platform:1. Linux kernel port
A TI LSP or Linux PSP is a Linux kernel port to a device, not just a set of device drivers
2. BootloaderUboot is the standard bootloader for ARM Linux
3. Linux ‘file system’This does NOT mean a specific type of file system like FAT file system or flash file system … rather, it more like the “C:\” drive in WindowsIt refers to all the ‘user mode’ software that an application needs such as graphics libraries, network applications, C run-time library (glibc, uclibc), codec engine, dynamically-loaded kernel modules (CMEM, DSPLINK)
4. Development toolsGCC, GDBMV DevRocket, CCS, GHS Multi, etc.
Linux Distributions
Linux isn’t complete without a distributionMontaVista and Timesys, for example, provide commercial (i.e. production) distributionfor TI’s DaVinci / OMAP processorsA few distributions supporting the open-source BeagleBoard (OMAP35x-based) include: OpenEmbedded, Ubuntu, Fedora, Android, Gentoo, ARMedslack and ALIP
Kernel
Windowing System
CreativityTools
OfficeSuite
Browser
Investigating Linux
1 - 18 ARM Hands on Workshop - Getting Started with Linux
Operation System (O/S) Choices
O/S Choices
Choices
Linux Android(a.rowboat.com) WinCE
Commercial Community
Others …
• QNX• Nucleus• Etc.
Build ItYourself
Linux Distributions
Ease of UseEasyTested
Experienced User Latest
“GIT”from kernel.org, and others
Bit-BakeRecipies
BinaryNarcissus(online tool)OE
BinaryUpdated foreach SDKrelease
Binary(Update patches)
Custom from
Sources
Open Embedded
(OE)ÅngströmTI SDK
(PSP)TimesysMontaVistaEtc.
Custom(Build it Yourself)CommunityCommercial
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 19
Community Options
TI Linux PSP SDK
Community OptionsTI Linux SDK (PSP)
Pre-built snapshot of Linux tested against specific version of TI Software Development KitsUpdated at each new SDK/DVSDK releasePSP = Platform Support Package (name of TI team)Currently, a “BusyBox-based” bare-bones distro (“lean/mean”) Arago open-source OE project
Advantage of OE – recipies can be reused by Angstrom (or custom OE) usersIn general, users shouldn’t (re)build using OE; no reason to, because if you want more features, we recommend you go with Angstrom (also built using OE)
Ångström…
TI Device Linux Kernel Patching Methodology
Arago “Staging” Areahttp://arago-project.org/git/projects
DaVinci and OMAP Linux staging trees
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=summaryhttp://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary
MainlineTrees
TI ‘work’ areaOMAP3x Linux patchesOMAP-L1x Linux patchesDaVinci Linux patchesU-Boot patchesTest scripts and frameworkEarliest customer access to patches
Current Linux kernels plus recently accepted TI and third-party patchesSmall temporary deltas from mainline kernel
‘Official’ Linux kernels rel’s[mach-omap2][mach-davinci]
‘Official’ U-Boot releases
AcceptedPatches
Investigating Linux
1 - 20 ARM Hands on Workshop - Getting Started with Linux
Community Linux (DV)SDK Releases
GA release is 3.01 on Nov, 2010.DM3730
No current schedule. Plan is address when upgrading the DVSDK for 810 MHz support. Est availability in 2010Q3 DVSDK 3.11.DM6446
Available in DVSDK 3.10, GA May 2010.DM355, DM365
Available in DVSDK 3.10. Beta now, GA May 2010. Will support all speed grades of DM6467T.DM6467T
SDK 1.00.00 is in Beta. GA in May 2010.AM1xxx, OMAPL-1xx
SDK 3.00.00 is in Beta. GA on April 6, 2010AM3517
DVSDK 3.00.02 is current GA release. Next release is 3.01 on June 21, 2010.OMAP3530
Release
Angstrom (Narcissus)
Community OptionsTI Linux SDK (PSP)
Pre-built snapshot of Linux tested against specific version of TI Software Development KitsUpdated at each new SDK/DVSDK releasePSP = Platform Support Package (name of TI team)Currently, a “BusyBox-based” bare-bones distro (“lean/mean”) Arago open-source OE project
Advantage of OE – recipies can be reused by Angstrom (or custom OE) usersIn general, users shouldn’t (re)build using OE; no reason to, because if you want more features, we recommend you go with Angstrom (also built using OE)
ÅngströmOpen-source, full-featured Linux distro targeted for embedded systemsGet it from:
User-compiled binaries widely available for many targetsNarcissus (http://www.angstrom-distribution.org/narcissus)Web-based tool to create binary version (with your own package selection)
Built using OE (user community can re-use TI OE recipies)
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 21
Ångström Narcissus
(http://www.angstrom-distribution.org/narcissus)
DIY Linux
DIY OptionsOpen-Embedded (OE)
Build Linux from source using OE’s Bit-Bake recipe(s)Many recipes available for various architectures, including many variations for a given deviceBuilds full-up distro including Kernel and FilesystemTI builds it’s PSP Linux distro’s via OE
Build from Sources (roll your own)Build directly from sources, such as kernel.orgUse GIT, as well as SVN and others to get sources from repo’sAre you nuts? Either you want to waste your life redoing what OEdid, or you’re so advanced you don’t need this presentation.
Investigating Linux
1 - 22 ARM Hands on Workshop - Getting Started with Linux
DIY Linux : Open Embedded (OE)
LINUX
Commercial Linux OS and tools vendors
kernel.org
You
You
Code Sourcery
Sourcery G++
ubootLinux application
packages on internet
OpenEmbeddedRecipes, config fi les
TI’s New Linux Strategy
TI Customers
LINUX
TI DSPSDevelopers
Commercial Linux OS and tools vendors
kernel.org
TI Customers
TI Customers
Code Sourcery
Sourcery G++
uboot
TILinux SDK
Linux application packages on
internet
Recipes, config files
Uboot ports
Linux ports
OpenEmbeddedRecipes, config fi les
TI Device Linux Kernel Patching Methodology
Arago “Staging” Areahttp://arago-project.org/git/projects
DaVinci and OMAP Linux staging trees
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=summaryhttp://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary
MainlineTrees
TI ‘work’ areaOMAP3x Linux patchesOMAP-L1x Linux patchesDaVinci Linux patchesU-Boot patchesTest scripts and frameworkEarliest customer access to patches
Current Linux kernels plus recently accepted TI and third-party patchesSmall temporary deltas from mainline kernel
‘Official’ Linux kernels rel’s[mach-omap2][mach-davinci]
‘Official’ U-Boot releases
AcceptedPatches
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 23
Commercial Options
LinuxMontaVistaTimeSysWind RiverMentorRidgerun
WinCEAdeneoMistralMPC DataBSQUARE
Commercial O/S Vendors
Linux Partner StrategyCommercial: provide support, off-the-shelf Linux distributions or GNU toolsConsultants: provide training, general embedded Linux development expertise, or specific expertise for developing drivers or particular embedded applicationshttp://www.tiexpressdsp.com/index.php/Linux_Consultants_and_Commercial_Linux_Providers
RTOSGreen HillsWind River (VxWorks)ELogic (ThreadX)QNXMentor (Nucleus)
Commercial vs Community
Commercial vs CommunityCommercial
Less effort – another team does the work of porting new kernel to the distribution … and then laboriously testing it over-and-over againMore robust – many customers generating more inputs/errata to team testing anmaintaining the distributionMore secure – among other reasons, many homebrew distributions don’t get around to adding security patches due to effort and timeLatest features? Many vendors backport new features into their kernels – thus, you get the stability of a known kernel but with new featuresGood choice if: you don’t need the absolute latest features; you have a many projects to ammortize the costs; you’re a Linux wiz who really knows what they’re doing.Bottom Line – Commercial distributions trade cost (and the bleeding edge features) for robustness and less-effort. What is it worth, if your company depends on this product?
Community (to Git or not)Access to latest improvements in Linux kernelWant to know exactly how it is all put togetherMaximum involvement in Linux communityNo costs … (unless you count your labor)Bottom Line – Choose this option if you have the Linux expertise and labor is cheaper than NRE; or, you need access to the very latest features
Looking at MVL vs GIT example…
Investigating Linux
1 - 24 ARM Hands on Workshop - Getting Started with Linux
Example Comparison : MVL Pro 5.0 vs GIT
TI offering is clearly free as GIT Linux distributions are open source.
Demo copy and LSP open source, but original licensing has created confusion.
Linux run-time Licensing
GNU Tools free. IDE requires annual subscription.
GNU Tools free. IDE requires annual subscription.Tools licensing
Multi-vendor, including MVMV and its partnersThird-party support
Not part of kernel. TI is addressing through Arago. Initially may be less user-friendly than MVL.
Comprehensive host and target file systems with GUI tools for optimization.
File System
Applied to current release, which changes every few months. User may need new kernel to get a fix.
Applied to 2.6.18, so no need to change kernel versionsKernel bug-fixes
Uses latest available kernelUses 2.6.18, which is almost 3 years oldKernel Version
Community LinuxMVL 5.0 Pro
You've come to a fork in the road ...
50
TI Customers Can CHOOSE a Linux Path: Community or Commercial
Stable
SystemTested
Supportprovided
Fast
Fresh
Roll YourOwn
LatestKernel
Commercial Community
TI Driver/KernelDevelopment
Community first pathTI delivers LSP/DVSDK to communitySmaller set of applicationsCustomer builds up solutionOpen source assetsCustomer assetsFaster access, newer kernelsMore customer responsibility
Invest own resources vs. $$
Commercial complement pathCommercial Linux partner pulls from communityPartner adds value: production testing, tools integration, support, application bundles, etc. for customersService and subscription salesExecuting with MontaVista, Timesys…Opportunities for other commercial vendors
Commercial vs. communityBeyond commercial benefits of open source
Success typically depends heavily on “community”Gartner recommendations for building community
Allow participants to self-selectEliminate barriers to participationProvide clear engagement rules for consensusProvide fair and reciprocal ownership and accessMake visible historic and current work in progressMake visible individual contribution historyImplement agreed standardsDecompose problem for parallel developmentSeek continuous improvement and low-cost integration
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 25
Community is a conversationBill Gatliff (Embedded Systems Conference)
How do we motivate embedded systems developers?[Software support for the platform] is on the mainline[The platform] just worksWhat tools are available to me?
Matthew Walster (demo scene)How do we motivate a demo hacker?
Make it really, really easy –or–Make it really hard
Tony Lindgren (linux-omap git maintainer)How do we speak to the Linux kernel developers?
Code is the conversationMore patches, less powerpoints
What motivates participants?Categories courtesy of “LugRadio” – it is largely about control
Community ParticipantLikes attention and being part of something big
TinkererDesires to know how things work and to tweak them
Underdog FanLikes to cheer on anyone who’ll take on the big guys
CheapWant things for free, or as cheap as possible
Freedom CrusaderDesires to prevent others from controlling their destiny
58
Some Good References
Greg Kroah Hartman on kernel development:http://www.youtube.com/watch?v=L2SED6sewRw
Cost of Deployment Models:See “Embedded Linux Total Cost of Development Analyzed”http://www.embeddedforecast.com/
DaVinci™ technology & OMAP™ platform community resources:Wiki documents mailing list, git repositories, etchttp://wiki.davincidsp.com or http://wiki.omap.com
or http://wiki.davincidsp.com/index.php/Category:Linux
Investigating Linux
1 - 26 ARM Hands on Workshop - Getting Started with Linux
How Do I Build Linux – and Why?
Don’t
How Do I Build It, Let Me Count the Ways…1. Don’t … find a pre-built Linux uImage
Build Default Linux
How Do I Build It, Let Me Count the Ways…1. Don’t … find a pre-built Linux uImage
2. Build Default Linuxa. make defconfigb. make uImage
Why Re-Build Linux Kernel?TI SDK’s often support various ARM CPU’s, thus GSG directs you to specify target processor and rebuild kernelYou made changes to a Linux source file (i.e. driver, etc.)…Change to Kernel’s Directory ( TI/MontaVista LSP Example )
> cd ti-davinci/linux-2.6.18_pro500
Configure the Kernel> make ARCH=arm CROSS_COMPILE=arm_v5t_le- davinci_dm644x_defconfig
Build the Kernel> make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 27
Build ‘Custom’ Linux Kernel
How Do I Build It, Let Me Count the Ways…1. Don’t … find a pre-built Linux uImage
2. Build Default Linuxa. make defconfigb. make uImage
3. Build ‘Custom’ Linuxa. make defconfigb. make menuconfigc. make uImage
Configure the Kernelhost $ cd ti-davinci/linux-2.6.18_pro500
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- davinci_dm644x_defconfig
Verify Kernelhost $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- checksetconfig
Customize the Kernelhost $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfig
Build the Kernelhost $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage
Build Loadable Modules (i.e. dynamic “insmod” modules)host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- modules
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le INSTALL_MOD_PATH=/home/<useracct>/workdir/filesys modules_install
Investigating Linux
1 - 28 ARM Hands on Workshop - Getting Started with Linux
Linux Kernel – Static vs Dynamic
Kernel Object Modules
# insmod <mod_name>.ko [mod_properties]
Use insmod (short for insert module) command to dynamically add modules into the kernelKeep statically built kernel small (to reduce size or boot-up time), then add functionality later with insmodInsmod is also handy when developing kernel modulesLater we’ll insert two modules (cmem.ko, dsplink.ko) using a script: loadmodules.sh
Linux Kernel source code is broken into individual modulesOnly those parts of the kernel that are needed are built in
Kernel Module Examples:fbdev frame buffer devv4l2 video for linux 2nfsd network file server devdsp oss digital sound proc.audio alsa audio driver
How to add modules to Linux Kernel:1. Static (built-in)
2. Dynamic(insmod)
.ko = kernel object
Linux Kernel
v4l2
fbdev
dsp
oss
nfsd ext3
httpd
Static Linux Kernel Configuration
#> make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfig
Investigating Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 29
TI Customer (Linux) Support
Linux Kernel Support from TI
Process Management
Virtual File System
Memory Management
Device Management
Network Stack
EXT2 YAFFS
CPU support code
CPU/MMU support code
Storage device drivers
Network device drivers
Character device drivers
Linux Kernel
HTTP Server
Custom User Application
GstreamerFramework
3D Graphics Library
User Mode Applications – NOT in the kernel
= Areas of TI expertise
• TI can ONLY provide support for the drivers it develops– TI has limited expertise in generic OS parts of the kernel such as
network stacks and file systems• TI does NOT support Linux application code
TI and Community Support
http://wiki.openembedded.net/index.php/Mailing_Lists
Support limited to specific questions about TI devices or packages
OpenEmbedded
Applications have their own mailing lists: http://gstreamer.freedesktop.org/lists/, http://httpd.apache.org/lists.html
TI does NOT support Linux application code, except for applications provided in the DVSDK
User-mode applications
http://gcc.gnu.org/lists.html covers numerous gcc- and gdb-related lists
Does not supportGNU tools
http://www.kernel.org/pub/linux/docs/lkml/for generic kernel & many specific forums such as http://www.linux-usb.org/mailing.html and https://www.redhat.com/mailman/listinfo/video4linux-list
Supports drivers specific to TI devices, not generic stack, scheduler, …http://e2e.ti.comhttp://www.tiexpressdsp.com/index.php/Category:Linux
Linux Kernel
[email protected] supports parts specific to TI devices
U-BootCommunity ForumsTI
Investigating Linux
1 - 30 ARM Hands on Workshop - Getting Started with Linux
Community Linux Kernel Bug Fixes• All fixes will be applied to the then CURRENT Linux kernel version
in the Community tree – The current Linux kernel version will often be a DIFFERENT (=later)
kernel version to the one used for the initial release for a TI device– TI will NOT be back-porting fixes to older kernel versions, including the
one supported in the original Linux PSP release for a device• Deviating from the mainstream complicates customer access to any bug
fixes or enhancements• Periodic system-tested Community Linux PSP updates will be based
on the then CURRENT Linux kernel version• TI customers can use one or a combination of the following
approaches to obtain fixes and enhancements:– Upgrade kernel versions when needed– Backport any required fixes themselves or using a third-party– Use a commercial Linux vendor who supports a stable Linux release
• Only WindRiver now does this
Basic Linux Commands If you’re new to Linux, here’s some commands you may want to investigate:
Linux Command Summary
File Managementls and ls –lacdcpmvrmpwdtar (create, extract .tar and tar.gz files)chmodchownmkdirmount, umount (in general, what is “mounting” and how do you do it?)aliastouch
Network/sbin/ifconfig, ifup, ifdownpingnfs (What is it? How to share a folder via NFS. Mounting via NFS.)
VMware Shared Folders/mnt/hgfs/<shared name>
Program Control<ctrl>-cps, topkillrenice
Kernelinsmod, rmmod
Linux Usersrootusersu (… exit)
BASHWhat is BASH scriptingWhat are environment variablesHow to set the PATH environment variableWhat is .bashrc? (like DOS autoexec.bat)man pageschange command line prompt
Some commands used in this workshop:
Boot Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 31
Boot Linux
Overview Booting Linux – ROM to Kernel
RBL UBL / x-loader U-Boot Kernel
ROM Internal RAM DDR2 DDR2
Device Flash
DDR2
UBLx-loader
UBoot Linux Kernel
RBLUBL
x-loader
UBoot Linux Kernel
Bootloader Components
Yes
Board Designer
No
User Config’d
U-BootU-boot
“Das U-boot” is the standard open-source Linux boot loader for ARM. It supports networking for TFTP/NFS booting. It is used to locate, load and execute the Linux kernel in uImage format and is also responsible for passing arguments to the kernel
Linux boot
XLDRUBL
The primary function of this boot loader is to initialize external memory and system clocks so that a larger, more advanced boot loader (in this case U-boot) can be loaded.
Second-level
RBLRBL
This is ROM’d code for detecting desired boot type (NAND, UART, …) and loading executable code of second-level bootloader from selected peripheral/interface
First-level
OMAP3xDaVinciOperationsBoot stage
Customizing UBL / XLDR1. Configure system clocks2. Setup memory interfaces
Boot Linux
1 - 32 ARM Hands on Workshop - Getting Started with Linux
Customizing UBL / Xloader – for your board Customize UBL/XLDR for Custom Board
Customizing UBL / XLDR1. Configure system clocks2. Setup memory interfaces
Refer to wiki site for details on porting UBL/XLDR for different processor types
http://wiki.omap.com
Das U-Boot
Das U-Boot
D SPTEXAS INSTRUMENTS
TECHNOLOGY
The Linux PSP SDK board is delivered with the open-source boot loader: Das U-Boot (U-Boot)
At runtime, U-Boot is usually loaded in on-board Flash or an SD/MMC card
In general, U-Boot performs the functions:1. Initializes the DaVinci EVM hardware2. Provides boot parameters to the Linux kernel3. Starts the Linux kernel
Boot Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 33
Additional U-Boot Features
In addition, it provides some convenient features that help during development:
Ping IP addressesReads and writes arbitrary memory locationsUploads new binary images to memory via serial, or EthernetCopies binary images from one location in memory to another
D SPTEXAS INSTRUMENTS
TECHNOLOGY
To Boot Linux, You Need…
3. Filesystem
2. Linux Kernel
1. Bootloader (U-Boot) At reset, U-Boot bootloader is executed
U-Boot loads O/S kernel into DDR2 memory; then,Connects to the root filesystemIf you don’t know what this is, think of it as the ‘c:\’ drive of in Windows PC
Where are these 3 located?
Boot Linux
1 - 34 ARM Hands on Workshop - Getting Started with Linux
Where are the U-boot, Kernel and Filesystem Found? Where Do You Find …
“MMC boot”
SD/MMC
SD/MMC
SD/MMC
Hands-On Lab
“NFS boot”“HDD boot”
Linux PC (via NFS)Hard Drive3. Filesystem
Linux PC (via TFTP)Flash2. Linux Kernel
FlashFlash1. Bootloader (U-Boot)
DevelopmentDM6446 EVMDefaultWhere located:
By default, the DVEVM ships in “HDD boot” mode; this allows the demo applications to run "out-of-the-box”“NFS boot” (network boot) is good for application development
SD / MMC Boot
XLDR(FAT32)
RootFilesystem
(EXT3)
Boot Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 35
NFS Boot
WindowsPC
VMware Linux “Tools” PC
DM6446DVEVM
eth0 Ethernet provides physical connection to Linux PCRoot filesystem is accessed via NFS protocolDon’t need to ‘flash’ DVEVM after compiling new program
RS-232
Tera Term
U-BootRS-232 is physical connection to U-BootUse to stop DVEVM from stand-alone bootConfigure U-Boot’s modes by setting/saving environment variables
Ethernet
~/workdir/filesys
Note: ~/workdir/filesys = /home/user/workdir/filesys
Configuring U-Boot and Starting Linux (5 Steps)
D SPTEXAS INSTRUMENTS
TECHNOLOGY
Note, login with: “user” for the Tools Linux PC“root” for the DVEVM target
You can use any RS-232 comm application (Linux or Win), we use Tera Term for its macro capability
1. Connect an RS232 serial cable and start a Tera Term
2. Power on the DVEVM and press any key in TeraTerm toabort the boot sequence
3. Set U-Boot variables to select how Linux will boot (save changes to flash to retain settings after power cycle)
4. Boot Linux using either:the U-Boot “boot” commandpower-cycle the DVEVM
5. After Linux boots, log in to the DVEVM target as “root”
What U-Boot param's do I need?
Configuring U-BootCommon Uboot Commands:
printenv - prints one or more uboot variablessetenv - sets a uboot variablesaveenv - save uboot variable(s)run - evaluate a uboot variable expressionping - (debug) use to see if Uboot can access NFS server
Common Uboot Variables:You can create whatever variables you want, though some are defined either by Linux or common style
bootcmd - where Linux kernel should boot frombootargs - string passed when booting Linux kernel
e.g. tells Linux where to find the root filesystemserverip - IP address of root file system for NFS bootnfspath - Location on serverip for root filesystem
Boot Linux
1 - 36 ARM Hands on Workshop - Getting Started with Linux
U-Boot MacrosVariables can reference each otherfor example, to keep original bootargs settings, try:
setenv bootargs_original $(bootargs)
“Run” command – Force uboot to evaluate expressions using runFor example, evaluate this expression:
setenv set_my_server ‘setenv $(serverip):$(nfspath)’
Using the run command:setenv serverip 192.168.1.40
setenv nfspath /home/user/workdir/filesys
run set_my_server
U-Boot Commands/VariablesU-Boot Commands: setenv, saveenv, printenv, run, ping, dhcp, tftpExample: setenv ipaddr 192.168.1.41
Common variables used to configure the behaviour of U-Boot: autoload If set to “no”, only lookup performed, no TFTP bootautostart If “yes”, a loaded image is started automaticallybaudrate Baudrate of the terminal connection, defaults to 115200bootargs Passed to the Linux kernel as boot "command line“ argumentsbootcmd Command string that is executed when the initial countdown is not interruptedbootdelay After reset, U-Boot waits ‘bootdelay’ seconds before executing bootcmd;
abort with any keypressbootfile Name of the default image to load with TFTP cpuclk Available for processors with adjustable clock speedsethaddr Ethernet MAC address for first/only ethernet interface (eth0 in Linux);
additional ethernet i/f’s use eth1addr, eth2addr, …initrd_high Used to restrict positioning of initrd ramdisk imagesipaddr IP address; needed for tftp command loadaddr Default load address for commands like tftp or loadsloads_echo If 1, all characters recv’d during a serial download are echoed backpram Size (kB) to reserve for "Protected RAM" if the pRAM feature is enabledserverip TFTP server IP address; needed for tftp command; (also use for nfs root mnt’s)serial# Hardware identification information, usually during manufacturing of the board silent If option is enabled for your board, setting this will suppress all console msgsverify
Boot Variations
setenv bootcmd “mmc init; fatload mmc 0 ${loadaddr} uImage; run mmcargs; bootm ${loadaddr}”
MMC
setenv bootcmd 'dhcp;bootm'TFTP
setenv bootcmd bootm 0x2050000Flash
NFSTFTPdhcp4. MMCMMCdhcp5.
HDDTFTPdhcp3. NFSFlashdhcp2.HDDFlashdhcp1.
IP Root FilesystemLinux KernelMode
U-Boot’s bootcmd variable specifies the root filesystem
Boot Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 37
Boot Variations
NFSTFTPdhcp4. MMCMMCdhcp5.
HDDTFTPdhcp3. NFSFlashdhcp2.HDDFlashdhcp1.
IP Root FilesystemLinux KernelMode
setenv bootargs console=ttyS0,115200n8 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 rootwait nolock mem=120M
MMC
setenv bootargs console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=$(serverip):$(nfspath),nolock mem=120M
NFS
setenv bootargs console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/hda1, nolock mem=120MHDD
U-Boot’s bootargs variable specifies the root filesystem
Configuring U-BootKernel from Flash, Filesystem from HDD
[rs232]# baudrate 115200[rs232]# setenv stdin serial[rs232]# setenv stdout serial[rs232]# setenv stderr serial[rs232]# setenv bootdelay 3[rs232]# setenv bootfile uImage[rs232]# setenv serverip 192.168.2.101[rs232]# setenv nfspath /home/user/workdir/filesys[rs232]# setenv bootcmd bootm 0x2050000[rs232]# setenv bootargs console=ttyS0,115200n8
noinitrd rw ip=dhcp root=/dev/hda1, nolock mem=120M
[rs232]# saveenv
Configuring U-BootKernel from Flash, Filesystem from NFS (network)[rs232]# baudrate 115200[rs232]# setenv stdin serial[rs232]# setenv stdout serial[rs232]# setenv stderr serial[rs232]# setenv bootdelay 3[rs232]# setenv bootfile uImage[rs232]# setenv serverip 192.168.2.101[rs232]# setenv nfspath /home/user/workdir/filesys[rs232]# setenv bootcmd bootm 0x2050000[rs232]# setenv bootargs console=ttyS0,115200n8
noinitrd rw ip=dhcp root=/dev/nfs nfsroot=$(serverip):$(nfspath),nolock mem=120M
[rs232]# saveenv
Boot Linux
1 - 38 ARM Hands on Workshop - Getting Started with Linux
Configuring U-BootUsing Macro’s
HDD boot:[rs232]# run bootargs_hdd[rs232]# saveenv[rs232]# run bootcmd
NFS boot: [rs232]# setenv serverip 192.168.1.103[rs232]# saveenv nfspath /home/user/workdir/filesys[rs232]# run bootargs_nfs[rs232]# saveenv[rs232]# run bootcmd
U-Booting : Static vs Dynamic IP
[rs232]# setenv serverip 192.168.13.120 [rs232]# setenv ipaddr 192.168.13.121 [rs232]# setenv gateway 192.168.13.97 [rs232]# setenv netmask 255.255.255.224 [rs232]# setenv dns1 156.117.126.7 [rs232]# setenv dns2 157.170.1.5
[rs232]# setenv myip $(ipaddr):$(gateway):$(netmask):$(dns1):$(dns2)::off[rs232]# setenv nfspath /home/user/workdir/filesys[rs232]# setenv bootcmd bootm 0x2050000[rs232]# setenv bootargs console=ttyS0,115200n8 noinitrd rw
ip=$(myip) root=/dev/nfs nfsroot=$(serverip):$(nfspath) ,nolock mem=120M $(videocfg)
[rs232]# saveenv
You must specify the IP addressesEverywhere we previously had dhcp must now reference the static ip addressesThis example creates a variable called myip and used it in place of the previous dhcp entries in bootargs
Using Tera Term Macros
U-boot strings can be very precise, one wrong character could prevent bootingTeraTerm Pro (freeware) provides a simple macro languageVery convenient for setting up U-Boot, if you change settings frequently
Working with Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 39
Working with Linux
X Window, X, or x11 Linux Desktop Environment
x11(server)
Linux
AM3517
GNOME
x11 (Display Manager)
x11 Display x11 Display
xterm
mplayer
Also known as X, or X Windowx11 is the most common Linux display managerx11 also manages Human Interface Devices (HIDs) Various applications send graphical data to x11, which displays each in an independent, resizable window
Working with Linux
1 - 40 ARM Hands on Workshop - Getting Started with Linux
Desktop Manager (GNOME) Desktop Managers
Gnome is one of many Linux display managersDesktop managers provide a “Desktop” or similar environment (i.e. for handheld device)Applications (such as mplayer or xterm) typically interface directly to x11 and are therefore independent of the Display ManagerGnome display manager is “just another client” to x11A display manager isn’t required to run Linuxx11 isn’t required to run Linux, though it is required by many graphicalapplications
Terminal vs. Desktop
A terminal is a text-based interface to Linux O/SCommands are interpreted by a shell program (such as BASH)A terminal may connect via RS-232, Ethernet, etc.xterm is a terminal which connects via the X window server, i.e. receives input via x11 HID and outputs to x11 displayMost applications which can be launched from the Desktop (i.e. a drop-down menu) can be equivalently launched by typing a command into a Linux terminal
Working with Linux
ARM Hands on Workshop - Getting Started with Linux 1 - 41
Remote/Exporting Desktop Exported Desktop
x11(server)
Linux(Angstrom)
x11(client)
Linux(Ubuntu)
EthernetAM3517 PC
GNOMEGNOME
(Exported)
Ubuntu, used in our lab exercise, does not contain a copy of GnomeThus, desktop (e.g., Gnome) is actually generated by the AM3517 in our example – PC acts only as a ‘dumb’ displayBoth client and server are available whenever X is started
Remote x11
x11 Display
xterm
mplayer(remote Linux)mplayer
(from remoteLinux)
As with many Linux packages, x11 was designed from beginning with networking in mind (client/server)x11 may export Human Interface Device (HID) I/O in addition to DisplayExporting a desktop is handled by x11(Destop managers are “just another client” to x11)
Working with Linux
1 - 42 ARM Hands on Workshop - Getting Started with Linux
x11 service is considered a server (xserver) even though it doesn’t generate graphical contentx11 “serves the display” to applications (clients)
For exported displays, the remote xserver additionally acts as a client to the local xserverIn Linux world, a server is a standalone (“daemon”) process which responds to requests from clients
Client or Server ?
Physical Display
Local xserver(server)
Remote xserver(server)
Ethernet
Remote xterm(client)
Exporting x11 Display
# startx &# export DISPLAY=192.168.1.10:0.0# gedit myfile.txt
Most applications launched from a terminal will query terminal’s DISPLAY environment variable
# startx &# gnome-session –-display=192.168.1.10:0.0
Processes, such as the Gnome display manager, which exist outside the context of the terminal may take a display argument
x11 over ssh
# ssh –X 192.168.1.10
Invoking ssh with the ‘-X’ option shares x11 display Details:
Display set to ‘localhost:10.0’ on remote machineScreen 10 is a virtual display which forwards requests over ssh
Secure Shell is the recommended terminal over IPprogram (because it is encrypted)Exporting x11 (without encryption) is insecure
Hands-On Lab Exercises
ARM Hands on Workshop - Getting Started with Linux 1 - 43
Hands-On Lab Exercises
Lab Descriptions Lab Exercises
Lab 1: Connect and boot the AM3517 EVMBoot the AM3517 from an SD/MMC card.
Lab 2: Start Gnome (Linux GUI) desktop running on the AM3517 EVMThere are four parts to this lab which correspond to the four different ways that you can invoke Gnome:
a. Automatically start GNOME on the AM3517 EVM’s LCDb. Manually start GNOME on the AM3517 EVM’s LCDc. Display the GNOME GUI remotely on the host PC via secure SSH connectiond. Export the GNOME GUI onto the host PC
x11(server)
Linux(Angstrom)
x11(client)
Linux(Ubuntu)Ethernet
AM3517 PC
GNOMEGNOME
(Exported)
Copyright © 2010 Texas Instruments. All rights reserved.
Lab ExercisesLab 1: Connect and boot the AM3517 EVM
Boot the AM3517 from an SD/MMC card.Lab 2: Start Gnome (Linux GUI) desktop running on the AM3517 EVM
There are four parts to this lab which correspond to the four different ways that you can invoke Gnome:
a. Automatically start GNOME on the AM3517 EVM’s LCDb. Manually start GNOME on the AM3517 EVM’s LCDc. Display the GNOME GUI remotely on the host PC via secure SSH connectiond. Export the GNOME GUI onto the host PC
Lab 3: Running video (and audio) on the AM3517a. Play a .wmv video movie trailerb. (Take Home Lab) View video from a USB Webcam c. (Take Home Lab) Listen to audio via USB speakers
Lab 4: Investigating Linux Networking with the AM3517a. Configure Linux Ethernet connection, both temporarily and permanentlyb. Configure a Samba Serverc. Configure an HTML Server
Hands-On Lab Exercises
1 - 44 ARM Hands on Workshop - Getting Started with Linux
Lab Diagrams Lab Exercise
x11(server)
Linux(Angstrom)
x11(client)
Linux(Ubuntu)
Ethernet
AM3517 PC
GNOMEGNOME
(Exported)
Lab Setup (H/W)
Logic PD Zoom board
Ubuntu‘client’(VMware)
IP
USB
AM3517
FBTIRS-232
Lab Setup (S/W)
AM3517 Zoom board Windows XP
Terra Term(COM4)
VMware (ubuntu_x11_client)
Linuxx11
Gnome(exported)
Linuxx11
Gnome
USB
IP
Top Related