Changes

Jump to navigation Jump to search
1,886 bytes added ,  12:28, 21 September 2015
Line 4: Line 4:  
sudo apt-get install -y libpulse-dev libopenal-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libasound2-dev libgeoclue-dev libbluetooth-dev libicu-dev libglib2.0-dev libffi-dev libxslt1-dev libjasper-dev libmng-dev libtiff4-dev
 
sudo apt-get install -y libpulse-dev libopenal-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libasound2-dev libgeoclue-dev libbluetooth-dev libicu-dev libglib2.0-dev libffi-dev libxslt1-dev libjasper-dev libmng-dev libtiff4-dev
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
raspbian has a 0.3.x series libwebp, which is too old for qt 5.5.  Get a newer one.
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 12: Line 14:  
./configure
 
./configure
 
make
 
make
 +
sudo make install
 
</syntaxhighlight>
 
</syntaxhighlight>
    
== Creating a sysroot ==
 
== Creating a sysroot ==
 +
 +
=== compiler ===
 +
 +
Get a linaro cross compiler. For linux, there are official ones available, for OS X, I used http://www.welzels.de/blog/en/arm-cross-compiling-with-mac-os-x/comment-page-1/
 +
 +
I needed to use the gcc 4.8 version for my compiled binaries to work on raspbian.  GCC 4.9 worked fine on alarmpi.
 +
 +
== everything else ==
 +
 +
In this case a sysroot is just a copy of the important files for compiling built for the target system.  It's also easier to just include a superset of the import files by grabbing pretty much everything.
 +
 +
There are a couple ways to do this, but I just created a case sensitive OS X volume and did and rsyncd the rpi to that volume.
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
rsync -P -rt --ignore-errors --delete --copy-unsafe-links --links --exclude /home --exclude /tmp --exclude /proc --exclude /sys --exclude /srv --exclude /var/cache --exclude /dev --exclude /var/log --exclude /root --exclude /run --exclude /lost+found --exclude /var/tmp --exclude /var --exclude /usr/share --exclude /etc --exclude /usr/lib/ssl [email protected]:/ /Volumes/raspbian/
 
rsync -P -rt --ignore-errors --delete --copy-unsafe-links --links --exclude /home --exclude /tmp --exclude /proc --exclude /sys --exclude /srv --exclude /var/cache --exclude /dev --exclude /var/log --exclude /root --exclude /run --exclude /lost+found --exclude /var/tmp --exclude /var --exclude /usr/share --exclude /etc --exclude /usr/lib/ssl [email protected]:/ /Volumes/raspbian/
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
If you want a narrower approach, I suspect the important files are in
 +
 +
*  /usr/include
 +
*  /usr/lib
 +
*  /usr/local/include
 +
*  /usr/local/lib
 +
*  /lib
 +
*  /opt/vc
 +
 +
Another common approach is to create an nfs server an the rpi2 and just mount nfs:/ from the rpi2 on the dev machine.
 +
 +
== Build qt5.5 for the rpi2 ==
 +
 +
<syntaxhighlight lang="bash">
 +
./configure -v -nomake examples -nomake tests -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /Volumes/raspbian -prefix /usr/local/qt5.5-raspbian -confirm-license -opensource
 +
</syntaxhighlight>
 +
    
build, takes  43 minutes, 32 seconds on my 8 core MBP.
 
build, takes  43 minutes, 32 seconds on my 8 core MBP.
Line 24: Line 57:  
make -j8
 
make -j8
 
make install -j8
 
make install -j8
 +
</syntaxhighlight>
 +
 +
 +
once make install is run, there will be a a /volumes/rasbpian/usr/local/qt5.5-raspbian folder.  copy that back to the pi in the same location
 +
 +
First make a target location on the pi
 +
<syntaxhighlight lang="bash">
 +
sudo mkdir /usr/local/qt5.5-raspbian
 +
chown pi:pi /usr/local/qt5.5-raspbian
 +
</syntaxhighlight>
 +
 +
Copy the files from the host machine to the pi.
 +
<syntaxhighlight lang="bash">
 +
rsync -auP /usr/local/qt5.5-raspbian [email protected]:/usr/local
 
</syntaxhighlight>
 
</syntaxhighlight>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu