cat > /etc/profile.d/videocore-paths.sh <<EOF
#!/bin/sh
# For root users, ensure that /opt/vc/sbin is in the $PATH.
if [ "`id -u`" = "0" ]; then
echo $PATH | grep /opt/vc/sbin 1> /dev/null 2> /dev/null
if [ ! $? = 0 ]; then
PATH="$PATH:/opt/vc/sbin"
fi
fi
# Add videocore utilities to system $PATH:
PATH="$PATH:/opt/vc/bin"
<<EOF
chmod a+x /etc/profile.d/videocore-paths.sh
[/code]
[*] And finally we have to edit
/boot/config.txt
to increase GPU memory to 128 MB, and set the start_file and fixup_file variables. (And optionally disable_camera_led config entry as well.)
if grep -q "^gpu_mem=" /boot/config.txt; then
sed -ie 's:gpu_mem=.*$:gpu_mem=128:g' /boot/config.txt
else
echo "gpu_mem=128" >> /boot/config.txt
fi
if grep -q "^start_file=" /boot/config.txt; then
sed -ie 's:start_file=.*$:start_file=start_x.elf:g' /boot/config.txt
else
echo "start_file=start_x.elf" >> /boot/config.txt
fi
if grep -q "^fixup_file=" /boot/config.txt; then
sed -ie 's:fixup_file=.*$:fixup_file=fixup_x.dat:g' /boot/config.txt
else
echo "fixup_file=fixup_x.dat" >> /boot/config.txt
fi
if grep -q "^disable_camera_led=" /boot/config.txt; then
sed -ie 's:disable_camera_led=.*$:disable_camera_led=1:g' /boot/config.txt
else
echo "disable_camera_led=1" >> /boot/config.txt
fi
[/list]
Once we are done with the above steps, we should be ready to give it a try:
raspistill -o cam.jpg
- wowbagger blogja
- A hozzászóláshoz be kell jelentkezni
- 1293 megtekintés
Hozzászólások
Adding a DS3231 RTC to the PI2 (the procedure is slightly different than that for the PI1):
http://www.patthoyts.tk/blog/using-a-ds3231-rtc-with-the-raspberry-pi-2…
-------------------------------------------------------------------------------
Az életben csak egy dolog a szép, de az épp nem jut eszembe.
Slackware Linux 14.1 | 3.10.84-janos
- A hozzászóláshoz be kell jelentkezni