User avatar
JohnBeardmore
Posts: 211
Joined: Thu Nov 15, 2012 11:03 pm
Location: Derbyshire UK.
Contact: Website

Embedded distributions on Pi

Mon Aug 12, 2013 10:40 pm

Is there any viable embedded Linux distribution for the Pi yet ?

Ideally I'd like something that tolerates being rebooted by cycling the power or hardware reset by watchdog timer.

I appreciate applications will loose data in some circumstances, but what I'm keen to achieve is a way of protecting the core OS files form corruption, ideally by having the core OS in a read only file system, with everything else in RAM or accessed over a network.

Obviously it would help if it was compatible with gcc binaries compiled under Raspbian, and also if it could support a reasonable IDE like codeblocks.

Thanks, J/.
Author of oBeMS open source Building energy Management System.
Automatic Meter Reading (AMR), Building Management System (BMS),
Building Energy Management System (BEMS), Infrastructure Control System (ICS).
See: http://t4sustainability.co.uk/oBeMS/

micedwards
Posts: 4
Joined: Thu Jun 07, 2012 2:51 am

Re: Embedded distributions on Pi

Thu Sep 12, 2013 3:19 am

I'm interested in this too, and I'm willing to help on a project to make this happen if we can find any ...

User avatar
JohnBeardmore
Posts: 211
Joined: Thu Nov 15, 2012 11:03 pm
Location: Derbyshire UK.
Contact: Website

Re: Embedded distributions on Pi

Thu Sep 12, 2013 7:11 am

I was a bit stunned by the silence when I asked this question.

Maybe it's because it was a silly question in some respect, or maybe most people just aren't interested in embedded systems.

I haven't had much time to look in to this, but have you seen http://www.machinoid.com/ ?

I've only had a brief glance at their web site, but there doesn't seem to be a lot of obvious information.

I'd be very interested what you think of machinoid, or any other embedded distributions that you find.


Thanks, J/.
Author of oBeMS open source Building energy Management System.
Automatic Meter Reading (AMR), Building Management System (BMS),
Building Energy Management System (BEMS), Infrastructure Control System (ICS).
See: http://t4sustainability.co.uk/oBeMS/

ghans
Posts: 7871
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Embedded distributions on Pi

Thu Sep 12, 2013 8:33 am

There are a lot of minimal images around ... or you could use Arch or TinyCore , which focus on extensibility and
start very "bare" .


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
duberry
Posts: 379
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour

Re: Embedded distributions on Pi

Thu Sep 12, 2013 9:24 am

i must have missed this Q
*big noise*

not shore i fully understand what "compatible with gcc binaries compiled under Raspbian" might entail

tho Tiny Core maybe worth taking a look at ( bold added )

http://tinycorelinux.net/concepts.html
Tiny Core is different because users are not encouraged to perform a 'traditional', hard-drive installation of the operating system. Sure, a hard drive installation is possible, but Tiny Core is designed to run from a RAM copy created at boot time. Besides being fast, this protects system files from changes and ensures a pristine system on every reboot. Easy, fast, and simple renew-ability and stability is a principle goal of Tiny Core.
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi

User avatar
JohnBeardmore
Posts: 211
Joined: Thu Nov 15, 2012 11:03 pm
Location: Derbyshire UK.
Contact: Website

Re: Embedded distributions on Pi

Thu Sep 12, 2013 10:27 am

Tiny Core does look quite promising ! Many thanks !

duberry wrote:

>not shore i fully understand what "compatible with gcc binaries compiled under Raspbian" might entail

I'm assuming is that an embedded distribution won't be a great development environment. At the moment I'm developing with codeblocks, gcc, wiringPi and a couple of libraries, and can 'apt-get install' whatever I want. I assume because you get a 'pristine image every time' there is more to adding software to the TC image ?

What I assume I need to do, is compile my code on Raspbian, then copy the executables to the target embedded OS, which I guess in this case would involve incorporating them into the image from which the system boots, them patching inittab on the embedded OS to start and respawn them automatically.

Have you used TC much ? What's your experience been ? Are there other (or better !) ways of working than the one I've assumed above ?

Apart from TC, are there other embedded OSs I should look at before committing ?

Cheers, J/.
Author of oBeMS open source Building energy Management System.
Automatic Meter Reading (AMR), Building Management System (BMS),
Building Energy Management System (BEMS), Infrastructure Control System (ICS).
See: http://t4sustainability.co.uk/oBeMS/

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Embedded distributions on Pi

Thu Sep 12, 2013 11:05 am

The "classic" solution to this problem is buildroot (which can run from an initramfs if your image is small enough), and there's already a few Pi-focused buildroot derivatives. And there's also lots of info on these forums if you try searching for things like "readonly root filesystem".

With regards to "compatible with Raspbian" - the big headache will be library compatibility (and not only version matching) - for reasons of space many "embedded" distros typically don't include shared libraries in the rootfs, but build all the binaries statically linked instead of dynamically linked.
Of course there are other solutions, but it all comes down to balancing memory usage / binary size / disk footprint / etc. etc. in terms of what your exact requirements are.
I haven't yet looked at TinyCore myself, but I keep meaning to...

User avatar
duberry
Posts: 379
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour

Re: Embedded distributions on Pi

Fri Sep 13, 2013 11:53 am

> I assume because you get a 'pristine image every time' there is more to adding software to the TC image ?

indeed ! TC is smater than your average distro

graphic over view @ tiny_core_file_architecture_diagrams

adding software is easy enough
you just need to set "tce=sdXY" parameter in kernel boot option code in cmdline.txt to configure persistent storage
then you can use the TC package management tools ( gui or cli ) to search / install TCZ extension packages
eg
to load compile-essentials.tcz which "Loads essential files to compile C/C++ programs"

Code: Select all

tce-load -i -w compile-essentials.tcz 
had a quick look wiringpi-dev.tcz is available as an extension !
so

Code: Select all

tce-load -i -w wiringpi-dev.tcz 
code blocks its not in currently in the TC armv6 repo .
( tho if needed i assume it could be built easy enough )

to get stuff starting / respawning how u want it
tinycorelinux.net/wiki:the_boot_process

all credit to TCL team ( who can be found on the TC forum )
all mistakes my own

good luck !
also the corebook.pdf !!
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi

Return to “Other”