Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Embedded Linux Projects Using Yocto Project Cookbook

You're reading from   Embedded Linux Projects Using Yocto Project Cookbook Over 70 hands-on recipes for professional embedded Linux developers to optimize and boost their Yocto know-how

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784395186
Length 324 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Alex Gonzalez Alex Gonzalez
Author Profile Icon Alex Gonzalez
Alex Gonzalez
Arrow right icon
View More author details
Toc

Table of Contents (7) Chapters Close

Preface 1. The Build System 2. The BSP Layer FREE CHAPTER 3. The Software Layer 4. Application Development 5. Debugging, Tracing, and Profiling Index

Troubleshooting your Wandboard's first boot

If you have problems booting your image, follow this recipe to troubleshoot.

Getting ready

  1. Without the microSD card inserted, plug in a microUSB-to-USB cable to the USB OTG interface of your Wandboard. Check the lsusb utility on your Linux host to see whether the Wandboard appears as follows:
    Bus 002 Device 006: ID 15a2:0054 Freescale Semiconductor, Inc. i.MX6Q SystemOnChip in RecoveryMode

    If you don't see this, try a different power supply. It should be 5V, 10W.

  2. Make sure you connect a NULL modem serial cable between the RS232 connector in your Wandboard target and a serial port on your Linux host. Then open a terminal program like minicom with the following:
    $ minicom -D /dev/ttyS0 -b 115200
    

    Note

    You will need to add your user to the dialout group, or try to run the command as sudo. This should open a 115200 8N1 serial connection. The serial device may vary in your Linux host. For example, a USB-to-serial adapter may be detected as /dev/ttyUSB0. Also, make sure both hardware and software flow control are disabled.

How to do it...

  1. Insert the microSD card image to the module slot, not the base board, as the latter is only used for storage and not for booting, and power it. You should see the U-Boot banner in the minicom session output.
  2. If not, you may have a problem with the serial communication. By default, the Ethernet interface in the FSL community BSP image is configured to request an address by DHCP, so you can use that to connect to the target.

    Make sure you have a DHCP server running on the test network where the target is.

    You can use a packet sniffer like Wireshark to capture a network trace on your Linux host and filter packages like the bootp protocol. At the least, you should see some broadcasts from your target, and if you use an Ethernet hub, you should also see the DHCP replies.

    Optionally, you can log in to your DHCP server and check the logs to see if a new IP address has been assigned. If you see an IP address being assigned, you might want to consider adding an SSH server, like Dropbear, to your core-image-minimal image so that you can establish a network connection with the target. You can do this by adding the following line to the conf/local.conf configuration file:

    IMAGE_INSTALL_append = " dropbear"

    Note the space after the initial quote.

    After building and reprogramming, you can then start an SSH session to the Wandboard from your Linux host with:

    $ ssh root@<ip_address>
    

    The connection should automatically log in without a password prompt.

  3. Try to program the default microSD card images from http://www.wandboard.org/index.php/downloads to make sure the hardware and your setup is valid.
  4. Try to reprogram your microSD card. Make sure you are using the correct images for your board (for example, do not mix dual and quad images). Also, try different cards and card readers.

These steps will have your Wandboard start booting, and you should have some output in your serial connection.

There's more...

If everything else fails, you can verify the position of the bootloader on your microSD card. You can dump the contents of the first blocks of your microSD card with:

$ sudo dd if=/dev/sdN of=/tmp/sdcard.img count=10

You should see a U-Boot header at offset 0x400. That's the offset where the i.MX6 boot ROM will be looking for the bootloader when bootstrapped to boot from the microSD interface. Use the following commands:

$ head /tmp/sdcard.img | hexdump
0000400 00d1 4020 0000 1780 0000 0000 f42c 177f

You can recognize the U-Boot header by dumping the U-Boot image from your build. Run the following commands:

$ head u-boot-wandboard-quad.imx | hexdump
0000000 00d1 4020 0000 1780 0000 0000 f42c 177f
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime