RPI mini wheezy (headless only)
Posted by kll on December 10 2013 23:30:38
The "darkbasic" image for RPI:
here i downloaded a very small image (123MB as .7z, 1GB as .img )
format and burn a 2GB SD card
and login ( after found IP with IPscanner ) with PUTTY by
root raspberry ! NOT pi raspberry

apt-get update
apt-get upgrade
apt-get install mc


localisation:
dpkg-reconfigure tzdata
( dpkg-reconfigure console-data )
( dpkg-reconfigure locales )


LAN setting:
nano /etc/network/interfaces
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1

reboot

firmware update:
apt-get install git-core
wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
apt-get install binutils
rpi-update
reboot
df -h

space nearly full, 45MB free
make a SD card backup 2GB

want expand to the 2GB of SD card:
apt-get install raspberrypi* raspi-config
_______E: Unable to locate package raspberrypi*
_______E: Couldn't find any package by regex 'raspberrypi*'
_______E: Unable to locate package raspi-config

apt-get install dmsetup libdevmapper1.02.1 libparted0debian1 parted
apt-get install lua5.1 triggerhappy -y
______Error opening '/dev/input/event*': No such file or directory

wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20130525-1_all.deb
dpkg -i raspi-config
_______dpkg: error processing raspi-config (--install):
_______ cannot access archive: No such file or directory
_______Errors were encountered while processing:

nano /etc/apt/sources.list :add line
deb http://archive.raspberrypi.org/debian/ wheezy main

apt-get update
apt-get install raspi-config
raspi-config
expand
_____/dev/root is not the last partition. Don't know how to expand
does not work.

ok, i am stuck
need using a other linux computer and use gparted to expand to 2GB
pls find that part documented here
backup with zip the 2GB .img is now 446MB from the 128MB we started with.





also not work
raspistill -o image.jpg
because that software is not there. ( and also with update / upgrade not installed )
but as we are headless anyway i try the full way! i get from here

apt-get install git gcc build-essential cmake vlc
cd ~
mkdir Development
? what is that for ?
git clone git://github.com/raspberrypi/userland.git
cd userland
sed -i 's/if (DEFINED CMAKE_TOOLCHAIN_FILE)/if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)/g' makefiles/cmake/arm-linux.cmake

following fixes not needed:
Fix Raspistill
Open Raspistill command source file at line 1034:
nano +1034 host_applications/linux/apps/raspicam/RaspiStill.c
Modify the line from:
MMAL_STATUS_T status = -1;
to:
MMAL_STATUS_T status = MMAL_SUCCESS;

Fix Raspivid
Open the raspivid source file at line 852:
nano +852 host_applications/linux/apps/raspicam/RaspiVid.c
Modify the line from:
MMAL_STATUS_T status = -1;
to:
MMAL_STATUS_T status = MMAL_SUCCESS;

Build and Install the Latest Userland
Configure a build folder and build and install the userland binaries. This should take around 30 to 45 minutes:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install


TEST:
root@raspberry-pi:~# raspistill
-bash: raspistill: command not found


thats disappointing, ok.. found it:
/root/userland/build/bin/raspistill -o image.jpg
root@raspberry-pi:~# ls
Development image.jpg userland
root@raspberry-pi:~#

GOOD

You should now be able to create a stream with VLC and connect to it on a headless system using the -n parameter for no preview:

raspivid -o - -t -1 -w 920 -h 540 -n | cvlc -vvv --network-caching=0 stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
well also not work,
root@raspberry-pi:~# raspivid -o - -t -1 -w 920 -h 540 -n | cvlc -vvv --network-caching=0 stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
-bash: raspivid: command not found
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use /usr/bin/vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).
root@raspberry-pi:~#

/root/userland/build/bin/raspivid -o - -t -1 -w 920 -h 540 -n | cvlc -vvv --network-caching=0 stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
root@raspberry-pi:~# /root/userland/build/bin/raspivid -o - -t -1 -w 920 -h 540 -n | cvlc -vvv --network-caching=0 stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use /usr/bin/vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).
root@raspberry-pi:~#

naja lets stop here

and make an other backup

so , having a reduced functionality,
but a smaller footprint ( 2GGB SD card only ), can not be all,
how to prove that this mini wheezy is so much faster,
that its worth the reduced functionality and the add installation work?
here i downloaded the RPI benchmark tools.
just unzip to RPI via SFTP
chmod +x *PiA6
./whetstonePiA6
./dhrystonePiA6
./liverloopsPiA6

but i must test it
- without and with my CPU tuning!
nano /boot/config.txt
#gpu_mem_512=256
#arm_freq=850
#core_freq=400
#sdram_freq=400
#gpu_freq=300
- for mini wheezy and berryboot raspbian ( both with camera tools.. no fresh installs )
results

i know it is more a hardware test and not a speed of OS test
and the data are inconclusive so i need to check more
as it looks like mini wheezy not react on cpu tuning.
the new command for check on this is
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq or
sudo watch -n 1 cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
to see if there is a tuning check
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
so when i check both ( with and without cpu tuning ) 4 systems,
i see the 850 / 700 in cpuinfo_max_freq, means the tuning worked in both OS.
so i repeated the tests for the miniwheezy, same.

but i found a other mistake, the first 2 test for the berryboot raspbian i did
while the python motion camera SERVICE WAS RUNNING!
after stop see new data, its the fastest system.