Embedded Linux practical labs with the Beagle Board

Beagle boardGet valuable embedded Linux experience using our practical labs on a Beagle Board.

We were asked to customize our embedded Linux training session with specific labs on OMAP 3530 hardware. After a successful delivery on the customer site, using Beagle boards, here are our training materials, released as usual under the terms of the Creative Commons Attribution-ShareAlike 3.0 license:

  • Lecture slides (PDF, ODF): the same slides as in our embedded Linux sessions.
  • Practical labs (PDF, ODF), with specific instructions for the Beagle Board.
  • Training agenda: (PDF, ODF)

If you are the happy owner of such a board (both attractive and cheap), or are interested in getting one, you can get valuable embedded Linux experience by reading our lecture materials and by taking our practical labs.

Here’s what you would practise with if you decide to take our labs:

  • Build a cross-compiling toolchain with crosstool-NG
  • Compile U-boot and the X-loader and install it on MMC and flash storage.
  • Manipulate Linux kernel sources and apply source patches
  • Configure, compile and boot a Linux kernel for an emulated PC target
  • Configure, cross-compile and boot a Linux kernel on your Beagle Board
  • Build a tiny filesystem from scratch, based on BusyBox, and with a web server interface. Practice with NFS booting.
  • Put your filesystem on MMC storage, replacing NFS. Practice with SquashFS.
  • Put your filesystem on internal NAND flash storage. Practice with JFFS2 too.
  • Manually cross-compile libraries (zlib, libpng, libjpeg, FreeType and DirectFB) and a DirectFB examples, getting familiar with the tricks required to cross-compile components provided by the community.
  • Build the same kind of graphical system automatically with Buildroot.
  • Compile your own application against existing libraries. Debug a target application with strace, ltrace and gdbserver running on the target.
  • Do experiments with the rt-preempt patches. Measure scheduling latency improvements.
  • Implement hotplugging with mdev, BusyBox’s lightweight alternative to udev.

Note that the labs were tested with Rev. C boards, but are also supposed to work fine with Rev. B ones. You may also be able to reuse some of our instructions with other boards with a TI OMAP3 processor.

Of course, if you like the materials, you can also ask your company to order such a training session from us. We will be delighted to come to your place and spend time with you and your colleagues.

About Michael Opdenacker

Michael Opdenacker is the founder of Free Electrons. He is best known for all the free embedded Linux and kernel training materials that he created together with Thomas Petazzoni. He is always looking for ways to increase performance, reduce size and boot time, and to maximize Linux' world domination. More details...
This entry was posted in Hardware, News, Technical, training and tagged , , , . Bookmark the permalink.

