Tag Archive for Raspberry Pi

First test build lasted 25 minutes before everything exploded!

https://www.flickr.com/photos/-cavin-/Just ran the very first version of an app we are building on multiple RPIs, it lasted for all of 25 minutes and generated good data before melting down. The fact that all the Pis gave up the ghost at the same exact time, and were all using the same power supply, makes me suspect a power glitch. The RPIs are horribly underpowered (and i mean power in the electrical sense) — for instance it is a known issue that with some power supplies, taking a picture will cause the ethernet connection to drop.

But honestly I’d have been happy if they ran for 5 minutes before exploding. So progress.

Programmable behavior everywhere, in everything.

“A nice article”:http://radar.oreilly.com/2012/11/to-eat-or-be-eaten.html from @mikeloukides that extends on the “software is eating the world” idea, and talks about how the world is eating software. Programmable behaviour is getting stuffed into everything, and the trend is just going to accelerate.

I’ve got a pile of computers on my desk right now — Arduinos, Raspberry Pis, Beaglebones. They just keep getting cheaper. And faster. And lower power. And re-imagined in new form factors — go look at the number of Arduino variants you can buy. And I’ve got a pile of super cheap sensors on my desk — cameras, audio, pressure, temperature, humidity, IR, you name it. Computing and sensing is getting so cheap, it is going to be embedded everywhere — and not just in the obvious places, but in objects made of “fabric or paper or wood”:http://www.kobakant.at/DIY/?p=3794, or in “plastics”:http://www.3ders.org//articles/20121122-printing-electronic-sensors-using-low-cost-3d-printers.html. This last one is really fascinating, combining 3d prototyping and electronic behavior, I can’t wait to play around with this.

And the world is getting more capability to build these devices. Prototyping with 3d printers. Funding bootstrapping by Kickstarter and its ilk (for example “circuits.io”:http://www.adafruit.com/blog/2012/11/28/circuits-io-kickstarter-like-electronics-funding-raspberry_pi-robotic-shield-on-launch/). Easy sourcing via services like “Maker’s Row”:http://makersrow.com.

Exciting times. I got involved with personal computers because I was excited about bringing computing power to everyone. This next wave of bringing computing power into everything seems even more exciting.

Raspberry Pis — Limit 25 to a customer

It is fascinating to me that a site like “MCM”:http://www.mcmelectronics.com/content/en-US/raspberry-pi has to limit raspberry pi sales to 25 to a customer. Many possible reasons for this of course, but exceedingly interesting.

Great evening at Metrix Create Space last night

Rich and I had a great evening geeking out at “Metrix Create Space”:http://metrixcreatespace.com/ in Capitol Hill last night. We attended the Intro to Arduino class and had a blast wiring things up, playing with the Arduino IDE, and absorbing the maker vibe. I’d love to follow up and take the E-textiles course they have coming up, because that just sounds cool, what could go wrong with electricity and computers embedded in your clothing?

I totally love the maker revolution. My desk right now is covered with Arduinos, sensors, Raspberry Pis, LEDs, and all the other desiderata of modern hobbyist electronics. Awesome stuff.

Grab bag of raspberry pi dev info

* The “Advanced Setup page at elinux”:http://elinux.org/RPi_Advanced_Setup has great tips on how to go headless, including key-based ssh and zeroconf setup, and basic SD card setup.
* This “guide at linuxnews”:http://linux-news.org/index.php/2012/06/02/raspberry-pi-emulation/ is a good guide for getting an RPI emulator working on Ubuntu, I followed it, changing only to the latest raspbian linux distro image, and it worked fine. But it has no net access so more to do.
* This “arm emulation guide”:http://franciscobenitezleon.wordpress.com/2010/02/05/installing-debian-lenny-on-virtualized-arm-arch-with-qemu-on-ubuntu-karmic-koala/ adn “this one”:http://www.cnx-software.com/2011/02/10/emulate-an-arm-plaform-with-qemu-on-ubuntu-10-10/ have a little more detail on how to generate and modify the ondisk image, I might want to mix these in with the previous guide. As i understand these, there are 3 images to play around with — the in-memory kernel boot image, the initial ramdisk image (initrd), and an initial filesystem image.
* “AQEMU”:http://aqemu.sourceforge.net/ looks like a useful tool for creating and managing a network connection and other qemu setup attributes
* Some good guidance on “arm toolchains”:http://www.raspberrypi.org/phpBB3/viewtopic.php?f=2&t=3812. Some people like the “sourcery toolchain”:http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/request?id=478dff82-62bc-44b2-afe2-4684d83b19b9&downloadlite=scblite2012&fmpath=/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/form. And some more “toolchain info”:https://launchpad.net/gcc-arm-embedded

If you are coming from the PC universe, the Raspberry Pi boot sequence is funky

Read the “RPIforum”:http://elinux.org/RPi_Software outline carefully. No boot rom, no boot loader. Instead:

The boards do not include NAND or NOR storage – everything is on the SD card, which has a FAT32 partition with GPU firmware and a kernel image, and an EXT2 partition with the rootfs.
We’re not currently using a bootloader – we actually boot via the GPU, which contains a proprietary RISC core (wacky architecture). The GPU mounts the SD card, loads GPU firmware and brings up display/video/3d, loads a kernel image, resets the SD card host and starts the ARM.

I was hopelessly confused as to why I needed a kernel image and a system disk image until I read this. It is no goofier than the PC BIOS but is just different.

Raspberry Pi Dev Environment on OSX, round 2

OK I am still “stymied by a linker problem”:http://theludwigs.com/2012/09/trying-to-get-set-up-a-raspberry-pi-dev-environment-on-osx/ in getting a native OSX Raspberry Pi dev environment set up. Stymied might be a strong word, I haven’t looked the make file nor have I spent any time cruising the various forums to see if there is an answer to my problem.

That is because I have moved on to another approach — a vm-based approach. And I am successfully compiling now. The setup:

* Install the “Virtual Box”:https://www.virtualbox.org OSX software, and create a new Ubuntu VM.
* Download the latest “Ubuntu image”:http://www.ubuntu.com/download
* Bring up the VM, and then follow the recipe at “elinux”:http://elinux.org/RPi_Kernel_Compilation for a foreign Ubuntu machine. Note that these instructions assume you are transferring the image over to a raspberry pi and have a lot of extra steps. I am just trying to get to an image I can run in an emulator, and so once the kernel is compiled, I can flip over to the instructions at…
* …”RPIForum”:http://www.rpiforum.net/forum/tutorials/article/16-a-raspberry-pi-emulated-environment-on-osx-lion/. I could run the QEMU emulator inside Virtual Box at this point, but running an emulator inside a vm seems a little nutty. So at this point I can pull the zImage image out of the VM and run the native osx qemu emulator.

So still a little Rube-Goldbergian, but working and viable. And since most of the work is done in a VM, I can move the setup over to a Windows machine or a Linux machine or wherever.

Trying to get set up a Raspberry Pi dev environment on OSX

I’ve been trying to get a Raspberry Pi dev environment set up on OSX. I’d like to have a cross compiler, a full linux build, an emulator all operational.

There is a pretty clear outline at “RPIforum from earlier this summer”:http://www.rpiforum.net/forum/tutorials/article/16-a-raspberry-pi-emulated-environment-on-osx-lion/. I’ve had partial success:

* Install Xcode and Xcode command line tools. No problem, I had these around anyway
* Install “homebrew”:http://mxcl.github.com/homebrew/. A package manager for OSX, a good thing to have. Installing this is what finally “broke my existing flawed OSX install”:http://theludwigs.com/2012/09/beware-the-osx-migration-assistant/ and drove me to reinstall OSX. But installed super cleanly once I had a fresh OSX
* Install the dependencies for ARM toolchain: brew install mpfr gmp libmpc libelf texinfo. There is a known error with mpfr compilation, so reinstall that with flags “per homewbrew wiki”:https://github.com/mxcl/homebrew/issues/15061.
* Then install the Arm tools. BTW, you can’t just copy and past the script from the RPI forum page because of the damn smart quotes — echo “export PATH=$HOME/rpi/arm-cs-tools/bin:$PATH” » ~/.bash_profile will utterly fail
* Then compile kernel. This step is unfortunately failing late in the process, I think at the linking stage. Still digging into. I have tried an alternative recipe at “the elinux site”:elinux.org/RPi_Kernel_Compilation, it fails as well, in both cases unhappy with the vmlinux file.
* Then install the qemu emulator. the rpi forum recipe is missing a dash, should be a double dash in front of the use-gcc flag i believe. works fine with that change

So I feel close. Just need to dig into the kernel compile problem. Here are the details, I need to study the make file to figure out exactly where this occurs:

==> make ARCH=arm CROSS_COMPILE=~/rpi/arm-cs-tools/bin/arm-none-eabi- -k > compile.txt
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
arch/arm/boot/compressed/vmlinux.lds:77: undefined symbol `__OBJC' referenced in expression
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[1]: Target `arch/arm/boot/zImage' not remade because of errors.
make: *** [zImage] Error 2
make: Target `_all' not remade because of errors.