Beagle Guide

Embed Size (px)

Citation preview

  • 8/2/2019 Beagle Guide

    1/23

    BO

    RRA

    DO

    RB E A G L E B O A R D

    M A N U A L G U I D E

    (for dummies)

    l

    Ricardo Cauelo Navarro(dummy)

  • 8/2/2019 Beagle Guide

    2/23

  • 8/2/2019 Beagle Guide

    3/23

    iii

    LicenseCopyright 2010 Ricardo Cauelo Navarro .

    Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.3or any later version published by the Free Software Foundation; with noInvariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copyof the license is included in the file named FDL.

  • 8/2/2019 Beagle Guide

    4/23

  • 8/2/2019 Beagle Guide

    5/23

    Contents

    1 Introduction 1

    2 Components 2

    3 Connections 6

    4 Booting up 15

    4.1 SD Memory Card . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Minicom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    v

  • 8/2/2019 Beagle Guide

    6/23

  • 8/2/2019 Beagle Guide

    7/23

    1IntroductionThis is a basic illustrated guide about how to connect successfully Beagle-Board to a PC. This guide is aimed to people with no experience in thisgadgets and those who need making the board function quickly, at the firstattempt and with no headaches.

    For this, a pack of components available at the boards website will beused. At this way, the same kind of components will be connected, as thereare serveral versions and reviews of the board that include subtle hardwarechanges -specially, changes related with connectivity-.

    I also get a Debian GNU/Linux image ready that can be downloaded

    and copied onto a memory card. So, do not worry any more about placingthe memory card into the board and turning it on to start experimentingwith the board.

    1

  • 8/2/2019 Beagle Guide

    8/23

    Simplicity is the final achievement. Afterone has played a vast quantity of notes andmore notes, it is simplicity that emerges as thecrowning reward of art

    Frdric Chopin 2Components

    The board used on this guide is a Rev C2 BeagleBoard, used at the Teaproject1. Board specifications and other technical details are explained onthe Technical Report 1. As this is not the main objective of this guide, letsleave the technical stuffaside.

    Figura 2.1: Box label

    Appart from the board, a serie of components will be used to connectthe board to a PC, to supply it and to add supporting-peripheral ports.Components used are included in the kit located at http://specialcomp.com/beagleboard/RevC2.htm (figura 2.2).

    1In fact, this guide was written to be enclosed to the project documentation.

    2

    http://specialcomp.com/beagleboard/RevC2.htmhttp://specialcomp.com/beagleboard/RevC2.htmhttp://specialcomp.com/beagleboard/RevC2.htmhttp://specialcomp.com/beagleboard/RevC2.htm
  • 8/2/2019 Beagle Guide

    9/23

    Components 3

    Figura 2.2: Components kit for the BeagleBoard Rev C2

    In order to avoid undesirable surprises, it is recommended to get a kit,available on that website. It is well-known that this kit works.

    The board will be connected to a PC via serial cable. As the board doesnot have a suitable interface to support it, a converter cable will be neededfor the boards interface. It is available at http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=BBC01-ND . Now you can connect the board toa PC serial port via DE-9 null modem.

    Figura 2.3: DE-9 adapter cable

    Nowadays, this port is not usually included because designers think itis easier to remove this port, in order to put there 2 or 4 additional USB

    http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=BBC01-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=BBC01-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=BBC01-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=BBC01-ND
  • 8/2/2019 Beagle Guide

    10/23

    4 Components

    ports. For this reason, you may need a USB Serial adapter cable.

    Figura 2.4: USB Serial adapter cable

    A 2GB SD memory card is also needed. The bigger the memory is, thebetter. Actually, it is difficult to find memory cards with less capacity than2GB. If you do not have a memory card reader in your PC, be aware that itis also necessary. These things are not included in the memory card kit.

    Other things you may need are:

    An additional null modem serial cable to connect the serial converterof the board to the USB-Serial converter. In my case, I will need afemale to female cable.

    An adapter to connect the power supply included in the kit becauseit has North American pins. An adapter like this 2.6 costs approxi-mately e1 (picture 2.6).

    An Ethernet cable with RJ45 pins to connect the board to a modem,router or whatever.

  • 8/2/2019 Beagle Guide

    11/23

    Components 5

    Figura 2.5: Memory card and card reader

    Figura 2.6: Yankee power supply and adapter

  • 8/2/2019 Beagle Guide

    12/23

    It can scarcely be denied that the supremegoal of all theory is to make the irreduciblebasic elements as simple and as few as possi-ble without having to surrender the adequaterepresentation of a single datum of experience

    Albert Einstein 3Connections

    A cleared work surface near from a PC will be used. So, get it one firstly. Ihave been using my desk, next to my laptop (picture 3.1). This area willbe full of cables soon, and everybody knows that, when many tangledcables are together in the same place, they come alive and chaos domainseverything, so it is a good idea to draw up a plan for it beforehand.

    (a) Not-to-work surface (b) Adapted not-to-work surface

    Figura 3.1: Work area

    Here we have the box with the board inside. Im curious and astonished.Lets open it.

    6

  • 8/2/2019 Beagle Guide

    13/23

    Connections 7

    Figura 3.2: Opening

    At last, here is the board! The board is on my palm, so you can noticethe size of the board. I have to clarify that my hands are small, this isreason of why the board seems to be bigger than what it really is.

    Figura 3.3: Taking the board

    Handle the board with care, God knows what you have touched before.Take it along the edge or using the plastic wrapping as a tray, like in thepicture.

  • 8/2/2019 Beagle Guide

    14/23

    8 Connections

    The brand is indeed written on the board:

    Figura 3.4: Yes, it is a BeagleBoard

    Among other things, the OMAP3530 is located inside the chip markedas OMAP3:

    Figura 3.5: Here is the chip

    Now, take the things out of the kit and mount them. Firstly, connectthe DE-9 adapter to the board. Look at the picture carefully to see more

  • 8/2/2019 Beagle Guide

    15/23

    Connections 9

    in detail where and how to connect it. Take care with the connectors

    possition, pay attention to the red stripe of the cable.

    Figura 3.6: Successful connection of the adapter

    Connect the hubs feeder cable to the hub. Do not mind about the

    posibility of getting confused and thinking that the power supply shouldbe connected to the board, because the boards jack does not fit the powersupplys slot.

    Figura 3.7: Hubs power supply and slot

  • 8/2/2019 Beagle Guide

    16/23

    10 Connections

    Figura 3.8: Hub connected to power supply

    Take the power supply cable of the board. USB A connector must beconnected in one of the hubs slot, and the power supply plug to the board.

    Figura 3.9: Power supply cable

  • 8/2/2019 Beagle Guide

    17/23

    Connections 11

    Figura 3.10: Male USB A connector with female USB A

    Figura 3.11: Board power supply connection

    Now you have only got the serial cable to connect. Use the USB Serialadapter. Connect both DE-9 connectors.

  • 8/2/2019 Beagle Guide

    18/23

    12 Connections

    Figura 3.12: DE-9 connectors

    Connect the other end of the USB Serial adapter to the PC.

    Figura 3.13: Inminent conection of the adapter to the PC

  • 8/2/2019 Beagle Guide

    19/23

    Connections 13

    This is the result:

    Figura 3.14: Laboratory

    And is this cable spare? OK. This board has two USB ports. One ofthem is a regular female A connector. This port acts as an EHCI host. Thismeans that any kind of device can be connected here to make this devicebe controlled by the board. The other port has a female mini-A connector(not very common). There, the board is supplied and can work as a hostor as a slave. So, why do not I use it? Because, if a mini-A plug (this plugjumps a pair of pins, configuring this port as a host) is connected in thisport, it should work as a host. However, when I tested it, there was no way

    to make it function as host. I do not know why. But it is expected to startquickly, so I recommend you not to bother about it because it can be causedby a designing effect, for example. I stopped thinking about it because itwas pretty frustrating, as detailed in the picture 3.15. Despite the fact thatthe port detected the hub and the board was being powered, I could notmake the Ethernet port work in Linux.

    So, the remaining option is connecting the hub to the EHCI port, whichworks properly.

  • 8/2/2019 Beagle Guide

    20/23

    14 Connections

    Figura 3.15: My face when I was trying to make the hub work via USB OTG

    port

  • 8/2/2019 Beagle Guide

    21/23

    Ill play it first and tell you what it is laterMiles Davis

    4Booting upEverything is connected, so prepare what remains.

    4.1 SD Memory Card

    This memory card will be used to store the whole system (kernel + filesystem). For this, no modifications of the board are needed. Just place thememory card into the board and turn it on. The charger pump startup(that will be reconfigured later on) will do the rest.

    Start by downloading the system zipped image. Unzip the image with:

    $ b u n zi p 2 s d . dd . b z 2

    As a result of this, a 2GB file will appear, and this file will be stored inthe memory card.

    Insert the memory card in the PC and check which device refers to it.Once the memory card has been connected, this can be seen by checkingthe last kernel messages:

    $ d m es g | t ai l

    For example, I have this:

    [ 3 4 14 8 3 .2 3 8 45 1 ] s d b : s d b 1 s d b 2 s d b3 < s d b5 >

    [ 3 4 14 8 3 .3 4 2 45 1 ] s d 1 0 : 0: 0 : 0: [ s d b ] A t t ac h ed S C SI r e m ov a b le d i sk

    So, the memory card refers the device /dev/sdb. Then copy the systemimage onto the memory card with:

    $ d d i f = ./ s d . dd o f =/ d e v / sd b

    And now place it in the board.

    15

  • 8/2/2019 Beagle Guide

    22/23

    16 Booting up

    4.2 Minicom

    Minicom is the program that will be used to have access to the board serialconsole. For this, licenses are necessary to have acess to the PC serial device,so you must probably be logged as root.

    As you did with the memory card, you can find out what kind of devicemust be used if the computer does not have a serial port and de USB Serialadapter must be used. Connect the adapter to a USB port and enter

    $ d m es g | t ai l

    I have this:[ 3 4 19 5 9 .5 9 7 57 6 ] u s b 1 - 1: p l 23 0 3 c o nv e r te r n o w a t ta c h ed t o t t y US B 0

    [ 3 4 19 5 9 .5 9 7 57 6 ] u s b 1 - 1: N e w U S B d e vi c e f o un d , i d V en d o r = 06 7 b , i d P ro d uc t = 2 3 03

    [ 3 4 19 5 9 .5 9 7 57 6 ] u s b 1 - 1: N e w U S B d e vi c e s t ri n g s : M f r = 1 , P r od u ct = 2 , S e r ia l N um b e r = 0

    [341959.597576] usb 1-1: Product: USB-Serial Controller

    [341959.597576] usb 1-1: Manufacturer: Prolific Technology Inc.

    So, the serial port used for the communication would be /dev/ttyUSB0.

    Then, run Minicom:

    % m i n ic o m

    And press Ctrl-A Z to have access to the help menu. Press O to configureMinicom and select Configure serial port.

    +- -- -- -- -- -- -- [ Co nf ig ur at io n ]- -- -- -- -- -- -- -+

    | Routes and files name |

    | File transfer protocols |

    | Serial port configuration |

    | Dialed modem and number |

    | Screen and keyboard |

    | Save configuration as dfl |

    | Save configuration as ... |

    | Quit |

    +- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -+

    Press A to edit the device and make changes. Set the hardware flowcontrol to none by pressing F and press E to scroll to another menu.

    Press E to select a baud rate of 115200 bps and Q to restore theremaining parameters. Press Intro to return to the previous menu. Theresult should be a configuration like the following one:

    A - Se ri al de vi ce : / de v / tt yU SB 0

    B - L o ck f i le l o ca t i on : / v a r / l o ck

    C - Callin program :

    D - Callout program :

    E - Bps / Parity / Bits : 115200 8 N1

  • 8/2/2019 Beagle Guide

    23/23

    Booting up 17

    F - H a rd w a re f l ow c o nt r o l : N o

    G - S o ft w a re f l ow c o nt r o l : N o

    R e tu r n b y p r e ss i n g E s c a n d s e le c t in g Q ui t . P r es s C t rl - A m t o r e s ta r t t h e c o n e c ti o n , n o w y o u

    c a n c o n n e ct t h e b o a r d t o t h e e l e c t ri c c u r re n t . S e v e r al c h ar g e r p u m p s t a rt u p m e s sa g e s

    should be displayed.\\

    I f t h i s i s t h e f i r st t i me t h e b o a rd i s b o o te d , s t op i t b y p r e ss i n g a n y k e y w h en t h e u - b o ot

    c o u nt d o wn i s d i s pl a y ed a n d e n te r :

    \begin{lstlisting}[style=consola , numbers=none]

    s e te n v b o ot c m d m m c in i t ; f a tl o a d m m c 0 : 1 0 x 8 0 30 0 00 0 u I m ag e ; b o ot m 0 x 8 03 0 00 0 0

    setenv bootargs console=ttyS2 ,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro

    WARNING, these orders change the bootloader configuration inorder to make the board boot from the memory card. It is necessaryto configure the board again if you want the board to boot from the

    NAND memory

    These orders configure the bootloader to boot from the image locatedin the memory card according with several parameters. The parameterconsole let us see the console output via serial port.

    Restart the board and, if everything is OK, you should be watching howthe system boots after the u-boot countdown. Congrats! You have a wholeready-to-use system. By the way, the root password is beagle.