10 Responses to Embedded Linux practical labs with the Beagle Board

  1. Maciej Wasiel says:

    Hi,
    I’m following your lab instructions and, like some other people on the web who have followed this tutorial, I’ve run into a problem when booting a cross-compiled kernel on my beagle board where the boot process stops after busybox starts up. The following is the serial output:

    Texas Instruments X-Loader 1.4.4ss (Aug 8 2010 – 14:57:52)
    Beagle Rev C4
    Reading boot sector
    Loading u-boot.bin from mmc

    U-Boot 2010.06-00267-gb1f95b4 (Aug 08 2010 – 15:08:09)

    OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz
    OMAP3 Beagle board + LPDDR/NAND
    I2C: ready
    DRAM: 256 MiB
    NAND: 256 MiB
    In: serial
    Out: serial
    Err: serial
    Board revision Ax/Bx
    Die ID #7c4e000400000000040373050f01300b
    Hit any key to stop autoboot: 0
    mmc1 is available
    reading boot.scr

    ** Unable to read “boot.scr” from mmc 0:1 **
    reading uImage

    2291592 bytes read
    Booting from mmc …
    ## Booting kernel from Legacy Image at 82000000 …
    Image Name: Linux-2.6.35-rc6-dirty
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2291528 Bytes = 2.2 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum … OK
    Loading Kernel Image … OK
    OK

    Starting kernel …

    Uncompressing Linux… done, booting the kernel.
    Linux version 2.6.35-rc6-dirty (mwasiel@mwasiel-desktop) (gcc version 4.3.2 (crosstool-NG-1.4.2) ) #1 Mon Aug 9 01:21:59 EDT 2010
    CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
    Machine: OMAP3 Beagle Board
    Memory policy: ECC disabled, Data cache writeback
    OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp )
    SRAM: Mapped pa 0×40200000 to va 0xfe400000 size: 0×100000
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
    Kernel command line: console=ttyS2,115200n8 vram=12M omapfb.mode=dvi:1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 128MB 128MB = 256MB total
    Memory: 255252k/255252k available, 6892k reserved, 0K highmem
    Virtual kernel memory layout:
    vector : 0xffff0000 – 0xffff1000 ( 4 kB)
    fixmap : 0xfff00000 – 0xfffe0000 ( 896 kB)
    DMA : 0xffc00000 – 0xffe00000 ( 2 MB)
    vmalloc : 0xd0800000 – 0xf8000000 ( 632 MB)
    lowmem : 0xc0000000 – 0xd0000000 ( 256 MB)
    modules : 0xbf000000 – 0xc0000000 ( 16 MB)
    .init : 0xc0008000 – 0xc00d9000 ( 836 kB)
    .text : 0xc00d9000 – 0xc043d000 (3472 kB)
    .data : 0xc043e000 – 0xc046f8c0 ( 199 kB)
    Hierarchical RCU implementation.
    Verbose stalled-CPUs detection is disabled.
    NR_IRQS:402
    Clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
    omap_hwmod: l3_hwmod: cannot be enabled (3)
    omap_hwmod: l4_core_hwmod: cannot be enabled (3)
    omap_hwmod: l4_per_hwmod: cannot be enabled (3)
    omap_hwmod: l4_wkup_hwmod: cannot be enabled (3)
    Reprogramming SDRC clock to 332000000 Hz
    GPMC revision 5.0
    IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
    Total of 96 interrupts on 1 active controller
    OMAP GPIO hardware version 2.5
    OMAP clockevent source: GPTIMER12 at 32768 Hz
    Console: colour dummy device 80×30
    Calibrating delay loop… 489.46 BogoMIPS (lpj=1912832)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    regulator: core version 0.5
    NET: Registered protocol family 16
    Found NAND on CS0
    Registering NAND on CS0
    Unable to get DVI reset GPIO
    OMAP DMA hardware revision 4.0
    bio: create slab at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c_omap i2c_omap.1: bus 1 rev3.12 at 2600 kHz
    twl4030: PIH (irq 7) chaining IRQs 368..375
    twl4030: power (irq 373) chaining IRQs 376..383
    twl4030: gpio (irq 368) chaining IRQs 384..401
    regulator: VUSB1V5: 1500 mV normal standby
    regulator: VUSB1V8: 1800 mV normal standby
    regulator: VUSB3V1: 3100 mV normal standby
    twl4030_usb twl4030_usb: Initialized TWL4030 USB module
    regulator: VMMC1: 1850 3150 mV at 3000 mV normal standby
    regulator: VDAC: 1800 mV normal standby
    regulator: VDVI: 1800 mV normal standby
    regulator: VSIM: 1800 3000 mV at 1800 mV normal standby
    i2c_omap i2c_omap.3: bus 3 rev3.12 at 100 kHz
    Switching to clocksource 32k_counter
    musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0
    musb_hdrc musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
    NET: Registered protocol family 2
    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    NetWinder Floating Point Emulator V0.97 (double precision)
    VFS: Disk quotas dquot_6.5.2
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    msgmni has been set to 498
    alg: No test for stdrng (krng)
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
    serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
    serial8250.2: ttyS2 at MMIO 0×49020000 (irq = 74) is a ST16654
    console [ttyS2] enabled
    brd: module loaded
    loop: module loaded
    usbmon: debugfs is not available
    ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
    ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
    ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
    ehci-omap ehci-omap.0: irq 77, io mem 0×48064800
    ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 3 ports detected
    i2c /dev entries driver
    TCP cubic registered
    NET: Registered protocol family 17
    NET: Registered protocol family 15
    Power Management for TI OMAP3.
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
    regulator_init_complete: incomplete constraints, leaving VDVI on
    regulator_init_complete: incomplete constraints, leaving VDAC on
    drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
    Freeing init memory: 836K
    init started: BusyBox v1.4.1 (2007-04-20 15:26:03 CEST) multi-call binary
    Starting pid 346, console /dev/ttyS2: ‘/etc/init.d/rcS’
    mmc0: new high speed SD card at address 0007
    mmcblk0: mmc0:0007 SD02G 1.90 GiB
    mmcblk0: p1

  2. Maciej Wasiel says:

    Found the solution to my post above. ttyS0 has to be changed to ttyS2 in fwlabs/sysdev/xkernel/data/rootfs/etc/inittab file when using initramfs.

  3. vamsi says:

    hi,
    i got the beagleboard-xM recently and following your manual to boot up the board.
    i am tryin to make the boot image on a new MMC card.
    i copied the MLO file, uboot.bin(from mkimage) and uImage to the FAT partition. however the board doesnt read from MMC when i turn it on.are there any other files that have to be copied onto the board.i would greatly appreciate your response.

    Thanks,
    Vamsi

  4. abhishek kunwar says:

    Hi’
    While booting 2.6.35.8 kernel on beagleboard-xm (A3) I got this kernel panic :
    Detailed error:
    Root-NFS: No NFS server available, giving up.
    VFS: Unable to mount root fs via NFS, trying floppy.
    VFS: Cannot open root device “nfs” or unknown-block(2,0)
    Please append a correct “root=” boot option; here are the available partitions:
    b300 3870720 mmcblk0 driver: mmcblk
    b301 3863601 mmcblk0p1
    Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

    I am passing root=/dev/nfs but I don’t know how to solve this issue.

    • Passing root=/dev/nfs is not sufficient, you also need to pass the ip= and nfsroot= options. Moreover, your NFS server must be set up appropriately on your development workstation.

  5. Pragnya says:

    Hello sir,

    I installed the latest angstrom demo image on beagleboard rev C4 using
    SD card. Logged in as root. Pico projector is connected to HDMI port
    and shows the login screen. I have a serial port connected with tera
    term pro and a mouse and keyboard connected to beagleboard. I can play
    the included BigBunny movie on pico projector.
    Now my project aim is to use this beagle board as an interface between my system and DLP Pico Projector to configure the projector using i2c commands.
    so when i type the following command to check for i2c buses on beagle board it isa displaying the below lines..

    root@beagleboard:/dev# ls i2c*
    -sh: i2c bus not found

    What does it mean? Is that mean the drivers are not there ?
    Please help me in finding out what is the problem and what i need to do.
    Thank you in advance.

  6. thala says:

    VFS: Cannot open root device “nfs” or unknown-block(2,0)
    What does it mean? Is that mean the drivers are not there ?
    Please help me in finding out what is the problem and what i need to do.
    Thank you in advance.

    • Hi,

      This kind of error typically happens when root filesystem support over NFS is not available, or if the kernel failed to mount the root filesystem for multiple reasons.

      Could you post the few lines that appeared before this final error?

      Michael.

  7. John says:

    Hi,
    I followed the lab instructions to build a rootfs (busybox-1.19.4) and ended up with the following kernel panic while booting from an mmc card:
    Kernel panic – not syncing: No init found. Try passing init= option to kernel.

    My bootcmd is listed below:
    mmc rescan 0
    setenv bootargs ‘console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait’
    setenv bootcmd ‘fatload mmc 0 0×80300000 uImage ; bootm 0×80300000′
    bootd

    I have also tried passing the following values to init in my bootcmd but the error still persists:
    init=linuxrc, init=/linurc, init=/sbin/init.

    The following is the serial output:

    1924680 bytes read
    ## Booting kernel from Legacy Image at 80300000 …
    Image Name: Linux-2.6.32
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 1924616 Bytes = 1.8 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum … OK
    Loading Kernel Image … OK
    OK

    Starting kernel …

    Uncompressing Linux………………………………………………………………………………………………………… d.
    Linux version 2.6.32 (john@john-MacBookPro) (gcc version 4.4.3 (crosstool-NG 1.13.0) ) #1 Thu Dec 29 01:08:15 PST 2011
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
    Machine: OMAP3 Beagle Board
    Memory policy: ECC disabled, Data cache writeback
    OMAP3630 ES1.0 (l2cache iva sgx neon isp )
    SRAM: Mapped pa 0×40200000 to va 0xfe400000 size: 0×100000
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
    Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait
    PID hash table entries: 2048 (order: 1, 8192 bytes)
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Memory: 256MB 256MB = 512MB total
    Memory: 515712KB available (3300K code, 299K data, 124K init, 0K highmem)
    Hierarchical RCU implementation.
    NR_IRQS:402
    Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
    Reprogramming SDRC clock to 332000000 Hz
    GPMC revision 5.0
    IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
    Total of 96 interrupts on 1 active controller
    OMAP GPIO hardware version 2.5
    OMAP clockevent source: GPTIMER12 at 32768 Hz
    Console: colour dummy device 80×30
    Calibrating delay loop… 492.62 BogoMIPS (lpj=1925120)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    regulator: core version 0.5
    NET: Registered protocol family 16
    Found NAND on CS0
    Registering NAND on CS0
    OMAP DMA hardware revision 5.0
    bio: create slab at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c_omap i2c_omap.1: bus 1 rev4.0 at 2600 kHz
    twl4030: PIH (irq 7) chaining IRQs 368..375
    twl4030: power (irq 373) chaining IRQs 376..383
    twl4030: gpio (irq 368) chaining IRQs 384..401
    regulator: VUSB1V5: 1500 mV normal standby
    regulator: VUSB1V8: 1800 mV normal standby
    regulator: VUSB3V1: 3100 mV normal standby
    twl4030_usb twl4030_usb: Initialized TWL4030 USB module
    regulator: VMMC1: 1850 3150 mV normal standby
    regulator: VDAC: 1800 mV normal standby
    regulator: VPLL2: 1800 mV normal standby
    regulator: VSIM: 1800 3000 mV normal standby
    i2c_omap i2c_omap.3: bus 3 rev4.0 at 100 kHz
    Switching to clocksource 32k_counter
    musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0
    musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
    NET: Registered protocol family 2
    IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
    TCP: Hash tables configured (established 16384 bind 16384)
    TCP reno registered
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    NetWinder Floating Point Emulator V0.97 (double precision)
    VFS: Disk quotas dquot_6.5.2
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
    msgmni has been set to 1007
    alg: No test for stdrng (krng)
    io scheduler noop registered
    io scheduler anticipatory registered (default)
    io scheduler deadline registered
    io scheduler cfq registered
    omapfb: configured for panel omap3beagle
    omapfb: DISPC version 3.0 initialized
    Console: switching to colour frame buffer device 128×48
    omapfb: Framebuffer initialized. Total vram 1572864 planes 1
    omapfb: Pixclock 64000 kHz hfreq 59.0 kHz vfreq 76.9 Hz
    Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
    serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
    serial8250.2: ttyS2 at MMIO 0×49020000 (irq = 74) is a ST16654
    console [ttyS2] enabled
    brd: module loaded
    loop: module loaded
    usbmon: debugfs is not available
    ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
    ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
    ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
    ehci-omap ehci-omap.0: irq 77, io mem 0×48064800
    ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 3 ports detected
    i2c /dev entries driver
    TCP cubic registered
    NET: Registered protocol family 17
    NET: Registered protocol family 15
    Power Management for TI OMAP3.
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    regulator_init_complete: incomplete constraints, leaving VDVI on
    regulator_init_complete: incomplete constraints, leaving VDAC on
    drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
    Waiting for root device /dev/mmcblk0p2…
    usb 1-2: new high speed USB device using ehci-omap and address 2
    usb 1-2: configuration #1 chosen from 1 choice
    hub 1-2:1.0: USB hub found
    hub 1-2:1.0: 5 ports detected
    mmc0: new high speed SD card at address 1234
    mmcblk0: mmc0:1234 SA02G 1.81 GiB
    mmcblk0: p1 p2
    kjournald starting. Commit interval 5 seconds
    EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
    EXT3 FS on mmcblk0p2, internal journal
    EXT3-fs: recovery complete.
    EXT3-fs: mounted filesystem with writeback data mode.
    VFS: Mounted root (ext3 filesystem) on device 179:2.
    Freeing init memory: 124K
    Kernel panic – not syncing: No init found. Try passing init= option to kernel.

    – John

    • santhosh says:

      Hi,

      Cross check bootloader environment variables are set properly.

      Check your file system path in bootloader environment variables.

      If possible, Please share the uboot environment variables.

      @uboot prompt type “printenv” command, send the details.

      Regards,
      Santhosh

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>