Home Wiki > HCL:Raspberry Pi
Sign up | Login

HCL:Raspberry Pi

tagline: From openSUSE

Raspberry Pi

The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video.

Technical Data

  • Low Power ARM1176JZ-F Applications Processor (ARMv6)
  • Dual Core VideoCore IV® Multimedia Co-Processor
  • 1080p30 Full HD HP H.264 Video Encode/Decode
  • Advanced Image Sensor Pipeline (ISP) for up to 20-megapixel cameras operating at up to 220 megapixels per second
  • Low power, high performance OpenGL-ES® 1.1/2.0 VideoCore GPU. 1 Gigapixel per second fill rate.
  • High performance display outputs. Simultaneous high resolution LCD and HDMI with HDCP at 1080p60

More technical data (tests and configurations) on openSUSE:Raspberry_Pi.

As well the E-Linux Org PI HUB at http://elinux.org/RPi_Hub give you a lot of help in case of Setup, Hardware Compabilty , Use cases and more.


Installing the openSUSE 13.1 Image

  1. Download the latest image at http://download.opensuse.org/repositories/devel:/ARM:/13.1:/Contrib:/RaspberryPi/images/
  2. JeOS image for a minimal system openSUSE-13.1-ARM-JeOS-raspberrypi-*.raw.xz
  3. As root extract the image onto your SD-Card (replace sdX with the device name of your SD-Card). WARNING: all previous data on the SD-Card will be lost.
 xzcat [image].raw.xz | dd bs=4M of=/dev/sdX; sync

JEOS dos part resize ( required [Image BUILDBUG] - timestap 2014-03-20, -Build33.9- and below )

  1. A little workaround is needed to get the SD bootable:
  2. Befor you can use the current JEOS Images (timestamp 30-03-2014) you must resize the dos part as descripted
http://en.opensuse.org/openSUSE:Raspberry_Pi#resizing_jeos_nonbootable_Image_-_dos_boot_part_-_HOWTO

First start / Login

  1. Insert the SD-Card with the openSUSE image into your Raspberry Pi
  2. Connect the Raspberry Pi to your monitor via DVI or HDMI.
  3. Power on the Raspberry Pi.
  4. Walk through the first boot steps and YaST2 firstboot will be auto-started (auto-resize, configure initial values: user, password, etc.).
  5. install Software you want to have
  6. Have a lot of fun...

For more issues with the OSS Images ahev an look at #Known Issues

Known Issues

  • FAT partition must be size down using YaST2 partitioner from 200 MB to 196 MB, otherwise you won't be able to boot.
  • No initrd is used, so auto-resize of partition is not performed. You can extend the EXT partition (2nd partition) to match the size of your SD card using YaST2 partitioner (or other partitioning tool).
  • zypper update and zypper dist-upgrade may fail on old JeOS images. Just do a zypper ref before your zypper update or zypper dist-upgrade
  • see http://en.opensuse.org/HCL:Raspberry_Pi#Toubleshooting_RPI for help

Misc

Configuring the openSUSE system on the Raspberry PI

Using the system headless

A headless system does not have a display and a keyboard connected. It is only connected to the network.

  1. Connect to the system using ssh and the above mentioned login information and the IP address the system received from your DHCP server in your network.
  2. Use zypper to install the necessary services and applications (the system already contains a link to the repository containing this software).
  3. If you are not familiar using config files for services and application, but you are using YaST, you can install a number of YaST modules and use the ncurses interface to YaST to configure your system.

Manual Yast2 Install

# Note : this require arround 150MB free diskspace on an freshly new SD .

# Yast2 Base :
 zypper install yast2

# Yast2 YOU base:
 zypper install yast2-online-update yast2-online-update-configuration yast2-online-update-frontend ncurses libyui-ncurses libyui-ncurses-pkg4

# Yast2 base sysconfig :
 zypper install  yast2_basis patterns-openSUSE-yast2_basis yast2-inetd yast2-network yast2-storage yast2-sysconfig yast2-trans yast2-sudo yast2-sshd yast2-runlevel yast2-pam

Yast2 .. some modules.
 zypper install yast2-instserver yast2-installation yast2-ldap-client yast2-mail yast2-samba-server yast2-samba-client 

# If you think you miss an Yast2 module , install it ...
zypper search yast2 | egrep -v '(debuginfo|debugsource|devel|Quellpaket)'
zypper install <module>

In case you want the more familiar YaST2 windows, you have to install an x11 package and a number of yast qt packages

