Just how much bloat can you strip out of a Pi?

Looking at my 'I only do one thing' Pi running 94 different processes, realistically how many of them do I need? And how could I get rid of them?

I want to examine the pi as a reasonably real-time signal processing unit.

I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a gui.

I just want to run one high priority daemon and one lower priority demon, with shared memory between them...is there something simpler than Linux? More like e.g. DOS?

--
When plunder becomes a way of life for a group of men in a society, over  
the course of time they create for themselves a legal system that  
authorizes it and a moral code that glorifies it.
Reply to
The Natural Philosopher
Loading thread data ...

I get pretty good results with the latest version of devuan for the Pi.

--
W J G
Reply to
Folderol

does systemd have an equivalent of runlevel S ?

Reply to
Andy Burns

And how could I get rid of them?

None if you have systemd.

--
Ottavio Caruso
Reply to
Ottavio Caruso

Alpine Linux is popular with containers, because it's extremely stripped down:

formatting link

For non-Linux, you could try an alternative OS like RISC OS or FreeRTOS. You would need to port your apps to those OSes though - it wouldn't be a simple recompile.

Theo

Reply to
Theo

If you want to cut out all of that, then you probably don't need the Pi at all. Have a look at an Arduino, you can either program bare metal, or if you don't want to do your own scheduling run under FreeRTOS.

---druck

Reply to
druck

RISC OS? Or possibly even RISC OS Pico.

formatting link

Good use for an older Pi, as RISC OS doesn't need lots of RAM and is only a single core OS.

Bryan.

--
RISC OS User Group Of London  -  http://www.rougol.jellybaby.net/ 
RISC OS London Show           -  http://www.riscoslondonshow.co.uk/
Reply to
Bryan Hogan

*grin* I haven't written them yet

Free RTOS sounds...interesting

--
No Apple devices were knowingly used in the preparation of this post.
Reply to
The Natural Philosopher

I need a fair bit of RAM and a pretty fast floating point processor. But Arduino has some definite pluses.

--
"Strange as it seems, no amount of learning can cure stupidity, and  
higher education positively fortifies it." 

    - Stephen Vizinczey
Reply to
The Natural Philosopher

On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher declaimed the following:

A microcontroller running barebones -- or with something like FreeRTOS (two tasks, with priority set as needed)?.

Especially as Linux is not the most "real-time" OS available; I don't even know if an RT kernel is available for the R-Pi (Beaglebones have had RT kernel builds, but they aren't the default install).

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

I believe there is a real time os in development somewhere - have you looked for it? You might also check out arch and gentoo,or maybe risc os.

Reply to
ray carter

On Thu, 10 Sep 2020 17:15:00 +0100, The Natural Philosopher declaimed the following:

So focus on the ARM-based boards, with an "f" suffix on the core -- M4F, say. TIVA-C boards, Adafruit Metro M4 (yeah, they don't list the F on the name, but do claim floating point and "DSP" instructions) and Grand Central M4. Unfortunately, the Arduino DUE does NOT appear to have hardware floating point.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Have a look at the Teensy 4.1 with 600 MHz cortex-m7 and room for extra memory:

formatting link
Or perhaps the cheaper 4.0, if the 4.1 is still unavailable.

Reply to
A. Dumas

Microware OS-9 could be a starter, since it was designed from the ground up as an RTOS.

It was originally released for the 6809 and quickly ported to the 680x0 where v2.4 was super-stable. Since then seems to have been ported to ARM and picked up TCP/IP support, but I can't determine which ARM architectures it has been ported to. Its website doesn't mention RaspberryPis either. Pity: I used it for years on a 68020 and liked it a lot.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

And yes they have fp units. For doubles! From the 4.0 page, which has the same chip: "Teensy 4.0's Cortex-M7 processor includes a floating point unit (FPU) which supports both 64 bit "double" and 32 bit "float". With M4's FPU on Teensy 3.5 & 36, and also Atmel SAMD51 chips, only 32 bit float is hardware accelerated. Any use of double, double functions like log(), sin(), cos() means slow software implemented math. Teensy 4.0 executes all of these with FPU hardware."

Reply to
A. Dumas

Try PiCore, it's as stripped-down as Linux gets for the Pi. Boots _way_ quicker than RPi OS on my Pi Zeros. No GUI, or systemd, no disk access (runs in RAM). if you want to disable hardware drivers, you can do that in config.txt (as you can in Raspberry Pi OS).

formatting link

There are various Bare-Metal environments, such as:

formatting link
formatting link

--
__          __ 
#_ < |\| |< _#
Reply to
Computer Nerd Kev

I cant find it for a Pi though sadly. Yes. OS-9 had its adherents. I have written my own multitasking OS under DOS 2...its not hard to write a basic scheduler good enough for simple work. In fact the application could easily run as one foreground task and one interrupt driven background task. But networking would be nice and that is a whole new can of worms...

--
?The ultimate result of shielding men from the effects of folly is to  
fill the world with fools.? 

Herbert Spencer
Reply to
The Natural Philosopher

Yes, that is near spec...

-- Those who want slavery should have the grace to name it by its proper name. They must face the full meaning of that which they are advocating or condoning; the full, exact, specific meaning of collectivism, of its logical implications, of the principles upon which it is based, and of the ultimate consequences to which these principles will lead. They must face it, then decide whether this is what they want or not.

Ayn Rand.

Reply to
The Natural Philosopher

Ok I will take a look at that - may just be the 'right compromise' Mmm. At first glance that is very near the mark. AND I can prototype on an old PC *86 chassis...

--
?it should be clear by now to everyone that activist environmentalism  
(or environmental activism) is becoming a general ideology about humans,  
about their freedom, about the relationship between the individual and  
the state, and about the manipulation of people under the guise of a  
'noble' idea. It is not an honest pursuit of 'sustainable development,'  
a matter of elementary environmental protection, or a search for  
rational mechanisms designed to achieve a healthy environment. Yet  
things do occur that make you shake your head and remind yourself that  
you live neither in Joseph Stalin?s Communist era, nor in the Orwellian  
utopia of 1984.? 

Vaclav Klaus
Reply to
The Natural Philosopher

You can start what you want. Linux is just the kernel. Alter the cmdline.txt to tell the kernel what program to start (init=...), instead of systemd or another init process.

see

formatting link

Ok, your code that acts as init would have to start anything else you wanted, or set up networking etc. but it can be done. I'm pretty sure you could use busybox to form a minimal but adaptable boot environment.

This maybe of use...

formatting link

All the parts are available from the standard Raspbian OS

Reply to
Jim Jackson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.