S390 documentation in the Gentoo Wiki

October 13, 2014

Hi all,

One of the projects I had last year that I ended up suspending due to lack of time was S390 documentation and installation materials. For some reason there wasn’t any materials available to install Gentoo on a S390 system without having to rely in an already installed distribution.

Thanks to Marist College, IBM and Linux Foundation we were able to get two VMs for building the release materials, and thanks to Dave Jones @ V/Soft Software I was able to document the installation in a z/VM environment. Also thanks to the Debian project, since I based the materials in their procedure.

So most of the part of last year and the last few weeks I’ve been polishing and finishing the documentation I had around. So what I’ve documented: Gentoo S390 on the Hercules emulator and Gentoo S390 on z/VM. Both are based in the same pattern, since

Gentoo S390 on the Hercules emulator

This is probably the guide that will be more interesting because everyone can run the Hercules emulator, while not everyone has access to a z/VM instance. Hercules emulates an S390 system, it’s like QEMU. However QEMU, from what I can tell, is unable to emulate an S390 system in a non-S390 system, while Hercules does.

So if you want to have some fun and emulate a S390 machine in your computer, and install and use Gentoo in it, then follow the guide: https://wiki.gentoo.org/wiki/S390/Hercules

Gentoo S390 on z/VM

For those that have access to z/VM and want to install Gentoo, the guide explains all the steps needed to get a Gentoo System working. Thanks to Dave Jones I was able to create the guide and test the release materials, he even did a presentation in the 2013 VM Workshop! Link to the PDF . Keep in mind that some of the instructions given there are now outdated, mainly the links.

The link to the documentation is: https://wiki.gentoo.org/wiki/S390/Install

I have also written some tips and tricks for z/VM: https://wiki.gentoo.org/wiki/S390/z/VM_tips_and_tricks They’re really basic and were the ones I needed for creating the guide.

Installation materials

Lastly, we already had the autobuilds stage3 for s390, but we lacked the boot environment for installing Gentoo. This boot environment/release material is simply a kernel and a initramfs built with Gentoo’s genkernel based in busybox. It builds an environment using busybox like the livecd in amd64/x86 or other architectures. I’ve integrated the build of these boot environment with the autobuilds, so each week there should be an updated installation environment.

Have fun!


New AArch64/arm64 stage3 available

April 6, 2014

Hello all,

Following up with my AArch64/ARM64 on Gentoo post, in the last months Mike Frysinger (vapier) has worked in bringing arm64 support to the Gentoo tree.

He has created the profiles and the keyword, along with keywording a lot of packages(around 439), so props to him.

Upstream qemu-2.0.0-rc now supports aarch64/arm64, so I went ahead and created a stage3 using the new arm64 profile. Thanks to Mike I didn’t had to fight with a lot of problems like in the previous stage3.

For building I just had to have this in my package.keywords file:

=app-text/opensp-1.5.2-r3 **
=dev-util/gperf-3.0.4 **
=sys-apps/busybox-1.21.0 **
=app-text/sgml-common-0.6.3-r5 **
=app-text/openjade-1.3.2-r6 **
=app-text/po4a-0.42 **
=dev-perl/Text-CharWidth-0.40.0 **
=dev-perl/SGMLSpm-1.03-r7 **
=dev-util/intltool-0.50.2-r1 **
=dev-perl/XML-Parser-2.410.0 **
=dev-perl/Text-WrapI18N-0.60.0 **

And in my package.use file:

sys-apps/busybox -static

coreutils-8.21 fails to build, 8.22 built fine. And building busybox with USE=”static” still fails.

Also I’ve just found out that USE=”hpn” on net-misc/openssh makes the client segfault. Not sure if its because of qemu or because the unaligned accesses hpn had aren’t happy on arm64. So if you plan to use the ssh client in the arm64 chroot, make sure you have USE=”-hpn”

By the way, app-arch/lbzip2 seems to fail to run here, not sure if its because of qemu or it simply doesn’t work on arm64. It segfaults.

You can download it from: http://gentoo.osuosl.org/experimental/arm/arm64

I’ve also starting to upload some binary packages: http://tinderbox.dev.gentoo.org/default/linux/arm64/

Also, if someone wants to give us access to arm64 hardware, we would be really happy 🙂