zypper in yast2-x11 yast2-control-center-qt libui-qt-pkg4
(a number of needed packages are also pulled in) and start YaST using
yast2
In this case you have to make the ssh connection using
ssh -X root@<IP address RPi>
Warning: It may take up to 60 seconds before you get the YaST window on your screen.
  1. Have a lot of fun installing and configuring...

OpenSuSE SuSEfirewall2

Warning The OpenSuSE Image has not an firewall installed per default
 To install Firewall and manage it with YaST2 , you need to install Yast2 and iptables :

 zypper install yast2-firewall iptables SuSEfirewall2

resizing Opensuse RPI sd card using Yast2

  1. If you really need to increase the root filesystem itself:
  2. Take a backup & verify it! - if you have data on it.
  3. Resize / Partion actions with Yast2 :
( see docu http://de.opensuse.org/YaST_Module_Partitionierer )
  Yast2 ->   menu : System ->   menu : Partitioner    -> Menu -> Partition: /dev/mmcblk0p3 <return> ->   menu : "Resize..."
  menu : "Custom Size " , enter the size you whant for the root FS , at least 2 G shuold be used .
  edit the  size to what you like .. i.e 10GB
  Save & run it( "Finish") .
 errors can be ignored , just force it, say yes at questions 

do reboot your rpi

after relogin as root :

  1. resize2fs /dev/mmclk0p2

(see http://linux.die.net/man/8/resize2fs)

Configure Boot & System startup parameters /boot/config.txt

Warning You may need to adjust some parameters in the file config.txt (see openSUSE:Raspberry_Pi#Custom_configuration:_config.txt) in the DOS partition to have a proper display on your screen

Using a keyboard

Warning as default you will get an american keyboard-layout. Keep this in mind, when entering the password ...
  1. Manual way updating keyboard :
 
 zypper install vim
 vi /etc/sysconfig/keyboard
  1. Change to i.e ( sample for standard german 105 keytype´s) :
  KEYTABLE="de-latin1-nodeadkeys"

reboot your PI after changes.

Configure default system runlevel for headless

with Opensuse after 12.3 for RPI systemd are the default , no sys5 init system anymore :-)

How do I change the runlevel? systemd has the concept of targets which is a more flexible replacement for runlevels in sysvinit.

Run level 3 is emulated by multi-user.target. Run level 5 is emulated by graphical.target. runlevel3.target is a symbolic link to multi-user.target and runlevel5.target is a symbolic link to graphical.target.

You can switch to ‘runlevel 3′ by running

  1. systemctl isolate multi-user.target (or) systemctl isolate runlevel3.target

You can switch to ‘runlevel 5′ by running

  1. systemctl isolate graphical.target (or) systemctl isolate runlevel5.target


To set runlevel 5 and 3 we should modify a symbolic link to point a specific Target symbolic link metric :
(runlevel 5) :

 rm /etc/systemd/system/default.target
 ln -sf /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target 
 (runlevel 3) :

 rm /etc/systemd/system/default.target
 ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target 

Manual Network Setup for Static IP

Steps to Setup Static Network on Factory OpenSuSE Image below
Assume your network is an Class C 192.168.1.x with Router/gateway/dns a at .1 and your local domain called "local"


echo "default 192.168.1.1 - -" >/etc/sysconfig/network/routes

cp -p /etc/sysconfig/network/ifcfg-eth0_orig
cat << EOF >/etc/sysconfig/network/ifcfg-eth0
STARTMODE='auto'
BOOTPROTO='static'
BROADCAST='192.168.1.255'
ETHTOOL_OPTIONS=''
IPADDR='192.168.1.20/24'
MTU=''
NAME='eth0'
NETWORK='192.168.1.0'
REMOTE_IPADDR=''
USERCONTROL='no'
#
EOF
cp -p /etc/resolv.conf /etc/resolv.conf.orig
cat << EOF >/etc/resolv.conf
nameserver 192.168.1.1
domain local
search local
#
EOF

For Perament DNS / NTP settings edit the/etc/sysconfig/network/config settings  instead /etc/resolv.conf & /etc/ntp.conf uppon your own needs.
 NETCONFIG_DNS_STATIC_SERVERS
 NETCONFIG_DNS_STATIC_SEARCHLIST
 NETCONFIG_DNS_RESOLVER_OPTIONS
 NETCONFIG_NTP_STATIC_SERVERS

echo "192.168.1.20 MyPIHostname.local  MyPIHostname >>/etc/hosts

echo MyPIHostname >/etc/HOSTNAME

and do : 
rcnetwork reload 
rcntp reload "

Disable IPV6

Steps for disabling ipv6:

echo "net.ipv6.conf.all.disable_ipv6=1" >/etc/sysctl.d/disableipv6.conf



The non-systemd way (typically for 12.2 and earlier)
Code:     sysctl -p

The systemd way (12.3 and later although the above should still work indefinitely)
Code:    systemctl restart systemd-sysctl.service


Disable LINKLOCAL / Zeroconf / 169.254.0.0/16 on headless

The link-local( 169.254.0.0/16) zero conf network may not always required - i.e at headless to disable it do the following steps:

Change "NOZEROCONF" to yes.

vi /etc/sysconfig/network/config 
NOZEROCONF="yes"

save it exec : rcnetwork restart

openSUSE self kernel compile

For some RPI kernel avalible the source and Running kernel do not fit due the automated image build faild. the workaround for this are self compile and install your own kernel.

Steps to do:

First we pick an up to date RPI kernel source from GitHUB RPI - the standard kernel sources do not have all patches.

cd /usr/src
cat << EOL >git3.11.y-update.sh
#!/bin/sh

cd /usr/src
if [ ! -d SOURCES ]; then
  mkdir SOURCES
fi
if [ ! -d GIT ]; then
        mkdir GIT
fi
cd GIT
        if [ -d .git ]; then
                rm -rf .git
                rm .gitignore .mailmap
        fi
git init

D=2013-12-20


if [ -d rpi-3.11.y. ]; then
        rm -rf rpi-3.11.y
fi

cd /usr/src/GIT
mkdir rpi-3.11.y
git fetch git://github.com/raspberrypi/linux.git rpi-3.11.y:refs/remotes/origin/rpi-3.11.y
git checkout origin/rpi-3.11.y
 mv ./* rpi-3.11.y
tar cpfj /usr/src/SOURCES/rpi-3.11.y.tar.bz2    rpi-3.11.y


cd /usr/src
tar xpfj  SOURCES/rpi-3.11.y.tar.bz2
rm linux
ln -s rpi-3.11.y linux
#
EOL

chmod 750 git3.11.y-update.sh nohup git3.11.y-update.sh &

This take 2-4 ...depend on your network speed and SD card , cpu load.

now we build the kernel

cat << EOL >make-linux.sh
cd /usr/src/linux
kversion=$(make -s kernelrelease)
echo $kversion

#make distclean clean
#make cloneconfig
#make oldconfig
zcat /proc/config.gz >/boot/config-$kversion
## zcat /proc/config.gz >.config
#cp -p /boot/System.map-$kversion /usr/src/linux/System.map

touch /usr/src/linux/include/linux/modversions.h
 nohup make \
 CPPFLAGS="-Ofast -mfpu=vfp -march=armv6zk -mtune=arm1176jzf-s" \
 CFLAGS="-Ofast -mfpu=vfp -march=armv6zk -mtune=arm1176jzf-s" \
 dep zImage modules &
#
EOL

cd linux make oldconfig cd .. nohup make-linux.sh &

This can take up to 30H ..depend on your and SD card , cpu load. This requires a swapfile configured with at least 512M - I use 1G .

once done, install it:

cd /usr/src
cat << EOL >installkernel.sh

/bin/sh

D=`date +%Y%m%d_%H%M`
mkdir /boot.old-$D

echo "backing up /boot to  /boot.old-$D"
cp -p /boot/* /boot.old-$D/

cd /usr/src/linux
kversion=$(make -s kernelrelease)

echo "Installing selfcompiled  $kversion kernel"
cp System.map /boot/System.map-$kversion
cp System.map /boot/System.map

make ARCH=arm modules_install INSTALL_MOD_PATH=/

make ARCH=arm INSTALL_PATH=/boot/ install

cp .config /boot/config-$kversion
cp ./Module.symvers  /boot/symvers-$kversion
cp arch/arm/boot/Image /boot/kernel.img

echo "You can reboot now rebooting"
echo " In case of failures , copy back the backup from /boot.old-$D \nwith use of an sdcard reader and an Opensuse Live cd within an OS emulator Like vmware Player"
echo ""

Reboot after done that. In case of possibly failure - restore old kernel.

HP hplip Cups drivers for RPI

as not yet build by oss service for RPI,
see 3rd party  Build Project on GITHUB https://github.com/remsnet/OpenSuSE-hplip
The created Build for Raspberry PI 
RPM & SRPM created for Opensuse 13.1 RPI arm
are stored at Our Drop Box URL for Opensuse RPI
https://www.dropbox.com/sh/ofpzj8u3j2v43zq/mqoFqLLzQB

Toubleshooting RPI

Moved to http://en.opensuse.org/openSUSE:Raspberry_Pi#Troubleshooting_RPi

TODO