Archive

Posts Tagged ‘libhybris’

AsteroidOS is an Open Source Operating System for Your Android (Wear) Smartwatch

January 17th, 2016 4 comments

If you own an Android or Android Wear smartwatch, but would like more control over its functionality or simply prefer a truly open source operating systems for your watch, AsteroidOS could be the answer. Like alternative mobile operating systems such as Sailfish OS or Ubuntu Touch, AsteroidOS leverages existing Android drivers via libhybris library, and the user interface relies on Qt5 and QML running on top of OpenEmbedded, while Bluetooth is handled by BlueZ 5 library.

AsteroidOSThere’s no company behind the project, and it is purely community driven. Currently only the LG G watch is supported, and you can give AsteroidOS a try by following the instructions. The Wiki provides information about the boot process, how to build the OS, creating an Qt5/QML app. etc.. and also explains how to port AsteroidOS to other watches, so if the project gets traction more devices will be supported.

Graphics Stack Architecture in AsteroidOS

Graphics Stack Architecture in AsteroidOS

There are several ways to get involved with the project:

  • Porting AsteroidOS to another smartwatch
  • Developing AsteroidOS by creating Qt5/QML Asteroid apps , and/or packaging or maintaining software and libraries in OpenEmbedded.
  • Testing AsteroidOS
  • Translating AsteroidOS to more languages
  • Documenting AsteroidOS by maintaining the Wiki

Beside Github, you can also contact the developer and community on #asteroid IRC channel.

You can find all details on Asteroidos.org, and the project leader will present AsteroidOS at FOSDEM 2016 at the end of the month.

If you are interested in open source project for smartwatches, you may also consider checking out the open Source sport/smart watch project that runs on the lower end Weloop Tommy, and may run on SMA-Q watch later. as well as Fernly a reverse-engineered operating systems for MediaTek MT626x wearables.

FOSDEM 2016 Schedule – Open Source Hardware and Software Event in Europe

January 13th, 2016 3 comments

FOSDEM (Free and Open Source Software Developers’ European Meeting) is a 2-day event that usually takes place on the first week-end of February in Brussels, but this year it will be on January 30-31. The event brings thousands of developers, hackers, and other person interested in open source technology who present their projects and share ideas. FOSDEM 2016 schedule is now available, and There will be 557 speakers, 612 events, and 50 tracks this year including 7 main tracks: Distros, Enterprise, Hardware, Communications, Miscellaneous, Office, Systems Administration, and Virtualization.

FOSDEM_2016

So I’ve had a look at some of the talks, especially out of  “Embedded, Mobile and Automotive” and “IoT” devrooms, and prepared my own virtual schedule although I won’t be able to attend.

Saturday

For many years MIPS processors have been involved in the embedded market, particularly in areas related to networks and storage. With the success of the mobile market, and the great evolution of the world linked to the “makers”, other architectures (such as ARM), they have reached very large levels of diffusion.

Meanwhile, the MIPS architecture has evolved, introducing innovations and improvements to adapt to both the processor market from performance, both to the world of micro-controllers. The future of MIPS is a new family divided into several generations evolving.

During the presentation, after a brief and simplified introduction to architecture, will be shown the technologies available at the time and what will be the future developments.

The presentation will also show some reference platforms (ex. Imagination Creator CI20), and how to work to integrate and port on these platforms. Application examples with Yocto and buildroot, to switch to a full distribution (Debian). Finally it will also present a perspective on the use of MIPS in embedded designs.

AsteroidOS is a free and open-source smartwatch platform based on OpenEmbedded, libhybris, BlueZ5 and Qt5. The OS currently offers a basic user experience on the LG G Watch. This technical talk will briefly introduce the philosophical background of the project and more deeply its architecture’s details in order to attract developers, porters and curious.

This talk will successively be focused on how to boot an Android Wear watch, on how to gain hardware acceleration on that kind of hardware, on how Qt5 and OpenEmbedded are used and on the future of AsteroidOS.

AsteroidOS uses similar technological choices as those of projects like SailfishOS, NemoMobile, Mer, WebOS-Ports or Ubuntu Touch but adapted to the needs of smartwatches. The architecture of those project will briefly be compared during the presentation.

