Author Archives: Marcin Juszkiewicz

96boards goes enterprise?

96boards is an idea from Linaro to produce some 32 and 64-bit ARM boards. So far there were two boards released in “consumer” format and few more announced of rumoured. The specification also lists “extended” version which has space for some more components.

But during Red Hat Summit there was announcement from AMD with mention of “enterprise” format:

How would you like an affordable and compact 160x120mm board to jump start your development efforts with AArch64? AMD and Linaro have been collaborating to develop a 96Boards Enterprise Edition (EE) specification that is ideal for the individual developer. Targeting the server and networking markets, the board will feature a 4-core AMD Opteron A1100 Series processor with two SO-DIMM memory slots, PCIe®, USB, SATA, and Gigabit Ethernet capabilities. Popular operating systems such as CentOS, Fedora, and Red Hat Enterprise Linux Server for ARM Development Preview are targeted for use with this particular board. Additional software downloads, updates, and a forum for software developers will be available via the 96Boards web site. The board is slated to be available in 2H 2015 from distribution partners worldwide and it will be supported through the Linaro Enterprise Group’s 96Boards.org site.

I do wonder where from they took idea to name yet-another-crazy-non-standard board format “Enterprise Edition”. In my understanding what enterprise user like is something which just works and comes with support and does not require crazy embedded nonsense hacks.

So when I saw post from Jeff Underhill with photos of the board I noticed few arghs.

Top view of AMD "Enterprise" board

Bottom view of AMD "Enterprise" board

First of course is board format. 160x120mm does not sound like any industrial format. Nano-ITX is 120×120, Mini-ITX is 170x170mm. But everyone knows that enterprise people love to be creative and make own cases. Why it was not done as 170×120 with partial compatibility with mini-itx cases?

Second thing (related to first) is connectors placing. With PCI-Express x16 slot (with x8 signals) I wonder how it will look when some cables go one side or the other while card sticks out of board. With SATA ports moved to the other side there would be space for USB and Ethernet ports so all cables would be in same area. Note also molex connector to give power to SATA disks.

Nice that there are two memory slots (DDR3 ECC SO-DIMM). But with second on the bottom we probably can say goodbye to all PC cases as it would not fit. Yay for creativity when it comes to cases (again).

There are holes to mount heatsink above CPU. From quick look I think that those for FM2 socket may fit.

HDMI connector suggests some graphics to be present. I did not heard about Radeon core inside AMD Seattle CPU but it could change since last check.

But even with those “issues” I would like to have that board ;)

Vacations in USA and Canada

Few years ago I told that I would not fly to USA. Then I changed job and had to fly there for conference. And another one and another… But it was always travel just for conference and one or two days of sightseeing. But not this year.

In August I am going to USA for Fedora Flock conference which takes place in Rochester, NY, USA on 12-15th. But I plan to spend a bit more time on american continent…

First flight is Berlin, Germany to Reykjavík, Iceland where I could just change flight and go to Boston, MA, USA. But why would I? Price of tickets does not change if I stay there for 24h. So I will do some sightseeing, buy a fridge magnet to my collection and then fly.

Boston is a place where I would like to spend few days. Take a look at city, visit Cambridge, MA just because it is younger brother of Cambridge, UK etc. Hope to go to Westford to visit Red Hat office and met some team members and co-workers there. Nothing planned yet, not even hotels.

Then trip to Rochester, NY. Probably by train or bus. Then conference, sightseeing, meeting people etc. I share hotel room with Paul Whalen so probably there will be some interesting discussions ;)

Another part will be visiting Niagara Falls. Hope for both US and Canadian sides. From there I go to Toronto and then on 19th August flying back home.

If someone want to meet me then just ping me. Hints for Canadian prepaid are welcome (in US T-Mobile with 30$ plan should be fine).

Project “media player for my wife” finished

For long time I had one project on my todo list: media player for my wife use. Has to be easy to use and control, does not need connecting anything when you want to watch a movie etc. Typical black box design.

Idea was to take one of boards I have at home, plug 750GB 2.5″ hdd to it and put it on a box with only power and hdmi ports exposed. All running Ubuntu (with distro kernel) or Android. And controlled by simple remote control.

