Difference between revisions of "GettingTheConsoleLCDVXWorking"

From HBMobile
Jump to navigationJump to search
(Need roommate!)
m (Reverted edits by 77.244.212.231 (Talk); changed back to last version by 63.249.90.31)
 
Line 44: Line 44:
 
# If you don't get a nice yellow light come on when you plug the power cable into the ConsoleLCD-VX, then you may have a defective board. I think I saw something about this on the GumStix mailing list.
 
# If you don't get a nice yellow light come on when you plug the power cable into the ConsoleLCD-VX, then you may have a defective board. I think I saw something about this on the GumStix mailing list.
  
Need
+
== Connecting to the Board ==
<a href=http://coomahalig.info/noreen-roommate.htm>noreen roommate</a>  for Spring 2008, room is available after Dec.7th. $450 month ($465 with pet)  
+
 
Home is fully furnished and nicely decorated (you just need your bedroom stuff), roommates are a young fun married couple. (Husband currently away with USMC). Male or female roomate is fine, just have to be clean and not loud!! We do have a cat so no dogs please!!
+
You should now have two connections to the board: a serial connection (through which you can update the flash image) and the USB keyboard (that is mildly nicer interface, IMHO, than the serial link.) The default connection settings are: 115200 bps, 8-bit, No Parity, 1-stop bit.
Call Danielle 229-291-1627 or Caroline 904-838-6789
+
 
 +
You should see a login prompt at least on the serial connection. If you don't see anything on the LCD, you probably have to reflash the boot loader, root file system and kernel. In case you forgot, the root password on all GumStix boards is: 'gumstix' (without the quotes.)
  
 
= Software =
 
= Software =

Latest revision as of 08:40, 12 December 2007

Intro

Success!

This is a simple introduction to how I got my Gumstix Verdex XML4-BT (400MHz PXA 270 with BlooTueth) working with the ConsoleLCD-VX and the Samsung 4.3" LCD.

Hardware

Things You Should Have

