20200311

Setzen, 6!

Ich genüge ihrer Liebe nicht.

… hab wohl weniger als sechzehn Prozent.

Ich bin ungenügend.

20190310

Odroid U2: From Ubuntu 16.04 minimal to Ubuntu 18.04 Desktop — a Tutorial

Intro

A while ago, I mean, quite a while, in 2012, I bought an Odroid U2 from Hardkernel. I liked the feature set and also the form factor, which reminded me of a mini NeXTcube. So my original plan was to get FreeBSD and then GNUstep for that thingie, not knowing at that time that every SoC (in this case the Samsung Exynos 4412) needed a special port to be supported by an OS (I thought ARMv7 support to be generic, like Darwin 1.4.1 x86 did run on my AMD Box in the days, when Mac OS X for Intel was still far away). However, this never became a reality, despite asking several times on the FreeBSD-Arm mailing list. So I lost interest in this and the poor Odroid settled dust buried somewhere in my stowage …


… until lately. Something reminded me that I still had an Odroid. I wanted to play with it and scrambled my whole stowage until I found it. It came with some rather vintage Android installed on it's microSD card (hence the name Odroid), which I didn't like from the beginning. I needed something more recent, like let's say Ubuntu 18.04. Here I have to mention that the Odroid U2 is EOLed for quite a while now and Hardkernels support has never been the best. But I still had hope an finally found this thread, however, the offered minimal Ubuntu 18.04 image did not work for me (and others). So, after a while browsing the Odroid forum, I found this post, which inspired me to try the same.

How I did this

Download the minimal Ubuntu 16.04 image and install it

#!/bin/bash

fdisk_first() {
        p2_start=`fdisk -l /dev/mmcblk0 | grep mmcblk0p2 | awk '{print $2}'`
        echo "Found the start point of mmcblk0p2: $p2_start"
        fdisk /dev/mmcblk0 << __EOF__ >> /dev/null
d
2
n
p
2
$p2_start

p
w
__EOF__

        sync
        touch /root/.resize
        echo "Ok, Partition resized, please reboot now"
        echo "Once the reboot is completed please run this script again"
}

resize_fs() {
    echo "Activating the new size"
    resize2fs /dev/mmcblk0p2 >> /dev/null
    echo "Done!"
    echo "Enjoy your new space!"
    rm -rf /root/.resize
}


if [ -f /root/.resize ]; then
    resize_fs
else
    fdisk_first
fi
  • log in onto your odroid using ssh root@ from your Laptop/Desktop and then paste the above script into vi,nano or whatever editor you prefer. Save the script as resize.sh
  • then run the script before and after a reboot:
chmod +x resize.sh
./resize.sh
reboot
./resize.sh

Upgrade to Ubuntu 18.04

sudo apt install ubuntu-release-upgrader-core

sudo apt update

sudo apt upgrade

sudo reboot

sudo do-release-upgrade -d

sudo reboot

From Server to Desktop

(see also: https://askubuntu.com/questions/322122/switching-from-server-to-desktop)

sudo apt-get update

sudo apt-get install tasksel

sudo tasksel

sudo reboot

Some additional things

For some reasons unknown to me gnome-terminal is not working, it crashes on launch. To solve this problem I just installed xterm:

sudo apt-get install xterm

When examining the first image I created in a hex editor, I found that a lot of clutter from deleted Android files was still there (which probably was a leftover of the original Odroid Android from the 16.04 image I downloaded) So I decided to remove this by first defragmenting the disk and then wiping the free disk space:

sudo apt-get install e2fsprogs
sudo apt-get install secure-delete

sudo e4defrag -c /
sudo e4defrag -v /

sudo sfill -llz -v /
sudo sfill -llz -v /media/boot

This also resulted in a smaller xz compressed image file since free space is so much easier to compress … :)