Based on Migen, MiSoC is a library of cores and a system-on-chip integration system to build gateware for various applications. MiSoC is lightweight (runs on FPGA devices as small as Spartan-6 LX9 with 32-bit RISC CPU and SDRAM), portable (demonstrated on Xilinx, Altera and Lattice devices) and high performance (e.g. contains the fastest open source DDR3 solution we are aware of). Designing and integrating cores is facilitated by Python and Migen features. Current MiSoC applications include LTE base stations, video processing (Numato Opsis) and experiment control system (ARTIQ).

Nemo Mobile is a long time FOSS operating system. Created in 2012 as continuation to Meego Community Edition, it has been actively developed since then. The newest iteration of it is to use Glacier UI as its renewed User Interface, along with its Qt Components. These components are now used in the NemoTablet adaptation using Raspberry Pi2 as underlying hardware and its plethora of possible peripherals to create a true DIY tablet derived from SailPi project.

With Raspberry Pi 2 introduction in February 2015, it was then possible to create an adaptation for it. This enables the myriad of functionality it offers, with its hardware provided. Initial adaptation was done originally for SailfishOS, but Nemo Mobile had the first run and checking that everything worked, before a closed system was installed. Nemo Mobile, however, was then not tried until later. The idea came once the official touchscreen by Raspberry Pi Foundation was released, so that a FOSS tablet could be built by anyone and used. Raspberry Pi 2 has non-free hardware, but Nemo Mobile itself is FOSS completely. As with all other adaptations, the questions regarding hardware freedom limitations rise for a good reason.

Libreboot is a free software BIOS replacement (boot firmware), based on coreboot, for Intel, AMD and ARM based systems. Backed by the Free Software Foundation, the aim of the Libreboot project is to provide individuals and companies with an escape from proprietary firmware in their computing. Libreboot is also being reviewed for entry as an official component of the GNU system.

Boot firmware is the low-level software that runs when you turn your computer on, which initializes the hardware and starts a bootloader for your operating system. Libreboot currently supports laptops and servers, on x86 (Intel and AMD) and ARM (Rockchip RK3288), with more hardware support on the horizon. The purpose of this talk is to describe the history of the project, why it started, why it’s important, where it’s going and, most importantly, to tell people how they can get involved.

Francis also runs the Minifree (formerly Gluglug), a company that sells computers with libreboot and Trisquel GNU/Linux pre-installed.

No abstract, but it’s clear about Olimex’s Allwinner A64 A64-OlinuXino board to be used in the company’s open source hardware laptop.

A brief discussion about the stable release branch 4 of KiCad as well as goals for the next development cycle and beyond.

The WPANKit is a ptxdist based Open-Source 6LoWPAN Board Support Package (BSP). The main focus is to provide a software development kit for the linux-wpan project. The linux-wpan project aims to implement a 6LoWPAN inside the mainline Linux kernel.

This talk will present the WPANKit: An Open-Source Linux BSP to develop 6LoWPAN IoT applications. It contains support for various common platforms such Raspberry Pi’s and Beaglebones. Additional components like the openlabs 802.15.4 transceiver SPI transceiver or BTLE USB dongles gives you a getting started platform into the Linux 6LoWPAN world.

The WPANKit will directly build a current mainline 6LoWPAN kernel, which is the official bluetooth-next tree. This is important, because the mainline 6LoWPAN development is still much in development. Additional the WPANKit offers a large of userspace IoT software collection e.g. tshark for sniffing network traffic, libcoap, etc. On top of this BSP you can develop your IoT application, setting up a Border-Router or help at the current mainline 6LoWPAN Linux-kernel development.

Through the power of ptxdist you can easily add new own packages for cross-compiling. As well we accept patches to integrate new software into the official WPANKit repository, so we getting more and more new IoT capable software into the WPANKit which can be used by other ptxdist users.

An AdaCore intern has rewritten the CrazyFlie drone software, originally in C, into SPARK. In addition to fixing some bugs, this allowed to prove absence of runtime errors. Various techniques used to achieve that result will be presented, as well as a live demo of free fall detection.

This talk will take us through the available FOSS software stacks that are available for automotive. This last year has produced a lot of working software from fiber-optic networking drivers in the Linux kernel, complete In-Vehicle Infotainment stacks, to a newly released Qt Automotive. There has also been a change in available hardware to run this software on, new boards like the Minnowboard Max, Renesas’ Porter board, and even the Raspberry Pi 2. This talk will try and cover the entire software ecosystem and how it matches to hardware, how you can get involved today, and what the future holds.

Turris Omnia aims to bring to the market affordable, powerful and secure SOHO router which is completely open-source and open-hardware. As a operating system it uses our own fork of OpenWrt which has some additional features such as automatic security updates. This talk will cover few topics such as motivation for starting this project and developing of our own hardware and software.

FROSTED is an acronym for “FRee Operating System for Tiny Embedded Devices”. The goal of this project is to provide a free kernel for embedded systems based on ARM Cortex-M CPU family, which exposes a POSIX-compliant system call API. Even if it runs on small systems with no MMU and limited resources, Frosted has a VFS, UNIX command line tools and a HW abstraction layer which makes it easy to support new platforms and device drivers.

This talk will cover why the project was started, the approach taken to separate the kernel and user-space on ARM Cortex-M CPU’s without MMU, the collaboration with the libopencm3 project to provide a high quality hardware abstraction layer and the future goals of the project. Of course there will a demo showing the latest developments: dynamic loading of applications and possibly TCP/IP communication.

Sunday

Yocto project has been used at Open-RnD for building a number of IoT related products. The talk will go though the details of integration of Poky build system and OpenEmbedded layers into 3 projects carried out at Open-RnD:

  • an autonomous parking space monitoring system
  • a distributed 3D steroscopic image acquisition system
  • a gadget for acquisition of metabolic parameters of professional athletes

The presentation will approach to building software, automation and upstreaming of fixes. Only widely available hardware platforms such as BeagleBone Black, Raspberry Pi, Wandboard or Gateworks GW5400 (not as widely used as the previous ones, but still fully supported) were used in the project, hence all the points made during presentation are directly applicable by professionals and hobbyists alike.

Tizen is an open source GNU/Linux based software platform for mobile, wearable and embedded devices as well as Internet of Things. Tizen:Common provides a generic development environment for Tizen 3 which key features include, Wayland, Weston, EFL UI/UX toolkit, and a web runtime for safely running standalone HTML5 apps. Yocto Project offers tools to easily expends features of Tizen:Common by creating layers for new profiles. This talk will focus the Tizen architecture and it will provide guidelines for creating and building new Tizen profiles, based on Tizen:Common, using the Yocto Project for devices with Intel or ARM processors. It will also provide information about hidden gems in Tizen on Yocto and practical examples for packaging and deploying HTML5 applications through Yocto recipes for the open source hardware development boards like Raspberry PI2 or HummingBoard (Freescale I.MX6 ARM SoC) or MinnowBoard Max (Intel).

Finally, since Tizen aims to because the OS of everything, we will illustrate this by extending Tizen Distro with new connectivity features provided by IoTivity library, the open source implementation of OpenInterConnect’s standard.

This session will show you how to build your own retro hand-held console that is powered by Java, runs on a Raspberry Pi, and is printed on a 3D printer. Some of the topics covered include:

  • Hacking Java on the Raspberry Pi
  • Rigging input devices with Pi4J
  • Insane performance tuning on the JVM
  • Why your boss [or SO] needs to buy you a 3D printer!

And of course your retro gaming mettle will be put to the test, so make sure to dust off your old 8 and 16 bit consoles to prepare.

How to roll your own build and extend the Fairphone 2 hardware

The kernelci.org project is currently doing hundreds of build and boot tests for upstream kernels on a wide variety of hardware. This session will provide an introduction to the kernelci.org system, some live demos and how to start consuming its results, and be a forum for further discussions.

Distributed boards farms across the world are working together to deliver unified build, boot, and test results for every merge of an upstream Linux kernel tree. A community based architecture agnostic effort, kernelci.org aims to detect regressions in a timely manner and report back to kernel developers with a concise summary of the issues found. On every merge, all defconfigs for x86, arm, and arm64 are built, booted, and tested on over 300 real or virtual hardware platforms. Come join in the discussion and help make Linux better!

Hardware is funny stuff. It is often documented to work one way when it actually works a slightly different way. Different revisions of the hardware may have different bugs that require different sets of work-arounds. Programming it even slightly incorrectly can lead to software crashes or system hangs. Sometimes some versions of the hardware work fine, but the version not on the developer’s desk crashes. Failure modes are often opaque and give no clues for fixing the problem. Writing robust, reliable software to run directly on hardware is hard.

Software simulation of hardware is a technique that, in many cases, can alleviate some of this pain. Teams that develop hardware will often create a simulator as a by-product of hardware synthesis. Not ever developer is fortunate to have access to such tools. Those who do have access often find them slow or difficult to use. After all, these simulators are generally created as an aid for the hardware developers themselves. Much of the benefit of a full hardware simulator can be attained by developing the simulator independently from the hardware development. When the correct techniques are applied, it’s not even that hard.

This talk will present a variety of techniques based on experience with several “home grown” simulation environments. Techniques for both developing and validating the simulator and techniques for integrating simulation in the regular development process will be described.

  • 16:00 – 17:00 – PHP7 by Derick Rethans

With PHP 7 having been released, it is time to show what’s in there. Speed, scalar type hints and spaceships.

These are just a few selection from the complete schedule. Last year, most FOSDEM 2015 videos were available in mid-March, so I’d expect FOSDEM 2016 videos to be available in about the same time frame.

As usual, the event will be free, and does not require registration, so you just need to show up at the Université libre de Bruxelles in order to attend.

How to Use Libhybris and Android GPU Libraries with Mer (Linux) on the Cubieboard

April 21st, 2013 18 comments

You may have heard about libhybris, a library that cleverly loads Android HW adaptations and convert calls from bionic to glibc. One of the greatest achievement of this library is to allow Android GPU drivers to be used with Linux, and is notably used by Canonical, although they did not write it, for Ubuntu 14.04 which will be compatible with any recent Android smartphones or tablets.

One way to get started with libhybris is to port a device to Ubuntu Touch, but this may take a while. However, I’ve found a faster and easier way to play with libhybris thanks to Martin Brook (vgrade) who wrote a tutorial on how to use libhybris with Mer on the Cubieboard. Mer is an open source mobile Linux distribution powered by Qt/QML and HTML5, that’s born from the ashes of Meego, and is now used in the upcoming Sailfish OS.

Qt5 Cinematic Experienced Rendered at 25 fps in Cubieboard via Android GPU Drivers in Linux Thanks to libhybris

Qt5 Cinematic Experienced Rendered at 25 fps in Cubieboard via Android GPU Drivers in Linux Thanks to libhybris

You’ll need to follow 4 main steps:

  • Build Android
  • Build a minimal Mer image
  • Install Libhybris
  • Run demos

I’ll skip the Mer image build since Martin has provided a binary image. I’ll use a build machine running Ubuntu 12.04.2 LTS. You should make sure the build environment is setup correctly, you’ve installed repo, and that it’s in your path. I’ll use the Cubieboard (1GB RAM), but you may want to try other hardware platform, or Linux distribution as the instructions should be similar.

Build Android for the Cubieboard

This is basically following the instructions provided here. First let’s code Android Jelly Bean (CyanogenMod) source code:

repo sync may take quite a while depending on your Internet connection. It took 10 hours, after several attempts over three days… Once this is done, we’ll need to configure the build for the Cubieboard:

Select Cubieboard (#4), and start the build:

The build initially failed with this error:

So I shamelessly typed “make update-api” to automatically update current.txt, and continued the build with “make -j10”. The build may also take quite a while depending on your computer performance and available RAM. This step was much faster than repo sync in my case, as it just took about 45 minutes in total.

The Android build is now completed, but we need still to patch Bionic library, and rebuild:

Now let’s tar Android’s system directory as we’ll need to copy the will have the patched bionic library plus all the android libs (EGL, GLESv2, RIL etc):

Installing and Running Mer

Since we don’t build the image ourself, this step is rather easy, as we just need to download the image, and dump it to a micro SD card.

wget ftp://5.9.162.110/nemo/cubieboard/tablet/cubieboard/mer/testing/armv7hl/weekly/nemo-cubieboard-tablet-cubieboard-mer-testing-armv7hl-weekly-20130511-1516-mmcblk0p.raw.bz2
bzip2 -d nemo-cubieboard-tablet-cubieboard-mer-testing-armv7hl-weekly-20130511-1516-mmcblk0p.raw.bz2

Burn the image to a microSD card (4GB or greater):

Where you need to replace <sd_device> by your actual SD card device such as “sdc”.

My 4GB microSD is slightly smaller than the image provided, so dd failed at the very end. But you can usually run the following 2 commands on the last partition (in this case ext4) in order to resize the partition, and fix any potential boot problems:

Interestingly, this time those commands failed, but I still inserted the microSD in my Cubieboard, and I was able to login successfully into Mer via the serial console as root (password: mer). You should also have access a terminal on the HDMI monitor.

We don’t want X to start anymore, so let’s disable it and restart the Cubieboard:

If you’re using HDMI console, switch to VT2 (Ctrl+Alt+F2) before running the command.

Installing libhybris and Android system folder

Let’s log-in again via the serial console, or via VT2 on the HDMI monitor if this works for you, and install libhybris:

zypper ar http://repo.merproject.org/obs/home:/sage:/libhybris/latest_armv7hl/home:sage:libhybris.repo
zypper in libhybris
zypper in libhybris-tests

You may want to enlarge your terminal for the steps above, as the text goes over the window, and you have to answer some questions for the installation. The next step is to install Android’s system files to /system in the Cubieboard. Copy the files from the Linux PC to the Cubieboard:

and complete the install in the board:

The installation is now complete and it’s time to try it out.

Graphics Demos

To test whether libhybris is correctly installed run the following:

The only problem is that it did not work exactly as expected:

After a reboot, Cubieboard decided to boot Android from flash, so I tried to remove and re-insert the micro SD, and noooooooooo! The micro SD socket let me down and refuses to lock the card in place, so I’ll have to replace the slot which will take me few weeks since I have to order the thing.

So I count on you to let me know what has gone wrong. Thanks 🙂

Let’s carry on as if everything worked just fine, and run the next demo:

This should display a white diamond shape filled with an animated Catherine wheel.

Martin also has instructions for several other demos, but the most interesting one (we have a video), is Qt5 Cinematic Experience that you can install in the board as follows:

Now edit content/Mainview.qml with vim, and comment out the PathAnimation part.

Finally run the demo:

Et voila!

Libhybris Let You Use Android Drivers & HW Libraries in Linux

April 8th, 2013 5 comments

One of the main issues with Linux on ARM is the lack of proper GPU drivers for the platform, as most silicon manufacturers now only focus on Android drivers which are not compatible with the Linux kernel, because Android is based on Bionic C library, whereas Linux is based on glibc or its variants. There are two ways to solve this issue:

  • Open Source GPU drivers. This would be the ideal solution, as you would just be able to cross-compile the drivers for the proper, as well as fix bugs without having to ask the silicon manufacturer to fix the driver for you.
  • Bionic to Glibc library. Such library acts like libdl, and allows to load Bionic library and overrides some symbols from bionic with glibc based ones. This is exactly what libhybris does.

Ubuntu Touch is capable of using Android GPU drivers to run Ubuntu thanks to this library, and Libhybris will provides the interface between the HAL and Mir display server for Ubuntu 14.04.

Libhybris is released under an Apache 2.0 license, and the source code, written in C, is available in github. This library is based on the initial work of .

There are 3 main directories in the source tree:

  • compat
    • ui – Some wrapper for Android UI.
  • hybris
    • common –  Common parts, including parsing /system/build.prop and matching common C functions (e.g. pthread*, str*…) between Bionic and glibc
    • egl – EGL support
    • gles2 – OpenGL ES 2 support
    • hardware – Loads /system/lib/libhardware.so
    • tests – Test programs for egl, gles2, lights, sensors, offscreen rendering, and ui
    • ui – Loads /system/lib/libui_compat_layer.so and creates bindings for the related functions.
  • utils –  Contains load_sym_files.py utility that loads symbol files for debugging.

Libhybris not only let you access the GPU, but also other hardware such as lights and sensors. I assume, but I may be wrong, that it could also be used with Wi-Fi and Bluetooth closed source drivers. Hopefully, work can also be done for VPU (Video Processing Unit) support in order to take advantage of hardware video decoding and encoding in Linux with Android libs, but I’m not knowledgeable enough to know if it’s feasible or not.

Using Libhybris is not an optimal solution, as there may be a small performance degradation, and you’ll be using the Android kernel, so many of the things you’d got used to with the Linux kernel won’t be available, and you’ll have to use the “Android” way. The implementation is not straightforward either, as Canonical’s Ubuntu Touch preview makes use of SurfaceFlinger which means applications relying on X11, GTK… will not work at the beginning, and you’ll have to wait until 2014 and and implementation with Mir display server to get a full solution based on libhybris with X11 compatibility. Nevertheless, even though libhybris is not a perfect solution, it’s a practical one, as it’s a technical solution, and not one which relies on convincing management and lawyers to release open source drivers.

There’s also some work on reverse-engineered open source GPU drivers such as the lima project, and some companies, e.g. Freescale / Vivante, release proper (closed-source) drivers for ARM Linux, but the company with the highest market share, namely Imagination Technologies, does not participate in any of those initiatives, and libhybris could become the way of the future, so most people may end-up using Android kernels on their ARM “Linux” distribution. Comments are welcome!