Archive

Posts Tagged ‘nanopi’

Linux 4.10 Release – Main Changes, ARM & MIPS Architectures

February 20th, 2017 3 comments

Linus Torvalds has just released Linux 4.10:

So there it is, the final 4.10 release. It’s been quiet since rc8, but we did end up fixing several small issues, so the extra week was all good.

On the whole, 4.10 didn’t end up as small as it initially looked. After the huge release that was 4.9, I expected things to be pretty quiet, but it ended up very much a fairly average release by modern kernel standards. So we have about 13,000 commits (not counting merges – that would be another 1200+ commits if you count those). The work is all over, obviously – the shortlog below is just the changes in the last week, since rc8.

Go out and verify that it’s all good, and I’ll obviously start pulling stuff for 4.11 on Monday. Linus

Linux 4.9 added Greybus staging support, improved security thanks to virtually mapped kernel stacks, and memory protection keys, included various file systems improvements, and many more changes.

Some newsworthy changes for Linux 4.10 include:

  • Virtual GPU support – Intel GVT-g for KVM (KVMGT) is a full GPU virtualization solution with mediated pass-through, starting from 4th generation Intel Core processors with Intel Graphics. Unlike direct pass-through alternatives, the mediated device framework allows KVMGT to offer a complete virtualized GPU with full GPU features to each one of the virtualized guests, with part of performance critical resources directly assigned, while still having performance close to native.
  • New ‘perf c2c’ tool, for cacheline contention analysis – perf c2c (for “cache to cache”) is a new tool designed to analyse and track down performance problems caused by false sharing on NUMA systems. The tool is based on x86’s load latency and precise store facility events provided by Intel CPUs. Visit C2C – False Sharing Detection in Linux Perf for more details about the tool.
  • Improved writeback management – Linux 4.10 release adds a mechanism that throttles back buffered writeback, which makes more difficult for heavy writers to monopolize the I/O requests queue, and thus provides a smoother experience in Linux desktops and shells than what people was used to. The algorithm for when to throttle can monitor the latencies of requests, and shrinks or grows the request queue depth accordingly, which means that it’s auto-tunable, and generally, a user would not have to touch the settings. Read Toward less-annoying background writeback for more details about this improvement.
  • FAILFAST support –  This release also adds “failfast” support. RAID disk with failed IOs are marked as broken quickly, and avoided in the future, which can improve latency.
  • Faster Initial WiFi Connection – Linux 4.10 adds support for using drivers with Fast Initial Link Setup as defined in IEEE 802.11ai. It enables a wireless LAN client to achieve a secure link setup within 100ms. This release covers only the FILS authentication/association functionality from IEEE 802.11ai, i.e., the other changes like scanning optimizations are not included.

Some notable ARM architecture improvements and new features:

  • Allwinner:
    • Allwinner A23 – Audio codec driver
    • Allwinner A31/A31s – Display Driver (first pipeline), audio codec support
    • Allwinner A64 – clock driver
    • Allwinner A80 – External SDIO WiFi
    • Allwinner H3 – Audio codec driver, SPI
    • New boards support: NextThingCo CHIP Pro, Pine A64, NanoPi M1
  • Rockchip:
    • Initial support for Rockchip PX5 & PX3 automotive platforms
    • Added Rockchip RK1108 evaluation board
    • Added support for Rikomagic MK808 Android TV stick based on Rockchip RK3066
    • Update Rockchip PCI driver to support for max-link-speed
    • Rockchip rk3399,rk3066 PLL clock optimizations
  • Amlogic
    • Support for the pre-release “SCPI” firmware protocol shipped by Amlogic in their GXBB SoC
    • Initial support for Amlogic S905D, and S912 (GXM) SoCs
    • Added support for Nexbox A1 and A95X Android TV boxes
    • Cleanup for the Amlogic Meson PWM driver
    • New Amlogic Meson Graphic Controller GXBB (S905)/GXL (S905X/S905D)/GXM (S912) SoCs (meson)
    • Resets for 2nd USB PHY
    • Initial support for the SD/eMMC controller in the Amlogic S905/GX* family of SoCs
    • Updated DTS to enable support for USB, I2C, SPI, maibox/MHU, PWM, ethernet MAC & PHY, secure monitor, IR, and watchdog.
  • Samsung
    • Device Tree for Samsung Exynos5433 mobile phone platform, including an (almost) fully supported phone reference board
    • Added support for TOPEET itop/elite board based on exynos4412
    • DeviceTree  updates:
      • Add Performance Monitor Unit to Exynos7.
      • Add MFC, JPEG and Gscaler to Exynos5433 based TM2 board.
      • Cleanups and fixes for recently added TM2 and TM2E boards.
      • Enable ADC on Odroid boards
      • Remove unused Exynos4415 DTSI
  • Qualcomm
    • Add support for Qualcomm MSM8992 (Snapdragon 808) and MSM8994 (Snapdragon 810) mobile phone SoCs
    • Added support for Huawei Nexus 6P (Angler) and LG Nexus 5X (Bullhead) smartphones
    • Support for Qualcomm MDM9615 LTE baseband
    • Support for WP8548 MangOH Open Hardware platform for IOT, based on Qualcomm MDM9615
    • Other device tree changes:
      • Added SDHC xo clk and 1.8V DDR support
      • Add EBI2 support to MSM8660
      • Add SMSC ethernet support to APQ8060
      • Add support for display, pstore, iommu, and hdmi to APQ8064
      • Add SDHCI node to MSM8974 Hammerhead
      • Add Hexagon SMD/PIL nodes
      • Add DB820c PMIC pins
      • Fixup APQ8016 voltage ranges
      • Add various MSM8996 nodes to support SMD/SMEM/SMP2P
  • Mediatek
    • Added clock for Mediatek MT2701 SoCs
    • New Mediatek drivers: mtk-mdp and mtk-vcodec (VP8/VP9/H.264) for MT8173
    • Updated the Mediatek IOMMU driver to use the new struct device->iommu_fwspec member
  • Other new ARM hardware platforms and SoCs:
    • Hisilicon – Hip07 server platform and D05 board
    • NXP – LS1046A Communication processor, i.MX 6ULL SoC, UDOO Neo board, Boundary Devices Nitrogen6_SOM2 (i.MX6), Engicam i.CoreM6, Grinn i.MX6UL liteSOM/liteBoard,  Toradex Colibri iMX6 module
    • Nvidia – Early support for the Nvidia Tegra Tegra186 SoC, NVIDIA P2771 board, and NVIDIA P3310 processor module
    • Marvell – Globalscale Marvell ESPRESSOBin community board based on Armada 3700, Turris Omnia open source hardware router based on Armada 385
    • Renesas “R-Car Starter Kit Pro” (M3ULCB) low-cost automotive board, Renesas RZ/G (r8a7743 and r8a7745) application processors
    • Oxford semiconductor (now Broadcom) OX820 SoC for NAS devices, Cloud Engines PogoPlug v3 based on OX820
    • Broadcom – Various wireless devices: Netgear R8500 router, Tenda AC9 router, TP-LINK Archer C9 V1, Luxul XAP-1510 Access point
    • STMicro  – stm32f746 Cortex-M7 based microcontroller
    • Texas Instruments – DRA71x automotive processors, AM571x-IDK industrial board based on TI AM5718
    • Altera – Macnica Sodia development platform for Altera socfpga (Cyclone V)
    • Xilinx – MicroZed board based on Xilinx Zynq FPGA platforms

That’s a long list of changes and new boards and devices… Linux 4.10 only brings few MIPS changes however:

  • KVM fixes: fix host kernel crashes when receiving a signal with 64-bit userspace,  flush instruction cache on all vcpus after generating entry code (both for stable)
  • uprobes: Fix uprobes on MIPS, allow for a cache flush after ixol breakpoint creation
  • RTC updates:  Remove obsolete code and probe the jz4740-rtc driver from devicetree for jz4740, qi_lb60
  • microblaze/irqchip: Moved intc driver to irqchip. The Xilinx AXI Interrupt Controller IP block is used by the MIPS based xilfpga platform and a few PowerPC based platforms.
  • crypto: poly1305 – Use unaligned access where required, which speeds up performance on small MIPS routers.
  • MIPS: Wire up new pkey_{mprotect,alloc,free} syscalls

You can also read Linux 4.10 changelog with comments only, generated using git log v4.9..v4.10 --stat, in order to get a full list of changes. Alternatively, you could also read Linux 4.9 changelog on kernelnewbies.org.

How to use Sonoff POW with ESPurna Firmware and Domoticz Home Automation System

January 21st, 2017 10 comments

Sonoff POW is an ESP8266 based wireless switch with a power meter that comes pre-loaded with a closed-source firmware that works with eWelink app for Android or iOS by default. But we’ve also seen Sonoff POW, and other Sonoff wireless switches from the same family, can be flash with open source firmware supporting MQTT (Message Queuing Telemetry Transport) lightweight messaging protocol such as ESPurna, and I initially sent data from Sonoff POW to ThingSpeak via an MQTT broker (mosquitto) to draw some pretty charts. I did that with the switch connected to a lightbulb, but I’ve since installed Sonoff POW in my office to measure the room’s power consumption minus the ceiling light and aircon as shown below.

Wall Mounted Sonoff POW WiFi Switch – Click to Enlarge

Sonoff cable mechanism is really a pain for hard copper wires, as they are hard to push inside the mechanism, and something come out. I finally managed by it took longer than expected to install. I had to cut the mains cable, and rewire the gang box too. The good thing is that I did not need to drill a hole in my wall, as the device is very light.

I could see the power value updated in ESPurna web interface, depending on the load on my computer, and whether I turned on or off other devices. That’s all good, but instead of using ThingSpeak, whose open source implementation is not updated, I decided to try Domoticz, and already wrote a short guide showing how install Domoticz in NanoPi NEO ARM Linux development board. I had not gone through the setup yet, as I had to study a little more, and upgrade Sonoff POW firmware first. I also planned to use vThings CO2 monitor with Domoticz, but canceled since it can’t be configured remotely, and a USB connection is needed.

ESPurna OTA Firmware Update

So I’ll focus only on Sonoff POW in this post, and first we need to update the firmware since Domoticz support is only recent. I’ll assume you have already followed the post entitled How to Build and Flash ESPurna Open Source Firmware to Sonoff POW Wireless Switch.

