Hey guys,
I was able to get the Pi Camera working on this image. Thank you for providing this OS image! I did NOT install the libraspberrypi-bin or libraspberrypi-dev because when I did they didn't work with the camera. First thing is to add this to /boot/config.txt:
Then you have to build raspberry pi userland yourself and make some changes. Just git clone
https://github.com/raspberrypi/userland then apply this diff to it:
Code: Select all
diff --git a/buildme b/buildme
index ce8f516..7cef87d 100755
--- a/buildme
+++ b/buildme
@@ -2,10 +2,11 @@
if [ "armv6l" = `arch` ]; then
# Native compile on the Raspberry Pi
+ export LDFLAGS="-Wl,--no-as-needed"
mkdir -p build/raspberry/release
pushd build/raspberry/release
cmake -DCMAKE_BUILD_TYPE=Release ../../..
- make
+ make -j4
if [ "$1" != "" ]; then
sudo make install DESTDIR=$1
else
diff --git a/makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake b/makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake
index 575cc0e..a5bebcd 100644
--- a/makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake
+++ b/makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake
@@ -10,7 +10,8 @@ SET(CMAKE_ASM_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_SYSTEM_PROCESSOR arm)
#ADD_DEFINITIONS("-march=armv6")
-add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")
+#add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")
+add_definitions("-march=armv7-a -mfpu=neon -mfloat-abi=hard")
# rdynamic means the backtrace should work
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
and run buildme. You may want to run buildme as root so it can install to the proper places, then you may have to add /opt/vc/bin to your PATH. Otherwise it resides in build/bin/. Also you may want to do
Code: Select all
export LD_LIBRARY_PATH=/opt/vc/lib/:$LD_LIBRARY_PATH
before you run your app so that it knows to use the new libraries you compiled rather than the old. (For some reason the old ones were still in /usr/lib/ and were taking priority).
Raspivid and still will only work from a desktop session, so I installed VNC and ran it from the VNC session and it worked!
Quick tip for getting VNC running:
Install xubuntu-desktop:
Code: Select all
sudo apt-get install xubuntu-desktop
Install tightvncserver:
Code: Select all
sudo apt-get install tightvncserver
Run
then kill it with
Edit ~/.vnc/xstartup so that it looks like this:
Code: Select all
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
#/etc/X11/Xsession
startxfce4
Run
And you should be up and running!