The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,757 other followers

The woods and trees of OpenSuSE on single-board computers – image abbreviations – and getting it installed using OS X

Posted by jpluimers on 2017/02/27

Finding the right image

There are many single-board computers on the OpenSuSE hardware-compatibility list (HCL), including:

A lot of them have ready to go images, often for Tumbleweed, however none of the pages explain the below image differences hence the one-line for each:

Since I wanted a headless system, JeOS was what I needed.

As it wasn’t available for my ODroid C1+ but was for my Raspberry Pi 2 and as my main machine is a 15″ Retina MacBook Pro Late 2013 [WayBack] below are the steps I used to get the image working.

Installing the Raspberry Pi 2 image using OS X

The below Raspberry Pi2 link will redirect to the correct image in the generic download directory http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi2/images/

http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi2/images/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l.raw.xz

For other Raspberry Pi versions, you can find them here:

http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi3/images/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi3.aarch64.raw.xz

http://download.opensuse.org/ports/armv6hl/tumbleweed/images/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-Current.raw.xz

I installed on a 8 gigabyte SD card that revealed itself as /dev/disk1 using this diskutil command (via osx – List all devices connected, lsblk for Mac OS X – Ask Different [WayBack])

diskutil list

So this wrote the image to SD card in a sudo su - prompt:

targetDevice="disk2"
unxz --keep openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l-2016.08.20-Build2.1.raw.xz; \
diskutil umount "/dev/${targetDevice}s1"; \
dd bs=1m of="/dev/r${targetDevice}" if=openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l-2016.08.20-Build2.1.raw; \
sync; \
diskutil list; \
diskutil eject "/dev/${targetDevice}"

or if you want to select which image to “burn”:

targetDevice="disk2"
imageName="openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l-2016.08.20-Build2.1.raw"
imageName="openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-2016.11.23-Build2.22.raw"
imageName="openSUSE-Tumbleweed-ARM-JeOS-raspberrypi3.aarch64-2017.01.12-Build3.2.raw"
unxz --keep ${imageName}.xz; \
diskutil umount "/dev/${targetDevice}s1"; \
dd bs=1m of="/dev/r${targetDevice}" if=${imageName}; \
sync; \
diskutil list; \
diskutil eject "/dev/${targetDevice}"

A few notes:

As a precaution, I always diskutil unmount disks before dd write operations to them.

Contrary to the example in the OpenSuSE documentation, Mac OS X does not support binary prefixes like M. When you do use them you get this error
dd: bs: illegal numeric value

For the same reason, I’ve removed iflag=fullblock and oflag=direct otherwise you get this error:
dd: unknown operand iflag
dd: unknown operand oflag

I’ve used rdisk devices instead of disk devices as raw disks are at least an order of magnitude faster to write:Source: archlinux – SD card write speed seems to be 14 times slower than read speed – Raspberry Pi Stack Exchange [WayBack]

I got 4 megabyte/second which is OK for my Kingston class 4 [WayBack] device.

Coloured splash screen (gradient / rainbow)

Coloured splash screen (gradient / rainbow)

After that the image didn’t boot: I saw a blink of the “rainbow screen” (4 pixel gradient) on the right and that was it. According to the Raspberry Pi trouble shooting guide, this likely means the kernel could not be loaded correctly.

This one did: https://www.raspberrypi.org/downloads/raspbian/ -> https://downloads.raspberrypi.org/raspbian_lite_latest -> http://director.downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2016-05-31/2016-05-27-raspbian-jessie-lite.zip with commands on a sudo su - prompt:

targetDevice="disk1"
unzip 2016-05-27-raspbian-jessie-lite.zip; \
diskutil umount "/dev/${targetDevice}s1"; \
dd bs=1m of="/dev/r${targetDevice}" if=2016-05-27-raspbian-jessie-lite.img; \
sync; \
diskutil list; \
diskutil eject "/dev/${targetDevice}" 

Connecting the wires of a USB TTL UART serial adapter to your Raspberry Pi

Connecting the wires of a USB TTL UART serial adapter to your Raspberry Pi

Debugging over serial

As I wanted to sort out what I screwed up, I wanted to see the serial output.

For that, you need a USB to TTL Serial Cable which I had as it was part of https://www.amazon.com/gp/product/B00MR2HR6O

Some links (note do NOT power both over serial and micro-USB at the same time!):

There are many USB serial TTL cables, but most of them use either of these chips manufacturers I wrote about in Some notes on apcupsd, a SUA3000XLI and a SUA48XLBP battery pack:

  • Prolific PL-2303HXA and PL-2303X, PL2303SA, PL2303TA, PL2303TB, PL2303HXD, PL2303EA, PL2303RA and PL2305
  • FTDI FT232BM, FT245BM, FT2232C, FT2232D, FT245R, FT232H, FT231X and FT230X
  • Silabs CP2101, CP2102, CP2103, CP2104, CP2105, CP2108, CP2109, CP2110, CP2112, CP2114, CP2130 and CP2614

The majority have these connector pins on the TTL (Raspberry) side:

  • RED power (do NOT connect if you have an other power source for the Raspberry!)
  • BLACK ground
  • WHITE TxD on the Raspberry PI connected to RxD of the USB adapter.
  • GREEN RxDon the Raspberry PI connected to TxD of the USB adapter.

Do NOT mix up the order or it won’t work; see rpi-usb-ttl-ssh.md [WayBack]

I use screen for connecting over serial. Sometimes a session hangs so you might want to learn how to kill a screen session – Ask Ubuntu [WayBack].

screen /dev/cu.usbserial 115200

You might want to set your screen buffer size to more than the default 1024 lines as described in linux – How do I increase the scrollback buffer in a running screen session – Stack Overflow [WayBack]:

Press Ctrl-a then : and then type

scrollback 10000

to get a 10000 line buffer, for example.

You can also set the default number of scrollback lines by adding

defscrollback 10000

to your ~/.screenrc file.

To scroll (if your terminal doesn’t allow you to by default), press Ctrl-aESC and then scroll (with the usual Ctrl-f for next page or Ctrl-a for previous page, or just with your mouse wheel / two-fingers). To exit the scrolling mode, just press ESC.

Another tip: Ctrl-ai shows your current buffer setting.

Within screen, you can scroll through the buffer (I like Esc for exiting the scrolling better than Enter twice), see terminal – Scroll inside Screen, or Pause Output – Unix & Linux Stack Exchange [WayBack]:

Screen has its own scroll buffer, as it is a terminal multiplexer and has to deal with several buffers.

Maybe there’s a better way, but I’m used to scrolling using the “copy mode” (which you can use to copy text using screen itself, although that requires the paste command too):

  • Hit your screen prefix combination (C-a / control+A by default), then hit Escape.
  • Move up/down with the arrow keys ( and ).
  • When you’re done, hit Return twice to get back to the end of the scroll buffer.

(If you move the cursor after hitting Return once, you’ll be selecting text to copy, and hitting Returnthe second time will copy it. Then you can paste with C-a followed by ])

Of course, you can always use more and less, two commonly used pagers, which may be enough for some commands.

Resetting your Raspberry Pi B+/2/3

Without modification, you have to pull/reinsert the power plug to reset your Raspberry Pi. Since connectors only survive a limited number of insertions, you might want to add a Raspberry Pi 2 Reset Button – All [WayBack] which works by shortening the RUN header with a switch.

The RUN header (which basically is a reset switch [WayBack]) is placed on various locations depending on your Raspberry Pi models:

Here is a YouTube video on How to fit a reset switch to your Raspberry Pi Rev 2 and blog post How To Add a Reset Switch To Your Raspberry Pi [WayBack]

Fixing the GPT into MBR

mkdir /efipart
mount -tmsdos /dev/disk1s1 /efipart
copy ~/Downloads/u-boot.bin /efipart

That didn’t work either, so I carefully looked at the board inside the case: it was a Raspberry B+ one which happened to be in the stock of Raspberry 2 pile. Stupid me!

Taking a “correct” Raspberry Pi 2 from the stock indeed worked with the above image.

Updating/Upgrading the Raspberry Pi 2

After installing, login on the console or via ssh (user root, password linux), then:

  1. change the root password
  2. add a new user that can sudo
  3. change the hostname
  4. update/upgrade: ensure you trust the 'Factory-Contrib-RPi2' key:
nohostname:~ # zypper up
Retrieving repository 'Factory-Contrib-RPi2' metadata ----------------------------------------------------------------------[\]

New repository or package signing key received:

  Repository:       Factory-Contrib-RPi2                                
  Key Name:         devel:ARM OBS Project <devel:ARM@build.opensuse.org>
  Key Fingerprint:  1D6571D6 77CD36CE F6B93856 16C5D54F 3F546F34        
  Key Created:      Wed 10 Apr 2013 01:47:53 PM CEST                    
  Key Expires:      Fri 18 Aug 2017 04:54:05 PM CEST                    
  Rpm Name:         gpg-pubkey-3f546f34-51655169                        


Do you want to reject the key, trust temporarily, or trust always? [r/t/a/? shows all options] (r): t
Retrieving repository 'Factory-Contrib-RPi2' metadata ...................................................................[done]
Building repository 'Factory-Contrib-RPi2' cache ........................................................................[done]
Retrieving repository 'openSUSE-Ports-Tumbleweed-repo-oss' metadata .....................................................[done]
Building repository 'openSUSE-Ports-Tumbleweed-repo-oss' cache ..........................................................[done]
Loading repository data...
Reading installed packages...

Nothing to do.

nohostname:~ # zypper dist-upgrade 
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...

The following 95 NEW packages are going to be installed:
  adjtimex alsa-oss alsa-plugins bash-completion bash-doc bundle-lang-common-en cantarell-fonts checkmedia crda cron cronie dconf dejavu-fonts expat fontconfig glibc-extra glib-networking google-opensans-fonts gsettings-backend-dconf gsettings-desktop-schemas
  hicolor-icon-theme hicolor-icon-theme-branding-openSUSE libdconf1 libfreetype6 libldap-data libpng16-16 libpython3_5m1_0 libXext6 libXft2 libXmuu1 libXrender1 libXss1 lsof mt-st openssh-askpass openssh-helpers perl-CPAN-Changes perl-Devel-Symdump perl-Digest-HMAC
  perl-Encode-Locale perl-File-Listing perl-HTML-Parser perl-HTML-Tagset perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-HTML perl-IO-Socket-SSL perl-libwww-perl perl-LWP-MediaTypes perl-LWP-Protocol-https perl-Net-DBus
  perl-Net-DNS perl-Net-HTTP perl-Net-SSLeay perl-Pod-Coverage perl-Test-Pod perl-Test-Pod-Coverage perl-TimeDate perl-URI perl-WWW-RobotRules perl-X11-Protocol perl-XML-Twig postfix python3 python3-base python3-curses python3-dbm python3-idle python3-pip
  python3-setuptools python3-six python3-tk readline-doc release-notes-openSUSE sbc systemd-bash-completion tcl time tk traceroute unzip-doc vim-data wallpaper-branding-openSUSE wireless-regdb xauth xdg-utils xhost yast2-add-on yast2-branding-openSUSE yast2-online-update
  zypper-aptitude zypper-log

95 new packages to install.
Overall download size: 44.4 MiB. Already cached: 0 B. After the operation, additional 132.2 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package adjtimex-1.29-7.2.armv7hl                                             (1/95),  36.3 KiB ( 62.1 KiB unpacked)
Retrieving: adjtimex-1.29-7.2.armv7hl.rpm ...............................................................................[done]
...
Retrieving package python3-idle-3.5.1-3.1.armv7hl                                       (95/95), 491.0 KiB (  2.5 MiB unpacked)
Retrieving: python3-idle-3.5.1-3.1.armv7hl.rpm ..........................................................................[done]
Checking for file conflicts: ............................................................................................[done]
( 1/95) Installing: adjtimex-1.29-7.2.armv7hl ...........................................................................[done]
...
(95/95) Installing: python3-idle-3.5.1-3.1.armv7hl ......................................................................[done]
Running: cantarell-fonts-0.0.24-2.1-reconfigure-fonts  (cantarell-fonts, /var/adm/update-scripts)
Running: cantarell-fonts-0.0.24-2.1-reconfigure-fonts  (cantarell-fonts, /var/adm/update-scripts) .......................[done]
Running: dejavu-fonts-2.37-1.1-reconfigure-fonts  (dejavu-fonts, /var/adm/update-scripts)
Running: dejavu-fonts-2.37-1.1-reconfigure-fonts  (dejavu-fonts, /var/adm/update-scripts) ...............................[done]
Running: google-opensans-fonts-1.0-11.2-reconfigure-fonts  (google-opensans-fonts, /var/adm/update-scripts)
Running: google-opensans-fonts-1.0-11.2-reconfigure-fonts  (google-opensans-fonts, /var/adm/update-scripts) .............[done]

