I’m currently doing a project a my university The Technical University of Denmark involving a Gumstix computer (connex 400xm). I got money from my institute to buy it as they thought my idea sounded novel. My team and I are building an adapter to update an electronic weight. The Gumstix computer is a tiny Linux computer with a serial and an ethernet port. We are writing software to make it translate xml-rpc from the network into serial commands the weight can understand. We are also looking into using Zeroconf to make it easy to find the weight on the network, and talk to it through another computer.
We downloaded version 1541 of buildroot for the Gumstix using a guide on the Gumstix wiki:
$ svn co -r1541 http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot
We then changed to the gumstix-buildroot directory and ran the following commands:
$ make defconfig
I chose option 11 xscale when asked which target architecture variant i
wanted and pressed enter at the rest of the options. I then ran
menuconfig, which gives you a menu system where you can add and remove
parts of the system:
$ make menuconfig
I selected “Target Options” and set the “Pad Output” to 0xEC0000 (the size of the internal flash). I also removed the option “Use sumtool to write…”. I went down to “Package Selection for the target” and pressed enter. I deselected a lot of packages that didn’t have weren’t going to be needed such as: alsa, aumix, bluez, gpsd, madplay, pcmiautils, pppd, wifistix, wireless tool and more. I then went all the way down to python and pressed space. That gave the option of including pyserial and pexpect, which I added as well. I exited out of the menu and answered yes to saving the configuration. The buildroot system was now ready to compile so I issued:
$ make
After a little while it asked which frame buffer device I wanted. As I wasn’t going to use a display I just hit enter. The compiling went on for a very long time.
After the compiling was done I found out that I couldn’t upload to the Gumstix as it was loaded with u-boot 1.1.4 and not 1.2… It seemed like I would have to update it which I didn’t want to, as this is a very risky operation that can brick the Gumstix. I thought I was out of luck and tried some older versions of buildroot, but those made python seg fault. I googled franticly and stumbled over a page by RoboMontreal by accident. It said to do the following after a make:
$ mkdir -p build_arm_nofpu/root/boot/
$ cp uImage build_arm_nofpu/root/boot/
$ rm rootfs.arm_nofpu.jffs2
$ make
This copies the kernel to the root image, which solved the problem with u-boot as it wasn’t able to find the kernel. I copied the file rootfs.arm_nofpu.jffs2 to the MMC flash card and put it into the Gumstix. I connected to the Gumstix with a serial null cable set with the following settings:
- 115200 baud
- 8 data bits
- 1 stop bit
- No parity
I turned the Gumstix on and hit enter when u-boot started. This gave me a simple console, which I used to replace the root file system:
GUM> mmcinit
GUM> fatload mmc 1 a2000000 rootfs.arm_nofpu.jffs2
GUM> protect on 1:0-1
GUM> erase all
GUM> cp.b a2000000 40000 ${filesize}
GUM> boot
This system booted and Python seemed to work with pyserial and xmlrpclib which we need for the project. It took me a lot of hours to figure this out but now we finally had something working.