Archive

Posts Tagged ‘drivers’

Work on VideoCore V GPU Drivers Could Pave the Way for Raspberry Pi 4 Board

August 8th, 2017 25 comments

I’ve come across an article on Phoronix this morning, about VideoCore IV GPU used in Broadcom BCM283x “Raspberry Pi” processors, but part of the post also mentioned work related to VC5 drivers for the next generation VideoCore V GPU, written by Eric Anholt, working for Broadcom, and in charge of the open source code related to VideoCore IV GPU for Raspberry Pi. This led me Eric’s blog “This Week in VC4/VC5” and articles such as “2017-07-10: vc5, raspbian performance“, where he explains he committed Mesa drivers for VC5.

I’ve just pushed a “vc5” branch to my Mesa tree (https://github.com/anholt/mesa/commits/vc5). This is the culmination of a couple of months of work on building a new driver for Broadcom’s V3D 3.3. V3D 3.3 is a GLES3.1 part, though I’m nowhere near conformance yet. This driver is for BCM7268, a set-top-box SOC that boots an upstream Linux kernel. I’m really excited to be working on a modern GLES implementation, and one that has its core platform support upstream already.

Raspberry Pi 3 is a nice little board, but competition is building with features not found in the RPi foundation board such as Gigabit Ethernet, USB 3.0, 4K video playback and so on. So even though, Eben Upton has clearly said he was in no rush in releasing Raspberry Pi 4, this will happen at some time, and in order to leverage part of existing software it would make sense to use an upgrade to VideoCore IV GPU like VideoCore V.

So I’ve tried to find more information about BCM7268 SoC, and information is quite limited. We know it’s designed for 4K Ultra HD set-top boxes, and features four cores delivering up to 14,000 DMIPS. Some speculated that the processor could be used in Raspberry Pi 4, but Jamesh – Raspberry Pi Engineer & Forum Moderator – poured cold water on the idea:

That’s a set top box chip, doesn’t cover the requirements for the next gen Pi.

So I tried to specifically find more details about the GPU, but again information is limited. The GPU supports OpenGL ES 3.1, and VideoCore V (V3D-530) is about 2.4 times faster than VideoCore IV (V3D-435) in T-Rex GFXBench benchmark on dual core development boards. We don’t know the GPU frequency however, so that’s just for reference.

Anyway, there’s still plenty of time to find out since the “official” timeline for Raspberry Pi 4 is sometimes in 2019.

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.

CHUWI LapBook 14.1 Windows 10 Firmware, Drivers, and BIOS

February 13th, 2017 No comments

In case you’ve installed another operating system like Ubuntu on CHUWI Lapbook 14.1 laptop, and want to re-install Windows 10, CHUWI has released Windows 10 firmware, drivers, and LapBook 14.1 “BIOS” in their forums.

So I’ve re-installed Windows 10 on the laptop using the Windows 10 image. You’ll need to download the 8 files CHUWI LapBook 14.1 Windows.part1.rar to CHUWI LapBook 14.1 Windows.part8.rar, and after extracting them you should get a “CHUWI LapBook 14.1 Windows” directory with all necessary files to reinstall Windows.

The files take 8GB, so it may not fit on all 8GB flash drives, and you may need to use a 16GB or greater drive. I just copied the files to an 64GB flash drive formatted with NTFS, insert the drive into the USB 2.0 port of the laptop, and I could start the installation process at boot time.

Click to Enlarge

However, it quickly failed as it tried to install Windows 10 on the flash drive itself:

Virtual Disk Service Error:

The operation is not supported on removable media.

The system cannot open the device or file specified.

Then I remember I had to set the USB drive label to WINPE for this to work. So I have to repartition the drive, format it to NTFS, set the label WINPE, and copy the files again. I reinserted the drive into the laptop, and update started successfully and went much further this time.

Note that by default CHUWI LapBook 14.1 boots from USB first, but if you have changed the settings in the BIOS, you’ll have to press F7 at boot time in order to select the drive. The installation went ahead, and after a while the laptop shutdown. I removed the USB drive, and pressed the power button to carry on with the installation.

Click to Enlarge

At this point System Preparation Tool 3.10 windows pops up, and I just clicked on OK which rebooted the laptop again, and brought me to the usual Windows 10 setup wizard where you select the language, WiFi network, setup and account, etc…

I just went through it as usual, and everything works.

If you have one of the earlier model, and your BIOS is older than version “A2W6_NA14.012”, you may to upgrade the BIOS by downloading “LapBook 14.1 BIOS 20161230.zip” and extracting the files to a USB flash drive formatted with FAT32/NTFS, insert it in the laptop, and boot it to complete the update.

Embedded Linux Conference & OpenIoT Summit 2017 Schedule

February 4th, 2017 1 comment

The Embedded Linux Conference 2017 and the OpenIoT Summit 2017 will take place earlier than last year, on February  20 – 23, 2017 in Portland, Oregon, USA. This will be the 12th year for ELC, where kernel & system developers, userspace developers, and product vendors meet and collaborate. The schedule has been posted on the Linux Foundation website, and whether you’re going to attend or not, it’s always informative to check out the topics.

So as usual, I’ll make a virtual schedule for all 5 days.

Monday, February 20

For the first day, the selection is easy, as choices are limited, and the official first day it actually on Tuesday. You can either attend a full-day paid training sessions entitled “Building A Low Powered Smart Appliance Workshop“, and the only session that day:

  • 14:30 – 15:20 – Over-the-air (OTA) Software Updates without Downtime or Service Disruption, by Alfred Bratterud, IncludeOS

Millions of consumers are at risk from security vulnerabilities caused by out-of-date software. In theory all devices should update automatically, but in practice, updating is often complicated, time-consuming and requires manual intervention from users. IncludeOS is a unikernel operating system that enables over-the-air (OTA) software updates of connected devices without downtime or service disruption.

The talk starts with a brief introduction to unikernels, their capabilities and how they can be very beneficial for IoT products from security, performance and operational perspectives. Then we give an overview of the IncludeOS Live Update functionality, which we use to demonstrate an atomic update of a device using Mender.io.

Tuesday, February 21

  • 10:30 – 11:20 – Bluetooth 5 is here, by Marcel Holtmann, Open Source Technology Center, Intel

The next version of Bluetooth has been released just a few month ago. This presentation gives an introduction to Bluetooth 5 and its impacts on the ecosystem. It shows new and exciting use cases for low energy devices and IoT with the focus on Linux and Zephyr operating systems.

With Bluetooth 5, the wireless technology continues to evolve to meet the needs of the industry as the global wireless standard for simple and secure connectivity. With 4x range, 2x speed and 8x broadcasting message capacity, the enhancements of Bluetooth 5 focus on increasing the functionality of Bluetooth for the IoT. These features, along with improved interoperability and coexistence with other wireless technologies, continue to advance the IoT experience by enabling simple and effortless interactions across the vast range of connected devices.

  • 11:30 – 12:20 – Embedded Linux Size Reduction Techniques, by Michael Opdenacker, Free Electrons

Are you interested in running Linux in a system with very small RAM and storage resources? Or are you just trying to make the Linux kernel and its filesystem as small as possible, typically to boot faster?

This talk will detail approaches for reducing the size of the kernel, of individual applications and of the whole filesystem. Benchmarks will you show how much you can expect to save with each approach.

  • 14:00 – 14:50 – Moving from IoT to IIoT with Maker Boards, Linux, and Open-Source Software Tools, by Matt Newton, Opto 22

In this session, developers will learn how to use the open-source tools, maker boards, and technology they’re already familiar with to develop applications that have the potential to deliver a massive positive impact on society. There are billions of devices–sensors, I/O, control systems, motors, pumps, drives–siloed behind proprietary control and information systems, waiting to be tapped into. This workshop is geared towards teaching the developer community how to use the tools they’re already familiar with to access, monitor, and manage these assets to create a potentially huge positive impact on our way of life.

  • 15:00 – 15:50 – Debugging Usually Slightly Broken (USB) Devices and Drivers, by Krzysztof Opasiak, Samsung R&D Institute Poland

USB is definitely the most common external interface. Millions of people are using it every day and thousands of them have problems with it. Driver not found, incorrect driver bound, kernel oops are just examples of common problems which we are all facing. How to solve them or at least debug? If you’d like to find out, then this talk is exactly for you!

We will start with a gentle introduction to the USB protocol itself. Then standard Linux host side infrastructure will be discussed. How drivers are chosen? How can we modify matching rules of a particular driver? That’s only couple of questions which will be answered in this part. Final part will be an introduction to USB communication sniffing. Krzysztof will show how to monitor and analyze USB traffic without expensive USB analyzers.

  • 16:20 – 17:10 – SDK in the Browser for Zephyr Project, by Sakari Poussa, Intel

Starting a development for embedded IoT system can be a tedious task, starting with the tools and SDK installations. You also need to have proper operating system, cables and environment variables set up correctly in order to do anything. This can take hours if not days. In this tutorial, we present an alternative, fast and easy way to start IoT development. All you need is your Zephyr board, USB cable and Web Browser. The Zephyr will be running JavaScript Runtime for Zephyr including a “shell” developer mode and Web USB. The Browser has the IDE where you can edit and download code to your board. No compiling, flashing or rebooting is required. During the tutorial, we have few boards available and participants can start developing applications for zephyr in 5 minutes.

  • 17:20 – 18:10 – Fun with Zephyr Project and BBC micro:bit, by Marcel Holtmann, Open Source Technology Center, Intel

This presentation shows how Zephyr empowers the BBC micro:bit devices and its Bluetooth chip to do fun things.

  • 18:15 – 19:00 – Yocto Project & OpenEmbedded BoF, by Sean Hudson, Mentor

Got a comment, question, gripe, praise, or other communication for the Yocto Project and/or OpenEmbedded technical leaders? Or maybe you just want to learn more about these projects and their influence on the world of embedded Linux? Feel free to join us for an informal BoF.

Wednesday, February 22

  • 10:40 – 11:30 – Journey to an Intelligent Industrial IOT Network, by Giuseppe (Pino) de Candia, Midokura

There are 66 million networked cameras capturing terabytes of data. How did factories in Japan improve physical security at the facilities and improve employee productivity? With the use of open systems, open networking, open IOT platforms of course!

Edge Computing reduces possible kilobytes of data collected per second to only a few kilobytes of data transmitted to the public cloud every day. Data is aggregated and analyzed close to sensors so only intelligent results need to be transmitted to the cloud while non-essential data is recycled. The system captures all flow information, current and historical.

Pino will draw from real IIOT use cases and discuss the variety of operations and maintenance tool to support proactive policy-based flow analysis for edge computing or fog nodes enabling IT and OT end to end visibility from a network perspective.

  • 11:40 – 12:30 – SecurityPI: IronClad your Raspberry Pi, by Rabimba Karanjai

Raspberry Pi has garnered huge interest in last few years and is now one of the most popular Linux boards out there sparking all kinds of DIY projects. But most of these function with the default settings and connect to the Internet. How secure is your Pi? How easy is it for someone to take over and make it part of a botnet or sneak peek on your privacy?

In this talk Rabimba Karanjai will show how to harden the security of a Raspberry Pi 3. He will showcase different techniques with code examples along with a toolkit made specifically to do that. This cookbook will harden the device and also provide a way to audit and analyze the behavior of the device constantly. After all, protecting the device finally protects us all, by preventing another dyndns DDOS attack.

  • 14:00 – 14:50 – IoTivity-Constrained: IoT for Tiny Devices, by Kishen Maloor, Intel Corporation

The IoT will be connected by tiny edge devices with resource constraints. The IoTivity-Constrained project is a small-footprint implementation of the Open Connectivity Foundation’s (OCF) IoT standards with a design that caters to resource-constrained environments. It is lightweight, maintainable and quickly customizable to run on any hardware-software deployment.

This talk will present IoTivity-Constrained’s architecture, features, APIs, and its current integration with a few popular real-time operating systems. It will end with a discussion of IoTivity-Constrained’s adaptation for the Zephyr RTOS.

  • 15:00 – 15:50 – RIOT: The Friendly Operating System for the IoT (If Linux Won’t Work, Try RIOT), by Thomas Eichinger, RIOT-OS

This presentation will start with RIOT’s perspective on the IoT, focusing on CPU- and memory-constrained hardware communicating with low-power radios. In this context, similarly to the rest of the Internet, a community-driven, free and open source operating system such as RIOT is key to software evolution, scalability and robustness. After giving an overview to RIOT’s overall architecture and its modular building blocks, the speaker will describe in more detail selected design decisions concerning RIOT’s kernel, hardware abstraction and network stack. Furthermore, the talk will overview the development and organizational processes put in place to help streamline the efforts of RIOT’s heterogeneous community. The presentation will end with an outlook on upcoming features in RIOT’s next releases and longer-term vision.

  • 16:20 – 17:10 – Graphs + Sensors = The Internet of Connected Things, by William Lyon, Neo4j

There is no question that the proliferation of connected devices has increased the volume, velocity, and variety of data available. Deriving value and business insight from this data is an ever evolving challenge for the enterprise. Moving beyond analyzing just discrete data points is when the real value of streaming sensor data begins to emerge. Graph databases allow for working with data in the context of the overall network, not just a stream of values from a sensor. This talk with cover an architecture for working with streaming data and graph databases, use-cases that make sense for graphs and IoT data, and how graphs can enable better real-time decisions from sensor data. Use cases covered will include data from oil and gas pipelines and the transportation industry.

Thursday, February 23

  • 9:00 – 9:50 – Android Things: High Level Introduction, by Anisha Dattatraya & Geeta Krishna, Intel Corporation

An overview of the basic concepts behind Android things and its structure and components is presented. Upon completion of this session, you should have a good overview of how Android Things brings simplicity to IoT software and hardware development by providing a simple and secure deployment and update model. This presentation provides the context needed for the Android Things Tutorial and other deep dive sessions for Android Things.

  • 10:00 – 10:50 – 2017 is the Year of the Linux Video Codec Drivers, by Laurent Pinchart, Ideas on Board

Codecs have long been the poor relation of embedded video devices in the Linux kernel. With the embedded world moving from stateful to stateless codecs, Linux developers were left without any standard solution, forcing vendors and users to resort to proprietary APIs such as OpenMAX.

Despair no more! Very recent additions to V4L2 make it possible to support video codecs with standard Linux kernel APIs. The ChromeOS team has proved that viable solutions exist for codecs without resorting to the proprietary options. This presentation will explain why video codecs took so long to properly support, and how the can be implemented and used with free software and open APIs.

  • 11:10 – 12:00 – Embedded Linux – Then and Now at iRobot, by Patrick Doyle, iRobot

Mr. Doyle will review the history of the use of embedded Linux at a commercial company (iRobot) and discuss the challenges faced (and overcome) then and now. While home routers and WiFi Access Point developers have enjoyed the benefits (and risks) of deploying Linux based products, that has not always been the case for other products. With the advent of low cost cell phone processors and vendor support for Linux, it is now possible to embed a Linux based solution in a consumer retail product such as a vacuum cleaner, minimizing risk and development time in the process.

  • 12:10 – 13:00 – Mainline Linux on AmLogic SoCs, by Neil Armstrong, BayLibre

Inexpensive set-top boxes are everywhere and many of them are powered by AmLogic SoCs. These chips provide 4K H.265/VP9 video decoding and have fully open source Linux kernel and U-boot releases. Unfortunately most of the products based on these devices are running an ancient 3.10 Android kernel. Thankfully AmLogic has put a priority on supporting their chips in the mainline Linux kernel.

Neil will present the challenges and benefits to pushing support for these SoCs upstream, as well as the overall hardware architecture in order to understand the Linux upstreaming decisions and constraints. He will also detail the future development plans aiming to offer a complete experience running an Upstream Linux kernel.

  • 14:30 – 15:20 – OpenWrt/LEDE: When Two become One, by Florian Fainelli, Broadcom Ltd

OpenWrt is a popular Linux distribution and build system primarily targeting the Wi-Fi router/gateway space. The project has been around for more than 12 years, but has recently experienced a schism amongst the developers over various issues.  This resulted in the formation of the LEDE project.  This split has caused confusion among the community and users. This presentation will cover what OpenWrt/LEDE projects are, what problems they are solving in the embedded Linux space, and how they do it differently than the competition. We will specifically focus on key features and strengths: build system, package management, ubus/ubox based user space and web interface (LuCI). We will demonstrate a few typical use cases for the audience. Finally, the conclusion will focus on the anticipated reunification of the two projects into one and what this means for the community and the user base.

  • 15:30 – 16:20 – Unifying Android and Mainline Kernel Graphics Stack, by Gustavo Padovan, Collabora Ltd.

The Android ecosystem has tons of out-of-tree patches and a good part of them are to support Graphics drivers. This happened because the Upstream Kernel didn’t support everything that is needed by Android. However the Mainline Graphics Stack has evolved in the last few years and features like Atomic Modesetting and Explicit Fencing support are making the dream of running Android on top of it possible. In other words, we will have Android and Mainline Kernels sharing the same Graphics stack!

This talk will cover what has been happening both on Android and Mainline Graphics Stacks in order to get Android to use the Upstream Kernel by default, going from what Android have developed to workaround the lack of upstream support to the latest improvements on the Mainline Graphics Stack and how they will fit together.

  • 16:30 – 17:20 – Developing Audio Products with Cortex-M3/NuttX/C++11, by Masayuki Ishikawa, Sony

Sony released audio products with Cortex-M3 in late 2015. Considering development efficiency, code reusability, feature enhancements and training costs, we decided to port POSIX-based open source RTOS named NuttX to ON Semiconductor’s LC823450 by ourselves, modified the NuttX for fast ELF loading, implemented minimum adb (Android debug bridge) protocols for testing purpose, DVFS in autonomous mode with a simple CPU idle calculation, wake_lock and stack trace which are popular in Linux/Android worlds. Middleware and Applications were developed in C++11 with LLVM’s libc++ which are also popular for large software systems. To debug the software, we implemented NuttX support for OpenOCD so that we can debug multi threaded applications with gdb. In addition, we used QEMU with the NuttX to port bluetooth stack and in-house GUI toolkit and finally got them work before we received LC823450 FPGA.


That’s all. I had to make choice, and did not include some sessions I found interested due to scheduling conflicts such as “Comparing Messaging Techniques for the IoT” by Michael E Anderson, The PTR Group, inc, and “Improving the Bootup Speed of AOSP” by Bernhard Rosenkränzer, Linaro.

You’ll need to register and pay an entry fee if you want to attend the Embedded Linux Conference & OpenIoT Summit:

  • Early Registration Fee: US$550 (through January 15, 2017)
  • Standard Registration Fee: US$700 (January 16, 2017 – February 5, 2017)
  • Late Registration Fee: US$850 (February 6, 2017 – Event)
  • Academic Registration Fee: US$175 (Student/Faculty attendees will be required to show a valid student/faculty ID at registration.)
  • Hobbyist Registration Fee: US$175 (only if you are paying for yourself to attend this event and are currently active in the community)

Linux 4.8 Release – Main Changes, ARM & MIPS Architectures

October 4th, 2016 4 comments

Linus Torvalds has officially released Linux 4.8 last Sunday:

So the last week was really quiet, which maybe means that I could probably just have skipped rc8 after all. Oh well, no real harm done.

This obviously means that the merge window for 4.9 is open, and I appreciate the people who already sent in some pull requests early due to upcoming travel or other reasons. I’ll start pulling things tomorrow, and have even the most eager developers and testers hopefully test the final 4.8 release before the next development kernels start coming 😉

Anyway, there’s a few stragging fixes since rc8 listed below: it’s a mixture of arch fixes (arm, mips, sparc, x86), drivers (networking, nvdimm, gpu) and generic code (some core networking, with a few filesystem, cgroup and and vm things).

All of it pretty small, and there really aren’t that many of them. Go forth and test,
Linus

Linux 4.7 introduced support for AMD Radeon RX480 GPUs, parallel directory lookups, the new “schedutil” frequency governor with lower latency, EFI ‘Capsule’ firmware updates, and much more.

linux-4-8-changelogSome notable Linux 4.8 changes include:

  • HDMI-CEC framework
  • Kernel documentation system is now based on Sphinx
  • GPIO subsystem has a new user-space ABI for the management of general-purpose I/O lines; it is based on char devices and replaces the long-deprecated sysfs interface. You can check out tools/gpio/ directory with lsgpio, gpio-hammer, and gpio-event-mon for examples
  • Various file systems improvements for Btrfs, EXT-4 (unified encryption), OrangeFS (better in-kernel caching), Ceph (RADOS namespace support), XFS (Reverse-mapping support), etc…

Some improvements and new features specific to the ARM architecture and corresponding hardware platforms:

  • Allwinner:
    • Allwinner A10/A20 – Display engine clocks (TCON, FE, DE), I2S audio interface (ASoC) driver, added NFC node to DTS
    • Allwinner H3 – Clocks (through sunxi-ng), USB multi-reset lines support
    • AXP2xx driver – External drivebus support, AXP223 USB power supply support, AXP809 PMIC support
    • Broadcom BCM53125 support as it’s used in Lamobo / Banana Pi R1 router board.
    • New boards – Polaroid MID2407PXE03 & inet86dz (Allwinner A23 tablets), Banana Pi M1+, Banana Pi M2+, Allwinner Parrot (Allwinner R16 EVB)
  • Rockchip:
    • Many new peripherals added to RK3399 (eDP, clock controller, etc…)
    • Preparations to use generic DMA mapping code in the Rockchip IOMMU driver
    • Fixes for eMMC controller, SPI controller, eDP controller, and I2C
  • Amlogic
    • AmLogic meson8b clock controller (rewritten)
    • AmLogic gxbb clock controller
    • Reset controller driver for Amlogic Meson
    • New watchdog driver for Amlogic Meson GXBB (S905) SoC
    • Added support for Amlogic Meson RNG in crypto drivers
    • Some Amlogic ARM64 DTS updates
  • Samsung
    • Enable drivers for Exynos7 and Exynos5433 based boards: S2MPS clock driver, SoC: RTC, SPI, watchdog, EHCI, OHCI, DWC3, ADC and PWM, Enable Samsung SoC sound
    • Samsung ARM64 DTS Changes – Adjust the voltage of CPU buck regulator so scaling could work.
    • Samsung DTS changes
      • Add missing async bridge for MFC power domain on Exynos5420. This fixes imprecise abort on s5p-mfc re-bind.
      • Define regulator supplies for MMC nodes on Exynos4412 Odroid boards and for TMU on Exynos542x Peach boards.
      • Thermal cleanups on Odroid XU3-family (Exynos5422).
      • Enable AX88760 USB hub on Origen board (Exynos4412)
      • Disable big.LITTLE switcher so the cpufreq-dt could be enabled.
      • Enable Samsung media platform drivers.
      • Enable some board-specific drivers for boards: Trats2, Universal C210.
      • Enable Virtual Video Test Driver on nulti_v7 and exynos defconfigs. Useful for testing
    • Samsung drivers/soc updates:
      • Move the power domain driver from arm/mach-exynos and prepare for supporting ARMv8.
      • Add COMPILE_TEST.
      • Make SROMC driver explicitly non-module.
      • Endian-friendly fixes.
      • Fix size of allocation for Exynos SROM registers (too much was allocated)
    • Add CEC interface driver present in the Samsung Exynos SoCs
    • Added support for Exynos 5410 Odroid XU board
  • Qualcomm
    • Added MDM9615 support
    • Qualcomm ARM Based Driver Updates:
      • Rework of SCM driver
      • Add file patterns for Qualcomm Maintainers entry
      • Add worker for wcnss_ctrl signaling
      • Fixes for smp2p
      • Update smem_state properties to match documentation
      • Add SCM Peripheral Authentication service
      • Expose SCM PAS command 10 as a reset controller
      • Fix probe order issue in SCM
      • Add missing qcom_scm_is_available() API
    • Qualcomm ARM64 Updates
      •  Enable assorted peripherals on APQ8016 SBC
      • Update reserved memory on MSM8916
      • Add MSM8996 peripheral support
      • Add SCM firmware node on MSM8916
      • Add PMU node on MSM8916
      • Add PSCI cpuidle support on MSM8916
    • Qualcomm Device Tree Changes:
      • Reverse BAM dma node reverts
      • Add BAM remote control options for affected platforms
      • Enable peripherals on APQ8074 dragonboard
      • Enable PMA8084 pwrky
      • Fix PMIC reg entries by removing unnecessary size element
      • Add SCM binding and support for all currently supported boards
      • Add Qualcomm WCNSS binding documentation
      • Rename db600c to SD_600eval and add peripheral nodes
      • Remove gpio key entry from Nexus7
      • Add APQ8060 based dragonboard and associated peripherals
      • Add ARMv7 PMU for IPQ4019
      • Update smem state cells to match documentation
    • ARM64 defconfig: Enable PM8xxx pwrkey support, enable MSM8996 support
    • ARM defconfig: Enable MSM9615 board support, enable MSM8660 pinctrl support
  • Mediatek
    • Added Mediatek MT6755
    • Display subsystem added to MT8173
    • Support for Mediatek generation one IOMMU hardware
    • New drivers for Mediatek MT6323 regulator
    • new encoding codec driver for Mediatek SoC (linux-media): H.264/VP8/V4L2 video encoder drivers for MT8173
  • ARM64 – arm64 architecture has gained support for the kexec mechanism (allowing one kernel to boot directly into another) and kernel probes.
  • Other new ARM hardware or SoCs – NXP i.MX 7Solo, Broadcom BCM23550, Cirrus Logic EP7209 and EP7211 (clps711x platforms), Hisilicon HI3519, Renesas R8A7792, Apalis Tegra K1 board, LG LG1313, Renesas r8a7796, Broadcom BCM2837 (used in Raspberry Pi 3)

MIPS architecture changelog:

  • Fix memory regions reaching top of physical
  • MAAR: Fix address alignment
  • vDSO: Fix Malta EVA mapping to vDSO page structs
  • uprobes: fix incorrect uprobe brk handling, select HAVE_REGS_AND_STACK_ACCESS_API
  • Avoid a BUG warning during PR_SET_FP_MODE prctl
  • SMP: Fix possibility of deadlock when bringing CPUs online
  • R6: Remove compact branch policy Kconfig entries
  • Fix size calc when avoiding IPIs for small icache flushes
  • Fix pre-r6 emulation FPU initialisation
  • Fix delay slot emulation count in debugfs
  • CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems
  • CPS: Avoid BUG() when offlining pre-r6 CPUs
  • DEC: Avoid gas warnings due to suspicious instruction scheduling by manually expanding assembler macros.
  • FTLB: Fix configuration by moving configuration after probing, clear execution hazard after changing FTLB enable
  • Highmem: Fix detection of unsupported highmem with cache aliases
  • I6400: Don’t touch FTLBP chicken bits
  • microMIPS: Fix BUILD_ROLLBACK_PROLOGUE
  • Malta: Fix IOCU disable switch read for MIPS64
  • Octeon: Fix probing of devices attached to GPIO lines, fix kernel header to work for VDSO build, fix initialization of platform device probing.

You can find the full list of changes in Linux 4.8 changelog with comments only generated using git log v4.7..v4.8 --stat. A list of changes for Linux 4.8 will also soon be found on kernelnewbies.org.

Amlogic S905 Source Code Published – Linux, U-Boot, Mali-450 GPU and Other Drivers

November 19th, 2015 46 comments

Amlogic has an open linux website where they regurlarly release GPL source code, and with Amlogic S905 devices coming to market, they’ve released a few tarballs at the beginning of the month including Linux 3.14 source code, U-boot source code, and Mali-450MP GPU kernel source code (obviously not userspace), as well as some other drivers for WiFi, NAND flash, PMU, TVIN, etc…
Amlogic_S905_Linux_MenuconfigLet’s get to the download links:

I quickly tried to build the Linux source. If you’ve never build a 64-bit ARM kernel or app before, you’ll fist need to install the toolchain. I installed the one provided with Ubuntu 14.04:

Now extract the tarball and enter the source directory:

At first I had a build failure due to a missing directory, so I created it, and use the default config for Amlogic S905/S912 (in arch/arm64/configs), before building the Linux kernel.

and it ended well:

So that’s a good starting for anybody wanting to work on the Android or Linux kernel…

Unrelated to Amlogic S905/Meson64, but I’ve also noticed some OpenWRT packages and rootfs  on Amlogic website that was released a little earlier this year. So either some people are using Amlogic Sxxx processors with OpenWRT, or Amlogic is working on a router chip that I missed. Probably the former.

Thanks to Olin.

TBS5520 Multi-Standard Tuner Box and Linux Drivers

November 14th, 2015 27 comments

TBS Technologies is a company that specializes in digital TV tuner cards for PC, and recently they’ve also worked on ARM based boards or devices such as the Matrix 2. The company has sent me one of their TBS5520 USB tuner board and box supporting DVB-T2, DVB-S2, DVB-C and ISDB-T for evaluation, as well as some Linux drivers. Today, I’ll provide some specifications, take some pictures, and show how I compiled and installed the drivers in my Ubuntu 14.04 computer.

TBS 5520 Tuner Box specifications

TBS5520 is a multi-standard USB tuner with the following features:

  • USB – USB 2.0 device port
  • Antenna connectors – 1x LNB IN, 1x RF IN
  • Standards
    • DVB-S2/S
      • Symbol rate: 1~45Msps;
      • FEC
        •  DVB-S2: 8PSK: 3/5, 2/3, 3/4, 4/5, 5/6, 8/9, 9/10;
        • DVB-S:  QPSK: 1/2, 2/3, 3/4, 5/6, 7/8
    • DVB-T2/T 
      • Receiving channel: VHF band, UHF band;
      • Bandwidth: 1.7,5, 6, 7, 8 MHz;
      • FEC: QPSK, 16QAM, 64QAM, 256QAM
      • FFT mode: 1K, 2K, 4K, 8K, 16K, 32K
      • Code rate: 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 7/8
      • RF-Input impedance: 75Ω (IEC-DIN female)
    • DVB-C & ITU J83 A/B/C
      • Frequency range: 47~862 MHz
      • Signal level: -65~-10dBm
      • Symbol rate: 0.87 to 9Mbaud
      • QAM modes: 16QAM, 32QAM, 64QAM, 128QAM, 256QAM
    • ISDB-T
      • Supported modes: 1, 2, 3
      • Bandwidth: 6 MHz, 7MHz, 8MHz
      • QAM modes: DQPSK, QPSK, 16QAM, 64QAM
      • Code rate: 1/2, 2/3, 3/4, 5/6, 7/8
  • Misc – IR receiver, power LED
  • Dimensions – ~ 8 x 6 cm

TBS5520 Board and Box Pictures

The first time I received the board with a cable with Y USB cable.

TBS-5520_Tuner

Click to Enlarge

Click to Enlarge

DVB-S2_DVB-T2_Connectors

TBS 5520 Tuner Antenna’s Connectors

Click to Enlarge

Click to Enlarge

The shield is soldered, so I could not check the details of the tuner from the hardware, but as we”l see below with drivers to hardware includes RafaelMicro R848 multi-standard tuner and AVL6882 demodulator.

After your truly spent many hours struggling with the Linux drivers, the company informed me there was likely an issue with the hardware, so they sent me the full kit.
TBS5520_USB_Tuner

Click to Enlarge

Click to Enlarge

The kit has the same tuner board in a case, as well as the Y USB cable, a remote control, an indoor antenna, a coaxial to F-cable adapter, and a DVD with some documentation and software.

Building TBS5520 Drivers in Linux 3.x

I’m running Ubuntu 14.04.3 with kernel 3.18.xx on my computer, and if you connect the tuner, the USB is recognized:

But you don’t get anything in /dev/dvb, so you’ll need some drivers. So TBS provided me with a patch for Linux 3.x (Linux 4.x is currently WIP), and told me to “build it the usual way”. So I decided to do so on my computer instead of an ARM board, as I thought it might be easier…

I basically followed the instructions I wrote in “How to build a single kernel driver in Ubuntu“. I had already installed Linux 3.18.0 for this, but I first upgraded to a more recent Linux 3.18.23 version:

After installation, I rebooted my machine to make use of the update kernel, and downloaded Ubuntu Linux source code in order to patch it and build the drivers.

At this stage, the source is set to the latest working version

So you’ll want to switch to the tag/branch of the kernel installed on your computer to avoid “invalid format” error when inserting the modules.

Let’s make sure we’ve indeed switched to 3.18.23.

Now I’ll download and apply Ubuntu specific patchsets:

Before applying TBS5520 patch to the source tree:

Patching failed, but it was only a small issue, so you can manually edit drivers/media/tuners/Makefile to add the line with r848:

Let start the actually build procedure with make olconfig, which should ask about Turbosight TBS5520 support.:

Build TBS5520 drivers as modules by entering “m”, and carry on with the procedure:

At this stage, I ran make menuconfig to double check support for TBS5520 was enabled.
TBS5520_Make_Menuconfig

All good. Then I tried to build the modules one by one, as with the serial drivers I used in the previous instructions, but it did not work…

Eventually, I did not find a solution, and TBS was not very helpful, except they told me the media tree drivers were a pain to build, and  eventually mentioned I’d also need a firmware file (dvb-usb-tbsqbox-id5520.fw) and copy it to /lib/firmware… .

So I decided to just build the complete kernel and install all modules and firmware:

All modules where built into /lib/modules/3.18.23+/ directory, and i first tried to load the modules manually

Hmm… wrong file name for the firmware… let’s fix that:

I had a few more issues, and I’ve told to delete the media directory in my Ubuntu kernel drivers directory, and replace that with the one I’ve just built. So instead, I backed it up, before replacing it with the new drivers:

Then I rebooted the machine, all drivers were automatically loaded successfully, and I got a dvb adapter:

InitiallyHowever the output of dmesg appears suspicious:

There are some i2c errors, the MAC address is set to 00:00:00:00:00:00, and some systemd errors are popping up too. And soon after, I noticed /dev/dvb/adapter0 would just appear and disappear in loop.

The next step will be to find a solution to this issue, and get a DVB-T2 video stream likely with TvHeadEnd.

The tuner can be purchased for $79.99 on buydvb.net, and you can to check out TBS5520 tuner page for some more details.

Linux 4.2 Release – Main Changes, ARM and MIPS Architectures

September 2nd, 2015 No comments

Linus Torvalds released Linux Kernel 4.2 last Sunday:

So judging by how little happened this week, it wouldn’t have been a mistake to release 4.2 last week after all, but hey, there’s certainly a few fixes here, and it’s not like delaying 4.2 for a week should have caused any problems either.

So here it is, and the merge window for 4.3 is now open. I already have a few pending early pull requests, but as usual I’ll start processing them tomorrow and give the release some time to actually sit.

The shortlog from rc8 is tiny, and appended. The patch is pretty tiny too.

Go get it,

Linus

Some notable changes made to Linux 4.2 include:

  • File systems
    • New features for F2FS including per file encryption
    • CIFS support SMB 3.1.1 (experimental)
  • Cryptography – Jitter Entropy Random Number Generator, Chacha20 stream cipher and Poly1305 authentication (RFC7539),New RSA implementation. See lwn.net for details.
  • AMD GPU driver added support for AMD “Tonga,” “Iceland,” and “Carrizo” systems. That driver has now over 400,000 lines of code…
  • Networking

Some of the new features and improvements specific to the ARM architecture include (With a focus on Allwinner/Rockchip/Amlogic/Mediatek processors often discussed in this blog):

  • Allwinner:
    • A10/A10s/A13/A20/A31/A23 – SRAM Controller
    • A23 – SMP support, architected timer support
    • A31/A31s – CPUFreq support
    • A33 – Machine support, Bring-up sharing most drivers with A23, pinctl driver, PIO controller
    • A80 – Architected timer support, USB support
    • AXP221 PMIC driver
    • New boards and devices: LinkSprite pcDuino3 Nano, Cubietech Cubieboard4, Gemei G9, Auxtek T004, Utoo P66, Wexler TAB 7200, MK808C, Jesurun Q5, Xunlong Orange Pi, Xunlong Orange Pi Mini, Sinlinx SinA33
  • Rockchip
    • Fixes for GPU DRM driver
    • RK3368 – Added pinctrl and Ethernet (dwmac) support
    • Device tree – Files relicensed under GPLv2/X11 dual-license, Enable A12 HW PMU events in RK3288 boards, and TSADC for Firefly and PopMetal boards
    • Fixed IR receiver bug and modify some GPIO code in RK3288
  • Amlogic – Added documentation to the clock controller… nothing else.
  • Mediatek
    • Fixed clock registration in MT8135
    • Small changes and fixes to pinctrl driver
    • Added driver for Mediatek MT8173 I2C controller
    • Some fixes for PMIC
    • MT7601U driver (WiFi device)
    • Pinctrl driver for MT8127, MT6397,
  • Qualcomm
    • Added SPMI PMIC Arbiter device tree node for MSM8916
    • Added 8×16 chipset SPMI PMIC’s nodes
    • Added MSM8916 restart device node
    • Added initial set of PMIC and SoC pins for APQ8016 SBC board
  • Samsung
    • Fix exynos3250 MIPI DSI display and MIPI CSIS-2 camera sensor
    • Bring back cpufreq for exynos4210
  •  ARM64
    • New processors: Hisilicon ARM64 SoCs (e.g. Hi6220)
    • Various fixes for ARM64 for ACPI, MMU, SMP, perf, and more.
    • Enabled EDAC on ARM64
    • Support for Hikey board, ARM Juno r1 board
  • Various changes to some Atmel and Marvell processors, see Free Electrons blog post for details.
  • Other new ARM SoCs & hardware platforms – Freescale i.MX 7Dual, ZTE ZX29670, Buffalo WXR-1900DHP, ASUS RT-AC87U, SmartRG SR400ac, Compulab CM-A510, and more

There has also been some interesting changes for the MIPS architecture:

  • many bug fixes: LLVM build issue, KVM fixes, fix seccomp MIPS64, fix for oprofile (get_c0_perfcount_int), Fix JR emulation for R6, etc…
  • Some code cleanups (fixed misspellings, removes some code)
  • Added support for appended DTP
  • Improvements for R12000, R3000, Broadcom BCM47xx and BCM63xx,  ATH79
  • Large patchset for Ingenic JZ4740 SoC
  • Added support to Pistachio SoC
  • New MIPS platforms: MIPS Creator CI20 board and XWR-1750 board

A complete changelog for Linux 4.2 should soon be published on Kernelnewbies.org, and you’ll probably also want to look at their ARM architecture and drivers sections for more details about to various platforms including ARM and MIPS. I’ve also generated a complete Linux 4.2 Changelog with comments only (13.9MB) using git (git log v4.1..v4.2 --stat)