Hardware You'll need!
  1. A Gumstix Verdex Board of some sort (I have the Gumstix Verdex XML4-BT)
  2. A ConsoleLCD-VX
  3. A Samsung 4.3" LCD (I bought mine from GumStix)
  4. A 9-Pin DIN to Mini-DIN 8 null modem serial cable. Again, you can get them at the gumstix online store, it's easier than driving to Fry's and finding they don't carry them.
  5. A USB-A to Mini-USB cable.
  6. A female to female USB A adapter. Again, Fry's doesn't carry them, so you can buy them from the gumstix online store.
  7. A Power Supply for the board. (I use the 4V supply that came with my Basix Waysmall.)
  8. A USB Keyboard
    closeup of the electronics
  9. (optional) a USB to Serial Converter if you don't have a "real" serial port.
  10. A Linux box. I like xubuntu.
  11. A terminal program that knows how to send files over a serial port via ymodem or kermit protocols. (I use Dave Alverson's Z-Term on MacOS-X and Miniterm on Linux.)

Assembling the Hardware

  1. Connect the LCD to the ConsoleLCD-VX. The connector was a bit odd, and it threw me for a few minutes. If you look carefully at the connector, there's a "drawer" on the bottom of the connector made of black plastic. This drawer pulls out about a millimeter to allow you to insert the ribbon connector from the LCD. On either side of the connector, opposite the long side that has the soldered leads connecting it to the board, you'll see a tiny black plastic "hook." if you pull on both of these hooks out towards the long edge of the board, you'll find they slide out. Once you've slid this thing out, the ribbon cable slides in pretty easy. Once the ribbon connector is in place, slide the "drawer" back in by pressing on both of the "hooks." I found that a sharp pencil helped with this step.
  2. Connect the Verdex to the ConsoleLCD-VX. Note that it connects so the Verdex is over the consoleLCD-vx board. It does not connect like a tweener (the tweener, if connected, would hang out over the board.) There is a slight mechanical interference here, or at least there was on my revision.
  3. Connect the serial cable to the middle serial port on the ConsoleLCD-VX board.
  4. Connect the other part of the serial cable to your system. (I use a Macintosh to connect to the Verdex, but a Ubuntu Linux box to compile things. There's no reason why you can't use a Linux machine to connect to the system. I'm just using a Mac 'cause my Linux laptop is very, very slow.)
  5. Use the USB gender changer to connect your USB keyboard to your USB A to Mini USB cable. (If you're one of the rare breed with a USB keyboard that terminates in a Mini USB connector, you don't have to do this.)
  6. Connect the keyboard to the Mini USB connector on the ConsoleLCD-VX.
  7. Apply power to the board.
LCD Connector Open
LCD Connector Closed
LCD Connector Connected
Verdex on the ConsoleLCD-VX
Proper positioning of the serial cable
USB Gender Changer

Troubleshooting

  1. Careful... these connectors don't like a lot of stress. I'm using the stand from my Nokia 770 tablet to position everything "just right."
  2. If you don't get a nice yellow light come on when you plug the power cable into the ConsoleLCD-VX, then you may have a defective board. I think I saw something about this on the GumStix mailing list.

Connecting to the Board

You should now have two connections to the board: a serial connection (through which you can update the flash image) and the USB keyboard (that is mildly nicer interface, IMHO, than the serial link.) The default connection settings are: 115200 bps, 8-bit, No Parity, 1-stop bit.

You should see a login prompt at least on the serial connection. If you don't see anything on the LCD, you probably have to reflash the boot loader, root file system and kernel. In case you forgot, the root password on all GumStix boards is: 'gumstix' (without the quotes.)

Software

Preparing your Linux Box

  1. Find a Linux Box. I'm using a VMWare virtual machine using Xubuntu 7.04. Feel free to use something else, but you're on your own if you have problems.
  2. Download updated packages. I did this with the command

    sudo apt-get install build-essential libncurses5-dev bison flex texinfo zlib1g-dev gettext libssl-dev libc6-dev make g++ gcc automake1.9 subversion

    Adrian mentioned that his Ubuntu system came with the multiverse server commented out of the /etc/apt/sources.list file. This wasn't a problem for me, but if you suspect it is, then uncommenting the lines with "multiverse" in the sources.list file and issuing the command

    sudo apt-get update

    should do the trick.
  3. Check to see if /bin/sh is a link to dash. If it is, you want to change that with the following:

    sudo /bin/bash
    cd /bin
    rm sh
    ln -s bash sh

  4. If you don't have /bin/gzcat, create it with the command:

    sudo /bin/bash
    cd /bin
    ln -s zcat gzcat

  5. And now you're ready to download the source:

    svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot

Start Building

  1. You may want to review the Buildroot page at the GumStix wiki. It's where I got most of this process. What we're trying to do in this step is to produce the files:
    • rootfs.arm_nofpu.jffs2
    • u-boot.bin, and
    • uImage
    . These will later be loaded onto the device.
  2. And start the build process!

    cd gumstix-buildroot
    rm .config
    make defconfig

    If you look closely, you'll find a file in the buildroot directory named .defconfig. You'll be tempted to assume the rm .config line above is a misprint and delete the .defconfig file. Don't do this. The make defconfig command will ask you two questions: what kind of CPU you have and how fast it is. I have a 400MHz Verdex (PXA270), so my answers were "Gumstix Verdex" and "400 MHz". Your mileage may vary.
  3. Next, issue the command

    make

    It will ask you what kind of LCD you have. I have the Samsung display, so (big shock) I selected that option.
  4. Depending on the speed of your CPU, you may compile quickly. Or... like me, you may have time to go out and see a movie or two and come back. I discovered that my system will stop without error, but without building a root filesystem. I just typed in make again and everything built fine.

Loading the Software

Okay, this is where you can really hork your device if you're not careful. If you're in any way widgey about reflashing things, then you should get someone else to do this for you. But... I've done it a couple times without a problem.

Disclaimer: If you damage your device by following these instructions, it 'aint my fault. I'm providing them to the community as a service, I expect you to know what you're doing and to not do anything bad.

Reflashing the Boot Loader (u-boot.bin)

  1. Find the file u-boot.bin. It should be in your gumstix-buildroot directory.
  2. Get ready to quickly hit the spacebar.
  3. With the terminal up and running, recycle power on the device.
  4. Quickly hit the spacebar to stop the autoboot sequence. You should see a prompt that says

    GUM>

    You're now in the boot loader.
  5. Type the command

    loady

    . The boot loader is now waiting for you to upload the new u-boot.bin. Use your terminal program's "send ymodem" command to send the u-boot.bin file. This shouldn't take too long; I think it takes my setup less than a minute.
  6. Type the commands

    protect off 1:0-1
    era 1:0-1

    This will unprotect the boot loader blocks and erase them. Be very, very careful. If you lose power after these commands, but before the following command finishes, you'll seriously hork your Verdex. These commands will take a small amount of time, but nothing major.
  7. Type the command

    cp.b a2000000 0 ${filesize}

    to copy the boot loader image into the proper flash location. Again, this will take a small amount of time, but certainly less than 5 minutes.
  8. Type the command

    pro on 1:0-1

    This turns protection back on for the boot loader. This helps prevent accidental erasure while you're updating the root filesystem and the kernel.
  9. Now use the

    res

    command to reset the board. Get ready to quickly hit the spacebar again.

Reflashing the Root Filesystem and Kernel

  1. Find the file rootfs.arm_nofpu.jffs2. It should be in your gumstix-buildroot directory.
  2. Get ready to quickly hit the spacebar.
  3. With the terminal up and running, recycle power on the device.
  4. Quickly hit the spacebar to stop the autoboot sequence. You should see a prompt that says

    GUM>

    You're now in the boot loader.
  5. Type the command

    loady

    . The boot loader is now waiting for you to upload the new root filesystem image. Use your terminal program's "send ymodem" command to send the rootfs.arm_nofpu.jffs2 file. This takes friggin' forever. It takes about 25 minutes or so on my system.
  6. Type the following compound command:

    jera all && cp.b a2000000 40000 ${filesize}

    This command erases everything in flash except the two blocks that contain the boot loader. Be very sure you protected the boot loader with the pro on 1:0-1 command in an earlier step. After erasing flash, it copies the root image to the appropriate place in memory. This also takes friggin' forever. But the nice thing is both the erase command and the copy command spit out dots to tell you it's still working. If this takes more than 10 minutes, I would start to worry.
  7. Find the file uImage. It should be in your gumstix-buildroot directory.
  8. Type the command

    loady

    . The boot loader is now waiting for you to upload the new kernel. Use your terminal program's "send ymodem" command to send the uImage file. This takes a minute or so, so don't go too far away.
  9. Type the commands

    katinstall 100000
    katload 100000

    These commands install the kernel into the proper location and then load it in preparation for booting.
  10. Type the command

    bootm

    to boot.