#Getting the image onto SD
#Method 1, Needs a linux box with card reader
# download http://master.dl.sourceforge.net/pr...te-15.04-desktop-armhf-raspberry-pi-2.img.bz2
# install ddrescue
sudo apt-get install ddrescue
# extract downloaded file
bunzip2 ubuntu-mate-15.04-desktop-armhf-raspberry-pi-2.img.bz2
# write to microSD, mine mounts on /dev/sdb, yours may be different
sudo ddrescue -d -D --force ubuntu-mate-15.04-desktop-armhf-raspberry-pi-2.img /dev/sdb
# now resize the RPi2 image on the microSD using gparted
sudo apt-get install gparted
sudo gparted
#Method 2, Uses a windows machine to write image and RPi2 to expand image:
Use 7zip to extract the ubuntu mate image on a Windows machine.
Use Win32diskimager to write the disk to SD as usual.
Insert the SD card into the Pi and boot the Ubuntu image and go through the setup routine.
Manually resizing the SD card on Raspberry Pi
fdisk /dev/mmcblk0
Then delete partitions with d and create a new with n. You can view the existing table with p.
p to see the current start of the main partition
d, 2 to delete the main partition
n p 2 to create a new primary partition, next you need to enter the start of the old main partition and then the size (enter for complete SD card). The main
partition on the Debian image from 2012-04-19 starts at 157696, but the start of your partition might be different. Check the p output!
w write the new partition table
Now you need to reboot:
shutdown -r now
After the reboot you need to resize the filesystem on the partition. The resize2fs command will resize your filesystem to the new size from the changed partition
table.
resize2fs /dev/mmcblk0p2
This will take a few minutes, depending on the size and speed of your SD card.
When it is done, you can check the new size with:
df -h
# edit your /boot/config.txt if you want (optional) I add
arm_freq=1000
sdram_freq=500
core_freq=500
over_voltage=2
initial_turbo=30
# Also add any mpeg licences to your config.txt if you've bought them, like mpeg2 (recommended)
# update your repository
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo reboot
# install some pre-req's
sudo apt-get install git build-essential linux-headers-generic ncurses-dev libproc-processtable-perl fakeroot subversion patchutils
sudo apt-get install libqwt-qt5-dev libgl1-mesa-dev mesa-common-dev qtcreator libqt5serialport5-dev
sudo apt-get install omxplayer chromium-browser
# if you use nomachine you can get the armv7 deb from https://www.nomachine.com/download/linux&id=1
# Download the RPi2 kernel from https://github.com/raspberrypi/linux/tree/rpi-4.0.y and unzip the download
# I did this in /root
wget https://github.com/raspberrypi/linux/archive/rpi-4.0.y.tar.gz
tar xvzf rpi-4.0.y.tar.gz
cd linux-rpi-4.0.y
# make menuconfig did not work for us, instead we used the default RPi2 build config
make bcm2709_defconfig
make -j4
make -j4 modules
sudo make -j4 modules_install
sudo make -j4 install
sudo make headers_install INSTALL_HDR_PATH=/usr
sudo mv /boot/firmware/kernel7.img /boot/firmware/kernel7.img.old
sudo cp /boot/vmlinuz /boot/firmware/kernel7.img
sudo reboot
# Download V4L's media_build, I did this in /root
git clone git://linuxtv.org/media_build.git
cd media_build
./build
# cd to the directory above media_build in my case its root
cd ..
# Download v4l-updatelee from https://bitbucket.org/updatelee/v4l-updatelee/downloads and unzip the download
wget https://bitbucket.org/updatelee/v4l-updatelee/get/402bf4f7412b.zip
unzip updatelee-v4l-updatelee-402bf4f7412b.zip
# Now create the patch
cd media_build
cd linux
tar xf linux-media.tar.bz2
cd ../../ <--- this should take you to the directory above media_build in my case its root
diff -ruP media_build/linux/include/uapi/linux/dvb/ updatelee-v4l-updatelee-402bf4f7412b/include/uapi/linux/dvb/ >> UDL_patch.diff
diff -ruP media_build/linux/drivers/media/ updatelee-v4l-updatelee-402bf4f7412b/drivers/media/ >> UDL_patch.diff
cd media_build
mv ../UDL_patch.diff backports/
nano -w backports/backports.txt
# Now change this
[9.255.255]
add api_version.patch
add pr_fmt.patch
add debug.patch
add drx39xxj.patch
# to this
[9.255.255]
add api_version.patch
add pr_fmt.patch
add debug.patch
add drx39xxj.patch
add UDL_patch.diff
# Compile and install dvb modules in media_build Directory
./build
make install
cp -R linux/include/uapi/linux/dvb/* /usr/include/linux/dvb/
cd .. (to directory above media_build, in my case /root)
cp -R updatelee-v4l-updatelee-402bf4f7412b/firmware/* /lib/firmware/
# There is a bug in one of the qwt headers installed from apt-get, so lets fix that
wget http://svn.code.sf.net/p/qwt/code/branches/qwt-6.1/src/qwt_transform.h
cp qwt_transform.h /usr/include/qwt/qwt_transform.h
# To download the updateDVB source
git clone https://bitbucket.org/updatelee/updatedvb.git
#This will create a directory called updatedvb and will contain the source code.
# open qtcreator
qtcreator -noload Welcome
Then Open a project and browse to the updatedvb directory and
open updateDVB.pro
Go to:
Tools, Options, Build and Run, Compilers
Add Gcc if it is not there, then click apply
Now click on Kits and make it look like this:
http://www.satelliteguys.us/xen/media/kits.129/
Click Apply and OK
# To compile hit the green triangle in the lower left that says 'Build and Run'
Build should run for a little while and updatedvb window will pop up.
Exit out.
Go to one directory above the updatedvb directory.
You should fing a directory named: build-updateDVB-Desktop-Debug
cd into this directory and you will fin the executbl you just compiled called updateDVB.
Now lets get it to your desktop so its handy:
cp updateDVB /home/<your username>/Desktop
Hook up your tuner and double click the updateDVB icon on your desktop.
Go into settings menu and setup lnb, diseqc etc.