First we need to update platformio and ESP8266 development platform to the latest version otherwise we’ll get some build issues:

I updated the source code with git pull, but for whatever reasons the build failed, even after cleaning the code. So I did what any developer with enough experience would do in that case: start with a fresh check out ;), and rebuild the OTA firmware from there:

In order to update the firmware over the network, you’ll need to change sonoff-pow-debug-ota section in platformio.ini with your own IP address (upload_port) and password (in upload_flags) used in ESPurna web interface:

Once it’s done, you can upgrade the firmware, and then the file system as follows:

The Sonoff POW will reboot, and cut the power for about 2 seconds after both updates. My Sonoff POW is controlling my computer power, but that’s OK since I’m behind a UPS. Now I can access the web interface, and one of the improvement is that you’re being asked to setup a new password right after the update.

Click to Enlarge

I was then redirected to the Status page showing power, voltage (a bit low?), current, and power factor.

Click to Enlarge

I then jumped to MQTT menu to set the IP address to my NanoPi NEO board, and clicked Update.

Click to Enlarge

There’s a new DOMOTICZ menu which we’ll check out a little later.

Installing and Configuring MQTT in Domoticz

ESPurna communicates with Domoticz via MQTT, so the first task was to follow and adapt Domoticz MQTT wiki.

First login to your Domoticz server (NanoPi NEO) and access a terminal window to update the packages, install npm, node.js, Node RED, and mosquitto:

We then need to go to the Hardware page in Domoticz and configure a new “MQTT Client Gateway with LAN Interface” as shown in the screenshot below.

Click to Enlarge

We can test whether it works or not by creating a new Dummy device in the same Hardware section

Then click on Create Virtual Sensors, to add a new Temperature sensor which we’ll call Fictive Temp.

Now go to the list of Devices (Setup->Devices) to check the idx value (1 in our case), and a publish a MQTT message to update the temperature value of our virtual sensor:

The temperature switch from 0 to 25°C. Our installation is working. Great!

Using Sonoff POW with Domoticz

In theory, we should be able to get two type of data for Sonoff POW: relay status and power levels. However, after looking at ESPurna source code, domoticz.ino only seems to handle the relay status that can be changed from Domoticz web interface, but the power values are only send in pow.ino to the MQTT server, with data not directly compatible with Domoticz. Maybe I missed something as Tinkerman – ESPurna developer – can use Sonoff SC to send temperature data to Domoticz. Alternatively, it might be possible to convert that data somehow with Node RED, but that’s something I’ll try later. So today, I’ll only try to control the switch from Domoticz.

To do so, I created another Dummy device called Sonoff POW Switch, and from there, another Virtual Sensor of Switch type.

Click to Enlarge

Click to Enlarge

We’ve already configured MQTT in ESPurna web interface, and from the screenshot above,we can see that “Sonoff POW Switch” Idx is 3, a value we need to update in the DOMOTICZ section of ESPurna web interface.

Now I can go Domoticz interface in my phone, and not my computer since my office’s Ethernet switch will be turned off, click on the Switch tab, and turn on and off Sonoff POW by clicking on the lightbulb as shown below.

Click to Enlarge

It works fine, however note that the initial switch status was wrong (off instead on on), despite the switch sending regular updates to the MQTT server.

NanoPi NEO Power Adjustments and Installation

Normally, at this stage, it should be easy simply install NanoPi NEO outside the office close to my router in the living room. But I’ve come across a few issues doing so, which I’m going to report.

First I decided to make a very short Ethernet cable to connect NanoPi NEO directly to my router. I have done a couple of Ethernet cables in the past a few meters long, and they all work. I tested my ultra short straight Ethernet cable connections with a multimeter, and the 8 wires were properly connected, however, when I connected NanoPi NEO to the router with that cable it failed to get a link. Maybe there was aonther issue with the cable, so I made another one just as short… Another fail. It turns out very short Ethernet cables may cause issues, which are normally solved by twister pairs, but with such short cables the length of the twisted pairs is also extremely short, maybe 2 to 3 cm which may not be sufficient. So I ended up using a “normal” 1.5 meter cable, not as neat but it works.

The power strip close to my router was full, and since I did not want to add another, I decided to use the spare USB port on my modem router in order to power NanoPi NEO board. A USB 2.0 port can only deliver 2.5W max, so I was clearly looking for problems here. In order to avoid an issues, I made use of h3consumption script to adjust the behavior of CPU cores and disable unused peripherals.

Let’s check NanoPi NEO current settings in a terminal:

h3consumption allows us to change the following settings:

So I decided to disable USB, and use two CPU cores at most in order to limit the board’s power consumption, and avoid random reboots:

The changes were properly applied after a reboot.

I powered the board with my modem router, and could use it without issue. I’ll monitor NanoPi NEO’s uptime to check if this works.

How to Install Domoticz Home Automation System in NanoPi NEO and Other ARM Linux Boards

January 19th, 2017 7 comments

I’ve recently started experimenting with IoT projects, and the first hurdle is to select the hardware and software for your projects are there are simply so many options. For the hardware your first have to choose the communication protocols for your sensors and actuators, and if you are going to go with WiFi, ESP8266 is the obvious solution, used together with your favorite low cost Linux development board such as Raspberry Pi or Orange Pi to run some IoT server software locally or leveraging the cloud. But the most difficult & confusing part for me was to select the server software / cloud services as there are just so many options. I prefer having a local server than something running only in the cloud, as my Internet goes a few hours a month, so I started with a solution combining ThingSpeak with MQTT gathering data from Sonoff power switches running ESPurna firmware and vThings CO2 monitor. This works OK, but while ThingSpeak.com cloud service is continuously update, its open source version has not been updated since mid 2015. Among the many service and software framework available, one seems to have come more often than other, is supported by vThings air monitoring platforms, and recently been added to ESPurna. I’m talking about Domoticz described as:

a Home Automation system that lets you monitor and configure various device like lights, switches, various sensors/meters like temperature, rain, wind, UV, Electra, gas, water and much more. Notifications/Alerts can be sent to any mobile device.

The system can run on Linux, Mac OS, Windows on x86 platform, but also on 32-bit and 64-bit ARM Linux boards such as Raspberry Pi and Cubieboard with just 256MB memory recommended, and 200MB free hard disk space. It can also generate charts from the data like the ones below.

Click to Enlarge

On top of that, the forums appear to be very active, and the last stable version was released in November 2016, and the last beta release yesterday according the download page.

I’m going to take it slow, so today I’ve just tried to install it on NanoPi NEO since it’s compact and runs Linux. However, it does not appear to be officially supported by Domoticz, so we’ll have to see whether it’s possible to install it on the board.

Domoticz is not a Linux distributions but a framework, so first we need to install a Linux distributions on the board, and the obvious choice for NanoPi NEO is to use the latest Armbian release either Debian Jessie or Ubuntu Xenial.

I downloaded Debian, extracted the image, and flashed it to a micro SD card on a Ubuntu computer:

Replace /dev/sdX with your own SD card device, which you can find with lsblk command.  If you are a Windows user, you can flash the firmware like you’d do for a Raspberry Pi using Win32DiskImager after uncompress Armbian firmware.

Now we can insert the micro SD card into the board, and connect the power to start the board. If you have not connected the serial console to your board, please be patient for the first boot as the system may take around 3 to 4 minutes to boot before you can login to it, as it expands the micro SD card to full capacity, and creates a 128MB emergency SWAP file.

Once it’s done we can login through the serial console or SSH using root / 1234 credentials. The first time, you’ll be asked to go through the first setup, changing the root password, and creating a new user with sudo privileges.

So now that we have Linux running on the board, and after login again as the new user, we can follow the instructions for Raspberry Pi board and other ARM boards to install domoticz with a single command line that works on systems running Debian/Ubuntu:

After a minute or two, as the system update the packages, and download domoticz, the setup wizard should start.

At some points we’ll need a fixed IP address, either by configuring Linux with static IP, or setting a permanent IP linked to the board MAC address in the router. The second option is usually my favorite option. Nevertheless, let’s click on OK to proceed.

You’ll be asked whether you want to enabled HTTP or/and HTTPS access. I selected both for now, but it’s probably a good idea to only select HTTPS for better security.Next is the HTTP port number set to 8080 by default, followed by the HTTPS port number to 443 by default (no screenshot), and finally the installation folder which defaults to ~/domoticz. You should now have reached the Installation Complete! window, and you can click Ok to exit the installation wizard.
Wow.. That was easy, and no errors. But does it work? Let’s access https://192.168.0.110:443 from a web browser.

We have a “Your Connection is not secure” error, but it’s expected as Domoticz simply generated a self-certificate, you can safely add exception to your browser to avoid this issue next time. Your data will still be encrypted, but if you plan to access your Domoticz setup from the Internet, you should probably install an other certificate using Let’s Encrypt certificate authority for example.
Once we have added an exception to the web browser we can indeed access Domoticz web interface, so the installation worked, but it will only show “No favorite devices defined…” Again that’s normal, because we need to configure it for example by clicking on the Hardware link.

Adding Hardware to Domoticz – Click to Enlarge

This will allow you to configure the system with MQTT, local I2C sensors, all sort of gateways, and even Kodi Media Center.  I’m pretty sure all devices working over the network or USB should work, but things like “Local I2C Sensors” which may be connected directly to the board may or may not work. Anyway, that looks promising, but I’ll stop here for today, as I have a lot more to study before going further, including upgrading Sonoff firmware, and configuring vThings CO2 monitor for Domoticz.

RetrOrangePi 3.0 Retro Gaming & Media Center Firmware Released for Orange Pi H3 Boards and Beelink X2 TV Box

December 28th, 2016 9 comments

RetrOrangePi is a Linux distribution based on armbian transforming Allwinner H3 boards – mostly Orange Pi boards, but also Banana Pi M2+ and NanoPi boards – into entertainment centers to play retro games, and watch/listen media files (videos/music) using Kodi. If you don’t have a development board, or would prefer a complete solution with casing and power supply, Beelink X2 TV box is also supported. The developers had been recently working on rectifying some GPL issues, and they have released RetrOrangePi 3.0 images right before Christmas.

retrorangepi

RetrOrangePi 3.0 changelog and key features:

  • Full Armbian 5.23 Jessie Desktop version with kernel 3.4.113 (backdoors fixed)
  • Slim version 1st release (less than 2 GB) coming soon
  • OpenELEC (Kodi Jarvis 16.1) with CEC support by Jernej Škrabec
  • RetroPie-Setup version 4.1
  • New Kodi Krypton beta6 version
  • New emulationstation-ROPI branch forked from jacobfk20 with gridview, on screen keyboard with easy wifi config and storage check with additional features added by ROPi team: display settings, OpenELEC / Desktop launcher and background music switcher integrated into main menu.
  • New Plug n’ Play feature – USB roms autoload (reads from /media/usb0) (buggy)
  • New dummy roms feature (most common platform shown)
  • New splash video on 1st boot by Rafael Spirax
  • New default splashscreen (from Libretro)
  • New custom ES splashscreen by Francois Lebel @MagicFranky
  • OpenELEC ROPI addon already installed
  • Retroarch with XMB menu driver (Lakka)
  • Better looking video with bilinear filtering (smoothness) or scanlines by default
  • Most retroarch cores updated (FBA, PCSX etc)
  • New and improved content:
    • AdvanceMAME (newer romset, more compatibility, better performance in some games: Elevator Action Returns, Street Fighter the Movie, Star Wars Arcade, Judge Dredd, Sega Sonic The Hedgehog etc)
    • Amiga (FS-UAE emulator, fullscreen now, diskette sound, launcher)
    • Atari 5200
    • Atari 8bit (models 400 800 XL XE)
    • Coco / Tandy
    • Colecovision (ColEm emu Custom Coleco BlueMSX core)
    • Creativision
    • Daphne (Philips Cdi emulator)
    • Dosbox (GLES version)
    • Dreamcast (fixed reicast-joyconfig)
    • Duke Nukem port (fixed tint color)
    • Game and Watch (fixed shortcuts)
    • Intellivision
    • OpenMSX (with .dsk support) PPSSPP (new version 1.3 from odroid repo)
    • TI99/4A (Texas Instruments)
    • Wolfenstein3D port

There are two ways to download the images:

  • BitTorrent – 16.0 GB download with images for all boards
  • Main server (http) – 1.6 GB compressed firmware image for your board.

If you download from the main server, you’ll get a warning saying you can’t sell hardware pre-installed with the image:

RetrOrange Pi is a non profit project.
It consists of a basic Retropie setup with most Libretro cores on top of an Armbian Jessie Desktop version pre-installed.
It includes an OpenELEC fork as well.
Much of the software included in the image have non-commercial licences. Because of this,
selling a pre-installed RetrOrange image is not legal, neither is including it with your commercial product.
As it relies on other people’s work with our own features, we won’t be offering any help in customizations to avoid rebranding or reselling.

It will be interesting to see what happens with RetroEngine Sigma project on Indiegogo that is very likely based on RetrOrangePi image for Orange Pi Lite board.

Anyway, since BitTorrent download was very slow, I downloaded RetrOrangePi-3.0.Orangepione.img.tar.gz from the main server for my $3.69 Orange Pi One board (there was a promo in September), extracted it, and flashed it to a 32GB card (8GB is enough) in Linux:

Replace sdX by your own SD card device in the 3rd command above. You can also do this in Windows with Win32DiskImager. Once it is done, insert the micro SD card in your board or TV box, prepare a gamepad, and connect all relevant cables.

orange-pi-orange-gaming

If you have connected the serial console (completely optional), or want to access the system through ssh, you can login with pi/pi or root/orangepi credentials:

Most people will just follow the instructions on the TV. We’ll get through a bunch of animation and logos during the boot.Note: Please ignore the vertical lines on the photos, as there’s just an issue with my TV.

retrorangepi-3-0-logo
The first time the system will resize the SD card to make use of the full SD card capacity, and generate SSH keys.
retrorangepi-installationOne more “Loading…” logo…

retrorangepi-loading

If you have connected a gamepad (highly recommended), you’ll be ask to configure the keys. Tronsmart Mars G01 gamepad was automatically detected, and I could easily set all keys up.

retrorangepi-gamepad-configurationOnce all is well and done, you’ll get to the main menu to select emulator or Kodi.

retrorangepi-user-interfaceMost emulators do not come with ROMs due to license issues, so you’d have to find the ROMs yourself, and install them via a USB drive, or copy them directly into the board over the network, for example with scp. If you want to try to play some games straightaway, you can do so by going to the PORTS sections with 13 games available including Doom, Quake, Wolfenstein 3D, CannonBall, Duke Nukem 3D, Super Mario War, etc…
retrorangepi-ports-pre-installed-games
I tested shortly tested Wolfenstein 3D and Quake, as well as launched Kodi 17 (Beta 6) in the demo video below.

$25 NanoPi A64 is a Compact Yet Features Packed Allwinner A64 Development Board

December 23rd, 2016 20 comments

FriendlyARM has had a very busy year with their NanoPi boards, and they are completing the year by launching NanoPi A64 development board based on Allwinner A64 quad core Cortex A53 processor with 1GB RAM, Gigabit Ethernet, HDMI, USB ports and more.