Some things for you to do

  • Download a readymade Ubuntu 18.04 Desktop Odroid U2 / U3 Image for a 128GB microSDXC card here.
  • It is strongly recommended to disable remote ssh login for the user root since this makes remote attacks much harder! ssh login for root came in handy during the installation process and is enabled in the minimal Ubuntu 16.04 image I used as a starting point.
  • You might want to pin the MAC address of your Odroid to a fixed value so you don't get always a new IP address after each reboot. I found this: https://forum.odroid.com/viewtopic.php?f=77&t=30654#p245732 a working solution (the way like the first solution offered in this thread (post 11) did not work for me)
  • When you created the image file yourself (instead of using mine) you might experience a file system damage on the minimal Ubuntu 16.04 image. The boot partition (FAT16) had a damage, which I later repaired (the downloadable image should be fine). You can repair such images using a second SD-Card to boot from and then plug in an the SD-Card you want to repair using an USB-Adapter.
  • Report back to me whether this image works on a Odroid U3 or X2.
  • Have fun!

20160131

Herr Müller, kommen Sie bitte mal in mein Büro!

"Herr Müller, ich möchte erst gar nicht lange herumreden. Das Mitarbeitermotivationstracking hat festgestellt, dass sie in letzter Zeit, nun sagen wir mal langsam und fahrig, abgelenkt sind. Dann auch noch die deutlichen Zeichen von Demotivation, welche sich mit den unterdurchschnittlichen Arbeitsergebnissen in letzter Zeit bei Ihnen decken. Was soll ich sagen? Jeder hat mal eine Krise, Herr Müller, aber doch nicht über dreieinhalb Monate lang. Sie wissen, ich hab Verständnis, dass man mal ein paar Tage einen Durchhänger haben kann. Oder muss ich mir andere Sorgen machen? Jedenfalls hoffe ich, dass sie diese informelle Warnung ernstnehmen. Sonst kommt eine Abmahnung. Und sie wissen, was dass für Sie bedeutet!"

20151207

Und?


Und? … gibt es ein und?

Nein, es gibt kein "Und".

Dann, bitte entschuldigen Sie, ich meinte da etwas in Ihrem Gesicht gesehen zu haben, da habe ich mich wohl …

… nein, Du hast Dich nicht getäuscht. Aber ich kann doch nicht. Tut mir leid. …

20151205

Hoffnung

"Ich weiß, dass Ihre eigentliche Profession darin besteht, Leuten in feierlicher Umgebung Hoffnung zu verkaufen, um es vulgär zu sagen. Deswegen mag Ihnen mein Anliegen paradox erscheinen und doch bitte ich Sie, mich von all den falschen Hoffnungen auf die Wiederkehr des großen Glücks zu befreien, Hoffnungen, die, wenn sie sterben, mir einen schwer erträglichen Schmerz bereiten, Hoffnungen, die dennoch immer wieder aufkeimen, kaum dass sie gestorben sind. Diese Hoffnungen sind es, die jegliches kleine Glück, welches sich immer wieder hier und da im Alltag findet, verächtlich links liegen zu lassen, da dieses kleine Glück ja bei weitem nicht an das vergangene große Glück heranreicht."

20151117

Banalitäten

Es tropfte. Von einem Vorsprung des Hauses oder Sims, wo der Regen sich sammelte, herab auf seinen Kopf. Ein ziemlich großer Tropfen, der durch seine dichten Haare bis auf die Kopfhaut durchschlug. Und noch einer. Jetzt hätte er weggehen können, früher wäre er weggegangen, aber jetzt war es ihm egal. Es tat nichts zur Sache. Vieles war jetzt egal, hatte keine Wichtigkeit mehr. Denn die Würfel waren gefallen. Ändern konnte er daran nichts. Nichts am Verblassen der Welt noch am Grund der Weltenblässe. Es war nicht seine Entscheidung. Er musste damit leben.

20151115

Nadel


Sagt die Nadel, die ich mit viel Glück im Heuhaufen gefunden habe, zu mir:

"ich liebe dich nicht. ich wollte nur etwas ablenkung. ich kann sex und vergnügen vom alltäglichen leben gut trennen, und im alltäglichen leben sind unsere leben sehr unterschiedlich.
ich denke das weißt du auch. aus diesen grund ist die sache vorbei."

Dann meinte sie noch, da wären noch viele Nadeln im Heuhaufen. Ich glaube daran nicht, Heu sticht zwar auch ungemein, aber ich bin der festen Überzeugung, dass sich in einem Heuhaufen immer nur eine Nadel befindet, wenn überhaupt.

20150502

How to install GNUstep on FreeBSD 10.1 running in VirtualBox

In this post I describe step by step how to install a GNUstep development environment on FreeBSD 10.1. I used VirtualBox 4.3.26 in 64bit Mode for this so that you can run GNUstep alongside your favorite desktop. First I show the installation of FreeBSD inside VirtualBox over network including Guest Additions from a FreeBSD port. Then I continue with installing the FreeBSD's ports of GNUstep in the System domain and after that installing GNUstep from SVN trunk into the Local domain.


Setting up the VirtualBox VM

I am using VirtualBox 4.3.26 which is at the moment the latest version of VirtualBox. But this is not critical, a bit older versions of VirtualBox will do it too.


FreeBSD is supported by VirtualBox right away
I am giving it quite a bit more RAM than the recommended 128MB

Now create a dynamically allocated disk image

Also, I make the virtual hard disk big enough that I don't need to resize it later

After creating the VM click on "Settings" since there are a few things to change before starting with the actual installation.
I always use the bridged network adapter so I can easily SSH from other machines into the VM
Don't be so parsimonious with your VRAM, give it the full 128MB
Some more cores also won't do bad if you're having to share enough of them

Installing FreeBSD 10.1 over network

At first you need to download a bootable ISO image of FreeBSD. I've chosen a network based install since it downloads only what you need. Download for instance ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-bootonly.iso
Select the downloaded image at boot time
FreeBSD booting (nothing to do here)
Select Install
Choose a keymap here. I went with the default keymap.
Choose the hostname, I've chosen "freebsd10"

Now I selected to install everything, you might choose differently, but be sure to select "System source code" since you need it later to install the VirtualBox guest additions.
Don't forget to select "System source code"

Setting up the network connection for a network based install

Now the installation process of FreeBSD will guide you through the network setup. I had nothing to change here.
If your screen looks now something like this, e.g. you have got an IP address, everything is fine.
Now select the mirror to install from.

Partitioning the disk

Here I went with the default options. You can of course partition the disk differently, if you know what you're doing.

The installation itself

Now the installation process starts …

Do not select the ntpd demon since the VirtualBox guest additions will conflict with this.

Adding users to the system

I added the following users to the system:

user: root
pass: freebsd

user: gnustep
pass: gnustep


For now I use sh as the shell until bash is installed

Finishing the Installation


reboot
First login after the installation

Installing FreeBSD ports

For installing the required ports at first update the ports tree.

As user root do a:

 # portsnap fetch extract update


Then install the portmaster port which will make installing subsequent ports easier:

 # cd /usr/ports/ports-mgmt/portmaster && make install clean

enable bash and zsh completion in the options

To update outdated ports later do a

 # portsnap fetch update

to update the ports tree and

 # pkg version -l "<"

or

 # portmaster -L

to check for outdated ports,

followed by a

 # portmaster -a

or

 # portmaster -af

(if some port fails) on a regular basis.



Install bash

as root do:

 # portmaster shells/bash

I've chosen the default options for bash and all its dependencies



Change the default shell for user gnustep:


as user gnustep do:

 # chsh -s /usr/local/bin/bash



install x11/xorg

as root:

 # portmaster x11/xorg

Choose the default options except for:

llvm35-3.5.2
[x] CMAKE
xorg-server-1.14.7_4,1
(*) HAL
cairo-1.12.18_1,2
[x] OPENGL
freetype2-2.5.5
[x] PNG



Installing the VirtualBox Guest Additions port


as root:

 # portmaster emulators/virtualbox-ose-additions

Choose the default options except for:

virtualbox-ose-additions-4.3.26
[x] OPENGL



Configuring the Guest Additions



add user gnustep to group wheel to enable sudo later

 # pw groupmod wheel -m gnustep


enabling Guest Additions: 

Add this to /etc/rc.conf in the FreeBSD guest:

 vboxguest_enable="YES"
 vboxservice_enable="YES"

Xorg uses HAL to autodetect keyboards and mice. The sysutils/hal and devel/dbus ports are installed as dependencies of x11/xorg, but must be enabled by the following entries in the /etc/rc.conf file:

 hald_enable="YES"
 dbus_enable="YES"

Reboot or start both services by hand:

 /usr/local/etc/rc.d/dbus start
 /usr/local/etc/rc.d/hald start

see:




Installing the Window Maker port

as root:

 # portmaster x11-wm/windowmaker

Choose the default options except for:

jasper-1.900.1_14
[x] OPENGL
webp-0.4.3
[x] X11




enabling Window Maker

In order to run wmaker, a user needs to have an ~/.xinitrc file consisting of something similar to

 #!/bin/sh
 exec wmaker

add this for both user root and gnustep

see:




Launching Window Maker

launch Window Maker to check if everything works so far

Success!
A right click onto the background brings up Window Makers menu

Installing GNUstep from FreeBSD ports into the System Domain

Installing the necessary tools

Installing the Subversion port

Subversion is needed to check out the sources from GNUstep SVN.

as root:

 # portmaster devel/subversion

Choose the default options

Installing the Sudo port

sudo is needed during the GNUstep installation process.

as root:

 # portmaster security/sudo

Choose the default options



now logout/login

as root:

 # visudo

uncomment the line:
 # %wheel ALL=(ALL) ALL

to enable sudo for the group "wheel" and so for the user gnustep (which is part of the wheel group)


Installing the GNUstep libraries and framewoks

I've chosen the way of installing the GNUstep ports into the System domain so I don't need to look after the right dependencies for myself but let the FreeBSD's port system handle this.

Installing the Objective-C 2 runtime

as root:

 # portmaster lang/libobjc2

use the default options


Install GNUstep make

 # portmaster devel/gnustep-make

use the default options


install GNUstep base (Foundation)

 # portmaster lang/gnustep-base

Choose the default options except for

gnustep-base-1.24.6_6
(*) MDNS


Install GNUstep gui (AppKit)

 # portmaster x11-toolkits/gnustep-gui

Choose the default options except for

gnustep-gui-0.24.0_5
[x] ASPELL


Install GNUstep back

 # portmaster x11-toolkits/gnustep-back

use the default options

Optional: Trying to install the GNUstep examples port (currently broken)

GNUstep examples are a collection of simple GNUstep apps to guide you into developing for GNUstep.


 # portmaster misc/gnustep-examples

this port is currently broken



Installing the System Preferences port

System Preferences' purpose is to control certain settings of your GNUstep environment.


 # portmaster deskutils/systempreferences

use the default options


Installing the GWorkspace port

GWorkspace is GNUsteps Workspace manager.


 # portmaster deskutils/gworkspace

use the default options


Installing the Terminal.app port

Terminal.app is GNUstep's terminal emulator.


 # portmaster x11/terminal.app

use the default options


Installing the ProjectCenter port

ProjectCenter is GNUstep's integrated development environment (IDE).


 # portmaster devel/projectcenter

use the default options


Installing the GORM port (Graphical Object Relationship Modeller)

GORM is GNUsteps Interface Builder clone.


 # portmaster devel/gorm


Setting up the GNUstep environment

