HOWTO Reflash the GumStix Verdex

From HBMobile
Revision as of 19:29, 16 December 2007 by Msh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.

Before you start this process, you should have the files:

  • u-boot.bin
  • rootfs.arm_nofpu.jffs2, and
  • uImage

These files are what you get when you build the system from the GumStix buildroot.

Reflashing the Boot Loader (u-boot.bin)

Important Note: You may not need to reflash your boot loader. If you bump the cable or lose power while reflashing the filesystem (below), it's generally recoverable. If mistakes occur while flashing the boot-loader, you could brick your GumStix.

Put another way... You'll likely only have to install the boot loader once. And even then, depending on when you ordered your Verdex and what version of the buildroot you're trying to build, you may not need to re-install the boot loader.

Unfortunately, I don't know what versions of the boot loader are appropriate for which version of the buildroot. However, my experience was that I had to re-install the boot loader once.

  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.