How to get the latest Blender on a Raspberry Pi

Why?

Raspberry Pi (and alike) are single board computers on a budget and are totally capable of running Blender. Although it would be unreasonable to consider this as a high end 3D content creation machine, I have successfully ran simple and fun Blender projects on a Raspberry Pi. Shiv Integer lived its first 2 weeks on such a small computer running of a 32Go card.

This tutorial is dedicated to Matthew Plummer-Fernandez, the other human behind Shiv, and famous puppet master running bots off Pis.

Assumptions

I'm going to assume that the only thing you want is to run the latest Blender, without the Graphical User Interface (GUI), on a Raspberry Pi. The installation of a GUI for Linux and the whole Desktop Environment is not the subject of this tutorial.

Arch Linux ARM

We are going to use Arch Linux instead of the usual Raspbian. Arch Linux is not much different than any other Linux distribution but offers a great advantage: it provides the latest package for almost any software you can think of.

Raspbian might allow you to install Blender using their package manager, but it will certainly not be the latest. And since the Blender Foundation does not provide compiled versions of Blender for ARM chips, you're stuck compiling yourself Blender on a Raspbian system, which is definitely a very long and complex task.

There is a big community behind Arch Linux with great documentation. And a branch of that community is dedicated to run Arch Linux easily on any ARM based computer.

So the first thing we will have to do is install Arch Linux on the Raspberry Pi 2. For that, we go to https://archlinuxarm.org/ and click in the submenu > Platforms > ARMv7h > Broadcom > Rasperry Pi 2. Select the tab there called installation and follow the instructions.

Some notes on ArchLinuxArm and install instructions

As you can see on the website, there is a lot of platforms, from ARMv5h to ARMv8h. It's also good to know the manufacturer of your ARM chip. Broadcom is the manufacturer behind all Raspberry Pi chips. You also maybe noted that if you have a Raspberry Pi 3 (ARMv8h), the installation instruction won't be different than from the Pi2. It uses the same archive in this case.

Also note that you can do a search on the ArchLinuxArm website to find out which package/software is available for your architecture. You'll see that Blender so far is only available for armv7h. This does not mean that other software won't run on it, but you'lll have to compile it yourself.

It seems these install instructions only work from a Linux computer. You might try it from a MacOSX platform if it supports ext4 filesystem ( not sure it's there by default ). If not, use any live Linux USB to fire up a temporary Linux system and follow the instructions.

How to find which /dev/sdX is my SD card?

fdisk -l will list all your disks. Just remove the SD card from your card reader. Do fdisk -l, take a look at what you have. Then plug in the SD card again and redo fdisk -l. The new lines that have appeared are the ones corresponding to your SD card.

In my case, it looks like this:

Disque /dev/mmcblk0 : 28,9 GiB, 31021072384 octets, 60588032 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x99fdf490

Périphérique   Amorçage  Début      Fin Secteurs Taille Id Type
/dev/mmcblk0p1            2048   206847   204800   100M  c W95 FAT32 (LBA)
/dev/mmcblk0p2          206848 60588031 60381184  28,8G 83 Linux

You will notice that in my case, it's an SD card with 2 partitions already. It does not matter, they are going to be deleted by the installation procedure. In my case, the /dev/sdX from the instructions will be replaced by /dev/mmcblk0.

Installing Blender and other tools

Once Arch Linux ARM files have been correctly written on the SD card, plug the card into a Raspberry Pi 2 and connect it to power and network cable (with a DHCP router on the other side and internet access ).

Log in the system using:

  • user: alarm
  • pass: alarm

Here is a series of command that you can perform

su will make us temporary root. (root password is root, you might want to change that afterwards)

As root, you can then perform pacman -Syu which is the Arch Linux way to update the system. It will download all the updates available and install them. So you know, Arch Linux is a system that updates very frequently.

As you are probably more used to it, you might want to use sudo instead of su to do things. sudo is not installed by default. To install it, as root, do pacman -Syu sudo. This will install sudo and verify that the system is up to date. Arch Linux only supports installing software on an updated system.

To configure sudo for your user, as root, do EDITOR=nano visudo and uncomment the line that looks like this:

%wheel ALL=(ALL) ALL 

Save the file. You can now exit root mode by typing exit. The user alarm should now have access to sudo.

You guess now how to install Blender: sudo pacman -Syu blender. This will install a lot of packages. Just wait and select the default suggestion when asked (just type ENTER).

Once Blender is installed, verify that it's running by typing blender -v. This is what is my output as I write this.

[alarm@alarmpi ~]$ blender -v
Blender 2.78 (sub 0)
	build date: 2016-09-29
	build time: 11:25:04
	build commit date: 2016-09-28
	build commit time: 08:41
	build hash: 0b13b7a
	build platform: Linux
	build type: Release
	build c flags:  -Wall -Wcast-align -Werror=implicit-function-declaration -Werror=return-type -Werror=vla -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wnonnull -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Wformat-signedness -Wuninitialized -Wredundant-decls -Wshadow -Wno-error=unused-but-set-variable -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4  -fuse-ld=gold -fopenmp -std=gnu11 -pipe -fPIC -funsigned-char -fno-strict-aliasing
	build c++ flags:  -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Werror=implicit-function-declaration -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wuninitialized -Wundef -Wmissing-declarations -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4  -fuse-ld=gold -fopenmp -std=c++11 -pipe -fPIC -funsigned-char -fno-strict-aliasing
	build link flags:  -Wl,--version-script='/build/blender/src/blender-2.78/source/creator/blender.map'
	build system: CMake

And you're done.

Conclusion

The hardest part of all this is getting Arch Linux installed on an SD card and getting used to a slightly different Linux distribution for those more familiar with Debian/Ubuntu. But the documentation for Arch is one of the best I have seen. If you care to install and configure any other software, the official Arch Linux Wiki is the resource to go to.

If you have any question. Don't hesitate to write me. — Ju 2016/10/07 01:57