B ildi
di
l
i
th
Building an audio player using the
Texas Instruments OMAP-L137
with LinuxLink 3 0
with LinuxLink 3.0
Webinar Series
Webinar Series
Building a custom system with
Session 2
Building a custom system with
audio playback functionality
We will start our webinar in few minutes. Thank you for your patience
2
Series Overview
Session 1
Assembling a small footprint Linux platform for the
Assembling a small footprint Linux platform for the
OMAP-L137
Session 2 – today
Building a custom system with audio playback
functionality
functionality
Session 3 – September 10, 2009 11:30am EST
p
,
3
Agenda – Session 2
Recap of what we have done so far
Modify the Linux kernel
• Reconfigure to add support for Bluetooth
Modify RFS design
Modify RFS design
• Add packages for audio playback with codecs for desired media playback • Add Web server
• Use overlay to deploy custom codeUse overlay to deploy custom code • Enable Bluetooth
Create a custom content for a Web server
• Create an HTML static page
• Create CGI scripts for audio playback
Create a RFS overlay with modifications
Create a RFS overlay with modifications
• Web content
4
What we have accomplished so far
Built a starting point with Online Factory
• Experiment on day one with a pre-built starting point
Modified Linux kernel using desktop tools
• Optimized for footprint
O i i d f f b
• Optimized for fast boot
Altered root filesystem
• Removed unneeded startup scripts
Deployed the system on target with network mounted
RFS
• Transferred images via TFTP
• Configured bootloader for autobootg
5
Browsing the kernel sources
GIT is … part of the update service
• Git is an open source, distributed version control system
currently used by a number of projects including: currently used by a number of projects including:
– Kernel.org – X.org
– Perl – Android
• Every Git clone is a full-fledged repository with complete
history and full revision tracking capabilities
B hi g d gi g f t d t d
• Branching and merging are fast and easy to do
Timesys GIT
• Provides code for a number of TI’s platforms, including:
¾ OMAP-35x ¾ OMAP-L137 ¾DM355 ¾DM6446 https://linuxlink.timesys.com/git?repo=linux-2.6-davinci.git https://linuxlink.timesys.com/git?repo=linux-2.6-omap.git
READ more on the GIT update service here:
6
Platform adjustments
Linux kernel
• Linux kernel configuration
E bl b t t ( i tk)
– Enable verbose output (printk) – Enable audio
– Enable Bluetooth (for future use)
Desktop factory command: # make kernel-menuconfig
Root filesystem
• Add the following packages to the RFS definition
– alsa-utils – alsa-utils – thttpd – haserl
– bluez-utils (for future use)( ) – mplayer
– (codecs)
7
Custom Code for the Web server
Static web page
• Provide a static index.html
B tt t l b k di
– Button to playback audio
CGI script for audio playback
• Sections
– Calls haserl to translate to a web page – Lists all audio files at an assumed location – Allows to stop the playback
– Starts a media player with selected stream
Create an overlay that includes the following:
• Create a tar file with overlay directory structure • Create a tar file with overlay directory structure
Using desktop factory merge the overlay into the
system’s RFS
y
• Using Desktop Factory navigate to:
– Target Configuration->Build RFS->RFS Content Tarball
8
Deployment
We’ll use TFTP service to transfer images to the target
• Runs typically as xinetd process
Di bl d h l i t ll d M dif / t / i td d/tft d
• Disabled when newly installed. Modify /etc/xinetd.d/tftpd
Setup NFS to mount RFS via network for initial
development
• Runs as a daemon on your host
• Export FS via /etc/exportsp / / p
• Restart the NFS server via /etc/init.d/nfs service
Assign a static address or use dhcp
Assign a static address or use dhcp
Bootloader setup procedure
setenv bootdelay 3
setenv bootfile uImage
setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/nfs rw ip=dhcp setenv bootcmd dhcp;bootmp
9
What we have accomplished today
Modified our design to
• Enable audio
Add W b
• Add Web server
• Add media playback capability
A hi d b
Achieved by
• Device driver enablement
• Root filesystem adjustments
Added contents for the web server
• Static html page
• CGI script to playback audio files
System deployment
• Deploy an overlay onto our system RFS
10
Next Time
Session #3 is scheduled for Thursday, September 10th
at 11:30am EST
Subject: System debugging and testing with the
OMAP-L137
OMAP L137
• Test additional technologies: i.e. Bluetooth
• Build our system for debugging
• Remotely debug application e ote y debug app cat o
• Verify the quality of the solution with a testware
S t i htl b ild t b d th D kt F t
• Setup nightly build system based on the Desktop Factory
11
How Do I Learn More?
Go to
www.timesys.com
to learn more
• Webinars
• Webinars
• LinuxLink Radio Podcasts
• Request a Free Factory Test Drive
Schedule a more detailed introduction/training
session
• WebEx