Sunday, June 10, 2012

This Pi are more rectangular than square

Here's a list of what I've done to get my Raspberry Pi into a mode suitable for development. (Suitable to my way of thinking, not to someone in their right mind.) As always these ideas are never mine, and I am trying to give credit where it's due.

I started with the Debian Squeeze image from Raspberry Pi. Nothing against Arch, but I use Ubuntu on my laptop and this seemed like an easier transition. There are good instructions linked from the download page for how to get your image transferred to an SD card so it will boot correctly. The image is sized for a 4 GB card, but at Publix the 4 GB and 8 GB cards were the same price (a ridiculously low price, in my opinion) so I got an 8 GB card and followed the additional instructions to resize the root partition and file system to fill the extra space. I did all this work from my laptop, which has an SD card slot on it that loads as /dev/mmcblk0 under Ubuntu.

After having cast around the house looking for a composite input monitor or an available HDMI-capable monitor and come up empty (curse you Diablo III), it occurred to me that I should be able to run X remotely. Then it occurred to me that, unless I could log in at the console first, I'd never know the IP address of the card and the argument was moot. A little searching showed that, as usual, I wasn't the first person to have faced and overcome this issue.


I put the SD card into my laptop and mounted the two partitions - one is the /boot and one is /. I set the board to have a static IP address by configuring the root partition's /etc/network/interfaces file as follows:
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.253
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

I thenfollowed this set of instructions  to turn on SSH (the initial prerequisite) and then install and configure TightVNC. Put the SD card back in the board, power it on, and away we go.

Based on some searching, it became apparent at this point that the OWFS installation was going to be a little more complicated. The as-distributed kernel from Raspberry Pi doesn't include (as of this writing) the kernel module required to engage the i2c bus hardware which can be used to drive 1-Wire directly. However, the community stepped in (again) and now there's a new kernel that includes the driver. The comments on that post include crucial instructions on installation and also the need for updated firmware, both of which I managed to follow without too much difficulty.

Next, to get OWFS going, I downloaded the source tarball from SourceForge and followed the build instructions (configure, make, make install). One thing I noticed was that the 'owfs' binary wasn't built on my board for some reason. It turns out that it has to do with libusb versions and Debian Squeeze. By following some instructions on how to build OWFS on Squeeze, I got owfs compiled and installed.

I can't really test them too much because I don't have the hardware ready yet, but at least they show the simulation expected. Here's a page that shows how to get the software running. When I try to start owfs, it chirps because I don't have the USB bus master, but I will take that as a win for now.


No comments:

Post a Comment