

Debian Jessie on Raspberry Pi 2 - EmanueleAina
http://sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2/

======
mik3y
For those interested in rolling their own RPi rootfs builds:

\- Spindle is a collection of scripts that's used to build the 'official'
Raspbian images. It's hardly stripped-down as-is, and far from my favorite
rootfs building strategy, but is a starting point:
[https://github.com/asb/spindle](https://github.com/asb/spindle)

\- Yocto / OpenEmbedded recipes are available for truly stripped-down build
possibilities. Here's a random blog post specific to RPi:
[https://delog.wordpress.com/2014/09/16/embedded-linux-
system...](https://delog.wordpress.com/2014/09/16/embedded-linux-system-for-
raspberry-pi-with-yocto-project/)

\- The resin.io folks are trying to do "docker for embedded devices", with RPi
as one of the initial targets. They have a pre-built rootfs that pulls your
docker images via their (proprietary) cloud service.
[https://resin.io/](https://resin.io/)

~~~
helper
Buildroot[1] is another good tool for rolling your own rootfs. If you have
ever built your own kernel (i.e. ran make menu-config) you will feel right at
home using buildroot. And their documentation is fantastic[2].

Buildroot is a lot simpler than Yocto or OpenEmbedded. I found it a lot easier
to quickly understand how Buildroot works and get something working with it
than I did with Yocto. Of course Buildroot's simplicity means that you give up
some nice to have features that you would probably want for more serious
projects.

They have specific instructions for getting started with RaspberryPI v1[3].

[1]: [http://buildroot.uclibc.org/](http://buildroot.uclibc.org/) [2]:
[http://buildroot.uclibc.org/downloads/manual/manual.html](http://buildroot.uclibc.org/downloads/manual/manual.html)
[3]:
[http://git.buildroot.net/buildroot/tree/board/raspberrypi/re...](http://git.buildroot.net/buildroot/tree/board/raspberrypi/readme.txt)

~~~
seiferteric
Going to second buildroot. I played around with yocto/oe and found it overly
complicated for what I needed. Buildrot is much easier to grok and modify/add
packages.

------
xorcist
Does anyone know if the ethernet port still hangs off the USB bus? The CPU
usage of that thing killed the last use case I had. (Not to mention the
stability. The BeagleBone turned out to be solid in it's place.)

~~~
AlyssaRowan
It does, but the CPU's a _lot_ (400-700%!) beefier. We'll see how much of an
effect that has in practice.

------
awjr
I have to say, the Pi 2 comes across less as a bit of fun and more as
something you can really start doing interesting things with.

Currently investigating image processing and ANPR using OpenCV.

~~~
EmanueleAina
Given that the only thing that has changed is the more powerful CPU, I'd say
same fun and more interesting things! ;)

~~~
njs12345
And ARMv7 is a big deal, as the article points out..

~~~
muyuu
Yeah but I don't think its niche will change as much. It fell slightly short
in terms of processing power at not so many things. Obviously the faster the
better though.

~~~
exelius
Actually one of the biggest failings of the original Pi was that you couldn't
do timing-sensitive I/O operations on the GPIO pins reliably. If you can
dedicate one of the 4 cores for GPIO processing (we're not talking a lot of
data throughput here), that problem goes away. My biggest beef with the
Arduino platform is that the CPU/RAM is just too small to really do much with
other than act as a pure sensor<->serial bridge -- and functional GPIO means
the new Pi is essentially a half-price replacement for an Arduino Yun.

You'd probably need to write the code in C/C++ (rather than Python or some
other interpreted language) to get deterministic execution, but that's an
acceptable limitation in my mind.

Is there an implementation of RTLinux on ARM? If so, is it (mostly) compatible
with the RPi2?

~~~
zokier
I doubt that you could easily dedicate one core for RT GPIO while running
regular Linux on the rest. That would require quite significant engineering
both from the kernel and HW. Probably a better architecture would be something
like the PRUs in OMAP SoCs used in BBB, i.e. semi-independent RT co-
processors.

Besides there is lots of devices in the market positioned between Arduino and
RPi. STM32 F4 Discovery board is a good example; an order of magnitude more
processing power than an Arduino Uno but still a MCU designed for bare-metal
(real-time) operation.

------
falcolas
How the hell is a "really basic" Linux distro 3G in size? To me, a "really
basic" Linux install, particularly one which is just capable of providing a
prompt, should come in at less than 1/10th of that size: Kernel & modules,
basic shared libraries, standard linux command line tools... what else?

For comparison, my ubuntu VM is under 1.5G, and that's not been a "really
basic" install even when it was first created.

[EDIT] Thanks, it's the whole disk partition image, not the distro itself.

~~~
egil
The actual gzipped image file at
[https://images.collabora.co.uk/rpi2/](https://images.collabora.co.uk/rpi2/)
is 156 MByte, so I guess 3Gb is the size of the partition imaged, not of the
actual data consumed.

------
lamby
No script to reproduce this image? We would all jump down sjoerd's throat if
he asked us to "curl | sudo sh -", but this is almost equivalent :)

~~~
EmanueleAina
He probably didn't care because it's not much more than partitioning, running
debootstrap, installing the few extra packages and copying config.txt and
cmdline.txt. :)

That said a gpg signature could be a good thing to add.

~~~
EmanueleAina
Aaaand GPG signature added!

~~~
lamby
Cool, so now I'm confident that it was sjoerd that compromised my machine ;)

------
IgorPartola
Does anyone know if the RPi 2 has hardware accelerated crypto? A project of
mine that serves HTTPS video streams from an RPi was not usable on a model B
with more than 8 users.

By comparison, I know CubieBoard has accelerated crypto but I don't want to
switch horses half way, so to speak.

~~~
AlyssaRowan
It does not, although it has a hardware RNG. However ChaCha20_Poly1305 will
yield excellent software performance as it's ideally suited to NEON.

It could perhaps go even faster, given the VPU is a vector processor.

~~~
scott_karana
Isn't ChaCha20/Poly1305 still draft status in TLS? Might not be very helpful.

~~~
AlyssaRowan
Yes, but the draft is already running in production and mainlined in Chrome,
as well as BoringSSL (and thus throughout Google, I understand?) and LibreSSL
- nothing stopping you from benefiting from it right now. The final spin on
the AEAD's in final draft, it won't be too long, then the TLS WG is importing
that.

(I'm still working out the details - there are a few things about the VPU we
don't know - but the ChaCha core function in particular looks like something
the VPU could do _very_ naturally, except that it's got diagonals. However a
permutation to make those vertical might fix that, and if it can wrap around
and the transform doesn't cancel out the benefit, it might perform _very_
well. Or, it might block and be slower than the CPU. Hard to know at this
stage, but if I come up with a good implementation I'll release it.)

~~~
scott_karana
I'm solely talking about browser compatibility.

(And don't get me wrong: I LOVE the work that's being done, and can't wait to
be through with older cipher families!)

If you're streaming to mobile, ChaCha20 is out.

IE, Firefox, and Safari on the desktop: out. (so far)

Compatibility with IIS or any non-bleeding-edge middleware servers: out.

~~~
AlyssaRowan
Regarding mobile: the latest Android Browser, and the mainline Chrome for
Android and beta Chrome for Android both have CC20. agl specifically called
out Android as a use case - ARMv7+NEON performance of ChaCha20 is
substantially faster than, say, AES.

Yes, you'll probably be waiting until the RFC is out for wider support. I
reckon it makes a leading candidate for "AES backup/standby", however.

~~~
scott_karana
Great news! Thanks. :)

------
leni536
Well I'm not a Pi user but thanks for bmap-tools. How did I not know about
this before?

~~~
voltagex_
Mainly because Tizen isn't well publicised - I didn't know about the tool
either, seems like it will be really useful.

------
AlyssaRowan
Good start. Doesn't the BCM firmware have initramfs support already? Try
ORGing it in at a00000 with config.txt.

Mainline wasn't that far behind but uses bcm2835 instead of bcm2708. That
might change/need an update now - not sure? Will find out in a few days!

~~~
voltagex_
What does using the firmware's initramfs support give you?

------
rcarmo
Nice, although I'd rather have a mini Ubuntu 14.04 LTS. Ubuntu on ARMv7 is
great, and I'd like a minimal distribution to get started.

There's Snappy Core, but to be honest I don't want to run that on a Pi just
yet.

~~~
thu
If you don't want the snappy part, it seems you can use a straight Ubuntu Core
(not necessarily the Snappy Ubuntu Core).

~~~
rcarmo
The alpha image I downloaded lacked apt-get (given it was snappy). Anyone know
of a "normal" one?

(oh, and
[https://news.ycombinator.com/item?id=9000584](https://news.ycombinator.com/item?id=9000584)
\- I just got a board)

------
listic
Will this RPi2 support get upstream into Debian Jessie? That would be awesome.

~~~
EmanueleAina
That's the intention, but more work is needed.

------
hayd
I wonder what the chances of playstation 2 emulation working on RPi2 ?? :s

~~~
Narishma
Zero.

------
dmritard96
been using jessie on older pis for a while with lessbian

~~~
EmanueleAina
Yep, but the point is about running real Debian, not any Debian-derived
distributions like Raspbian that have been rebuilt for ARMv6.

With the old Pi it was not possible because the CPU only supported the ARMv6
instruction set, while mainstream distributions (Debian, Ubuntu, Fedora, etc.)
all require ARMv7.

Fortunately the just released Pi 2 sports Cortex-A7 Cores which use the ARMv7
instruction set, which made this possible without any full rebuild.

~~~
mkesper
It would have been possible to use Debian, but the armel build which is
running on ARMv6 would have diminished the performance even further, as it
servers for very old ARM processors.

