HCL:Raspberry Pi2
The Raspberry Pi 2 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
- Broadcom BCM2836 SoC
- 4x ARM Cortex-A7 CPU
- 40-pin connector also see Using The Header
openSUSE in Raspberry Pi 2
Writing a disk image to the SD card
- Download the image you want (Leap is stable, Tumbleweed is rolling) from here:
TumbleweedJeOS image E20 image XFCE image LXQT image GNOME image KDE image X11 image If the direct links above do not work for you, please check the general download directory for the images.
- 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. Check first if the device you have selected is really your SD card!xzcat [image].raw.xz | dd bs=4M of=/dev/sdX iflag=fullblock oflag=direct status=progress; sync
- Insert the SD card with the openSUSE image into your board.
- Connect the board to your PC via serial port (optional, but helpful for debugging; USB-TTL serial cable needed).
- Connect the board to your monitor (via DVI/HDMI, optional).
- Power on the board.
- Walk through the first boot steps.
- Ethernet is configured to request an IP via DHCP, check your DHCP server for the board IP if used.
- Have a lot of fun...
Tips for openSUSE Tumbleweed (upstream)
If you don't see any kernel output on serial or HDMI, you can add earlycon=pl011,0x3f201000,115200n8 to the kernel command line (e.g., by editing the GRUB menu item).
First start / Login
The SD card is formatted in the traditional DOS format. On the first boot with this micro SD card, the card will be repartitioned by the image to have 3 partitions and will be in the GPT format (GUID Partition Table):
- a small FAT partition
- a large EXT4 partition (takes whatever the other 2 leave behind)
- a SWAP partition.
In case after first start a reboot does not work the GPT backup at the end of the card (1024 bytes) may have confused the system. In that case clear that part of the SD card using the script:
card=/dev/sdX ssize=$(/usr/sbin/blockdev --getss $card) [ $ssize -ne 512 ] && echo "sectorsize not equal 512" && exit 1 size=$(/usr/sbin/blockdev --getsz $card) dd if=/dev/zero of=$card obs=$ssize seek=$(($size-2)) count=2
Additional software for Raspberry Pi 2
Some additional software is available for Raspberry Pi 2. Some are in official openSUSE repositories, others are in Packman repositories.
Packman repos
Please follow instructions from Additional_package_repositories#Packman
Multimedia
In multimedia software, you may want to install:
- omxplayer: a command line media player making use of Raspberry Pi 2 video hardware acceleration
- kodi-noX-raspberry-pi2: a media center (without X server and including Raspberry Pi 2 video hardware acceleration)
Configuring the openSUSE system on the Raspberry Pi 2
Using the system headless
A headless system does not have a display and a keyboard connected. It is only connected to the network using the UTP interface.
- After inserting the micro-SD card, connecting to Ethernet and connecting power, the system will start and partition the SD card as shown above. It will also start the ssh daemon. Although the lights on the Ethernet port show an active connection it may take up to 10 minutes before the system can accept an ssh connection.
- Connect to the system using ssh and the login information, user: root password: linux and the IP address the system received from your DHCP server in your network. You may need to consult the DHCP server to find the given IP address.
- Use zypper to install the necessary services and applications (the system already contains a link to the repository containing this software).
- 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.
SuSEfirewall2
To install Firewall and manage it with YaST2, you need to install Yast2 and iptables:
zypper install yast2-firewall iptables SuSEfirewall2
Configure Boot & System startup parameters /boot/config.txt
Using a keyboard
- Manual way of updating keyboard :
zypper install vim vi /etc/sysconfig/keyboard
- Change to i.e. ( sample for standard german 105 keytype´s) :
KEYTABLE="de-latin1-nodeadkeys"
reboot your Pi after changes.
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" -- note that a .local domain does break several things. Use f.e. "invalid" instead
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 permanent DNS / NTP settings edit the /etc/sysconfig/network/config settings instead of /etc/resolv.conf & /etc/ntp.conf upon 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
g
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 be 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
Troubleshooting RPi
The RPi2 troubleshooting should be similar to the Raspberry Pi (1) troubleshooting here:
Moved to openSUSE:Raspberry_Pi#Troubleshooting_RPi
Boot from USB
If you are using a Raspberry Pi 2B v1.2, you can enable USB boot by updating OTP memory. For that, you need to boot once from an SD card with a Config.txt file on 1st partition (along the Raspberry Pi firmware) which include the following line:
program_usb_boot_mode=1
Once done, your Raspberry Pi 2B v1.2 will try to start from USB, if no SD card.
More information on: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
See also
- List of Hats
- Raspberry Pi 2
- Raspberry Pi Camera Modules
- Raspberry Pi 3 SPI TFT Display
- Raspberry Pi 3 Real Time Clock (RTC)
- Raspberry Pi 3 Serial Console
- Raspberry Pi 4
- Using The Raspberry Pi Header