Aarch64/ARM64 in Gentoo

December 7, 2013

Hi all,

After some months(the stage I was trying to build has a release tag of 20130523…) trying to bootstrap a Gentoo aarch64 stage3 using the ARMv8 Foundation Model, which is REALLY slow, ‘dlan’ from the #gentoo-embedded IRC channel told me about the entry of ARM64 with QEMU in the Debian wiki.

In that wiki entry they talk about using the QEMU ARM64 user-space emulation done by the people of SuSE Linux. This port is to be incorporated to QEMU 1.8.

When you use the user-space emulation, the compilation is really fast compared to using a full-system emulation. So compared to using the ARMv8 Foundation Model, it was really fast to finally be able to build a stage3. During these months I’ve had to find a combination of toolchain packages(binutils, gcc, glibc) that worked fine. The stage3 was built using the stable arm keyword.

Things I’ve had to do to build a stage3 that are not integrated in the gentoo-x86 tree(that I know, at least):

  • Build everything with USE=”-berkdb -gdbm -pcre”.
    • dev-libs/libpcre fails to build because aarch64 is not supported
    • dev-libs/db fails to build because of assembler errors
    • sys-libs/gdbm I do not remember what was the issue
  • Build sys-apps/busybox with USE=”-static”, as it fails to link otherwise.
  • Use sys-devel/binutils-2.23.2 with some patches: patch 1 and patch 2 . Those are probably present in binutils-2.24.
  • Use linaro gcc-4.8-2013.09. If I remember correctly, gcc-4.8.2(the latest version on gentoo-x86), didn’t had aarch64 support. An alpha of gcc-4.9.0 seemed to work fine, but I decided to try what was supposed to work fine. I’m going to try with gcc-4.8.2 again and if that fails, with an alpha of gcc-4.9.
  • Use sys-apps/coreutils-8.21 with the following patch: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698330
  • Use dev-lang/python-3.2.5 with the following patch: http://bugs.python.org/issue16962
  • Use the latest versions of: dev-libs/libffi, sys-apps/coreutils.

The stage3 can be downloaded from:http://gentoo.osuosl.org/experimental/arm/arm64

Have fun.

Gentoo/m68k in the ARAnyM emulator

August 7, 2013

Hi all,

During the last 6 months I may have disappeared a bit, but to be honest apart from real life stuff, I’ve been doing something that isn’t visible.

I’ve been working in some S390 documentation, Gentoo’s “port”(a stage3) of aarch64(hope to finish it soon), and what about this post is about.

Gentoo supports m68k since a long time ago, but there wasn’t any stage3 available for installing Gentoo into an m68k machine. I recommend to read http://www.linux-m68k.org/ if you don’t know what m68k is.

So I decided to try out the ARAnyM emulator which is what Debian uses for its buildd(the machines that build the binary packages). Starting from a Debian installation I bootstrapped a Gentoo installation(that was a lot of months ago, I don’t even remember how I did it…).

I did all of this in my own workstation, then after a lot of asking I got a server loaned from Gentoo’s Infra to build the stages (link) and the binary packages (link). I also updated the app-emulation/aranym ebuild in the portage tree with the latest version and enabling some important stuff.

Anyway, I decided to make a howto so other people could try Gentoo on m68k using the ARAnyM emulator as well. According to ARAnyM’s website, its even faster than a real m68k, and you can have a lot of RAM as well. At least is way faster than the emulator of aarch64 which is REAL slow.

You can check out the howto here: http://dev.gentoo.org/~armin76/m68k/aranym.xml

Hope you like it and have some fun playing with m68k 🙂

The new BeagleBone Black and Gentoo

April 28, 2013

Hi all, long time no see.

Some weeks ago I got an early version of the BeagleBone Black from the people at Beagleboard.org to create the documentation I always create with every device I get.

Like always i’d like to announce the guide for installing Gentoo in the BeagleBone Black. Have a look at: http://dev.gentoo.org/~armin76/arm/beagleboneblack/install.xml . Feel free to send any corrections my way.

This board is a new version of the original BeagleBone, known in the community as BeagleBone white, for which I wrote a post for it: https://armin762.wordpress.com/2012/01/01/beaglebone-and-gentoo/

