Pidora
Pidora - Fedora Remix
Software
The currently available Pidora version is called "Pidora 2014 (Raspberry Pi Fedora Remix)".
Open a console and enter the following commands to get this image:
wget http://download.raspberrypi.org/Pidora-2014-R3.zip
PIDORAIMG="Pidora-2014-R3.zip"
# test the downloaded image (optional)
gunzip --test $PIDORAIMG
Setup
Formatting the SD-Card under Linux
Warning: "DRIVE" must be the device of your SD-card.
You can find this by inserting your card and then running journalctl --follow.
You should see the messages about the device being mounted in the log.
DRIVE=/dev/sdc # -or- DRIVE=/dev/mmcblk1
We use now gzip to decompress the image file and pipe that to dd which wrote the contents to $DRIVE.
gunzip -dc $PIDORAIMG | dd of=$DRIVE bs=4M
# ensure that the image is fully written onto the card
sync
You can now remove the SD card and insert it into the card reader of your Raspberry Pi.
System boot
Connect the Raspberry Pi to a high-definition monitor or TV using the HDMI output and connect a USB keyboard and mouse.
Plug in an ethernet cable connected to an IPv4 network with DHCP server and Internet gateway. The Remix will use this connection to set the system clock.
Apply power.
A graphical configuration tool will permit you to finalize the installation of your Pidora image.
Once done you should install the security fix against the Bash Shellshock vulnerability
yum localinstall -y http://pidora.ca/pidora/misc/bash-4.2.48-2.fc20.armv6hl.rpm
and than make a full system update
yum -y update
Adafruit PiTFT Touchscreen
The Adafruit TFT Touchscreen for Raspberry Pi features a 2.8" display with 320x240 16-bit color pixels and a resistive touch overlay. The plate uses the high speed SPI interface on the Pi and can use the mini display as a console, X window port, displaying images or video etc.
Kernel support
The PiTFT requires kernel support and a couple other things to make it a nice stand-alone display. In particular the Linux Framebuffer driver "fb_ili9340" for small TFT LCD display is required.
The source code, written by Noralf Tronnes, is available here.
Installation
Download kernel sources (raspberrypi-kernel package) from the Pidora 20 updates repository and install it.
PIREPOSRC="http://pidora.ca/pidora/rpfr-updates/20/SRPMS"
wget $PIREPOSRC/r/raspberrypi-kernel-3.12.26-1.20140808git4ab8abb.rpfr20.src.rpm
rpm -hiv raspberrypi-kernel-3.12.26-1.20140808git4ab8abb.rpfr20.src.rpm
Than move to the source tree
yum install git ncurses-devel
cd drivers/video
git clone --depth=1 https://github.com/notro/fbtft
cd ../..
Edit the file drivers/video/Kconfig by adding the line
source "drivers/video/fbtft/Kconfig"
and the file drivers/video/Makefile by adding
obj-y += fbtft/
Enable the driver "FB_TFT_ILI9340" in menuconfig and build the kernel
make menuconfig
# Device Drivers -->
# Graphics support -->
# <M> Support for small TFT LCD display modules
# <M> FB driver for the ILI9340 LCD Controller
# <M> Module to for adding FBFTP devices
# <SAVE>
# <EXIT>
make M=drivers/video/fbtft
# Output of the gcc compiler:
# LD drivers/video/fbtft/built-in.o
# CC [M] drivers/video/fbtft/fbtft-core.o
# CC [M] drivers/video/fbtft/fbtft-sysfs.o
# CC [M] drivers/video/fbtft/fbtft-bus.o
# CC [M] drivers/video/fbtft/fbtft-io.o
# LD [M] drivers/video/fbtft/fbtft.o
# CC [M] drivers/video/fbtft/fb_ili9340.o
# CC [M] drivers/video/fbtft/fbtft_device.o
# Building modules, stage 2.
# MODPOST 3 modules
# CC drivers/video/fbtft/fb_ili9340.mod.o
# LD [M] drivers/video/fbtft/fb_ili9340.ko
# CC drivers/video/fbtft/fbtft.mod.o
# LD [M] drivers/video/fbtft/fbtft.ko
# CC drivers/video/fbtft/fbtft_device.mod.o
# LD [M] drivers/video/fbtft/fbtft_device.ko
Install the new modules fbtft.ko, fb_ili9340.ko, and fbtft_device.ko.
cp drivers/video/fbtft/*.ko /lib/modules/`uname -r`/extra/
# eventually strip the debug informations
# strip --strip-debug /lib/modules/`uname -r`/extra/{fbtft*,fb_ili9340}.ko
depmod -a
You can now load both the kernel modules
modprobe fbtft_device name=adafruit22
journalctl will show the default pin assignements, and that the driver is loaded
kernel: fbtft_device: SPI devices registered:
kernel: fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00
kernel: fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
kernel: fbtft_device: 'fb' Platform devices registered:
kernel: fbtft_device: bcm2708_fb id=-1 pdata? no
kernel: fbtft_device: Deleting spi0.0
kernel: fbtft_device: GPIOS used by 'adafruit22':
kernel: fbtft_device: 'reset' = GPIO25
kernel: fbtft_device: 'led' = GPIO23
kernel: fbtft_device: SPI devices registered:
kernel: fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
kernel: fbtft_device: fb_hx8340bn spi0.0 32000kHz 8 bits mode=0x00
Persistent Module Loading
Create the file /etc/modules-load.d/fbtft-adafruit22.conf
fbtft_device
and the file /etc/modprobe.d/fbtft-adafruit22.conf to pass module settings to udev
options fbtft_device name=adafruit22
... FIXME ...
yum install xorg-x11-server-Xvfb # X Windows System virtual frame buffer X server
systemctl isolate multi-user.target
export FRAMEBUFFER=/dev/fb0
startx
$ grep '(EE)' /var/log/Xorg.0.log
...
[ 4052.263] (EE) Failed to load module "modesetting" (module does not exist, 0)
[ 4052.272] (EE) xf86OpenConsole: VT_ACTIVATE failed: No such device or address
[ 4052.277] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 4052.282] (EE) Server terminated with error (1). Closing log file.
Configuration
...
Original patchset for Rapsbian (Linux kernel 3.6.11)
Full documentation
Create a rpm for kernel modules