Wednesday, April 9, 2008

09 Frustrated Flashing

Since we need more packages on the gumstix than we were given, I went about flashing the file-system, playing it safe by first checking out a revision slightly after they started including C++ support by default in the buildroot.
Checking out revisions is very easy, just a standard subversion checkout command:

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

for the latest build, or

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

for a specific revision, where XXXX is the revision number required.

I began by installing the extra packages onto our current gumstix revision - if it ain't broke, and all. Checking out revisions, while easy, takes a bit of time. Then, the making of the revision takes an even longer time: probably around 2 hours or so for the latest ones. Couple this with another 40-60 minutes for transferring the file-system via serial to the gumstix, and you've got a long wait ahead.

Flashing the file-system is fairly straightforward:

{Interrupt the boot}
GUM>loadb a2000000
{Access transfer menu in hypertrm and send rootfs.arm_nofpu.jffs2 file}
GUM>protect on 1:0-1
GUM>erase all
GUM>cp.b a2000000 40000 ${filesize}
GUM>boot

This went through easily, but upon finishing, the wireless capability ceased to work, much to my chagrin. Some tinkering lead me to a discovery that the wifistix board wasn't being seen at all, despite being powered. After some searching online to no avail, I decided to just try another file-system.

I tried a few post-1444 revisions but running the makefile just wasn't working for some reason. Having run into this hitch, I decided to just opt for the latest release - supposedly not the most stable but it managed to make successfully, so it was worth a shot.
However, it turns out that the bootloader currently being used by the gumstix, u-boot 1.1.4, was older than the compiled u-boot provided with my new revision: u-boot 1.2.0. This meant that not only did I have to flash the file-system and kernel to the gumstix, I also had to replace u-boot which, as I understand from the U-Boot wiki, is tantamount to manually disarming a minefield - one slip-up and I'm toast.

GUM>loadb a2000000
{Access transfer menu in hypertrm and send u-boot.bin file}
GUM>protect off 1:0-1
GUM>era 1:0-1
GUM>cp.b a2000000 0 ${filesize}
GUM>reset

Thankfully this went off without a hitch. Upon booting I was getting some errors, but this is understandable as I hadn't flashed a kernel or a file-system; there was nothing there to load.
Putting on the file-system was the same as previously quoted, and transferring the kernel was very similar:

{Interrupt the boot}
GUM>loadb a2000000
{Access transfer menu in hypertrm and send uImage file}
GUM>katinstall 100000
GUM>katload 100000
GUM>bootm

This enabled the gumstix to boot, which I was very happy with as I now knew I hadn't bricked the unit. However, not only did the latest revision not fix my wifistix problem, it also appeared to break the bluetooth capability. I tried, again, searching online and tinkering around myself but I'd been left with all my previous problems, as well as some new ones, neither of which seemed to have answers online.

So, I decided to flash the file-systemagain, to revision 1445 this time as I'd seen it mentioned as working on the buildroot wiki. Another make, another transfer, and the wifistix was being detected again - I was very glad here, as it ensured me that the system wasn't bricked. Unfortunately, there were still a few problems with the wireless; I was able to scan for networks, but not able to connect to my home network. A bit of searching around online lead me, ironically, to a page about gumstix wireless on the UCD trac. Turns out that the revision I was using dropped the last character on the network essid.

So, at this stage I had my extra packages on the gumstix, and was actually able to test them out. C++ cross compilation worked fine, albeit with a small hello world programme. gpsd was also present, as was gpspipe, which was an excellent sign as they had not previously been included. Unfortunately though, I wasn't able to test either of these features because of the bluetooth not working.

At this point, I'm facing a dilemma: do I flash to yet another revision of the file-system in the hope of fixing the bluetooth, and risk breaking something new, or do I attempt to fix the bluetooth on the current revision? I've been attempting the latter all day, with no result, so I may have to flash a new revision. I'm hoping a solution to my bluetooth problem will pop up tomorrow.

3 comments:

Anonymous said...
This comment has been removed by the author.
Anonymous said...

I left a comment earlier but it just dawned on me that u guys are the third years with the blimp project! This is what lack of sleep does! I've been having identical problems to you guys. Try revision 1161. I just used and bluetooth and wireless seem to be fine now.

cillians said...

We are indeed the blimp project! I was using revision 1161 from the start, but I think it may be missing some of the GPS functionality we need. Not sure yet whether to go back and forego GPS stuff, or to try yet another revision...