nanopi-a64NanoPi A64 board specifications:

  • SoC – Allwinner A64 quad-core Cortex-A53 @ 648MHz to 1.152GHz with an ARM Mali400 MP2 GPU
  • System Memory – 1GB DDR3 RAM
  • Storage – 1x micro SD slot
  • Video Output / Display IF – HDMI 1.4 port,  30-pin MIPI DSI connector
  • Audio – HDMI, 3.5mm audio jack
  • Connectivity – 1x Gigabit Ethernet port (RTL8211E), 802.11 b/g/n WiFi
  • USB – 2x USB 2.0 ports, 1x micro USB port for power only
  • Camera – 24-pin DVP camera interface
  • Debugging – 4-pin debug UART header
  • Expansion
    • 40-pin mostly Raspberry Pi compatible header with UART, SPI, I2C, PWM, GPIOs, etc…
    • 7-pin I2S header
  • Misc – IR Receiver, 1x power button, power and system LEDs,
  • Power – 5V/2A via micro USB port; AXP803 PMIC; supports software power-off
  • Dimension: 64 x 60mm (6-layer PCB)

nanopi-a64-micro-sd-card

FriendlyARM will provide Ubuntu-core with Qt Embedded and Ubuntu MATE images, but community ports such as ARMbian may be released in the future. You’ll find some documentation in the Wiki (Note: the Chinese version has more info right now).

NanoPi A64 development board is now sold with a micro USB to USB cable for $25 plus shipping on FriendlyARM website

Thanks to Thomas for the tip.

Linux 4.9 Release – Main Changes, ARM and MIPS Architectures

December 12th, 2016 2 comments

Linus Torvalds released Linux 4.9 on Sunday:

So Linux 4.9 is out, and the merge window for 4.10 is thus open.

With the extra week for 4.9, the timing for the merge window is obviously a bit awkward, and it technically closes in two weeks on Christmas Day. But that is a pure technicality, because I will certainly stop pulling on the 23rd at the latest, and if I get roped into Xmas food prep, even that date might be questionable.

I could extend the merge window rather than cut it short, but I’m not going to. I suspect we all want a nice calm winter break, so if your stuff isn’t ready to be merged early, the solution is to just not merge it yet at all, and wait for 4.11. Just so you all know (I already bcc’d the main merge window suspects in a separate mailing last week, I’m just repeating myself here to avoid anybody being confused about timing).

Anyway, back to 4.9 itself.

I’m pretty sure this is the biggest release we’ve ever had, at least in number of commits. If you look at the number of lines changed, we’ve had bigger releases in the past, but they have tended to be due to specific issues (v4.2 got a lot of lines from the AMD GPU register definition files, for example, and we’ve had big re-organizations that caused a lot of lines in the past: v3.2 was big due to staging, v3.7 had the automated uapi header file disintegration, etc). In contrast, 4.9 is just big.

Admittedly a chunk of that is the new greybus staging support, but that really isn’t the bulk of it – it’s just another small detail in the overall “yes, v4.9 is big” picture.

Other than just the size, 4.9 looks fairly normal. A bit over two thirds drivers (staging, GPU and networking are the bulk of it, but it’s all over), with the rest looking fairly normal too: arch updates, documentation, generic networking, filesystems..

The shortlog (16k+ commits, with another 1100 merge commits to round things out) is obviously much too big to put here, and wouldn’t be legible anyway. So as is my wont, I’m appending just the log of my merges.

Linux 4.8 brought us an HDMI-CEC framework, a new kernel documentation system is now based on Sphinx, a user-space GPIO subsystem and tools, file systems improvements and more.

 

linux-4-9-changelogSome of the notable changes for Linux 4.9 include:

  • Greybus staging support. While Project Ara has been canceled, the code is still used in one Motorola phone, a Toshiba chip requires it, as well as other undisclosed users.
  • File systems improvements for CIFS (bug fixes, idsfromsid mount option, better reconnection handling), BTRFS (bug fixes), NFS (bug fixes and new features such as server-side copy), F2FS (bug fixed and performance improvements), EXT-4 (“Lots of bug fixes and cleanups”) , and XFS (iomap-based DAX infrastructure and XFS delalloc rework + bug fixes)
  • Improved security with virtually mapped kernel stacks, and memory protection keys
  • AMDGPU now supports older Radeon graphics cards, virtual display support, and improved reset.

