Beagle Board 101 Gerald Coley and Jason Kridner
Beagle Board 101 Gerald Coley and Jason Kridner September 22, 2009 Archived at: http: //beagleboard. org/esc 1
Agenda n Overview of the Beagle Board § § § Board features and community Booting the Beagle Board Some simple tests (learning Linux) Writing our own boot script Native, managed, and web-based UI code development § Collaboration tools and community participation § Resources for more information and support n Hardware presentation § Lessons from building Beagle
What’s in a name… n n n Bring your own peripherals Entry-level cost ($149) ARM Cortex-A 8 (superscalar) Graphics and DSP accelerated Linux and open source community Environment for innovators
Community development $149 > 2, 000 participants and growing Active & technical community Open access to hardware documentation Opportunity to tinker and learn Personally affordable Wikis, blogs, promotion of community activity Freedom to innovate Addressing open source community needs Instant access to >10 million lines of code Free software
Fast, low power, flexible expansion OMAP 3530 Processor § 600 MHz Cortex-A 8 § NEON+VFPv 3 § 16 KB/16 KB L 1$ § 256 KB L 2$ § 430 MHz C 64 x+ DSP § 32 K/32 K L 1$ § 48 K L 1 D § 32 K L 2 § Power. VR SGX GPU § 64 K on-chip RAM POP Memory § 128 MB* LPDDR RAM § 256 MB NAND flash 3” Peripheral I/O § DVI-D video out § SD/MMC+ § S-Video out § USB 2. 0 HS OTG § I 2 C, I 2 S, SPI, MMC/SD § JTAG § Stereo in/out § Alternate power § RS-232 serial USB Powered § 2 W maximum consumption § OMAP is small % of that § Many adapter options § Car, wall, battery, solar, … * Revision C has 256 MB LPDDR RAM
And more… Other Features § 4 LEDs § USR 0 § USR 1 § PMU_STAT § PWR § 2 buttons § USER § RESET § 4 boot sources § SD/MMC § NAND flash § USB § Serial On-going collaboration at Beagle. Board. org § Live chat via IRC for 24/7 community support § Links to software projects to download 3” Peripheral I/O § DVI-D video out § SD/MMC+ § S-Video out § USB HS on-the-go § I 2 C, I 2 S, SPI, MMC/SD § JTAG § Stereo in/out § Alternate power § RS-232 serial
New for Revision C 3” Peripheral I/O § USB HS/host-only (in addition to existing USB HS on-the-go) § LCD expansion 256 MB LPDDR RAM (up from 128 MB)
Desktop development DVI-D Power Stereo out SD Stereo in USB Note: Beagle Board can be powered from the alternate jack (as shown) or via USB
Development on-the-go Power + IP over USB Serial Port
Expand with custom hardware USRP Stereo out USB Power SD 2 GB Photo by Philip Balister 10
Typical peripherals n Available from Digi-Key § Serial cable (BBC 01 -ND) § Needed for serial console § HDMI-to-DVI-D cable (AE 10260 -ND) § Needed for connection to digital monitors § USB hub (DA-70227 -ND) § Needed for adding USB peripherals § 5 V power supply (T 450 -P 5 P-ND) § Frees USB OTG port n Hardware specifications and recommended peripherals § http: //Beagle. Board. org/hardware n RSS feed of newly verified peripherals § http: //feeds. feedburner. com/Beagle. Board. Peripherals
Other design benefits http: //beagleboard. org/hardware/design n Open source hardware design Low power § No fan for silent operation § Use a USB cable to power the board (barrel connector power option) USB 2. 0 high-speed on-the-go (OTG) and host-only (EHCI) ports § Host an almost endless set of USB peripheral devices § On-the go port § Acts as ‘device’ when connected to a PC and ‘host’ when connected to a hub § OTG port requires a mini-A to standard-A adapter to act as a host http: //Beagle. Board. org/hardware § Able to emulate a network connection to a PC § Provides power to board n Boot options § Boot from NAND, MMC/SD, serial, or USB using OMAP 3530 ROM § User button § § Boot default: NAND USB serial MMC/SD § Button pressed: USB serial MMC/SD NAND § Avoids “bricking” § Reusable in applications Reset button (function may be altered with software)
Verifying the hardware n Code images, procedure, and sources are provided to verify the board functionality § Links to the diagnostics found at http: //Beagle. Board. org/support § Includes bootloader, Linux kernel, and minimal file system for testing n These sources act as examples for software developers
Baseline tools and software http: //beagleboard. org/resources n n n n n Hardware verification procedure (http: //beagleboard. org. support) § Code images, procedure, and sources are provided to verify the board functionality GPL ARM GNU compiler collection § Code Sourcery version 2007 q 3 is one known-good option § Runs on Linux/Windows and generates ARMv 7/Thumb 2 Free C 6000 compiler for non-commercial use § x 86 -Linux hosted GPL x-load version 1. 4. 2 GPL u-boot version 2009. 01 § Interact over UART or USB and program flash § Boot kernel from UART, NAND, or MMC/SD (FAT 32) § Test UART, DVI-D, S-Video, NAND, and MMC/SD GPL Linux kernel version 2. 6. 28 for diagnostics § Test UART, DVI-D, S-Video, ALSA audio, NAND, MMC/SD, USB OTG, and USB Host Free 3 D graphics libraries (Open. GLES 2. 0) BSD/GPL DSP interface software Free production audio/video codecs for the DSP
Beagle. Board. org n Four primary activities § Buy a board § Learn how to use existing projects § Learn how to join or start a project § Learn about the latest project news n Plans for site § Multi-lingual § Wiki-like editing-through-web § Keep website source open & leverage Open. ID n Facilitates community § Aggregates blogs § Provides community chat § “Of, by, and for” members n n Promotes member actions OMAP 3530 collaboration § Focus “upstream” § Long-term presence § Broad set of problems § Aggregate “downstream” § Inform users of the broader world § Avoid information deluge
Community projects and distros http: //www. flickr. com/groups/beagleboard/pool/ and http: //beagleboad. org/project n Ångström Linux Distribution § § n n Maemo. org FFmpeg § n n n n Firefox 3. 0, Epiphany-Web. Kit, etc. Abi. Word, GIMP, etc. 3 D graphics and DSP codec integration ARMv 7+NEON gcc tool-chain 720 P-24 MPEG 4 decode on ARM+NEON only Beagle SDR (low-power software defined radio) Windows Embedded for Beagle. Board Handheld. org’s Mojo Ubuntu build for ARM Android for Beagle ARM Linux Internet Platform Ubuntu, Debian, Open. OCD, Mamona, Ethernet, OKL 4, robots, home automation, vision, e-ink displays, Free. BSD, QEMU, Fedora, … Kernel, boot-loader, and boot utilities Kernel Several more and growing… Creativity Tools Browser Office Suite Windowing System
A handful of the thousands… Camera streaming application Audio processing Linux home fileserver Fanless multimedia/internet VLC Video. LAN Low-cost kiosk terminal Development platform for mobile Vo. IP Wearable computer CMUcam-style phone applications Bluez and GUI using direct frame Low cost linux pc/gaming Smart home buffering Linux thin client I'm interested to buy 2 to 10 rev-B LCD picture frame device Port xnu boards Autonomous robot Port Open. Wrt (10 preferred ; ) congratulations for your Port Google-Android Networked digital project and its spirit ! Processing images and pattern Home monitoring recognition No idea yet Small linux home fileserver signage I'm not interested in waiting for the platform to mature any longer. Let Port Open. Moko Mobile DTV tuner and Clutter & Qt development Port OKL 4 me know how to get hold of a receiver beagleboard now. Autonomous vehicles Powerful nas with media server and transcoding After discussing with my dev capabilities Home security cameras and powered-curtains guys, Bachelor thesis I'd like my students to design and I confirm I would like to order Media centre build hardware and software to do 20 beagleboards SDR platform for Linux what Time. Capsule does for Speech recognition Mac. OS Project for masters Vehicle Linux/Firefox web add-on for the TV in the applications degree house telematics
Booting the Beagle Board
Equipment at ESC Boston n Powered USB hub For you to keep § Beagle Board Rev. C 3 § SD card § USB Power DVI-D Monitor § SD § n § Content for each class Serial cable § IDC 10 -to-DB 9 adapter § Null modem cable Hub: § Powered USB 2. 0 HS Cables: § USB to Beagle power § HDMI to DVI-D § USB A to mini-B For you to use in the labs § DVI-D monitor § USB keyboard and mouse Desktop Computer Configuration 19
First boot of “ 101” image n n Connect everything and then apply power Image boots up as root by default § Applications Settings Login Setup n Don’t do the next step yet! § Start ‘root terminal’ and use ‘/switchboot’ to start other images § Use ‘halt’ to power down (optional? ) #opkg install font-misc xterm -fn 10 x 20 & 20
Default boot behavior RESET Is USER pressed? Poll USB, Serial, and SD before trying NAND Is u-boot. bin on SD card? Run u-boot. bin from SD card, possibly ignoring environment Is env var set? Execute commands stored in ‘bootcmd’ environment var Execute default commands 21
The five (5) boot phases 1. 2. 3. 4. 5. ROM loads x-load (MLO) X-loads u-boot U-boot reads commands Commands load kernel Kernel reads root file system MLO: 0 x 000000 U-boot: 0 x 020000 Env: 0 x 260000 Kernel: 0 x 280000 File sys: 0 x 680000 22
(1) ROM loads x-load (MLO) http: //www. ti. com/litv/pdf/sprufd 6 a n ROM attempts to load boot image § Sequence of attempts depends if USER button pressed § Not-pressed: NAND USB serial MMC/SD § Pressed: USB serial MMC/SD NAND n For MMC/SD boot § Must have 255 heads and 63 sectors/track § First partition is FAT and bootable § Must have “MLO” as first file and directory entry § “MLO” is x-load. bin. ift renamed n X-load image must be “signed” § sign. GP app is open source n There are utilities for USB and serial boot 23
(2) http: //gitorious. org/projects/x-load-omap 3 X-loads u-boot n X-load is a utility derived from u-boot § Small enough to fit in internal RAM § Configures external RAM § Only configured to read NAND or MMC/SD n X-load 1. 4. 2 looks first on MMC/SD § If it finds u-boot. bin, loads and runs it § Otherwise loads u-boot from the second NAND partition (mtd 1) 24
(3) U-boot reads commands http: //gitorious. org/projects/u-boot-omap 3 n U-boot version allows interaction over the serial and USB ports § Serial cable provided in case you have a laptop § USB driver looks like a USB-to-serial converter device § Use gserial. inf to install a driver in Windows n U-boot environment variables read from flash § Stored in the third flash partition (mtd 2) § ‘bootcmd’ variable stores the commands to execute § ‘bootdelay’ is number of seconds to allow interruption of the boot n Default ‘bootcmd’ reads ‘boot. scr’ auto-script 25
(4) Commands load kernel n U-boot loads kernel and passes it ‘bootargs’ § Default environment is used when variables haven’t been stored in flash § Rev C boards are shipped without variables stored in flash § Console can be used to interrupt the boot process and modify variables § The Rev B u-boot only supported the console over the serial port § The Rev C u-boot adds support for the console over the USB OTG port § Future modifications may support USB keyboard/mouse and DVI-D monitor § Fourth flash partition (mtd 3) is reserved for the kernel n bootm <RAM addr> – executes kernel from RAM 26
Default bootcmd for Rev C http: //gitorious. org/projects/beagleboard-default-u-boot/repos/jason-clone/blobs/for-khasim-rebase/include/configs/omap 3_beagle. h n bootcmd= if mmcinit; then if run loadbootscript; then run bootscript; else if run loaduimage; then if run loadramdisk; then run ramboot; else run mmcboot; fi; else run nandboot; fi; else run nandboot; fi 27
U-boot command summary http: //www. denx. de/wiki/DULG/Manual n n Basic commands § help – provide the list of commands (varies by build) § printenv – lists the contents of the current environment § saveenv – writes the current environment to the flash § setenv <variable> ‘string’ – sets environment variable § autoscr <RAM addr> – run script from RAM MMC/SD § mmcinit – initializes the MMC/SD card § fatls mmc 0 – reads FAT directory on the first partition § fatload mmc 0 <RAM addr> <filename> – load a file into RAM NAND § nand unlock – enables writing to the NAND § nandecc <sw|hw> – configures ECC mode (OMAP 3 specific) § nand erase <start> <length> – erases portion of NAND flash § nand read <RAM addr> <start> <length> – reads into RAM § nand write <RAM addr> <start> <length> – writes from RAM Serial § loadb <RAM addr> – reads into RAM via kermit file send 28
(5) Kernel reads root file system n Kernel mounts root file system based on ‘bootargs’ § § NAND (JFFS 2): root=/dev/mtdblock 4 rw rootfstype=jffs 2 RAMDISK: root=/dev/ram 0 rw ramdisk_size=32768 initrd=0 x 81600000, 32 M MMC/SD: root=/dev/mmcblk 0 p 2 rw rootwait NFS: root=/dev/nfs rw nfsroot=192. 168. 123. 1: /data/target ip=192. 168. 123. 2: : 255. 0 nolock, rsize=1024, wsize=1024 rootdelay=2 29
Configuring the display http: //groups. google. com/group/beagleboard/msg/4 c 64 b 2 c 614622053 n n n video=omapfb vram=10 M omap-dss. def_disp=lcd omapfb. vram=4 M, 3 M omapfb. video_mode=1024 x 768 MR-16@60 30
Other bootargs n nohz=off § Power management n mem=88 M § Reserve memory 31
Some simple tests Understanding the basics of Linux
Getting started with Linux n Starting references § § § n http: //free-electrons/training http: //kernelnewbies. org (/Upstream. Merge) The Linux Documentation Project (http: //www. tldp. org/) Device Drivers Book (http: //www. xml. com/ldd/chapter/book/index. html) http: //kerneltrap. org “The” kernel Git. Web § http: //git. kernel. org/? p=linux/kernel/git/torvalds/linux-2. 6. git n Linux-omap kernel § http: //linux. omap. com § http: //source. mvista. com/git/ (Tony Lindgren) n Others that feed “the” kernel or linux-omap kernel § http: //www. linux-arm. org/git? p=linux-2. 6. git § http: //www. arm. linux. org. uk/ § http: //www. sakoman. net/cgi-bin/gitweb. cgi
Everything is a file http: //free-electrons. com/doc/unix_linux_introduction. pdf n n In Linux, you typically talk to devices using file I/O GPIO example § § § ls /sys; ls /proc; cat /proc/cmdline echo “none” > /sys/class/leds/beagleboard: : usr 0/trigger echo “ 1” > /sys/class/leds/beagleboard: : usr 0/brightness echo “ 0” > /sys/class/leds/beagleboard: : usr 0/brightness echo “heartbeat” > /sys/class/leds/beagleboard: : usr 0/trigger 34
Read events http: //git. kernel. org/? p=linux/kernel/git/torvalds/linux 2. 6. git; a=blob; f=Documentation/input. txt n n n cd ~/utils gcc -o evtest. c. /evtest /dev/input/event 0 § Press the “USER” button § ^C to exit n . /evtest /dev/input/event 4 § Move the mouse § ^C to exit 35
Access monitor EDID n n n cd /sys/bus; ls; cd cat /sys/bus/i 2 c/devices/3 -0050/eeprom i 2 cdump -y 0 x 3 0 x 50 b decode-edid fbset 36
USB OTG and EHCI n n n cd /sys/bus/usb/devices ls cat usb 1/speed cat usb 1/1 -2. 2/manufacturer cd lsusb 37
Networking n n n n Copy linux. inf from SD card to host and connect Beagle ifconfig nano /etc/networking/interfaces ifdown usb 0; ifup usb 0 ifconfig Configure your host using linux. inf ping 192. 168. 123. 1 VNC § x 11 vnc & § Connect with your VNC viewer from your host n Synergy § Start Synergy server on your host § synergyc --daemon --restart 192. 168. 123. 1 38
Writing our own boot script 39
Build u-boot and mkimage n n n cd ~/u-boot-omap 3 make omap 3_beagle_config make 40
Build my. scr n n n cd ~/u-boot-omap 3 cp /media/mmcblk 0 p 1/menu/kridner. script my. script nano my. script. /tools/mkimage -A arm -T script -C none -d my. script my. scr Be very careful before executing the next step § cp my. scr /media/mmcblk 0 p 1/boot. scr § If unsure, run /switchboot now § boot 41
Edit environment in flash n n make env nano /etc/fw_env. config § /dev/mtd 2 0 0 x 20000 n n n n . /tools/env/fw_printenv ln -s tools/env/fw_printenv fw_setenv. /fw_setenv usbtty ‘cdc_acm’. /fw_setenv stdout ‘serial, usbtty’. /fw_setenv stdin ‘serial, usbtty’. /fw_setenv stderr ‘serial, usbtty’. /tools/env/fw_printenv 42
Trying usbtty n n n cp ~/gserial. inf /media/mmcblk 0 p 1/ halt Remove power and SD card Copy gserial. inf from SD to PC Plug USB from Beagle to your PC § Select driver n Start Hyperterminal § Newest serial port, max baud, n 81, no flow n Optional § nand erase 0 x 260000 0 x 20000 43
Native, managed, and webbased UI code development
Native development n Not limited to embedded/cross tools § Reach out to broader developer community n n Native tools easy to install Immediately see impact of your changes § Edit local source files with familiar editors § You still need to manage your code! § Version control with git, svn, cvs, … n Also possible to perform distributed builds § Some packages may require larger memory
Managed code n n Easier to create an emulation environment But what about performance? § JIT compilers may be sufficient § Performance bottlenecks are often in just a few places § Just optimize where the issue is, but build the rest fast! § Important to make sure the rest is open for optimization n Certainly not for every market § If you already know C/GTK+/Qt, use what you know! § If you are new, this may be a way to get started
Web-based UI development http: //www. programmableweb. com/scorecard n n Familiar paradigm for consumers Enables remote control and monitoring Many HTML/Java. Script developers Opens up use of other web services § § Mapping Order fulfillment Storage Social networking and media
Web-based UI development n n Helma is one option for the server side § Based on Java Servlet Container and Mozilla Rhino § Provides sessions, user management, § Write entire applications in XML/HTML and Java. Script § No recompilation required, allowing for dynamic development § Database options for object storage with automatic persistence § Native XML database for flexibility § Java database connection (JDBC) for scale § Drop-in Java. jar files for access to huge libraries of functions Accessing Linux shell and drivers § rt=Packages. java. lang. Runtime. get. Runtime(); rt. exec(“…”) § new Packages. java. io. File(“…”)
Beagle web control demo n beagle-web-control-demo used at ARM Developers’ Conference http: //www. beagleboard. org/gitweb/? p=beagle-web-control-demo. git; a=summary n cd § If not root: sudo. /beagle-web-controldemo/script/permissions. sh n . /helma-1. 6. 1/start. sh & n tail -f helma-1. 6. 1/log/helma. beaglewebcontroldemo. event. log n Browse (using Midori) to § http: //localhost: 8080/demo/static/ARM_Dev. Con/slide 34. html n Turn LEDs “on” and “off” 50
Collaboration tools
Distributed version control n n GIT is different—eliminates often bad assumptions Instead of everyone pushing into Linus’ repository § § n Linus pulls patches from people he trusts Everyone has all of Linus’ history (and their own) locally Patches enter “system” as e-mail messages When a merge is non-trivial, he simply asks others to rebase Mailing list § Archives available to everyone § Accepted patches applied to ‘git’ repositories n Guides to GIT § http: //linux. yyz. us/git-howto. html § http: //git. or. cz/ § http: //www. kernel. org/pub/software/scm/git/docs/
Post patch to OMAP community n Read http: //www. muru. com/linux/omap/README_OMAP_PATCHES n Post your patch to mailing list linux-omap@vger. kernel. org
Chat, mail, forums, blogs, and wikis! n n All exist because they all solve different problems Chat allows you to know someone’s listening http: //beagleboard. org/chat or #beagle on irc. freenode. net § Great for beginner questions and rapid coordination n Mail allows you to reach almost anyone http: //groups. google. com/group/beagleboard § Brings larger group into the conversation § Provides you with a personal log in your inbox n Forums helps get the threads organized n Blogs provide emphasis, filtering, and timeliness n Wikis enable inputs to become documentation https: //community. ti. com/forums/32. aspx (minimal activity to avoid disrupting community critical mass) http: //beagleboard. org/news and http: //beagleboard. blogspot. com http: //e. Linux. org/Beagle. Board and http: //code. google. com/p/beagleboard/wiki
Chat on IRC n http: //freenode. net § § n #beagle: discussion regarding the Beagle Board #neuros: discussion #davinci: discussion regarding TI Da. Vinci products #ol: discussion regarding OMAP Linux (not active) IRC clients § § § http: //beagleboard. org/chat http: //pidgin. im http: //www. mirc. com http: //en. wikipedia. org/wiki/List_of_IRC_clients http: //www. ircreviews. org/clients/
E-mail regarding OMAP Linux n n http: //Beagle. Board. org/discuss http: //vger. kernel. org/vger-lists. html#linux-omap
Forums n http: //community. ti. com
Blogs (RSS feeds) n http: //beagleboard. blogspot. com
Wikis n n n http: //wiki. davincidsp. com http: //tiexpressdsp. com http: //elinux. org/Beagle. Board
Registering Beagle projects http: //code. google. com n n Anyone can create a new open source project Features § Site is “cleaner” than sf. net, but sf. net is OK too § Source control is Subversion § Issue tracking is custom § Provides downloads and wiki support n n n Use common sense and get your manager’s approval Use the tag “beagleboard” Let’s explore: http: //code. google. com/p/beagleboard
Git n What is Git? § Git is a popular version control system designed to handle very § § n n large projects with speed and efficiency; it is used mainly for various open source projects, most notably the Linux kernel. Git falls in the category of distributed source code management tools, similar to e. g. GNU Arch or Monotone (or Bit. Keeper in the proprietary world). Every Git working directory is a full-fledged repository with full revision tracking capabilities, not dependent on network access or a central server. Git is an Open Source project covered by the GNU General Public License v 2. It was originally written by Linus Torvalds and is currently maintained by Junio C Hamano. Read more here: § http: //git. or. cz/ Learn from Linus here: § http: //www. youtube. com/watch? v=4 Xpn. KHJAok 8
Community Participation with Git
Features of Git n Strong support for non-linear development § § n Distributed development § § § n Very fast and scales well even when working with large projects and long histories Commonly an order of magnitude faster Extremely efficient packed format for long-term revision storage Cryptographic authentication of history § § § n Remote changes are imported as additional development branches and can be merged in the same way as a locally developed branch Repositories can be easily accessed via the efficient Git protocol (optionally under ssh) or HTTP No special web server configuration required Efficient handling of large projects § § § n Git supports rapid and convenient branching and merging Includes powerful tools for visualizing and navigating a non-linear development history History is stored in such a way that the name of a particular revision (a "commit" in Git terms) depends upon the complete development history leading up to that commit Once published, it is not possible to change the old versions without it being noticed Tags can be cryptographically signed Toolkit design § § Following the Unix tradition, Git is a collection of many small tools written in C, and a number of scripts that provide convenient wrappers Easy to chain components together to do other clever things
Commands used to pull trees Refer to Tony’s README on muru. com for detailed description on working with OMAP GIT tree. http: //www. muru. com/linux/omap/README_OMAP_GIT Few important commands: To clone OMAP GIT Tree: $ git clone http: //www. kernel. org/pub/scm/linux/kernel/git/tmlind/linux-omap-2. 6. git Note: Setup Proxy Server before cloning the tree: Example: #> export http_proxy=http: //my. proxy. here: port/ To re-sync your branch with mainline: $ git-pull
What do you do with Git? To add new changes: • • • Open file in any unix compatible editor. Do the modifications Linus Main Line Save the file TAG To store the file in repository: 0 $ git status $ git update-index arch/arm/plat-omap/myfile. c $ git commit -s Linux OMAP 0 My-Clone To generate patches using GIT tool: TAG 1 0 $ git format-patch -o <output_dir> abcdef 0123456789 abcdef 01 Other methods: TAG 1 - Create another local branch and take a normal diff between the too. - Use Quilt. (http: //download. savannah. gnu. org/releases/quilt/)
Everyday Git http: //www. kernel. org/pub/software/scm/git/docs/everyday. html n n n n n git-show-branch(1) to see where you are. git-log(1) to see what happened. git-checkout(1) and git-branch(1) to switch branches. git-add(1) to manage the index file. git-diff(1) and git-status(1) to see what you are in the middle of doing. git-commit(1) to advance the current branch. git-reset(1) and git-checkout(1) (with pathname parameters) to undo changes. git-merge(1) to merge between local branches. git-rebase(1) to maintain topic branches. git-tag(1) to mark known point.
Community participation with Open Embedded
What is Open Embedded (OE)? http: //www. openembedded. org n OE is like a top-level ‘Makefile’ § Sophisticated layer on top of ‘make’ § Tool for building distributions § Maintains meta-database for building open source n Bit. Bake is a python tool core to OE § Database is built of recipes for each package § Inheritance for reuse (autotools, …) § Satisfies dependencies and follows build steps § Fetch, unpack, patch, configure, compile, stage, install, & package n Opkg tool for package management § Replacement for Debian ‘dpkg’ § Utilizes pre-built package feeds
What role does OE play? n Collaboration on entire distribution § “Ångstrøm” is a distribution built with OE n Full control over almost every aspect § Tool chain, package set, patches, kernel, . . . n Relatively complete starting point § ‘armv 7 a’ compiled binaries in “Ångstrøm” n Possible to take a “demo” snapshot § Play with higher-level development
What does Ångstrøm provide today? http: //beagleboard. org/project/angstrom n Browsers § Gecko: Firefox 3, Fennec, … § Web. Kit: Epiphany, … n Media § FFmpeg, XMMS, GStreamer, Myth. TV, … n Development § C, Java, Python, Perl, Mono, Ruby, Tk, … n Gaming, Networking, … http: //www. angstrom-distribution. org/repo/
Installing Ångstrøm to NAND http: //beagleboard. org/demo/angstrom n SD card FAT formatted (default, optionally bootable) § boot/kernel/ramdisk to get into OE console § § n § bootargs = console=tty. S 2, 115200 n 8 ramdisk_size=32768 root=/dev/ram 0 rw rootfstype=ext 2 initrd=0 x 81600000, 32 M bootcmd = mmcinit; fatload mmc 0 80300000 u. Image; fatload mmc 0 81600000 angstrom-console-rd. gz Flash board § § n Copy of tar. bz 2 of full file system image desired Boot console image § n Can store kernel (and ramdisk) in flash opkg install mtd-utils; opkg install mkfs-jffs 2 flash_eraseall /dev/mtd 4; mkfs. jffs 2 -o /dev/mtdblock 4 mkdir /mnt/flash; mount -t jffs 2 /dev/mtdblock 4 /mnt/flash tar xvjf Angstrom-XXX. rootfs. tar. bz 2 -C /mnt/flash Boot new file system § § bootargs = console=tty. S 2, 115200 n 8 console=tty 0 root=/dev/mtdblock 4 rw rootfstype=jffs 2 nohz=off video=omapfb: vram: 2 M, vram: 4 M bootcmd = nand read 80200000 280000 400000; bootm 80200000
What is Open Embedded made from? n Bit. Bake build tool n Meta-data n A version control repository of the meta-data § Specifically written for top level make problem space § Uses inheritance to factor common support from recipes § Simple language with shell sequences § Language elements and functions can use Python for advanced cases § Package recipes and classes § A number of distribution definitions § A number of platform definitions § Uses Monotone for SCM (moving to Git) § Maintains dev and (recently) stable branches
OE reference: typical processing n n Satisfy all dependencies Build (default command) § § § Fetch Unpack Patch Configure Compile Stage packages § Install directory § Package packages get the source code extract the source code apply patches (local or fetched) run any configuration steps do actual compilation install locally for use by other install product files to temporary take installed files and place into helloworld, helloworld-dbg, helloworld-dev, helloworld -doc, helloworld-local
Top Level Default OE flow n n Build toolchain and libraries Build needed components to packages Build file-system image from packages Will take Gigabytes of storage and hours to perform the above on a clean install
Alternate OE flows n n n Use precompiled toolchain Use pre-downloaded source archives Build toolchain and package as an SDK Build collection of packages only Build file-system image from pre-built packages*** This may not be a current capability
What is OE not good for (today) ? n Active development of a given component § There are ways to use OE in this fashion but it is not a strength and you can lose code if you are not careful n GUI tools to guide and monitor § All config is edit of text files § Build log is very verbose and not visually structured
Limitations and alternatives n Limitations § Build environment not always well isolated § Many build scripts do native build environment tests n Alternatives § Matrix § Sponsored by ARM: http: //linux. onarm. com § Utilizes Scratchbox and QEMU § Reproduces target environment in cross-compile § Relies on emulation on build host § Mamona § Targets Nokia Internet Tablets § Utilizes Open Embedded, Scratchbox, and QEMU § Generates Debian source/binary packages § Solves some “partial emulation” problems § Native development or managed code environments
Resources for more information and support 79
Some hardware options http: //wiki. omap. com/index. php? title=OMAP 3_Boards TI/Mistral OMAP 35 x EVM n. Nokia Internet Tablets n. Logic. PD OMAPZoom n. Gumstix Overo n. Analogue & Micro Cobra 3530 n. Cogent CSB 740 n Logic. PD OMAP 35 x Dev. Kit / Medical EVM 5. 75” x 6. 25” Mini Board 3” x 3” Logic. PD OMAP 34 x Mobile Development Kit 3. 8” x 6. 3” x. 95” Gumstix Overo Not to scale. Approximate size noted (in inches) Beagle Board 3” x 3” OMAP 3 5 x EVM 4. 25” x 7” OMAP 34 x SDP 8. 5” x 11”
Many tools options http: //focus. ti. com/dsp/docs/dspplatformscontenttp. tsp? section. Id=2&family. Id=1525&tab. Id=2224 The many OS vendors for are OMAP 35 x not listed here Tool / Top features Debug TI Code Low-level ARM and Composer DSP Studio ARM Real. View Compile Other Low-level ARM (ARMv 7) and DSP (NEON roadmap) Poweraware debug Low-level ARM Application-level ARM (ARMv 7, NEON) Lauterbach Low-level and app ARM and DSP None Extensive trace Green Hills Low-level and app ARM and DSP Low-level ARM Trace Linux application debug Linux kernel/app ARM (ARMv 7, NEON) Code. Sourcery • Cortex-A 8 uses ARMv 7 instructions Additional third party information: here
OS vendors for OMAP 35 x n n n Monta. Vista Ridge. Run Time. Sys b. Square QNX Many, many more 82
TI OMAP 35 x software architecture http: //www. ti. com/omap 35 x Applications GUI App Framework 2 D/3 D APIs GFX Driver Multimedia Framework Optional DRM Codec Engine and Link Codec Engine Linux Kernel / Win. CE & Power Management GFX ARM audio video image FC BIOS video image audio C 64 x+ DSP and Video Acceleration
Accessing the ™ C 64 x + n OMAP/Da. Vinci “Dummies Book” n DSP/BIOS™ Link source available DSP http: //www. ti. com/dummiesbook http: //tiexpressdsp. com § Provides code loading and data passing § Kernel portions licensed as GPL n DSP/BIOS RTOS and components http: //tiexpressdsp. com § Enables sharing of the DSP as a resource n Free TI DSP compiler https: //www-a. ti. com/downloads/sds_support/targetcontent/Linux. Dsp. Tools/index. html § Non-commercial use n Full support in Code Composer Studio http: //www. ti. com/expressdsp
The Beagle Board community n n Support for this board is provided through an active community of hobbyists and developers Being very open enables developers to share § Keeps costs low § Enables more people to participate n n 24/7 access to fellow developers http: //Beagle. Board. org/discuss Ask your questions before you buy… Participate and enjoy!
Participating in the community n Joining the herd of cats http: //lwn. net/talks/elc 2007 n Building Community for your open source project http: //www. eclipsecon. org/2006/Sub. do? id=268 n Video of Greg Kroah-Hartman on the Linux kernel http: //www. linuxelectrons. com/news/linux/16774/greg-kroahhartman-linux-kernel n Sending kernel patches upstream http: //wiki. omap. com/index. php? title=Patch_upstream_sending
Summary n n n Open source is very diverse and OMAP 35 x supports that diversity Beagle Board enables new possibilities for open collaboration Enjoy programming again!
Thank you! n n n jdk@ti. com jkridner@beagleboard. org http: //beagleboard. org/chat § IRC nickname: jkridner
Beagle. Board Hardware
Topics Covered n n n Overview Features Hardware Support Upcoming Revisions Questions and discussion
Project Overview n Shipped First Board July 2008 § 10, 000 Boards shipped n Open Source Hardware § Schematics, PCB, and BOM n n Continual improvements § Community input § Balanced against cost § Rev B 4, B 5, B 6, B 7, C 2, C 3 Community Supported § http: //beagleboard. org § >2100 subscribers § Beagleboard. org handles the RMAs
Overview (Cont) n Multiple Distributors § Digi. Key § >1, 000 per month § Mouser § Spark. Fun (Pending) § IDA Systems (India) n Production § Built in the US § Plans for Asia
n n 3” x 3” Power Features § USB § 5 V DC n Processor § § n n OMAP 3530 600 MHz DSP 3 D Graphics 256 MB DRAM 256 MB FLASH
Features (cont) n Serial Port § Header n Audio § Stereo § Input 3. 5 mm Jack § Output 3. 5 mm Jack n Display port § DVI-D § LCD Header § S-Video
Features (cont) n n SD/MMC Connector Expansion Header § MMC § UART § SPI § GPIO § Power Button § Reset § User LEDs § Power § User (2) § PMIC
Hardware Support Material n n n Schematics § PDF, Or. CAD PCB § Gerber, Allegro Database System Reference Manual § Block Diagram § Circuit descriptions § Schematic n n Debug Section. BOM § Excel Open Source Hardware
Upcoming Revisions n n C 4 § Production version of the OMAP 3530 § OMAP 3530 DCBB § No SW Impact § Limited number of units planned C 5 § USB Host Issue Fix § Minor PCB change § No Impact on SW n Rev D? /2. 0 § Q 2 2010 § Price? § Adding good stuff
Questions and Discussion?
- Slides: 96