This new version differs in some aspects with the previous version:

  • Cheaper: 45$ vs 89$ of the BeagleBone white
  • 512MB DDR3L RAM vs 256MB DDR2 RAM of the BeagleBone white
  • 1GHz of processor speed vs 720MHz of the BeagleBone white, both when using an external PSU for power

Also it has more features which the old BeagleBone didn’t had

  • miniHDMI output
  • 2GB eMMC

However the new version has missing:

  • Serial port and JTAG through the miniUSB interface

The reason for missing this feature is cost cutting measures, as can be read in the Reference manual.

The full specs of the BeagleBone Black are:
# ARMv7-A 1GHz TI AM3358/9 ARM Cortex-A8 processor
# SMSC LAN8710 Ethernet card
# 1x microSDHC slot
# 1x USB 2.0 Type-A port
# 1x mini-USB 2.0 OTG port
# 1x RJ45
# 1x 6 pin 3.3V TTL Header for serial
# Reset, power and user-defined button

More info about the specs in BeagleBone Black’s webpage.

For those curious as me, here’s the bootlog and the cpuinfo.

I’ve found two issues while working on it:

  1. The USB port doesn’t have a working hotplug detection. That means that if you plug an USB device in the USB port, it will be only detected once, if you remove the USB device, the USB port will stop working. I’ve been told that they are working on it. I haven’t been able to find a workaround for it.
  2. The BeagleBone Black doesn’t detect an microSD card when plugged in when its been booted from the eMMC. If you want to use a microSD card for additional storage, it must be inserted before it boots.

I’d like to thank the people at Beagleboard.org for providing me a Beaglebone Black to document this.

Have fun!

Beaglebone documentation updated

October 12, 2012

Hi all,

I’ve got some reports that my Beaglebone guide is outdated and giving some troubles regarding the bootloader and kernel.

While as of vanilla kernel 3.6.1 doesn’t support the beaglebone, U-Boot 2012.10-rc3 does support it, so i’ve tested all thechanges and updated the guide accordingly.

You can find it in http://dev.gentoo.org/~armin76/arm/beaglebone/install.xml
Some changes i’ve noticed in almost a year since i did the documentation:

  • The bug (by design they said) which made the USB port stop working after unplugging a device (check my post about the Beaglebone) is now fixed
  • CPU scaling is working, although the default governor is ‘userspace’. The default speed with this governor is:

a) 600MHz if powering it using a PSU through the 5V power connector, remember that the maximum speed of the  Beaglebone is 720MHz

b) 500MHz if powering it using the mini-USB port

Have fun

Pandaboard documentation and overlay updated

May 5, 2012

Hi all,

After some months of people asking me to update the documentation of the pandaboard, i’ve finally done it. The previous documentation was a bit outdated since the Pandaboard ES came into scene.

The problem was on the bootloader part, which didn’t work because they stopped developing X-Loader and integrated it to U-Boot. With an updated U-Boot this problem is solved.

Also on the drivers part, ubuntu released ubuntu 12.04, precise pangolin, with updated packages for the graphics part and a new kernel version. I follow whats stable on ubuntu, so if there’s some problem one could reproduce it with ubuntu and then complain to ubuntu developers 😛 After all, TI developers don’t get paid to support Gentoo but to support Ubuntu…

Anyway, ubuntu 12.04 switched from softfp toolchain to hardfloat toolchain(which Debian and Ubuntu call armhf), this means that the graphics drivers which are closed-source must have their binary blobs+libraries built as hardfloat. This means that if you want to use the new versions, you must reinstall your system with a hardfloat stage3…

More on the graphics part…until now since some libraries provided by the package collided with the ones from mesa, i had to remove them. Thanks to lu_zero, eselect-opengl now supports dynamic switching of those libraries, however i still have to fix the ebuild to use this new function.

The new guide is here: http://dev.gentoo.org/~armin76/arm/pandaboard/install.xml … its the same link as the older one 🙂

I’d like to thank to the different people that reported me what they had to do to make it work with the Pandaboard ES, since i don’t have one. Thanks!

Beaglebone and Gentoo

January 1, 2012

Hi all,

Two weeks ago I got a Beaglebone board from the people at Beagleboard.org to create the documentation I always create with every device I get.