Some interesting ARM architecture fixes and new features:

  • Allwinner:
    • Allwinner GR8 – Preliminary SoC support
    • Allwinner AXP209 PMIC – GPIO support
    • Allwinner A31 – SPDIF support
    • Allwinner A23/A33 and A31/A31s – sunxi-ng CCU driver
    • Allwinner A33 – Display Driver
    • Allwinner A64 – USB PHY support
    • Allwinner H3 – PWM support, I2C support
    • AXP806 PMIC – regulator support
    • AC100 RTC / codec IC – mfd driver, RTC driver
    • New boards and devices – Orange Pi PC Plus, Olimex A33-OLinuXino, Orange Pi Lite, Inet q972, Empire Electronix M712, Orange Pi Plus 2, Orange Pi Plus 2E, NanoPi NEO.
  • Rockchip:
    • PCI – Update Rockchip rk3399 host bridge driver DTS and resets
    • Rockchip RK808 PMIC driver
    • Rockchip DDR clks and rk3399 driver tweaks
    • phy driver for Rockchip usb2phy, internal PCIe PHY, and USB Type-C PHY on rk3399
    • update compatible strings for Rockchip efuse (RK3399)
    • Support for Tronsmart Orion R86 set-top-box (RK3368), Rockchip RK3288 Fennec reference board, Firefly RK3288 Reload platform
  • Amlogic
    • Network, clocks, and usb driver changes for meson-gxbb (S905)
    • Secure monitor firmware for Amlogic SoCs, and an NVMEM driver for the EFUSE based on that firmware interface
    • Amlogic 64-bit DT changes: added  USB host, I2C, SPI flash controller, PWM, mailbox, MHU, pinctrl: add pins for SPI, I2C, SDIO
    • Updates IR support for newer SoCs
    • net: new stmmac glue driver
  • Samsung
    • Added Samsung Exynos Low Power Audio driver (LPASS = Low Power Audio SubSystem)
    • samsung clk driver update: sound subsystem related clocks, addition of DRAM controller related clocks for exynos5420
    • Device Tree Update:
      • Enable HDMI on Arndale Octa board.
      • Update list of clocks for FIMC-IS block on Exynos4x12.
      • Remove skeleton.dtsi to fix DT compiler warning.
      • Cleanup of DT files
      • Allow compile testing of exynos-mct clocksource driver on ARM64.
      • Document Exynos5433 PMU compatible
      • Set chosen serial bitrate which allows proper serial output when bootloader does pass all the data in command line
  • Qualcomm
    • ASoC bug fix for simultaneous playback and capture
    • Added Qualcomm external bus interface 2 (EBI2), used in some mobile phone chips for connecting flash memory, LCD displays or other peripherals
    • Add a skeletal TSENS drivers for  MSM8916/MSM8996. TSENS is Qualcomms’ thermal temperature sensor device
    • Add MSM8916/APQ8016 display support
    • Updates for MSM8916 including TSCR, SMSM/SMP2P, and MBA reserve
    • Enable defconfig options for QDF2432
    • Added Qualcomm DragonBoard 820c single-board computer in 96boards form factor, LG Nexus 5 Phone
    • Device Tree Changes:
      • Rework dr_mode on APQ8064 and Nexus7
      • Add MSM8974 BLSP1 UART1 port
      • Add AP148 SATA mapping
      • Fixup MSM8660/MSM8064 SPMI/MPP IRQs
      • Add Nexus7 IMEM/reboot reason
      • Add Honami touchscreen support
      • Add TSENS support on MSM8974, APQ8064, and APQ8084
      • Add APQ8060 Dragonboard PM8058 LEDs
      • Rework VPH PWR REG for MSM8974
  • Mediatek
    • Add Mediatek thermal driver for mt2701
    • Driver for mt6577 auxdac found in mt2701, mt6577 and mt8173
    • Some DRM driver fixes
  • Other new ARM hardware or SoCs:
    • Marvell Armada 8040 development board, Netgear WNR854T router, Armada 395 SoC platform, GP board Armada 390 DB development board
    • ZTE ZX296718 STB SoC
    • SocioNext UniPhier LD11 TV SoC
    • Broadcom BCM958525er, BCM958522er, BCM988312hr, BCM958623hr and BCM958622hr reference boards for Northstar platform, Raspberry Pi Zero board
    • NXP i.MX 7 Warp7 reference board, Gateworks Ventana GW553x SBC, Technologic Systems TS-4900, and Engicam IMX6UL GEA M6UL computer-on-module, Inverse Path USB armory board
    • Renesas r8a7792/wheat and r7s72100/rskrza1 development boards
    • ST Microelectronics STi B2260 (96boards) single-board computer
    • TI Davinci OMAP-L138 LCDK Development kit, beagleboard-x15 rev B1 single-board computer

There has been a fair amount of MIPS changes in Linux 4.9 too, some of them are:

  • Various updated to MIPS core arch code –  generic DT-based board & Flattened Image Trees (.itb) support, per-device DMA coherence support, bug fixes for KVM, uprobes, c-r4k, ptrace and more
  • Octeon – Delete dead code and files, change to use all memory into use by default, add DTS for D-Link DSR-500N, etc…
  • Pistachio – Remove ANDROID_TIMED_OUTPUT from defconfig
  • TX39xx & TX49xx – Move GPIO setup from .mem_setup() to .arch_init(), convert to Common Clock Framework
  • txx9wdt – Add missing clock (un)prepare calls for CCF
  • BMIPS – Add PW, GPIO SDHCI and NAND device node names, add DT examples for BCM63268, BCM3368 and BCM6362, add support for BCM3368 and BCM6362, etc…
  • Code changes for PCI, CPC, GIC, SMP, USB host, cpuidle, fbdev, auxdisplay…
  • mt7620 -Delete unnecessary assignment for the field “owner” from PCI
  • BCM63xx -Let clk_disable() return immediately if clk is NULL
  • pm-cps – Change FSB workaround to CPU blacklist, Use MIPS standard lightweight ordering barrier and completion barrier, etc…
  • SEAD3 – Rewrite to use DT and generic kernel feature
  • Malta – Rewrite to use DT
  • Loongson1C – Add CPU support for Loongson1C, add board support, add defconfig, and add RTC support for Loongson1C board