I tested several platforms as a base for it. First was Pandaboard — but as I have EA1 board it was far too slow for my use. And with current kernels there is no support for any hardware decoding or video acceleration (yay for PowerVR and yay for Texas Instruments). Then I purchased Wandboard Quad. Nice device, fast but I lacked patience to get it to properly recognize monitors so it always booted into XGA resolution. HW acceleration was a bit of fun as well.

Then I got Minnowboard Max from Dave Anders. After first days of playing with board it was visible that it can be a good platform for this project. But then something happened and board required RMA which took quite a long time (remember to pay for air transport of package while sending Europe->USA).

During last 2-3 weeks I was working on it in free time and finally got it done:

MMax in a box

Box contents:

  • Minnowboard Max (dualcore Atom with Intel GPU and 2GB ram)
  • 750GB Serial ATA 2.5″ hdd (bootloader, system, movies storage)
  • cheap Realtek WiFi dongle
  • cheap usb hub
  • remote control dongle
  • microhdmi/m -> hdmi/f cable
  • hdmi/m -> hdmi/m adapter
  • hdmi/f -> hdmi/f wall mountable adapter

Amount of HDMI adapters was required as finding microhdmi/m->hdmi/m cable is (probably) impossible.

USB hub was fun. I have several of those but this one got removed from case, got all cables desoldered (two going to second board with additional two ports and one going to host) and then fun started…

Only one connector had 2.54mm spacing while both host and second port one were some random size. After soldering single pins for host cable I decided to not add 4th port. Pictures show why ;D

IMG_20150525_171420 IMG_20150602_162548 IMG_20150602_162602 IMG_20150602_163710

That’s hardware. For software part I used Ubuntu 14.04 LTS with Kodi 14.2 ‘Helix’ as media center. After few small tweaks (automatic login to ‘kodi’ user and into ‘kodi’ session) system boots directly to movie selection.

