Remake SD image - notro/fbtft GitHub Wiki
Note: Superceded by FBTFT-image-build-process
This shows the steps used to make a SD image with FBTFT support. All done on the Raspberry Pi itself.
Make sure we have enough disk space, 2.5 GB is needed:
df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 7.1G 4.2G 2.6G 63% /
Kernel build
This guide assumes the running kernel is compiled with FBTFT support as modules.
Install prerequisites
apt-get install zip kpartx
Download image
Click on the Direct download link on http://www.raspberrypi.org/downloads to get the mirror link.
wget <mirror link>
Unzip image file
# Takes approx. 9 minutes
unzip 2013-02-09-wheezy-raspbian.zip
Mount partitions
mkdir /media/{bootfs,rootfs}
losetup /dev/loop0 2013-02-09-wheezy-raspbian.img
kpartx -a /dev/loop0
mount /dev/mapper/loop0p1 /media/bootfs
mount /dev/mapper/loop0p2 /media/rootfs
Copy kernel and modules
cp /boot/kernel.img /media/bootfs/
rm -R /media/rootfs/lib/modules/3.6.11+
cp -R /lib/modules/3.6.11+ /media/rootfs/lib/modules/
Enable SPI
Uncomment the SPI blacklisting
nano /media/rootfs/etc/modprobe.d/raspi-blacklist.conf
Unmount partitions
umount /media/bootfs
umount /media/rootfs
kpartx -d /dev/loop0
losetup -d /dev/loop0
Zip up image
# Takes approx. 30 minutes
mv 2013-02-09-wheezy-raspbian.img 2013-02-09-wheezy-raspbian-2013-04-07-fbtft.img
zip 2013-02-09-wheezy-raspbian-2013-04-07-fbtft.zip 2013-02-09-wheezy-raspbian-2013-04-07-fbtft.img