3 years ago
I dunno if ARM code is more compact than *86 but I ended up with a Pi
Zero running Raspian lite, and, after all needed was installed, an SD
memory footprint of 22Mbyte in /boot and 1.4Gbyte in /.
So the while thing COULD have run off a 2GB card instead of the 16GB I
bought, with the wrong OS pre-installed (Noobs instead of Raspian. Sigh.)
Bootstrapping Raspian lite on the Pi Zero/W onto a fixed IP address in
the wireless turned out after much trepidation to be a snap. I burned
the SD card and then edited wpa_supplicant.conf in the /boot directory
as detailed here:
'touched' a file called '/boot/ssh'..
Then edited the /etc/dhcpcd.conf file on the SD card and added..
And booted the thing. which took longer than I expected, but eventually
I could ssh straight in.
The C code that worked on my *86 Linux Mint desktop didn?t QUITE compile
cleanly. Some header files extra were needed. But otherwise no extra
libraries or code were needed.
In order to get the sound going - I had a HiFibery DAC + Zero, I needed
to edit /boot/config.txt. Despite its name this card does NOT work with
the hifiberry dac plus driver but only the standard one.
here are the changes
# Enable audio (loads snd_bcm2835)
In addition I created the file
type hw card 0
type hw card 0
Sound was now operational but there was no volume contrul via 'amixer',
so on a hunch I installed pulseaudio.
That got the volume control working.
installing sox and mpg123 got flac and mp3 support going.
And my compiled backend worked on those now fine.
To get the web server going with PHP was an installation of apache2 phip
and IIRC mod_php for apache.
That didn't quite work so I needed to get short tags enabled...it's been
switched off somewhere by default.
That brought the web control panel up.
I installed NFS client and server for two way file access. Others might
use samba. Or you could use a fat USB drive to hold your music ..
So how much CPU and RAM does it use?
Right now, running, mpg123 and pulseaudio between them are taking 16% of CPU
as far as RAM goes
total used free shared buff/cache
Mem: 433 45 32 11 355
Swap: 99 0 99
So ~78MBytes to run the server and audio backend.