But how to choose what to play? My Iogear wireless keyboard will not go with media player box… I bought Natec A30 airmouse but then it shown that it’s dpad buttons work only as IR control for TV ;( But then I realised that years ago I bought Sony bluetooth remote for Playstation 3 console (for some other random project). And it still works ;D

Still have to sort out key mapping as lot of remote buttons have no sense for media center (I have no idea what for those triangle/circle/box/cross are for example) but this is small part which I already have partially solved. And need to add BT dongle into the box to get it working ;D

And now something more enterprise — CentOS on AArch64

Everyone can grab and install Fedora 21-22 on APM Mustang. But what if you want something more enterprise ready? Answer is simple: you can install CentOS 7 (at Alpha stage now).

Requirements are simple:

First fetch iso and then copy to USB thumb drive (simple “dd if=boot.iso of=/dev/sdc bs=4M” is enough). Then just reboot to UEFI shell and run “FS1:\EFI\BOOT\BOOTAA64.EFI” to get into installation.

All files will be read from USB (for Mustang you need official APM firmware 1.1.0 to get proper DTB) and installation goes like with Fedora, RHEL, CentOS — standard Anaconda.

Finally reboot and system is ready for use:

CentOS Linux 7 (Core)
Kernel 4.0.0-1.el7.aarch64 on an aarch64

pinkiepie login: 

AArch64 port is now in progress so not all packages are built yet but they will be.

Running VMs on Fedora/AArch64

There are moments when more than one machine would be handy. But AArch64 computers are not yet available in shop around a corner we have to go for other options. So this time let check how to get virtual machines working.

Requirements

For this I would use Fedora 22 on APM Mustang (other systems will be fine too). What else will be needed:

  • libvirtd running
  • virt-manager 1.1.0-7 (or higher) installed on AArch64 machine
  • UEFI for AArch64 from Gerd’s Hoffmann firmware repository
  • Fedora or Debian installation iso (Ubuntu does not provide such)
  • computer with X11 working (to control virt-manager)

Is KVM working?

First we need to get KVM working — run “dmesg|grep -i kvm” after system boot. It should look like this:

hrw@pinkiepie-f22:~$ dmesg|grep -i kvm
[    0.261904] kvm [1]: interrupt-controller@780c0000 IRQ5
[    0.262011] kvm [1]: timer IRQ3
[    0.262026] kvm [1]: Hyp mode initialized successfully

But you can also get this:

[    0.343796] kvm [1]: GICV size 0x2000 not a multiple of page size 0x10000
[    0.343802] kvm [1]: error: no compatible GIC info found
[    0.343909] kvm [1]: error initializing Hyp mode: -6

In such case fixed DeviceTree blob from bug #1165290 would be needed. Fetch attached DTB, store as “/boot/mustang.dtb” and then edit “/etc/grub2-efi.cfg” file so kernel entry will look like this:

menuentry 'Fedora (4.0.0-0.rc5.git4.1.fc22.aarch64) 22 (Twenty Two)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.0.0-0.rc5.git2.4.1.fc22.aarch64-advanced-13e42c65-e2eb-4986-abf9-262e287842e4' {
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt32'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt32 --hint-efi=hd1,gpt32 --hint-baremetal=ahci1,gpt32  13e42c65-e2eb-4986-abf9-262e287842e4
        else
          search --no-floppy --fs-uuid --set=root 13e42c65-e2eb-4986-abf9-262e287842e4
        fi
        linux /boot/vmlinuz-4.0.0-0.rc5.git4.1.fc22.aarch64 root=UUID=13e42c65-e2eb-4986-abf9-262e287842e4 ro  LANG=en_GB.UTF-8
        initrd /boot/initramfs-4.0.0-0.rc5.git4.1.fc22.aarch64.img
        devicetree /boot/mustang.dtb
}

After reboot KVM should work.

Software installation

Next step is installing VM software: “dnf install libvirt-daemon* virt-manager” will handle that. But to run Virt Manager we also need a way to see it. X11 forwarding over ssh to the rescue ;D After ssh connection I usually cheat with “sudo ln -sf ~hrw/.Xauthority /root/.Xauthority” to be able to run UI apps as root user.

UEFI firmware

Next phase is UEFI which allows us to boot virtual machine with ISO installation images (compared to kernel/initrd combo when there is no firmware/bootloader possibility). We will install one from repository provided by Gerd Hoffmann:

hrw@pinkiepie-f22:~$ sudo -s
root@pinkiepie-f22:hrw$ cd /etc/yum.repos.d/
root@pinkiepie-f22:yum.repos.d$ wget https://www.kraxel.org/repos/firmware.repo
root@pinkiepie-f22:yum.repos.d$ dnf install edk2.git-aarch64

Then libvirtd config change to give path for just installed firmware. Edit “/etc/libvirt/qemu.conf” file and at the end of file add this:

nvram = [
   "/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
]

Restart libvirtd via “systemctl restart libvirtd“.

Running Virtual Machine Manager

Now we can connect via “ssh -X” and run “sudo virt-manager“:

vm1

Next step is connection to libvirtd:

vm2vm3

Now we are ready for creating VMs. After pressing “Create a new VM” button we should see this:

vm4

And then creation of VM goes nearly like on x86 machines as there is no graphics only serial console.

But if you forgot to setup UEFI firmware then you will get this:

vm5

In such case get back to UEFI firmware step.

Installing Fedora 22 in VM

So let’s test how it works. Fedora 22 is in Beta phase now so why not test it?

vm6

vm10

vm11

2GB ram and 3 cpu cores should be more than enough ;D

vm12

And 10GB for minimal system:

vm13

vm14

But when it went to serial console it did not look good :(

vm15

I realized that I forgot to install fonts, but quick “dnf install dejavu*fonts” sorted that out:

vm16

Go for VNC controller installation.

After installation finish system runs just fine:

vm17

Summary

As you can see Fedora 22 has everything in place to get VM running on AArch64. UEFI firmware is the only thing out of distribution but that’s due to some license stuff on vfat implementation or something like that. I was running virtual machines with Debian ‘jessie’ and Fedora 22. Wanted to check Ubuntu but all I found was kernel/initrd combo (which is one of ways to boot in virt-manager) but it did not booted in VM.

Git commands which you should really know

Git is now ten years old. More and more developers get lost when have to deal with CVS or Subversion as first SCM they learnt was git. But in daily work I see many people limited to very basic use of it ;(

There is a lot of commands and external plugins for git. I do not want to mention them but rather concentrate on ones installed as part of git package. And only those which I think EVERY developer using git should know that they exist and how to use them.

Dealing with other repo is easy set: “pull” to merge changes (“fetch” if you only want to have them locally), “push” to send them out. “git remote” is useful too.

Branching is easy and there is a lot of articles how to do it. Basically “git branch” to see which one you use, “git branch -a” to check which are available and “git checkout” to grab code from one.

Checking changes is next step. “git diff” with all variants like checking local not committed changes against local repo, comparing to other branches, checking differences between branches etc. “git log -p” to check what was changed in earlier commits.

Then goes “status” to see which local files are changed/added/removed and need attention. And “add”, “rm” and finally “commit” to get all of them sorted out.

Lot of people ends here. The problem appears when they get patches…

So how to deal with patches in git world? You can of course do “patch -p1 <some.patch” and take care of adding/removing files and doing commit. But git has a way for it too.

To generate patch you can use “git diff” and store output into file. But this will lack author information and description. So it is better to commit changes and then use “git format-patch” to export what you did into file. Such file can be attached to bug tracker, sent by email, put online etc. Importing it is simple: “git am some.patch” and if it applies then it is merged like you would do local commit.

There are other ways probably too. Quilt, stgit etc. But this one is using basic git commands.

And I still remember days when I thought that git and me do not match ;D

96 boards again?

During Linaro Connect 2015 Asia there was announcement about new Linaro project called “96boards”. It is about making cheap ARM/AArch64 boards in same form factor and same placement of ports. And first board named HiKey was presented. Today third one — from Qualcomm. So we have two boards now (2/96 was not yet announced).

I prefer not to comment on form factor, lack of Ethernet, mobile phone cpus and other things people do not like but about software requirements.

96boards specification v1.0 says:

Minimum Software requirements for 96Boards certification will include:

  • Boot architecture (open source implementations are strongly recommended)
    • Support for bootloader such as U-Boot/FDT, UEFI/ACPI, UEFI/FDT
    • Support for a secure execution environment (optional)
    • Support for ARM Trusted Firmware (ARMv8), including PSCI APIs (optional)
  • Accelerated graphics support
    • Accelerated graphics drivers need to be fully supported either with open source code, or through royalty free binary drivers. If binary drivers are utilized, the vendor will provide support to provide updated drivers/libraries to support new mainline Linux kernel features.
  • Kernel
    • A kernel based on one of the following that is buildable from source code and any required binary blobs:
    • kernel.org latest “mainline” or “stable” kernel
    • The latest Google-supported Android kernel version
    • One of the last two kernel.org LTS kernels (for example Linaro LSK)
  • Operating system
    • The latest released (stable) version of one or more of the following open source distributions shall be made available for a 96Boards CE compliant design:
    • Android
    • Debian or Ubuntu
    • Fedora or Red Hat
    • An OpenEmbedded/Yocto build of a Linux distribution

I hoped that Linaro will be a place where free/open source software would matter. But it looks like “let release whatever you want as long as size and ports match” deal. Any blob as bootloader, binary graphics drivers (does someone remember TI OMAP line and PowerVR? Those boards run with raw framebuffer nowadays).

And that kernel requirement… HiKey uses cpu which is not in mainline kernel, so does Qualcomm one. Are they in AOSP kernel? Maybe. But does someone else than Android uses those trees for serious work? Latest I see in kernel-msm (which may not be proper place to check) is 3.10 which was released (in mainline) nearly 2 years ago…

I really wonder how “latest released (stable) version” of Debian/Fedora/Ubuntu can be made available for those boards when all those distributions use mainline kernel only (I do not count user generated remixes which are not supported by anyone).

So I wonder will 96/96 board came with mainline support, open bootloader and open drivers for everything. Time will show. Until that I am not so interested.