Like always i’d like to announce the guide for installing Gentoo in the Beaglebone. Have a look at: http://dev.gentoo.org/~armin76/arm/beaglebone/install.xml . Feel free to send any corrections my way.

The Beaglebone is a bit different from the devices i got lately, as it lacks video out(well, there’s video out with an LCD connector but i lack an LCD screen), and its pretty simple apart from that. One of the big points of the Beaglebone is the price(89$) and the ability of creating addon boards for it, which are already famous amongst the Beagleboard people.

The specs of the Beaglebone are:
# ARMv7-A 500MHz(USB power)/720MHz(PSU power) TI AM3358/9 ARM Cortex-A8 processor
# 256MB DDR2 RAM
# SMSC LAN8710 Ethernet card
# 1x microSDHC slot
# 1x USB 2.0 Type-A port
# 1x mini-USB 2.0 OTG port
# 1x RJ45
# Reset and user-defined button

Yes, the processor runs at 500MHz when being powered using the mini-USB port, and 720MHz when using a power supply. More info about the specs in Beaglebone’s webpage.

For those curious as me, here’s the bootlog and the cpuinfo.

All the hardware provided by the Beaglebone works fine, except the USB port. But thats due to a bug in the USB driver used on the Beaglebone. The bug appears when you disconnect the first USB device you connect. Once that happens, the USB port won’t recognize any new USB device.

The workaround is to do:
echo F > /proc/driver/musb_hdrc.1

After that, the USB port will work again. This idea comes from the Angstrom people. In the guide i’ve documented an udev rule to workaround this issue, its from Angstrom as well.

I’d like to thank the people at Beagleboard.org for providing me a Beaglebone to document this. Next step is getting everything upstream 🙂

Have fun!

TrimSlice and Gentoo

September 4, 2011


In this post i’ll speak about putting Gentoo on the trimslice.

Months ago the people from Trimslice.com kindly sent me a devkit for the purpose of documenting and supporting Gentoo on it. It took me a while because i’ve had a lot of stuff going on at work, and because Stephen Klimaszewski(steev) started documentating it, but since he doesn’t have time to finish it, i decided to do it myself.

Therefore i’d like to announce the guide for installing Gentoo on the Trimslice. Check it out at: http://dev.gentoo.org/~armin76/arm/trimslice/install.xml and feel free to send corrections to my way, either by mail or by putting a comment on this post.

Regarding the hardware provided by the pandaboard, here’s what i got:
-Audio(non HDMI): Works fine.
-Bluetooth: No bluetooth on the devkit.
-Wifi: No wifi on the devkit.
-SD slot: Works fine
-Ethernet: Works fine
-Video: Works fine

Let me remind you about the overlay for Tegra devices, which includes the video drivers and libraries for Tegra, based on the L4T released by Nvidia.

I’d like to thank the people at TrimSlice.com for their support and the hard work they’re doing with the open source community and dealing with Nvidia for us.

Also, probably you’ve heard about hardfloat graphics drivers for the TrimSlice or Tegra-based devices. They’re real, although Nvidia has said they’ll build them but won’t support them, it hasn’t been clear about the licensing. You can find them on the images of Meego and ArchLinux ARM for the Trimslice.

These hardfloat drivers can be integrated into an image, but the tarball can’t be published as of now. Thats why i can’t create ebuilds for them on Gentoo.

Have fun!

NVIDIA Tegra2 overlay available

July 16, 2011


It’s been a long time since i’ve wrote something. I’ve got a lot of things going at work and its taking all the energy from me. However i still spend time with Gentoo on weekends.

Anyway, some days ago NVIDIA published the updated Linux For Tegra(previously known as L4T) Linux development kit. The main difference with the previous one is that it uses a 2.6.38 kernel from the Chromium OS. Another thing is that the stupid nvrm daemon isn’t needed anymore, it was needed before to get audio and cpufreq functionality, and who knows what else. Also, NVIDIA was kind enough releasing the X.org drivers for the GPU in the tegra SoC. It also released them for different ABIs, which is appreciated.

I’ve done the ebuilds for it(it was really easy) and i’ve pushed them to the overlay: http://git.overlays.gentoo.org/gitweb/?p=proj/tegra.git;a=summary
The overlay should be available on layman too.

The ebuilds provide the libraries+drivers for the X.org driver, nothing else as far as i know…