The full list of changes can be found in Linux 4.9 changelog with comments only, generated using git log v4.8..v4.9 --stat. You’ll also find a more readable list of changes for Linux 4.9 once kernelnewbies.org is updated.

NanoPi S2 Quad Core ARM Linux Board Comes with WiFi & BT Connectivity, HDMI, LVDS, and LCD Interfaces

October 28th, 2016 12 comments

FriendlyARM has released a bunch of Allwinner based NanoPi Allwinner boards recently, but they also have some Samsung/Nexcell S5P ARM Cortex A9 boards in their portfolio, and the latest is NanoPi S2 with Samsung S5P4418 quad core processor, three display interfaces, a camera interface, wireless connectivity through WiFi and Bluetooth 4.0, a 40-pin “Raspberry Pi” header, and more.

nanopi-s2

NanoPi S2 specifications:

  • SoC – Samsung/Nexcell S5P4418 quad core Cortex A9 processor @ 400 MHz to 1.4 GHz with Mali-400MP GPU
  • System Memory – 1 GB DDR3
  • Storage – 8GB eMMC flash  + micro SD slot
  • Video Output / Display I/F – micro HDMI port up to 1080p60, 24-pin LCD RGB interface, 24-pin LVDS interface
  • Audio – 3.5mm audio jack, micro HDMI
  • Camera – 24-pin DVP camera interface
  • Connectivity – 802.11 b/g/n WiFi + Bluetooth 4.0 classic & LE (AP6212 module); IPEX/u.FL antenna connector
  • USB – 1x USB 2.0 Host, 1x micro USB port for data and power
  • Expansion Headers
    • 40-pin Raspberry compatible header with GPIOs, UART, SPI, I2C, PWM, etc..
    • Unpopulated ADC header
  • Debugging – 4-pin serial header
  • Misc – 1x power LED, 1x system LED, 2x user keys, unpopulated RTC header, heatsink mounting holes
  • Power Supply – 5V/2A via micro USB port; AXP228 PMU with software shutdown and wake-up functions.
  • Dimensions – 75 x40 mm (8-layer PCB)

The hardware is quite similar to NanoPi 2 board, but it replaces one of the micro SD slot by an eMMC flash, adds an LVDS connector, an audio jack, an ADC header, and mounting holes with an heatsink.

samsung-s5p4418-development-boardSoftware support for NanoPi S2 is basically the same as for NanoPi 2 with Android 5.1 and Debian 8 images provided, both relying on Linux 3.4. You’ll find hardware and software documentation on the Wiki.

NanoPi S2 board sells for $45 plus shipping directly on FriendlyARM website. Bear in mind that it does not sell with an heatsink, and I could find one in the “optional accessories” section (yet). [Update: The company confirmed it works with the heat sink for T2/T3]

FriendlyARM Introduces NanoPi NEO AIR Board with WiFi & BLE, Camera Interface and 8GB Storage for $17.99

September 28th, 2016 33 comments

FriendlyARM launched NanoPi NEO board with Allwinner H3 processor, Ethernet, and USB ports for $7.99 to $9.99 in July, and the company is back with a new board with the same form factor and processor, by trading Ethernet for WiFi, dropping one USB 2.0 port for a DVP camera interface, and adding an 8GB eMMC flash.

nanopi-neo-airNanoPi NEO AIR specifications:

  • SoC – Allwinner H3 quad core Cortex A7 @ 1.2 GHz with an ARM Mali-400MP2 GPU up to 600 MHz
  • System Memory – 512 MB DDR3
  • Storage – 8GB eMMC Flash (Samsung) + micro SD card slot
  • Connectivity – WiFi 802.11 b/g/n and Bluetooth 4.0 LE (via Ampak AP6212 module) with IPEX antenna connector
  • USB – 1x micro USB OTG port, 2x USB via headers
  • Camera – 1x DVP camera interface with optional 5MP CAM500B camera
  • Expansion headers
    • 24-pin header with I2C, 2x UART, SPI, PWM, and power signals
    • 12-pin header with 2x USB, IR pin, SPDIF, and I2S
  • Debugging – 4-pin header for serial console (unpopulated)
  • Misc – Power and status LEDs
  • Power Supply – 5V/2A via micro USB port or VDD pin on serial header
  • Dimensions – 40 x 40 mm
  • Weight – 7.5 grams without headers; 9.7 grams with headers

The company provides an Ubuntu Core + Qt firmware image, which will most likely be pre-loaded in the eMMC flash on the board when shipping. More details about hardware and software can be found on the Wiki (English translation in progress).

nanopi-neo-air-cameraAs mentioned in the specifications, FriendlyARM will also offer an optional 5 megapixel “CAM500B” camera board that can be connected to the DVP interface of the board. The Wiki shows instructions to stream the video to a web page using mjpg-streamer.

armbian has also been working on supporting the board, but I’m unclear about the status right now. I’m sure you’ll soon find out by reading the comments’ section of this post.

NanoPi NEO AIR can be purchased for $17.99 with 3 headers, but you may consider adding the heatsink for $2.97, and a 3dB WiFi antenna for $3.99. I could not find CAM500B camera module, but for reference CAM500A camera module (possibly not compatible) is sold for $19.99.