as root and as gnustep:

 $ echo . /usr/local/GNUstep/System/Library/Makefiles/GNUstep.sh >> ~/.profile
 $ echo gdnc >> ~/.profile

or, when using csh (root uses this maybe):

 # echo source /usr/local/GNUstep/System/Library/Makefiles/GNUstep.csh >> ~/.cshrc
 # echo gdnc >> ~/.cshrc

as root and as gnustep, edit the .xinitrc file:

 $ vi ~/.xinitrc

that it looks like this:

 #!/bin/sh
 exec wmaker &
 gpbs
 GWorkspace



Launching GWorkspace inside Window Maker

 $ startx

the tools and services from the System domain are in use

Installing GNUstep SVN trunk source into the Local Domain

Now continue to install the latest GNUstep from SVN trunk into the Local domain which supersedes the stuff in the System domain.

Checking out the sources from SVN trunk

as gnustep:

 $ mkdir GNUstep-sources
 $ cd GNUstep-sources/




check out all sources from GNUstep SVN:

 $ svn co svn://svn.gna.org/svn/gnustep/trunk .



Building libobjc2 (GNUstep Objective-C 2.0 runtime) from source

 $ cd ~/GNUstep-sources/modules/dev-libs/libobjc2/

for now use:

 $ CC=clang CXX=clang++ make
 $ sudo -E make install

enter gnustep user's password

in the future this will be the way to go:

 $ mkdir Build
 $ cd Build/
 $ cmake .. -DCMAKE_C_COMPILER=clang -DCMKAE_CXX_COMPILER=clang++
 $ make && sudo -E make install

enter gnustep user's password




Building GNUstep make from source

 $ cd ~/GNUstep-sources/modules/core/make/
 $ ./configure --prefix=/usr/local/GNUstep --with-config-file=/usr/local/GNUstep/GNUstep-trunk.conf --enable-objc-nonfragile-abi --enable-native-objc-exceptions --with-layout=gnustep --enable-debug-by-default CC=clang CXX=clang++
 $ sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install



Don't forget to source GNUstep.sh and make sure this is done on every login:

 $ . /System/Library/Makefiles/GNUstep.sh
 $ echo . /System/Library/Makefiles/GNUstep.sh >> ~/.profile



Building GNUstep base from source

 $ cd ~/GNUstep-sources/modules/core/base/
 $ ./configure --disable-mixedabi CC=clang CXX=clang++
 $ gmake && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install



Building GNUstep gui from source

 $ cd ~/GNUstep-sources/modules/core/gui/
 $ gmake && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install



Building GNUstep back from source

 $ cd ~/GNUstep-sources/modules/core/back/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install



Building GNUstep examples

 $ cd ~/GNUstep-sources/modules/usr-apps/examples/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Trying Calculator.app from the Examples

Building Developer Tools and GDL2 (Enterprise Objects Framework (EOF) clone)

Building GDL2 dependencies

as root: install PostgreSQL (needed for GDL2):

 $ su -
 # portmaster databases/postgresql94-server

use the default options


as root: install PostgreSQL ODBC support:

 # portmaster databases/postgresql-odbc

use the default options



as root: configure PostgreSQL:

 # echo postgresql_enable=\"YES\" >> /etc/rc.conf
 # /usr/local/etc/rc.d/postgresql initdb
 # /usr/local/etc/rc.d/postgresql start


as gnustep: install renaissance (needed for GDL2):

 $ cd ~/GNUstep-sources/modules/dev-libs/renaissance/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install


Building GDL2 from source

 $ cd ~/GNUstep-sources/modules/dev-libs/gdl2/
 $ ./configure CC=clang CXX=clang++
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install


Building ProjectCenter from source

 $ cd ~/GNUstep-sources/modules/dev-apps/projectcenter/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install


Building GORM from source

 $ cd ~/GNUstep-sources/modules/dev-apps/gorm/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Now the tools and services in the Local domain take precedence
That's it for now. 

Have fun developing with and for GNUstep!