Chumby Hacker Board

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
barrymead
 
Posts: 15
Joined: Thu Feb 24, 2011 1:48 am

Re: Chumby Hacker Board (ROM Image FIX)

Post by barrymead »

NO MORE OVERLAPPING PARTITIONS!
The binary ROM image file that you dd into a microSD card available here http://files.chumby.com/sean/rom-hackerboard-3320.zip
has a tiny glitch in it that is easily repaired with the fdisk utility on a desktop linux computer, but each time you use this image file
you have to repeat the fdisk partition fix procedure. Now you can pre-fix the partition table before your make your microSD card.

The fixrom program copies data from the original ROM image to a new ROM image, only patching the two incorrect bytes at the addresses that I obtained
by comparing the original ROM image with a ROM image made after the overlapping partitions had been corrected with fdisk.

On your desktop linux computer compile the fixrom utility with: gcc -Wall fixrom.c -o fixrom

Then patch your rom image with this command: ./fixrom rom-falconwing.img rom-falconwing-fixed.img

Create your microSD card using the "rom-falconwing-fixed.img" file, and you won't have to correct the overlapping partitions
with fdisk ever again.

To create the fixrom.c program I wrote a little program called delta, which performs a byte by byte comparison of two binary files.
I compared the downloadable rom-falconwing.img image file with an image file that I created after fixing the partition table with fdisk.
This delta utility found only two bytes that were incorrect, so I created the fixrom.c program to copy the rom image file patching only those
two incorrect bytes. I tried to edit the ROM image file with a binary file editor, but it wouldn't handle files this big, so I wrote the fixrom.c copy utility.
Both the fixrom.c and the delta.c are simple 1-page exceptionally well documented programs so you will have no trouble understanding what they do
and how they work. Both are open source, and available for download below.

Hope this helps, Barry Mead
Attachments
fixrom.c
This program patches the rom_falconwing.img file to remove the overlapping partition problem (copies file patching only 2 bytes)
(2.15 KiB) Downloaded 416 times
delta.c
This utility compares ROM image files and displays the address and bytes where they are different (in hex). Does a byte by byte compare.
(2.23 KiB) Downloaded 366 times

User avatar
barrymead
 
Posts: 15
Joined: Thu Feb 24, 2011 1:48 am

Chumby Hacker Board (Reducing Flash Writes)

Post by barrymead »

If you are like me, you want your Chumby Hacker board to be reliable, and write to the flash card as rarely as possible.
I noticed that by default they store the DHCP resolution data in a file on the flash drive under /etc/resolv.conf.

This means that every time you bring up the internet it uses up one of the 10,000 writes to the flash drive.
I wanted to avoid that, so I came up with a solution. First remove the file /etc/resolv.conf and replace it with a
symbolic link to /tmp/resolv.conf like this:

mount -o remount,rw /
rm /etc/resolv.conf
ln -s /tmp/reslolv.conf /etc/resolv.conf

The /tmp directory is stored on ramdisk, and does not write to the flash drive. Then replace the /sbin/dhclient-script file
with the one you get after unzipping the file attached below. It saves the resolv.conf file to the /tmp directory instead of the /etc
directory eliminating the need to write to the flash drive. The instructions below show you how to save a copy of your original
dhclient-script, so you can go back to the old configuration if you should ever want to.

mv /sbin/dhclient-script /sbin/original-dhclient-script
unzip dhclient-script.zip
cp dhclient-script /sbin
mount -o remount,ro /

Now you can attach to the internet and run dhclient without mounting the file system for read/write, or writing to the flash drive.
Attachments
dhclient-script.zip
This version of dhclient-script saves the ip address resolved by dhclient into files on the /tmp directory (ramdisk)
(2.64 KiB) Downloaded 161 times

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Chumby Hacker Board

Post by adafruit »

good idea! (altho flash is a little more complex than that, it does wear leveling)

User avatar
barrymead
 
Posts: 15
Joined: Thu Feb 24, 2011 1:48 am

Chumby Hacker Board (Battery)

Post by barrymead »

When I bought my lithium polymer battery, I thought it was plug and play with the hacker board. But after it arrived I discovered that the included connector is not of the type that is compatible with
the Hacker board. So I posted a question on the Chumby forum about this issue and they sent me the Adafruit link showing how to upgrade your battery.

Solved: With about two dollars worth of parts from Digikey, you can upgrade your Adafruit battery to be compatible with the connector and charging circuitry of the Hacker Board Here is the Adafruit link that shows you how to get the parts you need and how to hook it all up:

http://www.ladyada.net/learn/chumby/power.html

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”