Installing the Raspberry Pi image on a Raspberry B+

That turned out to be easy after downloading http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi/images/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-2016.06.09-Build2.3.raw.xz from http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi/images/

targetDevice="disk1"
unxz --keep openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-2016.06.09-Build2.3.raw.xz; \
diskutil umount "/dev/${targetDevice}s1"; \
dd bs=1m of="/dev/r${targetDevice}" if=openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-2016.06.09-Build2.3.raw; \
sync; \
diskutil list; \
diskutil eject "/dev/${targetDevice}"

A few notes:

From this image, zypper dist-upgrade gives this errror:

Problem: nothing provides raspberrypi-firmware = 2016.07.15 needed by raspberrypi-firmware-config-rpi-2016.07.15-1.1.noarch

The workaround his to add the hardware repository:

# zypper repos --details
# | Alias                              | Name                               | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                           | Service
--+------------------------------------+------------------------------------+---------+-----------+---------+----------+--------+-----------------------------------------------------------------------------------------------+--------
1 | Factory-Contrib-RPi                | Factory-Contrib-RPi                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi/standard/ |        
2 | openSUSE-Ports-Tumbleweed-repo-oss | openSUSE-Ports-Tumbleweed-repo-oss | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/ports/armv6hl/tumbleweed/repo/oss/                               |        

#zypper addrepo http://download.opensuse.org/repositories/hardware/openSUSE_Factory_ARM/hardware.repo
Adding repository 'Hardware tools (openSUSE_Factory_ARM)' ................[done]
Repository 'Hardware tools (openSUSE_Factory_ARM)' successfully added
Enabled     : Yes                                                                     
Autorefresh : No                                                                      
GPG Check   : Yes                                                                     
Priority    : 99                                                                      
URI         : http://download.opensuse.org/repositories/hardware/openSUSE_Factory_ARM/

# zypper repos --details 
# | Alias                              | Name                                  | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                           | Service
--+------------------------------------+---------------------------------------+---------+-----------+---------+----------+--------+-----------------------------------------------------------------------------------------------+--------
1 | Factory-Contrib-RPi                | Factory-Contrib-RPi                   | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi/standard/ |        
2 | hardware                           | Hardware tools (openSUSE_Factory_ARM) | Yes     | ( p) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/repositories/hardware/openSUSE_Factory_ARM/                      |        
3 | openSUSE-Ports-Tumbleweed-repo-oss | openSUSE-Ports-Tumbleweed-repo-oss    | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/ports/armv6hl/tumbleweed/repo/oss/                               |        
Raspberry Pi logo

Raspberry Pi logo

Boot differences between Raspberry Pi 2 and B+

The Raspberry Pi 2 boots faster, but blanks the screen between loading the kernel and showing the logon prompt.

The Raspberry Pi B+ shows a Raspberry logon between those moments.

The Raspberry Pi 2 does not need any repository changes in order to perform a zypper dist-upgrade (might be because the image is younger).

–jeroen

via: Raspberry Pi with boots up with Rainbow screen – Raspberry Pi Stack Exchange

How to fit a reset switch on your Raspberry Pi Rev 2:

One Response to “The woods and trees of OpenSuSE on single-board computers – image abbreviations – and getting it installed using OS X”

  1. […] build this later, but as the follow up on shortening the RUN pins of a Raspberry Pi to reset it in The woods and trees of OpenSuSE on single-board computers – image abbreviations – and getting it…, I want to see if the below will work for me to have a pair (maybe trio?) of Raspberry Pi devices […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: