Archive

Posts Tagged ‘tutorial’

Getting Started with NanoPi NEO Development Board – Ubuntu Core Firmware

July 20th, 2016 33 comments

NanoPi NEO is an exciting ARM Linux board due to the power it packs into its small size, and its low price starting at $7.99. It’s made by FriendlyARM, and since I’ve read some people had never heard about the company before, I’d like to point out it has been providing development boards well before the Raspberry Pi board was launched, with products such mini2440 based on a Samsung ARM9 processor introduced around year 2010. Anyway, I asked the company if they were willing to send 2 samples for review, as I plan to remove the USB & Ethernet port on one of them. Instead I got a 4 boards and accessories, so I’m going to start reviewing the board by writing a quick start guide, showing how to setup it, and check out the Ubuntu core provided by the company. If you are a fan of armbian made Debian distribution, NanoPi NEO will soon be supported too.

NanoPi NEO Pictures

So company send the parcel by DHL, and for some reasons declared an $11 value for 6 boards in the invoice, despite the board selling for respectively $7.99 and $9.99, and the two PSU-ONECOM debug boards going for $4 each… This resulted in higher custom duties than expected…

Click to Enlarge

Click to Enlarge

I opened all packages, with the board stored in anti-static bags as they should.

Click to Enlarge

Click to Enlarge

The complete package content include two NanoPi NEO 512MB RAM, two NanoPi NEO with 256MB RAM, two PSU-ONECOM debug board (which I don’t recommend, more details below), two 5V/2A power adapter and corresponding USB cables, as well as two blank 8GB micro SD cards. Each NEO board package also features a piece of paper with the specifications, and a getting started guide partially written for NanoPi-T3 (no you can’t use HDMI with NanoPi NEO), but still two useful links pointing the NEO Wiki, and Friendlyarm github account.

Click to Enlarge

Click to Enlarge

The top of the board features Ethernet, USB host, and micro USB (power) ports, as well as the micro SD slot, and I/O headers, while we’ll find the only two main ICs on the back with Allwinner H3 quad core Cortex A7 processor, and a Samsung RAM chip.

In case you wonder how to differentiate between the 512MB and 256MB version in case you buy both model, there’s a 512M RAM sticker on the former, and no sticker on the latter.

NanoPi_NEO_512MB_vs_256MB

If for some reasons, the sticker is detached, or remove, just check the back of the board for the Samsung memory part number: 2G (2 Gbit) = 256 MB, and 4G (4Gbit) = 512MB. Easy enough.

Samsung_Memory_256MB_vs_512MBNanoPi NEO can be considered a competitor of several other small ARM or MIPS Linux boards including Raspberry Pi Zero, Orange Pi One, Next Thing CHIP, and Mediatek LinkIt 7688, so I’ve taken a “family pictures” to show the respective size of the boards, and NanoPi NEO is clearly one of the smallest, and more powerful than most other board save for Orange Pi One.

Click to Enlarge

Click to Enlarge

However, it’s also much thicker than most because of its RJ45 jack, and vertical USB port.

NanoPi_NEO_Ethernet_USBI had planned to shoot a video showing how to remove the Ethernet and USB port (and possibly serial header), but I’ll probably skip it, because the company has now decided to also sell NanoPi NEO 512MB without Ethernet nor USB for $9.98 + shipping.

Getting Started with Ubuntu Core image for NanoPi NEO

So now, that we’ve checked out the hardware, it’s time to play with the board. Eventually, armbian will release an image, and it may become the preferred option, because of community support, but in the meantime, I’ll use the “Ubuntu Core + Qt Embedded” image released by the company. The instructions below are to be follow in a terminal windows in Debian, Ubuntu, or Mint operating system, but if you use Windows 10 you can flash the image with Win32DiskImager just like with a Raspberry Pi, or install Windows Subsystem for Linux, and follow the exact same procedure as in Linux.

First, you’ll need to download the image (currently nanopi-neo-core-qte-sd4g-20160704.img.zip) through mediafire, and uncompress it:

Now insert a micro SD card into your computer, and check the device name (/dev/sdX, or /dev/mmcblkpX) with lsblk command:

That step is very important. In my case, my 8GB SD card (the 3.7GB image should also work on 4GB micro SD cards) is /dev/sdb, so that’s what I’ll use. If I used /dev/sda instead, the instructions would completely wipe out my hard drive, and I’d lose all my data and OS. Anyway, let’s go ahead, and umount the SD card, and flash the image, checking the progress with pv:

The third step should take a few minutes to complete. Now we can take the micro SD card out, and insert it into the board, connect an Ethernet cable and the power, and after a few seconds (about 5 to 10 seconds). you should be able to ssh to the board with its IP address, which you can get from your router DHCP list.:

All good that was easy, and the board works out of the box. What’s not so nice is that the image is based on Ubuntu 15.10, an unsupported version of Ubuntu at this time.

Another way to connect to the board, especially if you don’t plan to use Ethernet is through the serial console. I’ve first done so using the company’s PSU-ONECOM debug board, plus a NULL modem cable, and an RS232 to USB adapter, since my computer does not have a DB9 connector.

NanoPi_NEO_RS232_Board

That’s fun, and it works, but that’s what I’d consider the old way of doing things simply because most recent computers or laptop don’t have a COM port. So instead, I’d recommend to use a standard USB to TTL, which normally cost $1 shipped, to connect to your computer, as it’s just more convenient to most people.NanoPi_NEO_USB_to_TTL_BoardSimply connect GND, Rx, and Tx to GND, Tx and Rx pins on the serial header of the board as shown below.NanoPi_NEO_Serial_Header

That’s the board output in minicom connected to /dev/ttyUSB0 with 115200 8N1 settings. In Windows, you may want to use Putty.

Let’s type some other command to find out more:

So the image is using a Linux 3.4.39 legacy kernel (mainline support should be a few weeks or months away), the rootfs size is 3.6GB with 3.0GB free (You’ll want to resize it with parted + resize2fs), and the quad core Cortex A7 processor has a maximum frequency of 1.2 GHz, instead of 1.29 GHz for boards with a different voltage regulation, but that’s OK, as the board has been mostly designed for IoT applications, and not necessarily for maximum performance. The GPIO module is compiled, but an error is generated after I load it, and now GPIOs are exported, which differs from my experience with the images I used with Orange Pi Allwinner H3 boards, where GPIOs are listed and ready to use.

Power consumption on this type of board is a topic that will require a separate post, but since I’ve been asked I’ve taken some quick measurements using a “kill-a-watt” power meter, and power consumption at idle is around 2.0 watts. Since the platform should also support standby/sleep mode, I tried it with pm-suspend:

Power consumption only dropped to 1.4 watts, and I was not able to resume by connecting a USB keyboard. So either the method I used is not correct, and suspend is not fully supported in the kernel. I’ll have to study a bit more, but obviously tips or links that could help me are welcome in comments.

Finally, I also checked whether it would be feasible to install an heatsink for people who may want to push the board to its limits.

NanoPi_NEO_HeatsinkThe Ethernet jack pins prevents to simply put some thermal paste on the processor and RAM, so you’d have to add some thermal pads on both ICs before fitting a heatsink, unless you use a smaller heatsink that does not cover the area under the RJ45 connector. There’s also no obvious way to keep the heatsink in place.

If you are interested in the board, it sells for $7.99 with 256MB RAM, and $9.98/$9.99 with 512MB RAM without/with Ethernet and USB host ports, plus shipping which normally amounts to $4 to $5 by airmail.

Setting a VoIP SIP user agent with Embedded Linux

July 19th, 2016 6 comments

This is a guest post by Leonardo Graboski Veiga, working for Toradex.

Introduction

This article’s main goals are: to cross-compile the PJSIP libraries and the PJSUA API reference implementation; deploy it to the target system; give an overview about the SIP protocol; and explore the reference implementation features, regarding audio only. For this purpose, a Computer on Module (CoM) from Toradex was chosen in the following configuration: Colibri iMX6DL* + Colibri Evaluation Board. The evaluation board and CoM are displayed in Figures 1 and 2, respectively.

Figure 1 -

Figure 1 – Colibri Evaluation Board

 

Figure 2 -

Figure 2 – Colibri iMX6DL

VOIP or Voice over IP, is a term designed to refer to a set of methods and technologies targeted for the implementation of telephony services over the Internet. For the purpose of this article, the scope will be limited to the use of a reference implementation built upon the SIP communication handling protocol by means of the PJSIP libraries and PJSUA2 API. If you wish to gather more information about VOIP itself, there is a website that labels itself “A reference guide to all things VOIP” and it holds comprehensive information on the matter.

SIP is the Session Initiation Protocol – a protocol used for signaling and handling communication sessions. This protocol is sometimes referred to as the de facto standard for VOIP implementations. It is an IETF (Internet Engineering Task Force) standard even though there are other options to SIP, such as IAX2. SIP employs the RTP protocol for data transmission which itself is encapsulated in TCP or UDP and can be encrypted by using TLS.

PJSIP is a set of libraries that implements the SIP and related protocols such as RTP and STUN, among others in C language. Some of its advantages are that it is free, open source, and highly portable. It was started in 2005 and is still being maintained and improved with wide documentation and the advantage of having a high level API named PJSUA2 for easily building custom applications. The PJSUA2 even has an online book for its official documentation.

Cross-compilation

The first step to cross-compile the PJSIP libraries and the test/sample application is to have the toolchain set. To do it, we can follow the toolchain for hard float calling convention section of this article. Note that if you are willing to use your own cross-compilation toolchain, according to this PJSIP documentation, you are required to have the following GNU tools: GNU make (other make will not work), GNU binutils, and GNU gcc for the target.

If the basic rootfs provided by Linaro doesn’t have some ALSA headers and the library needed to compile PJSIP, we will download and compile these libraries from the ALSA project website. In this article, the alsa-lib version downloaded was 1.1.1. then we will install the headers and library to the Linaro rootfs.

Install the toolchain Linaro:

Export the environment variables:

Download and unpack the ALSA lib:

Before compiling the ALSA lib source codes, it is necessary to run the autoconf script with the CFLAGS, LDFLAGS and prefix variables pointing to the rootfs from the Linaro toolchain:

Then just build and install. After the make command, the compilation will fail at some point; but it doesn’t matter because the headers and library we need will have been compiled.

Having the toolchain configured, it is time to download and extract the PJSIP source codes to the host machine and then go into the directory that holds the unpacked content. At the time this article was written, PJSIP version was 2.5.1.

Before compiling the PJSIP source codes, it is necessary to run the autoconf script pointing to the previously modified rootfs from the Linaro toolchain. It is almost the same way we did to compile the ALSA libraries, except for the fact that the directory where we want the compiled libraries to be installed is a directory we will compress and deploy to the target machine.

Then we are able to compile the libraries and also copy the reference implementation executable to the installation folder:

The next steps are to compress the folder and copy it to the Colibri iMX6. To discover the iMX6 IP, you can issue the ifconfig command:

Finally, log into the Colibri iMX6:

Now, we have the PJSIP deployed to the target – although it isn’t necessary for our next steps, since we will be using a binary only, you may find it useful somehow while developing applications of your own. We are also ready to start using the reference implementation, but first, let’s check some other things.

Audio check and configuration

The PJSIP library uses ALSA (Advanced Linux Sound Architecture) resources, which is also the audio subsystem used by the Toradex embedded system BSPs. Before starting, make sure you plug a headphone/speakers and a microphone into the carrier board with the system powered-off, as illustrated in the Figure 3.

Figure 3 -

Figure 3 – Connecting the mic/headphones/speakers to the Evaluation Board

Then you can use the alsamixer application to adjust the audio options according to your system.

The configuration used is illustrated in the Figure 4 and you should notice that adjusting the microphone’s amplification too loud can cause distortion, thus, it is good to experiment with the settings. Even adjusting the mic option to zero won’t mute your microphone; it just means there will be no amplification, or in other words 0dB gain. Another important point to notice is that if you force power-off the system, the configurations you made might be lost, therefore reboot or shutdown from the command line the first time you make your changes.

Figure 4 -

Figure 4 – Alsamixer configuration (Click to Enlarge)

To test the audio input (microphone) and, subsequently the output (headphones/speakers), we will record some audio by using the arecord command and then play it by using the aplay command. Notice that for the arecord there are some options that we need to set: -V displays a VU meter so you have visual feedback whether your mic configuration is good or not; mono is passed since microphone is mono; -r is the sampling rate; -f is the format and -d is the duration in seconds. For more information regarding arecord, you can use the –help option, or if you want to know more about audio on the Colibri iMX6, you can go to the Toradex developer related page.

If you can hear yourself well, we are ready to go ahead. Otherwise, check the connectors and the audio configuration.

SIP protocol overview

SIP is the session initiation protocol standardized by the IETF and used for VOIP and other types of multimedia sessions, such as messaging and video. It is text-based and uses the UTF-8 encoding, usually choosing UDP or TCP over port 5060 as a transport protocol. The information provided here about this protocol is mostly based on information provided here.

The protocol has methods defined in its RFC and method extensions defined in other RFCs. A few of them are:

  • ACK: used in some situations for handshake
  • BYE: session hang up
  • CANCEL: cancel an invite
  • INVITE: add another user agent to a session
  • SUBSCRIBE: request information about the status of a session
  • NOTIFY: sent from time to time by the gateway, must be answered with 200 OK
  • MESSAGE: used to allow and transport instant messages

There are also response codes, each with a specific meaning, that consist of 3 digit values:

  • 1xx: provisional – request received and still needs to process e.g. 100 trying, 180 ringing
  • 2xx: success – action successfully received and accepted e.g. 200 ok
  • 3xx: redirection – there is still some action needed to complete the request e.g. 300 multiple choices; 305 use proxy
  • 4xx: client error – server cannot process request or the client sent invalid e.g. 400 bad request; 404 not found
  • 5xx: server error – server cannot process a valid request e.g. 500 server internal error
  • 6xx: global failure – no server can fulfill the request e.g. 600 busy everywhere; 603 decline

It is important to notice that the SIP protocol doesn’t carry the audio information. Instead, it uses the RTP protocol encoded usually in UDP or TCP transport. For a better understanding, the Figure 5 explains how the transaction between two user agents is done for a simple call.

Figure 5: Example of a simple SIP call between user agents

Figure 5: Example of a simple SIP call between user agents

To make calls, a SIP URI is needed. It is a form of identifying a communication resource. A complete SIP URI has the format sip:user:[email protected]:port;uri-parameters?headers, but there are systems which can operate even with a SIP URI that provides only the host.

PJSUA reference implementation

The PJSUA API reference implementation is a command-line based application which uses the PJSIP, PJMEDIA, and PJNATH libraries and implements a user agent, also known as softphone. Its source-code can be found here and is a useful starting point to developing your own solution. The full documentation regarding the use of the PJSUA application can be found here.

Before starting to test, find the IP address for both your embedded system and your PC/notebook. You must have both of them in the same LAN, because we are not worried about using a proxy server or anything like that, therefore our connection between devices will be made point-to-point.

In this article, we will assume IP address 192.168.10.5 for the Colibri iMX6 and 192.168.10.1 for the PC. You also must have softphone software installed in your PC – it can even be the same reference application, if you want to compile it for your machine – this article will use the Linphone open-source softphone for Ubuntu 14.04 LTS. To start PJSUA in the embedded system use the following command. The PJSUA command line interface that you are expected to see is described in the Figure 6.

Figure 6: PJSUA command-line interface (Click to Enlarge)

Figure 6: PJSUA command-line interface (Click to Enlarge)

To make a new call from the embedded system to the PC, type “m” and then enter the simplest SIP URI possible which consists of passing only the softphone IP in the format sip:192.168.10.1. The process of making the call is illustrated in the Figure 7 and the answered call in the PC is illustrated in the Figure 8. To hang up, use the command “h”.

Figure 7: Making a call from PJSUA

Figure 7: Making a call from PJSUA

Figure 8: Linphone positive answer – in progress

Figure 8: Linphone positive answer – in progress

In order to send instant messages, type “i”, the SIP URI of the destination and the message, almost like the way we did to start a call. In your PC softphone, you should see the message. Try to send some message to the iMX6 by using the GUI. The Figure 9 displays the Linphone messaging interface with some messages exchanged between devices, while Figure 10 illustrates a message received by the Colibri iMX6 embedded system.

Figure 9: Message exchange between the Colibri iMX6 and the PC/notebook

Figure 9: Message exchange between the Colibri iMX6 and the PC/notebook

Figure 10: Message received by the Colibri iMX6 embedded system

Figure 10: Message received by the Colibri iMX6 embedded system

Additional configuration

In this subsection, some of the options for the PJSUA command-line application will be presented. They can be found here. Firstly, create a file named .pjsua-conf in the embedded system with the following contents:

The stereo configuration lets the audio output to be played on both the headphone’s speakers, while omitting it just makes the application to output the sound to only one of them. The auto-answer option lets you configure an answer code for incoming calls – in this case, the answer is 200, which means the call is accepted – and this can be useful in situations where the embedded system endpoint doesn’t has a human interface. Duration sets a maximum call duration in seconds, and this may be useful in applications such as debugging purposes. Color makes some log messages such as warnings and errors be colored, which helps identifying specific situations. Lastly, the add-buddy option lets you add SIP URIs so that you don’t have to add them manually every time you restart the application neither do you have to type the URI every time you want to make a call to the corresponding buddy (you may specify this option more than once for multiple buddies).

Passing the configuration file to the application:

Among the various options available, there are two that are nice for testing purposes: rx-drop-pct=PCT and tx-drop-pct=PCT. They both simulate packet loss by adjusting its percentage (PCT). It was tested with a package loss for both Rx and Tx of 10%, 20% and 30%, respectively, while monitoring the call quality average displayed by Linphone, which ranges from 0 to 5. The quality went from almost 5.0 without loss to 3.3, 2.3, and 0.6, respectively. Figure 11 shows the Linphone screen capture for the last situation (30% loss).

Figure 11: Quality for Rx and Tx packet loss of 30%

Figure 11: Quality for Rx and Tx packet loss of 30%

There you go! Now you have a VOIP implementation for the Colibri iMX6 running and a starting point to develop your own application according to your needs. Some additional information will be presented in the next chapter: network monitoring in order to see the SIP packets and some transactions being made.

Network monitoring for SIP packets

In order to see the SIP transactions being made between devices, the Wireshark software will be employed. You must notice that there is a third IP address 192.168.0.20 in the transactions and that is because the notebook was used as a DHCP server for the iMX6. Therefore, the notebook has two IP addresses. Still, no further investigation on why or how the SIP application is accessing the second IP address.

The sequence of operations made while capturing the network is described below:

  1. Call from Colibri iMX6 and reject from the notebook
  2. Call from Colibri iMX6 and accept from the notebook
  3. Colibri iMX6 hang up
  4. Call from the notebook and accept from Colibri iMX6
  5. Colibri iMX6 puts on hold
  6. Colibri iMX6 resumes the call
  7. Colibri iMX6 sends UPDATE
  8. Colibri iMX6 sends instant message
  9. Notebook sends instant message
  10. SUBSCRIBE/NOTIFY

The Figure 12 displays only the SIP protocol packets exchanged during the capture, with the highlighted lines corresponding to the start of the situations described above. Hence, 10 lines are highlighted. Notice that there is a SUBSCRIBE/NOTIFY handshake a moment before the third operation listed above.

Figure 12 - Network monitoring for SIP protocol packets only (click to enlarge)

Figure 12 – Network monitoring for SIP protocol packets only (Click to enlarge)

In the Figure 13, there is a capture of a very brief conversation (~4s) SIP and RTP packets. Notice that while the notebook uses the IP address 192.168.10.1 to send data to the embedded system, this one replies to the IP address 192.168.0.20.

Figure 13: Network monitoring for SIP and RTP packets for a brief call (Click to Enlarge)

Figure 13: Network monitoring for SIP and RTP packets for a brief call (Click to Enlarge)

With the information gathered, this is a way to confirm in practice some of the information presented in the previous chapter SIP protocol overview.

This is the end of the article that goes through implementing the PJSUA console-based application on a Toradex Colibri iMX6 and Evaluation Board running embedded Linux. Thank you for reading and I hope it was a useful article!

* for T20 based modules, mfpu=neon could generate incompatible binaries.

Lepton Image Compression Achieves 22% Lossless Compression of JPEG Images (on Average)

July 15th, 2016 2 comments

Dropbox stores billions of images on their servers, most of them JPEGs, so if they can reduce the size of pictures it can have a big impact on their storage requirements, so the company developed Lepton image compression, which – on average – achieved 22% lossless compression on the images stored in their cloud.

Lepton_CompressionCompression and decompression speed is also important, since the files are compressed when uploaded and uncompressed on the fly when downloaded so that the complete process is transparent to the end users, who only see JPEG photos, and the company claims 5MB/s compression, and 15MB/s compression, again on average.

The good news is that the company released Lepton implementation on Github, so in theory it could also be used to increase the capacity of NAS which may contain lots of pictures. So I’ve given it a try in a terminal window in Ubuntu 14.04, but it can be built on Windows too with Visual Studio:

If everything goes well for the last step, all tests should be successful:

I also installed it in my path with:

Now let’s go to some directory with photos I took with a DSLR camera:

44 pictures totaling 264 MB. I’ll compress them all, but first, let’s try with one to check the size difference and see if it is indeed lossless.

The Lepton file is definitely smaller (21.66% smaller):

Now let’s uncompress the file and see if there’s any difference:

The diff did not generate any output, so the compression is indeed lossless.

Time to compress all 44 photos:

I did so on a machine with an AMD FX8350 processor, and 8 cores were used during compression. The command took 5 minutes and 8 seconds, or about 7 seconds per picture. What about the size?:

That’s 207 MB down from 264 MB, or about 21.6% compression.

Via Phoronix

Updating Star Cloud PCG02U to Ubuntu 16.04 with WiFi and HDMI Audio Support

May 26th, 2016 15 comments

I completed my review of PCG02U Ubuntu TV stick a few days ago, and I was quite satisfied with the device, but since Ubuntu 16.04 was released last month, I thought it might be fun to upgrade to the latest version of Ubuntu. I’m go through the complete steps including building a new kernel for HDMI audio, and the drivers for WiFi, but you should be able to install Ubuntu 16.04 for Bay Trail and Cherry Trail processor with the image made by Linuxium and a USB stick.

Star Cloud PCG02U OS Support and Warranty

Before I go through the instructions, you may want to read the conditions on MeLE’s Aliexpress PCG02U page.

PCG02U_Linux_OS_WarningThey meant Ubuntu 14.04 instead of 14.0.4, but the important part is that if something goes wrong trying alternative OS, you may lose your warranty.

Upgrade Ubuntu 14.04 to Ubuntu 16.04

Upgrading from one LTS version to the next should be easy using the update manager…

… or doing it through the terminal entirely:

However, it did not work for me, as it quickly ended with the message:

I noticed that PCG02U was still stuck on Ubuntu 14.04.3 LTS, despite running dist-upgrade:

After trying several solutions, I eventually changed the Ubuntu mirror, and the steps above completed successfully with Ubuntu 16.04 running.

Click to Enlarge

Click to Enlarge

At least two little problems though: I lost HDMI audio with only Dummy Output available, and while Ethernet was still working after the update, WiFi support was gone… But if you don’t need either you’re good to go.

Enabling HDMI audio in PCG02U

Luckily we already have the instructions to enable HDMI audio for Bay Trail and Cherry Trail processors, all we need is a Linux 4.5 kernel and patch it. I’ll do everything inside PCG02U, and I have not used a separate build machine, which would likely be faster. Tip: you’ll need gcc 4.9 or greater. I used the instruction here and there.

First let’s build the dependencies required to build the kernel in Ubuntu.

Now let’s get the patches in a working directory

as well as the Linux 4.5.1 kernel patched for Ubuntu and the Intel Atom HDMI audio support:

Now we can configure the build:

This will ask which config files to configure for AMD64, i386, ARM and so on. We only need to edit the first one (AMD64). Once you are in the config menu, use menuconfig search function to locate SUPPORT_HDMI option and enable it. Exit and save.
CONFIG_SUPPORT_HDMI

Before starting the build add something like “+some_string” to the end of the first version number in the debian.master/changelog> file. I added +hdmi_audio string:

You can now start the build with:

However, the build did not complete for me, with the error:

I followed the instructions on askubuntu, and disabled set do_zfs = false in debian.master/rules.d/amd64.mk, and completed the build with the same command line. It took around 2 to 3 to complete the build on PCG02U, and I had a bunch of deb packages…

.. and I installed the headers and image:

Rebooted the system, which booted successfully, and I could confirm HDMI audio was back. Yes!

Click to Enlarge

Click to Enlarge

But still no WiFi… and space was running now, so I did some cleaning which gave me a few gigabytes to play with:

Building Realtek RTL8723BS WiFi Driver in Ubuntu/Linux

Star Cloud PCG02U uses  a WiFi and Bluetooth module with the common Realtek RTL8723BS chip, but the driver is not currently in mainline, so it needs to be compiled separately. That part is straightforward, and only take 2 minutes or less:

That’s all and now the Wireless network is enabled:

Click to Enlarge

Click to Enlarge

I had no problems connecting to my wireless router, and the module is automatically loaded at boot time. So now we have the same level of support as in Ubuntu 14.04 with HDMI audio and WiFi.

Realtek RTL8732BS Bluetooth in Linux

However, the hardware also supports Bluetooth, so it would be nice to have this enabled too, and again RTL8723BS Linux Bluetooth driver is available thanks to one independent developer (lwfinger).

In theory, it’s pretty easy:

But this did not work for me, despite Bluetooth apparently being located on /dev/ttyS4:

But the log would show a connection timeout:

Sadly, I haven’t been able to find a solution in a reasonable amount of time, and changing the baudrate from 115200 in the script to 2764800 (as shown in dmesg) does not help.

Of course everything would be so much easier if HDMI audio Cherry Trial and Bay Trial and RTL8723BS drivers would be in mainline linux, as all you would have to do would be to install Mainline linux in Ubuntu, and everything would just work. This does require some work however, but if you are motivated, lwfinger is ready to submit the RTL8723BS WiFi code to mainline if somebody takes care of all the errors and warnings generated by checkpatch.pl.

Getting Started with Wio Link Starter Kit, Visual Programming Android App, and IFTTT

May 15th, 2016 1 comment

Wio Link is a board based on on ESP8266 WiSoC that supposed to be easy to setup thanks to Grove modules – no breadboard and mesh or wires – and, as I first understood it, to program thanks to a drag and drop mobile app that does not require any actual programming. More advanced users can also use a RESTful API in Python, JavaScript, Node.js, PHP, Objective-C or Java. I’ve been sent a $49 Wio Link Starter Kit including the board, a USB cable, and six Grove modules to evaluate the kit. I’ll start by have a look a the kit, before experimenting with Wio Link Android app.

Wio Link Starter Kit Unboxing

The kit is sent in a red plastic case.

Click to Enlarge

Click to Enlarge

Wio Link board is lodged in the top covers, and other accessories placed in bags in the main part of the case.

Click to Enlarge

Click to Enlarge

Let’s check the board first.

Click to Enlarge

Click to Enlarge

There are three main ICs: ESP8266EX WiFi SoC, Silabs CP2102 USB to TTL chip for programming the board, and Winbond 25Q23BVIG serial flash memory (4MB). On the right side, the micro USB port is used for power and debugging, a header can be used for battery power, and Config and Reset buttons are present. The six Grove connectors can either take digital (3) modules, analog (1) modules, I2C (1) modules, or UART (1) modules.
ESP8266_Board_Open_Source_Hardware

The bottom side of the board does not any components, and the only noticeable parts are Seed Studio and Open Source Hardware logo, as well as http://iot.seeed.cc which point to documentation and forums for the board.

Click to Enlarge

Click to Enlarge

Once I’ve taken everything out of the small bags, we can see the fully kit content with Wio Link board, a micro USB port, and from top left to bottom right, six Grove modules and their cables: WS2812 LED strip (25 LEDs), temperature and humidity sensor, button, digital light sensor, 3-axis digital accelerometer, and a relay module.

Grove_Module_MarkingsIf you have many Grove module, it may not always be easy to know which one does what, but the Grove module is printed on the silkscreen on the back the board.

Wio Link Android App

Wio / Wio Link app is available for both Android 4.1+ and iOS 7+, and I tested the board with the Android app, following some of the instructions on the Getting Started Guide.

Click to Enlarge

Click to Enlarge

The first step is to login or create an account with your email, before setting up Wio Link, or the small and soon-to-be released Wio Node.

Click to Enlarge

Click to Enlarge

At this stage, I had to power Wio Link board. I did so by connecting Wio Link to one of the port my USB hub, and I noticed the red LED would blink very fast, but pressing on the Config button as instructed in the app would not do anything, and Wio Link was not detected at all. So I changed to a proper 5V/2A power supply, and the red LED was steady, with the green LED in the middle of the board slowly blinking, and after pressing the Config button for about 4 seconds, the blue TURN lit up. So if the board does not work, try another power supply. The USB cable should be OK, as it’s shipped with the board.

After that you can select Wio (WioLink_XXXXXX), select an access point (AP) to connect the board to the Internet, and give your board a name – I went with cnxwio – to complete the setup.

Click to Enlarge

Click to Enlarge

Then you can select module on the bottom, the app will show you where you can drag and drop it (Digital. Analog, UART, or I2C), and then repeat the same process with the other modules.  I had the idea of making a demo reporting the temperature and humidity, while turning off the LED strip with the accelerometer, and turning it on with the button module, so I connected the four modules in the app and in “real life”.

Wio_Link_LED_Strip

Once you are happy with the setup, tap on Update to flash the firmware to the board. This should take a few seconds. At this stage I was expecting to be able to do some more visual programming, but all you can do is tap on API to get the API info, and experiment with the API. So rather than a complete programming solution, Wio app is an help for program development.

Click to Enlarge

Click to Enlarge

The three screenshots above show the list of Wio Link boards and their connected modules, and one API call to control the LED strip, namely to make it “blink in a rainbow flow”. You can also share the API by email or other method to get the API calls on your computer and get on with programming. This is the list of API calls I got with the four modules. You can simply use the command link in a Linux computer (or now Windows Subsystem for Linux) to monitor and control the board with curl. You can also use Python or other programming languages to use the API, as show in wio_link_execute.py that controls a traffic light.

But for the purpose of this review, I did not want to write code, only use graphical tools or app, so my next option was IF by IFTTT app.

Wio_Link_IFTTT_Setup

Right after  you start the app, tap on the top right icon to Browse recipes, select “Create a New Recipe“, tap on “+”  (Start Here!) icon, and search for Seeed trigger. The first time you’ll be redirected to login to Seeed Studio – which the password created at the beginning of this tutorial – in your browser, and once it’s done you’ll be able to “Monitor a sensor value”, select one action related to the sensors connected to Wio Link, and complete the trigger. I wanted to detect when the button is pressed (The value should be 0 when pressed) on the Grove module. There’s a big caveat doing this, but more on that later.

Click to Enlarge

Click to Enlarge

Now click Next to select the “That” step, and again search for Seeed to select one of the “Actions”, and configure it. I wanted to turn on the LED strip, and selected “light up Grove WS2812 LED strip” and “Random Rainbow”, before pressing on Finish to complete the action.

Click to Enlarge

Click to Enlarge

That’s all good, except for one detail. It did not work, as pressing the button had not effect. After configuring the accelerometer to turn off the LED strip, I started to receive notifications every 2 to 5 minutes about the “shaked” status. So I went to recipe, modified it to turn on the LED when the accelerometer is shaken, and press the Check Now button to verify it, and the LED strip indeed lit up. So unless I’ve somehow missed an important option, that meant IFTTT is not suitable for my use case, because everything is handled from the cloud, and it’s not “polling” the sensors quite often enough.  However, If you want to monitor the temperature sensor, and take an action if the temperature rise above a threshold, that’s perfectly usable as long as it can be taken within a few minutes.

Click to Enlarge

Click to Enlarge

As one last experiment, I set the LED strip to turn on each time I receive a new email in my gmail account. It did not work for the first email, even after waiting a few minutes (5+ minutes), and then pressing “Check Now”. So I sent another email, waited one or two minutes without results, and pressed “Check Now” again, and the LED strip finally turned on.

So the takeaway is that Wio Link app does make setting up the board easier, and also provide an easy to use reference to the API after the configuration, but it’s not a pure visual programming app per se, and you’ll need to write your own program using the RESTful API. Alternatively IFTTT app can be used to control the board using triggers from the Internet (Facebook, twitter, emails, ….) or sensors from the Grove module, and the app then take actions using the Grove modules such as relays or LED strips, but there are some limitations to what can be done, and my experience with IFTTT and Wio Link was mixed.

I’d like to thank Seeed Studio for sending Wio Link Starter Kit for evaluation. You can purchase the kit for $49 on Seeed Studio if you are interested.

How to Run Ubuntu 16.04 Aarch64 (64-bit ARM) Cloud Images on Your Intel/AMD Linux Computer with QEMU

May 10th, 2016 4 comments

With the recent launch of several low cost Cortex A53 development boards, 64-bit ARM hardware is now pretty common and inexpensive, but if you want to run 64-bit ARM code on your x86 Linux computer, Riku Voipio, a software engineer working for Linaro, wrote some instructions to run Ubuntu 16.04 Aarch64 Cloud image in QEMU. Ubuntu cloud images are “the official Ubuntu images and are pre-installed disk images that have been customized by Ubuntu engineering to run on public clouds that provide Ubuntu Certified Images, Openstack, LXD, and more. ”  So the instructions are also useful if you want to easily try such packages on 64-bit ARM platform.

Ubuntu_16.04_ARM_Cortex_A57

Ubuntu 16.04 with Linux 4.4 Running on a Dual Core Cortex A57 Processor in QEMU

I’ve tried those instructions myself on my Ubuntu 14.04 machine with and AMD FX8350 processor, and they worked pretty well, and the only things I had to find out by myself was to install a recent version of qemu.

First, we’ll need to install qemu & cloud-utils, and download QEMU EFI firmware  as well as the Ubuntu 16.04 Xenial server Cloud image:

The instructions require qemu-system-aarch64 version 2.5, and my system only comes with qemu 2.0.0

So I had to find a qemu ppa to install a more recent version:

I now have version 2.5:

Since the Cloud images don’t come with default username and password, they need to configured with cloud-utils. To do so, I created cloud-utils as follows:

You simply need to change the file with your username, and RSA key, which should be in ~/.ssh/id_rsa.pub. If you don’t have that file you may want to read my post  showing how to create the SSH key and login without password. Cloud config can take many arguments, including packages to install during the first boot, and you can learn all about it on Cloud-init documentation.

Now you can initialize the cloud image, and run it:

The boot until the login prompt tool about 3 minutes on my machine. Here’s the boot log:

error: no suitable video mode found.
EFI stub: Booting Linux Kernel…
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map…
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.0-22-generic ([email protected]) (gcc version 5.3.1 20160413 (Ubuntu/Linaro 5.3.1-14ubuntu2) ) #39-Ubuntu SMP Thu May 5 16:54:53 UTC 2016 (Ubuntu 4.4.0-22.39-generic 4.4.8)
[ 0.000000] Boot CPU: AArch64 Processor [411fd070]
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] EFI v2.50 by EDK II
[ 0.000000] efi: SMBIOS=0x7c020000 SMBIOS 3.0=0x7bf90000 PROP=0x7f7b8d78 ACPI=0x7c040000 ACPI 2.0=0x7c040014
[ 0.000000] No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: Adding memblock [0x40000000 – 0x7fffffff] on node 0
[ 0.000000] NUMA: Initmem setup node 0 [mem 0x40000000-0x7fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7fff2280-0x7fff3fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] PERCPU: Embedded 17 pages/cpu @ffff80003ffc7000 s31128 r8192 d30312 u69632
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 832075
[ 0.000000] CPU features: enabling workaround for ARM erratum 834220
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 258048
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-22-generic root=LABEL=cloudimg-rootfs vt.handoff=7
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] software IO TLB [mem 0x77dc0000-0x7bdc0000] (64MB) mapped at [ffff800037dc0000-ffff80003bdbffff]
[ 0.000000] Memory: 923168K/1048576K available (8720K kernel code, 1006K rwdata, 3772K rodata, 760K init, 786K bss, 125408K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vmalloc : 0xffff000000000000 – 0xffff7bffbfff0000 (126974 GB)
[ 0.000000] vmemmap : 0xffff7bffc0000000 – 0xffff7fffc0000000 ( 4096 GB maximum)
[ 0.000000] 0xffff7bffc0000000 – 0xffff7bffc1000000 ( 16 MB actual)
[ 0.000000] fixed : 0xffff7ffffa7fd000 – 0xffff7ffffac00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffff7ffffae00000 – 0xffff7ffffbe00000 ( 16 MB)
[ 0.000000] modules : 0xffff7ffffc000000 – 0xffff800000000000 ( 64 MB)
[ 0.000000] memory : 0xffff800000000000 – 0xffff800040000000 ( 1024 MB)
[ 0.000000] .init : 0xffff800000cb5000 – 0xffff800000d73000 ( 760 KB)
[ 0.000000] .text : 0xffff800000080000 – 0xffff800000cb5000 ( 12500 KB)
[ 0.000000] .data : 0xffff800000d84000 – 0xffff800000e7fa00 ( 1007 KB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 64.
[ 0.000000] RCU restricting CPUs from NR_CPUS=128 to nr_cpu_ids=2.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=2
[ 0.000000] NR_IRQS:64 nr_irqs:64 0
[ 0.000000] GICv2m: range[0x8020000:0x8020fff], SPI[80:144]
[ 0.000000] Architected cp15 timer(s) running at 62.50MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[ 0.000135] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[ 0.006123] vt handoff: transparent VT on vt#7
[ 0.006565] Console: colour dummy device 80×25
[ 0.007325] console [tty0] enabled
[ 0.008449] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000)
[ 0.008599] pid_max: default: 32768 minimum: 301
[ 0.009541] Security Framework initialized
[ 0.009610] Yama: becoming mindful.
[ 0.011833] AppArmor: AppArmor initialized
[ 0.015594] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.017840] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.018889] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.018992] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.029386] Initializing cgroup subsys io
[ 0.029795] Initializing cgroup subsys memory
[ 0.030134] Initializing cgroup subsys devices
[ 0.030245] Initializing cgroup subsys freezer
[ 0.030346] Initializing cgroup subsys net_cls
[ 0.030421] Initializing cgroup subsys perf_event
[ 0.030490] Initializing cgroup subsys net_prio
[ 0.030574] Initializing cgroup subsys hugetlb
[ 0.030676] Initializing cgroup subsys pids
[ 0.031176] ftrace: allocating 30291 entries in 119 pages
[ 0.725663] Remapping and enabling EFI services.
[ 0.726171] EFI remap 0x0000000004000000 => 0000000040000000
[ 0.726421] EFI remap 0x0000000009010000 => 0000000044000000
[ 0.726500] EFI remap 0x000000007be40000 => 0000000044010000
[ 0.726557] EFI remap 0x000000007bea0000 => 0000000044070000
[ 0.726576] EFI remap 0x000000007beb0000 => 0000000044080000
[ 0.726597] EFI remap 0x000000007bf30000 => 0000000044100000
[ 0.726615] EFI remap 0x000000007bf40000 => 0000000044110000
[ 0.726632] EFI remap 0x000000007bf50000 => 0000000044120000
[ 0.726656] EFI remap 0x000000007c020000 => 00000000441d0000
[ 0.726673] EFI remap 0x000000007c050000 => 00000000441e0000
[ 0.726689] EFI remap 0x000000007c060000 => 00000000441f0000
[ 0.726706] EFI remap 0x000000007c070000 => 0000000044200000
[ 0.726771] EFI remap 0x000000007c0f0000 => 0000000044280000
[ 0.726802] EFI remap 0x000000007c100000 => 0000000044290000
[ 0.726819] EFI remap 0x000000007c110000 => 00000000442a0000
[ 0.726842] EFI remap 0x000000007c1e0000 => 0000000044370000
[ 0.726858] EFI remap 0x000000007c1f0000 => 0000000044380000
[ 0.726876] EFI remap 0x000000007c200000 => 0000000044390000
[ 0.726951] EFI remap 0x000000007c280000 => 0000000044410000
[ 0.726981] EFI remap 0x000000007c290000 => 0000000044420000
[ 0.726998] EFI remap 0x000000007c2a0000 => 0000000044430000
[ 0.727016] EFI remap 0x000000007f5b0000 => 0000000044460000
[ 0.727036] EFI remap 0x000000007f600000 => 00000000444b0000
[ 0.727053] EFI remap 0x000000007f610000 => 00000000444c0000
[ 0.727071] EFI remap 0x000000007f650000 => 00000000444f0000
[ 0.727618] ASID allocator initialised with 65536 entries
[ 0.746070] Detected PIPT I-cache on CPU1
[ 0.747515] CPU1: Booted secondary processor [411fd070]
[ 0.749129] Brought up 2 CPUs
[ 0.749201] SMP: Total of 2 processors activated.
[ 0.749430] CPU: All CPU(s) started at EL1
[ 0.750222] alternatives: patching kernel code
[ 0.766144] devtmpfs: initialized
[ 0.775039] evm: security.selinux
[ 0.775075] evm: security.SMACK64
[ 0.775089] evm: security.SMACK64EXEC
[ 0.775102] evm: security.SMACK64TRANSMUTE
[ 0.775116] evm: security.SMACK64MMAP
[ 0.775129] evm: security.ima
[ 0.775142] evm: security.capability
[ 0.778658] SMBIOS 3.0.0 present.
[ 0.779858] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.782640] pinctrl core: initialized pinctrl subsystem
[ 0.794894] NET: Registered protocol family 16
[ 0.810548] cpuidle: using governor ladder
[ 0.823124] cpuidle: using governor menu
[ 0.823790] vdso: 2 pages (1 code @ ffff800000d89000, 1 data @ ffff800000d88000)
[ 0.824292] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.826321] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.827846] Serial: AMBA PL011 UART driver
[ 0.855107] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 37, base_baud = 0) is a PL011 rev1
[ 0.893760] console [ttyAMA0] enabled
[ 0.946328] ACPI: Interpreter disabled.
[ 0.949605] vgaarb: loaded
[ 0.955849] SCSI subsystem initialized
[ 0.958552] usbcore: registered new interface driver usbfs
[ 0.959246] usbcore: registered new interface driver hub
[ 0.959790] usbcore: registered new device driver usb
[ 0.971932] NetLabel: Initializing
[ 0.972153] NetLabel: domain hash size = 128
[ 0.972377] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.973808] NetLabel: unlabeled traffic allowed by default
[ 0.976092] clocksource: Switched to clocksource arch_sys_counter
[ 1.099009] AppArmor: AppArmor Filesystem Enabled
[ 1.100738] pnp: PnP ACPI: disabled
[ 1.149920] NET: Registered protocol family 2
[ 1.157502] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 1.158260] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 1.158865] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.160369] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 1.160845] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 1.162945] NET: Registered protocol family 1
[ 1.169176] Trying to unpack rootfs image as initramfs…
[ 38.466085] Freeing initrd memory: 20908K (ffff80002a69a000 – ffff80002bb05000)
[ 38.467445] kvm [1]: HYP mode not available
[ 38.471688] futex hash table entries: 512 (order: 4, 65536 bytes)
[ 38.472992] audit: initializing netlink subsys (disabled)
[ 38.474139] audit: type=2000 audit(37.848:1): initialized
[ 38.480527] Initialise system trusted keyring
[ 38.485484] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 38.510331] zbud: loaded
[ 38.516406] VFS: Disk quotas dquot_6.6.0
[ 38.517291] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 38.528806] fuse init (API version 7.23)
[ 38.532598] Key type big_key registered
[ 38.533202] Allocating IMA MOK and blacklist keyrings.
[ 38.546907] Key type asymmetric registered
[ 38.547225] Asymmetric key parser ‘x509’ registered
[ 38.548522] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 38.549875] io scheduler noop registered
[ 38.550151] io scheduler deadline registered (default)
[ 38.551097] io scheduler cfq registered
[ 38.557770] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 38.558156] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 38.559066] PCI host bridge [email protected] ranges:
[ 38.559706] IO 0x3eff0000..0x3effffff -> 0x00000000
[ 38.560395] MEM 0x10000000..0x3efeffff -> 0x10000000
[ 38.560672] MEM 0x8000000000..0xffffffffff -> 0x8000000000
[ 38.563045] pci-host-generic 3f000000.pcie: PCI host bridge to bus 0000:00
[ 38.563709] pci_bus 0000:00: root bus resource [bus 00-0f]
[ 38.564346] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 38.564681] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff]
[ 38.565020] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff]
[ 38.585136] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 38.615449] msm_serial: driver initialized
[ 38.620995] Unable to detect cache hierarchy from DT for CPU 0
[ 38.681657] brd: module loaded
[ 38.707298] loop: module loaded
[ 38.744265] vdb: vdb1 vdb15
[ 38.755415] libphy: Fixed MDIO Bus: probed
[ 38.755791] tun: Universal TUN/TAP device driver, 1.6
[ 38.756571] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[ 38.769050] PPP generic driver version 2.4.2
[ 38.772339] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 38.772918] ehci-pci: EHCI PCI platform driver
[ 38.773577] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 38.774282] ohci-pci: OHCI PCI platform driver
[ 38.775318] uhci_hcd: USB Universal Host Controller Interface driver
[ 38.781025] mousedev: PS/2 mouse device common for all mice
[ 38.785156] i2c /dev entries driver
[ 38.790822] device-mapper: uevent: version 1.0.3
[ 38.793082] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: [email protected]
[ 38.795243] ledtrig-cpu: registered to indicate activity on CPUs
[ 38.795611] EFI Variables Facility v0.08 2004-May-17
[ 38.808496] NET: Registered protocol family 10
[ 38.816988] NET: Registered protocol family 17
[ 38.817611] Key type dns_resolver registered
[ 38.818458] Registered cp15_barrier emulation handler
[ 38.818815] Registered setend emulation handler
[ 38.822549] registered taskstats version 1
[ 38.823009] Loading compiled-in X.509 certificates
[ 38.833206] Loaded X.509 cert ‘Build time autogenerated kernel key: a959bfeeeafa5217003d029b713b4f3761d43036’
[ 38.834712] zswap: loaded using pool lzo/zbud
[ 38.939508] Key type trusted registered
[ 39.135319] Key type encrypted registered
[ 39.135696] AppArmor: AppArmor sha1 policy hashing enabled
[ 39.136679] ima: No TPM chip found, activating TPM-bypass!
[ 39.138753] evm: HMAC attrs: 0x1
[ 39.141193] hctosys: unable to open rtc device (rtc0)
[ 39.146796] uart-pl011 9000000.pl011: no DMA platform data
[ 39.194827] Freeing unused kernel memory: 760K (ffff800000cb5000 – ffff800000d73000)
[ 39.195339] Freeing alternatives memory: 48K (ffff800000d73000 – ffff800000d7f000)
Loading, please wait…
starting version 229
[ 39.750435] random: systemd-udevd urandom read with 1 bits of entropy available
Begin: Loading essential drivers … [ 46.415344] md: linear personality registered for level -1
[ 46.515772] md: multipath personality registered for level -4
[ 46.620934] md: raid0 personality registered for level 0
[ 46.726240] md: raid1 personality registered for level 1
[ 46.926037] raid6: int64x1 gen() 474 MB/s
[ 46.992135] raid6: int64x1 xor() 397 MB/s
[ 47.060108] raid6: int64x2 gen() 892 MB/s
[ 47.128118] raid6: int64x2 xor() 588 MB/s
[ 47.196003] raid6: int64x4 gen() 1156 MB/s
[ 47.264122] raid6: int64x4 xor() 777 MB/s
[ 47.332052] raid6: int64x8 gen() 538 MB/s
[ 47.400093] raid6: int64x8 xor() 450 MB/s
[ 47.468291] raid6: neonx1 gen() 330 MB/s
[ 47.536209] raid6: neonx1 xor() 189 MB/s
[ 47.604233] raid6: neonx2 gen() 398 MB/s
[ 47.672095] raid6: neonx2 xor() 163 MB/s
[ 47.740157] raid6: neonx4 gen() 440 MB/s
[ 47.808224] raid6: neonx4 xor() 238 MB/s
[ 47.876048] raid6: neonx8 gen() 385 MB/s
[ 47.944072] raid6: neonx8 xor() 230 MB/s
[ 47.944350] raid6: using algorithm int64x4 gen() 1156 MB/s
[ 47.944628] raid6: …. xor() 777 MB/s, rmw enabled
[ 47.944939] raid6: using intx1 recovery algorithm
[ 47.952791] xor: measuring software checksum speed
[ 47.996241] 8regs : 1440.000 MB/sec
[ 48.036207] 8regs_prefetch: 1445.000 MB/sec
[ 48.076186] 32regs : 1336.000 MB/sec
[ 48.116043] 32regs_prefetch: 1343.000 MB/sec
[ 48.116350] xor: using function: 8regs_prefetch (1445.000 MB/sec)
[ 48.123591] async_tx: api initialized (async)
[ 48.216579] md: raid6 personality registered for level 6
[ 48.216952] md: raid5 personality registered for level 5
[ 48.217259] md: raid4 personality registered for level 4
[ 48.475262] md: raid10 personality registered for level 10
done.
Begin: Running /scripts/init-premount … done.
Begin: Mounting root file system … Begin: Running /scripts/local-top … done.
Begin: Running /scripts/local-premount … [ 49.365334] Btrfs loaded
Scanning for Btrfs filesystems
done.
Warning: fsck not present, so skipping root file system
[ 50.489875] EXT4-fs (vdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom … done.
Begin: Running /scripts/init-bottom … Warning: overlayroot: debug is busted
done.
[ 52.425729] systemd[1]: System time before build time, advancing clock.
[ 52.600812] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[ 52.602459] systemd[1]: Detected virtualization qemu.
[ 52.602901] systemd[1]: Detected architecture arm64.Welcome to Ubuntu 16.04 LTS![ 52.615513] systemd[1]: Set hostname to .
[ 52.631062] systemd[1]: Initializing machine ID from random generator.
[ 52.633892] systemd[1]: Installed transient /etc/machine-id file.
[ 54.777420] systemd[1]: Created slice System Slice.
[ OK ] Created slice System Slice.
[ 54.787015] systemd[1]: Created slice system-getty.slice.
[ OK ] Created slice system-getty.slice.
[ 54.791265] systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
[ 54.827391] systemd[1]: Starting Create list of required static device nodes for the current kernel…
Starting Create list of required st… nodes for the current kernel…
[ 54.839431] systemd[1]: Reached target User and Group Name Lookups.
[ OK ] Reached target User and Group Name Lookups.
[ 54.900677] systemd[1]: Listening on Journal Audit Socket.
[ OK ] Listening on Journal Audit Socket.
[ 54.937520] systemd[1]: Listening on Syslog Socket.
[ OK ] Listening on Syslog Socket.
[ 55.061147] systemd[1]: Mounting Debug File System…
Mounting Debug File System…
[ 55.125920] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ 55.130335] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 55.166043] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ 55.203000] systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
[ 55.230696] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ 55.270726] systemd[1]: Starting Uncomplicated firewall…
Starting Uncomplicated firewall…
[ 55.302712] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ OK ] Set up automount Arbitrary Executab…ats File System Automount Point.
[ 55.342570] systemd[1]: Listening on LVM2 metadata daemon socket.
[ OK ] Listening on LVM2 metadata daemon socket.
[ 55.437727] systemd[1]: Mounting Huge Pages File System…
Mounting Huge Pages File System…
[ 55.478207] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ 55.505859] systemd[1]: Reached target Slices.
[ OK ] Reached target Slices.
[ 55.653438] systemd[1]: Mounting POSIX Message Queue File System…
Mounting POSIX Message Queue File System…
[ 55.671273] systemd[1]: Reached target Encrypted Volumes.
[ OK ] Reached target Encrypted Volumes.
[ 55.826639] systemd[1]: Starting Remount Root and Kernel File Systems…
Starting Remount Root and Kernel File Systems…
[ 55.895229] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 55.978436] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[ OK ] Listening on Device-mapper event daemon FIFOs.
[ 56.039144] systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ 56.338358] systemd[1]: Starting Load Kernel Modules…
Starting Load Kernel Modules…
[ 56.393745] systemd[1]: Listening on LVM2 poll daemon socket.
[ OK ] Listening on LVM2 poll daemon socket.
[ 56.554266] systemd[1]: Starting Nameserver information manager…
Starting Nameserver information manager…
[ 56.634591] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling…
Starting Monitoring of LVM2 mirrors… dmeventd or progress polling…
[ 56.742477] systemd[1]: Starting Journal Service…
Starting Journal Service…
[ 57.001027] systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Mounted POSIX Message Queue File System.
[ 57.064715] systemd[1]: Mounted Debug File System.
[ OK ] Mounted Debug File System.
[ 57.101124] systemd[1]: Mounted Huge Pages File System.
[ OK ] Mounted Huge Pages File System.
[ 57.227288] systemd[1]: Started Create list of required static device nodes for the current kernel.
[ OK ] Started Create list of required sta…ce nodes for the current kernel.
[ 57.258454] systemd[1]: Started Uncomplicated firewall.
[ OK ] Started Uncomplicated firewall.
[ 57.304651] EXT4-fs (vdb1): re-mounted. Opts: (null)
[ 57.527628] systemd[1]: Started Remount Root and Kernel File Systems.
[ OK ] Started Remount Root and Kernel File Systems.
[ 58.358611] systemd[1]: Started Nameserver information manager.
[ OK ] Started Nameserver information manager.
[ 59.850589] Loading iSCSI transport class v2.0-870.
[ 60.059388] systemd[1]: Started LVM2 metadata daemon.
[ OK ] Started LVM2 metadata daemon.
[ 60.205315] systemd[1]: Starting Load/Save Random Seed…
Starting Load/Save Random Seed…
[ 60.467673] iscsi: registered transport (tcp)
[ 60.479537] systemd[1]: Starting udev Coldplug all Devices…
Starting udev Coldplug all Devices…
[ 60.566825] systemd[1]: Starting Create Static Device Nodes in /dev…
Starting Create Static Device Nodes in /dev…
[ 60.630029] systemd[1]: Started Journal Service.
[ OK ] Started Journal Service.
Starting Flush Journal to Persistent Storage…
[ OK ] Started Load/Save Random Seed.
[ 62.065118] systemd-journald[368]: Received request to flush runtime journal from PID 1
[ OK ] Started Flush Journal to Persistent Storage.
[ 62.627589] iscsi: registered transport (iser)
[ OK ] Started Load Kernel Modules.
[ OK ] Started Monitoring of LVM2 mirrors,…ng dmeventd or progress polling.
Starting Apply Kernel Variables…
Mounting FUSE Control File System…
[ OK ] Mounted FUSE Control File System.
[ OK ] Started Create Static Device Nodes in /dev.
Starting udev Kernel Device Manager…
[ OK ] Started Apply Kernel Variables.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Found device /dev/ttyAMA0.
[ OK ] Found device /dev/disk/by-label/UEFI.
Mounting /boot/efi…
[ OK ] Mounted /boot/efi.
[ OK ] Reached target Local File Systems.
Starting Initial cloud-init job (pre-networking)…
Starting Tell Plymouth To Write Out Runtime Data…
Starting Set console keymap…
Starting Create Volatile Files and Directories…
Starting LSB: AppArmor initialization…
Starting Commit a transient machine-id on disk…
[ OK ] Started Tell Plymouth To Write Out Runtime Data.
[FAILED] Failed to start Set console keymap.
See ‘systemctl status console-setup.service’ for details.
[ OK ] Started Commit a transient machine-id on disk.
[ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[ OK ] Started Create Volatile Files and Directories.
Starting Network Time Synchronization…
Starting Update UTMP about System Boot/Shutdown…
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started LSB: AppArmor initialization.
[ OK ] Reached target System Initialization.
[ OK ] Started Trigger resolvconf update for networkd DNS.
[ OK ] Listening on ACPID Listen Socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
Starting Socket activation for snappy daemon.
Starting Seed the pseudo random number generator on first boot…
Starting LXD – unix socket.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started Daily apt activities.
[ OK ] Reached target Timers.
[ OK ] Listening on UUID daemon activation socket.
[ OK ] Started ACPI Events Check.
[ OK ] Reached target Paths.
[ OK ] Listening on Socket activation for snappy daemon.
[ OK ] Listening on LXD – unix socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting LXD – container startup/shutdown…
[ OK ] Started Deferred execution scheduler.
[ OK ] Started Regular background program processing daemon.
[ OK ] Started D-Bus System Message Bus.
[ OK ] Started ACPI event daemon.
Starting System Logging Service…
Starting Login Service…
Starting Accounts Service…
[ OK ] Started FUSE filesystem for LXC.
Starting LSB: Record successful boot for GRUB…
Starting LSB: MD monitoring daemon…
[ OK ] Started Login Service.
[ OK ] Started System Logging Service.
Starting Authenticate and Authorize Users to Run Privileged Tasks…
[ OK ] Started LSB: Record successful boot for GRUB.
[ OK ] Started LSB: MD monitoring daemon.
[ OK ] Started Authenticate and Authorize Users to Run Privileged Tasks.
[ OK ] Started Accounts Service.
[ OK ] Started Seed the pseudo random number generator on first boot.
[ OK ] Started LXD – container startup/shutdown.
[ 137.551732] cloud-init[502]: Cloud-init v. 0.7.7 running ‘init-local’ at Thu, 11 Feb 2016 16:29:14 +0000. Up 126.47 seconds.
[ OK ] Started Initial cloud-init job (pre-networking).
[ OK ] Reached target Network (Pre).
Starting Raise network interfaces…
[ OK ] Started Raise network interfaces.
Starting Initial cloud-init job (metadata service crawler)…
[ OK ] Reached target Network.
[ 183.824988] cloud-init[984]: Cloud-init v. 0.7.7 running ‘init’ at Tue, 10 May 2016 13:09:14 +0000. Up 162.17 seconds.
[ 183.856568] cloud-init[984]: ci-info: +++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++
[ 183.896700] cloud-init[984]: ci-info: +——–+——+—————————-+—————+——-+——————-+
[ 183.944499] cloud-init[984]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
[ 183.979733] cloud-init[984]: ci-info: +——–+——+—————————-+—————+——-+——————-+
[ 184.003937] cloud-init[984]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | . | . |
[ 184.024728] cloud-init[984]: ci-info: | lo | True | ::1/128 | . | host | . |
[ 184.040806] cloud-init[984]: ci-info: | eth0 | True | 10.0.2.15 | 255.255.255.0 | . | 52:54:00:12:34:56 |
[ 184.059981] cloud-init[984]: ci-info: | eth0 | True | fe80::5054:ff:fe12:3456/64 | . | link | 52:54:00:12:34:56 |
[ 184.076902] cloud-init[984]: ci-info: +——–+——+—————————-+—————+——-+——————-+
[ 184.096749] cloud-init[984]: ci-info: +++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++
[ 184.119901] cloud-init[984]: ci-info: +——-+————-+———-+—————+———–+——-+
[ 184.135772] cloud-init[984]: ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
[ 184.159764] cloud-init[984]: ci-info: +——-+————-+———-+—————+———–+——-+
[ 184.183873] cloud-init[984]: ci-info: | 0 | 0.0.0.0 | 10.0.2.2 | 0.0.0.0 | eth0 | UG |
[ 184.221910] cloud-init[984]: ci-info: | 1 | 10.0.2.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
[ 184.235614] cloud-init[984]: ci-info: +——-+————-+———-+—————+———–+——-+
[ 184.251771] cloud-init[984]: Generating public/private rsa key pair.
[ 184.267717] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
[ 184.287923] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
[ 184.299763] cloud-init[984]: The key fingerprint is:
[ 184.319922] cloud-init[984]: SHA256:5nfgM60p9uPLbYwOS9asle9xORwZn8f2w1Wn1/jxyv8 [email protected]
[ 184.347770] cloud-init[984]: The key’s randomart image is:
[ 184.368899] cloud-init[984]: +—[RSA 2048]—-+
[ 184.387884] cloud-init[984]: | |
[ 184.421722] cloud-init[984]: | |
[ 184.460441] cloud-init[984]: | . o|
[ 184.501071] cloud-init[984]: | B=|
[ 184.544642] cloud-init[984]: | S . =oO|
[ 184.575731] cloud-init[984]: | o + + ..**|
[ 184.607402] cloud-init[984]: | = Xo+ =o+|
[ 184.652524] cloud-init[984]: | ooBoOo+ o.|
[ 184.679908] cloud-init[984]: | .o=O=+ o.E|
[ 184.699730] cloud-init[984]: +—-[SHA256]—–+
[ 184.723963] cloud-init[984]: Generating public/private dsa key pair.
[ 184.747842] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
[ 184.768001] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
[ 184.787953] cloud-init[984]: The key fingerprint is:
[ 184.806946] cloud-init[984]: SHA256:KzpBU/Zr4F1VzPQL/SjCTZudKOk1n4AXjCVEx8sgc8g [email protected]
[ 184.815690] cloud-init[984]: The key’s randomart image is:
[ 184.827854] cloud-init[984]: +—[DSA 1024]—-+
[ 184.855475] cloud-init[984]: | . ++.o=o |
[ 184.866056] cloud-init[984]: | o E o*o +. |
[ 184.875487] cloud-init[984]: | o . +.++o ..|
[ OK ] Started Initial cloud-init job (metadata service crawler).
[ 184.897020] cloud-init[984]: | o . …=o*.oo|
[ OK ] Reached target Network is Online.
Starting /etc/rc.local Compatibility…
[ 185.021564] cloud-init[984]: | . o oSo* @ +..|
[ 185.051657] cloud-init[984]: | . . +o = = . |
Starting iSCSI initiator daemon (iscsid)…
[ OK ] Reached target Cloud-config availability.
Starting Apply the settings specified in cloud-config…
Starting OpenBSD Secure Shell server…
[ 185.504541] cloud-init[984]: | …. . o |
[ OK ] Started /etc/rc.local Compatibility.
[ 186.110577] cloud-init[984]: | .. . |
[ 186.542021] cloud-init[984]: | .. |
[ 186.557503] cloud-init[984]: +—-[SHA256]—–+
[ 186.585582] cloud-init[984]: Generating public/private ecdsa key pair.
[ 186.609651] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
[ 186.625636] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
[ 186.657904] cloud-init[984]: The key fingerprint is:
[ 186.801267] cloud-init[984]: SHA256:8AlCHJTqwT2ZHsSrQWYCamH0IP6rI1DR9rXcGPckoms [email protected]
[ 186.909225] cloud-init[984]: The key’s randomart image is:
[ 187.041113] cloud-init[984]: +—[ECDSA 256]—+
[ 187.093113] cloud-init[984]: |== =+o |
[ 187.173249] cloud-init[984]: |* O.B + o . |
[ 187.305466] cloud-init[984]: |.O B.=o+ B + |
[ 187.461236] cloud-init[984]: |. B B.o++.. . |
[ 187.601078] cloud-init[984]: | o * o .S |
[ 187.647573] cloud-init[984]: |. o o E |
[ 187.972585] cloud-init[984]: |. . . |
[ 188.117766] cloud-init[984]: |… |
[ 188.313919] cloud-init[984]: |… |
[ 188.425282] cloud-init[984]: +—-[SHA256]—–+
[ 188.540492] cloud-init[984]: Generating public/private ed25519 key pair.
[ OK ] Started iSCSI initiator daemon (iscsid).
[ 188.655394] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
Starting Login to default iSCSI targets…
[ 188.804741] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
[ 189.156485] cloud-init[984]: The key fingerprint is:
[ 189.274441] cloud-init[984]: SHA256:1nftC58SMDp4u2HEzdOJT0TQNGvLqgv2INuYUBnlgAs [email protected]
[ 189.362913] cloud-init[984]: The key’s randomart image is:
[ 189.410176] cloud-init[984]: +–[ED25519 256]–+
[ 189.821593] cloud-init[984]: | .. . .++ |
[ 189.965319] cloud-init[984]: | E . + ..o |
[ 190.016843] cloud-init[984]: | . .. . + |
[ 190.084884] cloud-init[984]: | . o ..oo* o. |
[ 190.137893] cloud-init[984]: | o Soo=+*. .|
[ 190.235385] cloud-init[984]: | . o.+ .=o . |
[ 190.504702] cloud-init[984]: | . . +.oo. o. .|
[ 190.680403] cloud-init[984]: | . B =.o .o o|
[ OK ] Started OpenBSD Secure Shell server.
[ 190.832058] cloud-init[984]: | + . =o .+ |
[ 190.897369] cloud-init[984]: +—-[SHA256]—–+
[ OK ] Started Login to default iSCSI targets.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Reached target Remote File Systems.
Starting LSB: automatic crash report generation…
Starting LSB: Set the CPU Frequency Scaling governor to “ondemand”…
Starting Permit User Sessions…
Starting LSB: daemon to balance interrupts for SMP systems…
[ OK ] Started Permit User Sessions.
Starting Terminate Plymouth Boot Screen…
Starting Hold until boot process finishes up…
[ OK ] Started Hold until boot process finishes up.
[ OK ] Started Serial Getty on ttyAMA0.
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Started Terminate Plymouth Boot Screen.
[ OK ] Started LSB: Set the CPU Frequency Scaling governor to “ondemand”.
[ OK ] Started LSB: daemon to balance interrupts for SMP systems.
[ OK ] Started LSB: automatic crash report generation.Ubuntu 16.04 LTS ubuntu ttyAMA0ubuntu login:

You won’t be able to login there however, so instead you can access the emulated server via ssh:

No password will be asked since we’re using an ssh key.

A few commands confirm we are indeed running Ubuntu 16.04 with Linux 4.4 on a dual core Cortex A57 processor:

I’ve also run linpack benchmark:

Emulation from x86 to ARM is affecting the results quite a bit here. For reference, a Raspberry Pi 2 achieves about 113300 KFLOPS for the same benchmark. You’ll also noticed specifically compiling for Cortex-A57 CPU improves the performance by about 10%, even in qemu.

Debian on DragonBoard 410c Development Board

May 6th, 2016 29 comments

I purchased Qualcomm DragonBoard 410c development board last year, and first tested it and run some benchmark on the 96Boards compliant hardware with Android. I found that it was still work-in-progress, and decided to wait before trying Debian on the board. I’ve now done so, and will report by experience installing Debian Linux, playing with the board, and running Phoronix benchmarks to compare it to other ARM Linux boards.

Installing Debian on DragonBoard 410c

The first challenge is to navigate through the documentation that is not always clear or up-to-date. I eventually ended up on DragonBoard 410c Wiki on Github.

DragonBoard_410c_Debian_Android_Opearting_SystemsYou then have to decided which image you want. While there are two official operating systems with Android and Debian, you can three “entities” releasiong their own images. For Debian specifically, you have the Linaro image, and Reference Platform Build (RPB) image. I could not find any changelog or known issues with the former, but the latter as its own Wiki with the latest release being RPB 16.03 (March 2016), and the next one scheduled to be RPB 16.06 in June.

That’s the current list of known issues

  • bug 285 USB host doesn’t detect any plugged devices
  • bug 121 [RPB] Cannot soft power off or shutdown db410c
  • bug 284 [RPB] Dragon board Display sleep not working
  • bug 289 [RPB] USB devices don’t work after reboot
  • bug 207 [RPB] Bluetooth does not work on Dragon board debian
  • bug 153 [RPB] Missing information about hwpack usage

USB host not working did not inspire confidence, so I first tested the Linaro image. The (other) Wiki points to the “latest version”, but the link would point to Linaro Debian 16.02 release, while I could find a more recent Linaro Debian 16.04 which I downloaded in a terminal:

I used a micro SD card to install it. If you use Windows, simply use Win32DiskImager, but in computer running Linux or in Windows via Windows subsystem for Linux, you may want to do it in the terminal. First check the SD card device with lsblk. Mine was /dev/sdb, but your may be different, and I use /dev/sdX in the command below tp flash the Debian installer to a micro SD card:

Now remove the micro SD card from your computer and insert it in to the board, set the jumper to boot from SD card on the DragonBoard 410c, and connect the power. I could see LED 1 blinking, but nothing on my HDMI TV. Last time, I did not  manage to make the serial console (requiring a 1.8V USB to TTL board or cable) using Hardkernel ODROID board, so I went to the support forums, and after several minutes of reading, I found that the RPB image is recommended, as well as a clear explanation between the Linaro and RPB images:

Use the Reference Platform Build instead of the Linaro release. The Reference Platform is an integrated build with support for multiple boards, and that is where all engineering effort is going. The Linaro build is the old single-platform image that we’re not working on anymore.

The reference platform will run on all 96boards CE (Consumer Edition) and EE (Enterprise Edition), while the Linaro image is built specifically for a given board, and they are not really working on it. [Update: This answer was specific to Hikey board, and for DragonBoard 410c there are two images provided by Qualcomm Landing Team and the Reference Platform team]

So let’s start again from scratch using the RPB image, and download the bootloader, Linux kernel and rootfs to my Ubuntu computer:

Now find a micro USB to USB cable to connect to DragonBoard 410c, install fastboot…

.. and check the device is detected:

Good. After making sure the jumper switch is set to 0000 on the board again, we can  extract the three files, and install Debian as follows:

That was a lot of commands to install the operating system… Now you can unplug the board, remove the micro USB cable, and connect the power again. After a few seconds, you should see the kernel log, and eventually LXDE desktop environment.

Click to Original Size

Click to Original Size

You’ll be asked to configure WiFi, and you’re basically done.

DragonBoard 410c Debian System Info

I’ve then run a few command to learn more about the image and system:

One of the main advantage of 96Boards should be recent Linux version,and that’s exactly what we have here with Linux 4.4 running on the board. Out of a total of 866MB reported RAM, 64MB is free, and the 6.9GB rootfs has 4.8 GB available to the user. Snapdragon 410 SoC is correctly reported as being a quad core Cortex A53 (0xd03) processor.

I used file utility to make sure a 64-bit rootfs is being used here:

Finally, there’s a bunch of modules pre-loaded on the board:

Testing Debian on DragonBoard 410c

The thing that often do not work on ARM Linux board are 3D graphics and hardware video decoding, so I’ve specifically tested these two, and also played with the pre-installed Chromium browser.

If I understand correctly the debian image comes with Freedreno open source graphics driver, and if that’s the case I have the first ever platform with working open source 3D graphics drivers:

So that means both framebuffer and X11 3D graphics acceleration are working. Nice !

I also tried to play Tuxracer as it was part of the board’s test results provided by Linaro.

It works, but it’s so slow that it’s barely playable (see video below).

I installed VLC to play 1080op h.264 videos, but based on the CPU usage the system is clearly using software decoding, and there’s no audio via HDMI. I’ve asked about those two issues on the forums about 24 hours ago, but I have yet to get a reply.

Chromium loads OK, but I did notice some freezes during use, and YouTube will struggle at full screen at 1080p, in similar way to many other low end ARM Linux platforms.

DragonBoard 410c Linux Benchmarks

Let’s install the latest version of Phoronix…

…and run some benchmarks to compare against other development boards:

After over 3 hours the results are in. Bear in mind that the board does not have heatsink, just a metallic shield, and this may affects the performance. It’s also running an OS with a 64-bit ARM rootfs, while platforms like Raspberry Pi 3 features a 64-bit processor running 32-bit code.

Click to Enlarge

Click to Enlarge

I like to check John the Ripper for multi-threaded performance.

DragonBoard_410c_Phoronix_John_The_RipperWhile FLAC audio encoding is nice to single threaded performance.

DragonBoard_410c_Phoronix_FLAC

In theory the CPU performance of Snapdragon 410 and Broadcom BCM2837 (as found in RPi 3) should be equal since both are quad core Cortex A53 processors @ 1.2 GHz, but for some reasons DragonBoard 410c is a little slower in the multi-threaded benchmark, and quite faster during FLAC audio encoding likely due to software differences (Aarch64 vs Aarch32).

You can find the full results @ http://openbenchmarking.org/result/1605068-GA-1604204GA12

How to Change Language to English and Install Apps Remotely on Xiaomi Mi Box 3 Enhanced

April 12th, 2016 41 comments

Just like other Xiaomi TV boxes the latest Xiaomi Mi Box 3 Enhanced (aka MiBox 3 Pro) comes with a Chinese only user interface, but a similar method as used for Xiaomi Mi Box Mini to change English and remotely install apps. I’ve gone through this and taken pictures and screenshots to show how to change the language.

I had connected the HDMI cable, a USB hard drive, as well as a USB keyboard and RF dongle for my airmouse and gamepad to the device, and after powering up the device, you are know some text in Chinese, you can press OK, and you’ll soon be presented with a list of WiFi access points.

List_of_Wifi_ESSID_Xiaomi_Box

Select one, and you’ll be asked to input the password for the network. However, in my case I had no connect button, and pressing OK on the remote did not work at all. It turns out connecting a hardware keyboard (or air mouse) will disable the software keyboard and the connection button.Xiaomi_Mi_Box_3_WiFi_Connection_No_Button

But at the time, I simply skipped, and that’s only later, that I discovered that disconnecting hardware input devices would allow to input the password with Xiaomi remote control and a soft keyboard, and connect to the WiFi access point by pressing the large key on the right as shown in the picture below.Xiaomi_Mi_Box_3_WiFi_Connection_Keyboard Anyway, once the boot is complete you’ll get the usual GITV user interface found in all Xiaomi TV boxes with all text in Chinese.

Xiaomi_Mi_Box_3_App_List

I upgrade the firmware via OTA (now MIUI TV 1.4.6) before completing the other steps, but the procedure should be the same if you have the previous version of the firmware. Some of screenshots and photos may just look a little different.

The trick to change the language is to access the Android Settings – not available from GITV interface – by downloading Shafa Market apk, and copying it to a USB flash drive. Now insert the flash drive in the box, and after a few short seconds, a pop-up window should appear. Select the left button, to enter the file manager.

Xiaomi_Mi_Box_3_Pro_USB_Detection

You can see that network shares are also detected, but since I could not find how to start the file manager, I used the USB flash drive as a workaround.

Xiaomi_Mi_Box_3_File_Manager

Navigate to the USB drive and select 0.shafaguanjia_138.apk.

Shafa_Market_Apk

There will be a warning because third party apps installation is disabled by default due to security reasons. Again select the left button.Shafa_Market_Installation_WarningYou’ll be brought to the Android settings, and need to change the settings as shown with the highlighted line.

Click to Enlarge

Click to Enlarge

Now go back, and complete the installation. Select “Open” (right button) to launch Shafa Market.

Shafa_Market_Installation_CompleteSelect 我的应用 (My Apps) on the top menu, and click on the Settings (设置) button.

Click to Enlarge

Click to Enlarge

You’ll now be in the familiar Android Lollipop settings, albeit in Chinese. Select the language and input menu with a Globe icon.

Xiaomi_Mi_Box_3_Android_Settings_Chinese

Then click on the first item to change the language.Xiaomi_Mi_Box_3_Android_Settings

There are just four languages, three variants of the Chinese language, and English.Xiaomi_Mi_Box_3_Enhanced-Pro_Chinese_EnglishYou may also want to change the “current keyboard” to “English (US) – Android Keyboard (AOSP)” to avoid issues when inputting text later on.

Now if you go back to the launcher, you’ll find most items in English, except the ones that are retrieved from the  network.Xiaomi_Mi_Box_3_Enhanced_English_User_Interface

A reboot might also help making sure, all apps are aware of the change of language. If you want to install apps using apks easily, you may want to go to Shafa Market->Tools->Remote Install.

Shafa_Market_Remote_Install

This will give you an URL to conveniently install Android apps from your web browser’s computer. Simply click on the green button, select an apk, it will be uploaded the box, where you’ll then be prompted to complete the installation.

Click to Enlarge

Click to Enlarge

I’m usually downloading apk directly from Google Play store using APK downloader add-on for Firefox, but as you can see from the screenshot above I’ve also install Amazon App (Amazon Underground) to more conveniently install apps. You could also copy a bunch of apk files to an USB flash drive, and install them the same way as I did for Shafa Market.