Archive

Posts Tagged ‘drivers’

Linux 3.9 Release

April 29th, 2013 No comments

Linus Torvalds has announced the release of Linux Kernel 3.9:

So the last week was much quieter than the preceding ones, which makes me suspect that one reason -rc7 was bigger than I liked was that people were gaming the system and had timed some of their pull requests for just before the release, explaining why -rc7 was big enough that I didn’t  actually want to do a final release last week. Please don’t do that.

Anyway. Whatever the reason, this week has been very quiet, which makes me much more comfortable doing the final 3.9 release, so I guess the last -rc8 ended up working. Because not only aren’t there very many commits here, even the ones that made it really are tiny and not pretty obscure and not very interesting.

Also, this obviously means that the merge window is open. I won’t be merging anything today, but if you start sending me your pull requests (Konrad already sent in his Xen pull request for the 3.10 merge window a week ago), tomorrow the flood gates start opening..

Linux 3.8 brought file systems enhancement for Btrfs, XFS and ext-4, introduce F2FS file system, memory management improvement, and the removal for i386 support.

Linux 3.9 brings the following key changes (Sources H-Online and Phoronix):

  • File-system improvements:
    • Btrfs has experimental RAID5/6 support and fsync performance improvements.
    • EXT-4 bug fixes for corruption issue, and JBD2 journaling layer issue which affected performance.
    • Various improvements for F2FS file-system.
  • Added ability to use SSDs as hard-disk cache.
  • Update the latest LZO compression implementation within the kernel. Decompression and compression performance has been massively improved and x86 and ARM targets.
  • Improved power management, including “lightweight suspend” (aka “suspend freeze”) mode.
  • Improved ARM SoC support
    • Added Nvidia Tegra 4 support including support for Dalmore and Pluto development boards.
    • Added Nvidia Tegra 3 Beaver Board support
    • Kernel-based Virtual Machine (KVM) support for ARMv7 (Cortex A15 required)
  • Mainlining of Google’s Goldfish virtual CPU.
  • Initial ARC Linux support. See commit.
  • Added support for Imagination Meta ATP (Meta 1) and HTP (Meta 2)
  • Graphics drivers updates – Nouveau, the open-source reverse-engineered NVIDIA Linux graphics driver, is faster for some Linux OpenGL games. There’s also some Intel OpenGL performance changes.
  • Support for Intel 7000 Wi-Fi components supporting 802.11ac.
  • CONFIG_EXPERIMENTAL kernel configuration option has been removed

More details about Linux 3.9 will be available on Kernelnewbies.org (which is currently down).

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Ubuntu Linaro 12.11 with 2D/3D Mali-400 GPU Acceleration on ODROID-X Development Board

February 19th, 2013 34 comments

A few days ago, Hardkernel released the first version of Ubuntu 12.11 (Linaro) with Mali-400 GPU support for their ODROID boards (ODROID-X/X2, ODROID-U/U2). This is still WIP (Work in Progress), but this is one of the few boards together with Pandaboard, Origen and Snowball that can support 2D/3D GPU acceleration in Ubuntu Quantal. Since I have an ODROID-X development board, I decided to give it a try. There are different ways to install it. I chose the way that is most convenient for me (LCD display instead of HDMI), and likely to yield more performance (eMMC instead of SD Card). The current installation instructions to eMMC are extremely cumbersome and you have to go through 5 main steps:

  1. Install Android (yes, seriously) in the eMMC
  2. Install Ubuntu in the SD Card
  3. Install Ubuntu to the eMMC
  4. Upgrade Ubuntu to the latest version
  5. Install the Mali drivers

In this post I’m going to go through all those steps, and do some testing for eMMC and 2D/3D performance. If you just want to boot Ubuntu from SD, simply skip steps 1 and 3. For eMMC installation, I followed the “eMMC Ubuntu” guide on odroid forums, as well as the instructions on the release post to install Mali drivers, and enable 2D/3D acceleration in Ubuntu. Similar instructions are also available for ODROID-X2 and ODROID-U2.

You’ll need an 8GB SD Card or greater to complete all the steps.

Installing Android to ODROID-X

  • Insert the SD card in a Linux PC, and find your SD card device:
sudo blkid
/dev/sda1: UUID="9c042788-fa75-4fc4-9b12-598c809410e8" TYPE="ext4"
/dev/sda5: UUID="fa4d6d7d-311a-4570-a498-96394b828e01" TYPE="swap"
/dev/sdb1: LABEL="SEAGATE EXTENSION" UUID="C0588ADB588AD018" TYPE="ntfs"
/dev/sdc: LABEL="Ubuntu_ODROID-X" UUID="f04f2d56-86a6-44ad-9b63-854714ab78fd" TYPE="ext4"
  • Download & extract the Android Installer, and write it to your SD card with dd or dd.sh script:
wget http://dn.odroid.com/Android_Alpha_4.0.2/x/emmc_installer_for_odroidx.zip
unzip emmc_installer_for_odroidx.zip
sudo dd.sh if=emmc_installer_for_odroidx.img of=/dev/sdc

If you use Windows, do it with Win32DiskImager. Back in the times when I still used Windows and Win32DiskImager, I never had problems myself, but some people apparently have, and Hardkernel released an improved version of Win32DiskImager to verify the copy.

Then insert the SD card in your ODroid-X board, connect a Jumper on SD/MMC connector (JP2) to boot from SD card, and install the latest version of Android. During installation I had no display on the 10″ LCD display, and the board simply powered itself off after a while. Not sure this is normal, but after removing the Jumper, I could boot to Android (3-Jan-2013 build) from the eMMC.

Installing Ubuntu 12.11 for ODROID-X to the SD card

Now take the SD card back to your Linux computer to copy the Ubuntu image:

  • For LCD display:
wget http://dn.odroid.com/Ubuntu_X/20130128/odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img.xz
  • For HDMI Display:
wget http://dn.odroid.com/Ubuntu_X/20130128/odroidx_20130128-linaro-ubuntu-desktop_SD_with_HDMI.img.xz

I’ll carry on with the LCD image since this is what I use, but the step for HDMI are the same, just replace the filename:

7z x odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img.xz
sudo dd.sh if=odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img of=/dev/sdc

Inset the SD card in ODroid-X board, insert the Jumper in JP2 to boot from SD card to verify Ubuntu 12.10 boots correctly.

Install Ubuntu to ODROID-X eMMC Module

Once you’ve verified Ubuntu boots correctly from the SD Card, put the SD card back in your PC and copy odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img.xz to the rootfs. In my PC running Ubuntu 12.04, it will automount it to /media/rootfs:

sudo cp odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img.xz /media/rootfs
umount /media/rootfs

Once umount is successfully (which means the data is fully written to the SD card), you can insert it back into your ODroid-X board to install Ubuntu 12.10 to your eMMC. First locate your eMMC device with:

ls /dev/mmcblk*

The eMMC is the device with with boot0/boot1, as well as p1/p2/p3/p4. In my case, it’s mmcblk0. Once you know this, copy Ubuntu to the eMMC by using the following command in a terminal:

sudo xzcat /odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img.xz | sudo dd of=/dev/mmcblk0 bs=4M
sync

Once sync is complete, power off the board, remove the Jumper on JP2, and start Ubuntu.

Ubuntu Quantal in ODROID-X Board

Ubuntu Quantal in ODROID-X Board

Upgrading Ubuntu (15 Feb)

Before we can use Mali-400MP4 GPU in Ubuntu, you must install an update for Ubuntu (Feb 15, 2013):

wget http://dn.odroid.com/Ubuntu_X/20130215/linux-3.0.63-odroidx_20130215.tar.gz
tar xvfz linux-3.0.63-odroidx_20130215.tar.gz
cd linux-3.0.63-odroidx_20130215
sudo ./install.sh
sync
sudo reboot

If you are using the Wi-Fi module from Hardkernel (and probably others), run those 2 commands:

sudo depmod -a
sudo reboot

Installing Mali Drivers for ODROID-X Board

Mali-400MP4 drivers are not included in the image, most probably for legal reasons, and you have to accept an End-User-License-Agreement (EULA) during installation (dkpg). Let’s do this:

wget http://dn.odroid.com/MALI400_R3P2/20130215/mali_packages.tar.gz
tar xvfz mali_packages.tar.gz
cd mali_packages
sudo dpkg -i mali400_2.1-13_armhf.deb
sudo dpkg -i mali400-dev_2.1-13_armhf.deb
sudo dpkg -i xf86-video-mali_1.0.1-7_armhf.deb
sudo rm -fr /usr/lib/arm-linux-gnueabihf/mesa-egl
sync

If you are outputting to an HDMI monitor, the installation should be complete at this stage. In my case I could only the 4 tux and nothing else showed up on the display. I could however access the command line via the serial console. After further reading, I found out I had to modify /usr/share/X11/xorg.conf.d/99-hkl_mali.conf to make it work with the LCD display as follows:

Option   "fbdev"          "/dev/fb0"
.......
DefaultDepth   24

Ubuntu Linaro 12.11 Performance in ODROID-X

The first thing I’ve noticed is that Ubuntu feel snappy with this hardware, at least snappier than in my Atom netbook running Ubuntu 12.04, and it’s the first time I could see myself using this platform as a desktop replacement. Booting from power off takes 15 to 20 seconds. There are still some issues though. Once of them is that software-center is not working when run from the eMMC (SD card is OK). Even though this post is mainly about GPU support, I’ve compared startup times from eMMC and SD card with Libreoffice Writer, Software Center, and Firefox

Libreoffice Writer was not pre-installed, so I installed it first:

sudo apt-get install libreoffice-writer
Firefox Software Center Libreoffice Writer
SD Card 5s 18s 11s
eMMC 3s Does not start 5s

Each program was started after a reboot. We can notice there’s a significant advantage of using eMMC instead of SD card when it comes to startup time.

I’ve also done several 2D/3D tests.

I started with es2gears, which comes in the provided Ubuntu image:

es2gears
EGL_VERSION = 1.4 Linux-r3p2-01rel0
vertex shader info:
fragment shader info:
info:
483 frames in 5.0 seconds = 96.561 FPS
427 frames in 5.0 seconds = 85.230 FPS
395 frames in 5.0 seconds = 78.827 FPS
394 frames in 5.0 seconds = 78.580 FPS
379 frames in 5.0 seconds = 75.664 FPS
373 frames in 5.0 seconds = 74.570 FPS
363 frames in 5.0 seconds = 72.585 FPS
352 frames in 5.0 seconds = 70.245 FPS
332 frames in 5.0 seconds = 66.387 FPS
317 frames in 5.0 seconds = 63.273 FPS
297 frames in 5.0 seconds = 59.341 FPS
298 frames in 5.0 seconds = 59.469 FPS
279 frames in 5.0 seconds = 55.722 FPS
280 frames in 5.0 seconds = 55.855 FPS
263 frames in 5.0 seconds = 52.505 FPS
260 frames in 5.0 seconds = 51.875 FPS
251 frames in 5.0 seconds = 50.090 FPS
237 frames in 5.0 seconds = 47.230 FPS

It appears to work, but the window background is transparent, and although the frame rate starts at 96.651, it just decreases which each iteration… Not sure what that means…

I’ve also installed glmark2-es2

sudo apt-get install glmark2-es2

glmark2-es2 2D/3D GPU Benchmark in ODROID-X Development Board

glmark2-es2 2D/3D GPU Benchmark in ODROID-X Development Board

run it, and got a score of 54:

linaro@linaro-ubuntu-desktop:~$ glmark2-es2
=======================================================
glmark2 2012.08
=======================================================
OpenGL Information
GL_VENDOR:     ARM
GL_RENDERER:   Mali-400 MP
GL_VERSION:    OpenGL ES 2.0
=======================================================
[build] use-vbo=false: FPS: 52 FrameTime: 19.231 ms
[build] use-vbo=true: FPS: 54 FrameTime: 18.519 ms
[texture] texture-filter=nearest: FPS: 57 FrameTime: 17.544 ms
[texture] texture-filter=linear: FPS: 57 FrameTime: 17.544 ms
[texture] texture-filter=mipmap: FPS: 57 FrameTime: 17.544 ms
[shading] shading=gouraud: FPS: 57 FrameTime: 17.544 ms
[shading] shading=blinn-phong-inf: FPS: 57 FrameTime: 17.544 ms
[shading] shading=phong: FPS: 54 FrameTime: 18.519 ms
[bump] bump-render=high-poly: FPS: 46 FrameTime: 21.739 ms
[bump] bump-render=normals: FPS: 58 FrameTime: 17.241 ms
[bump] bump-render=height: FPS: 57 FrameTime: 17.544 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 56 FrameTime: 17.857 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 56 FrameTime: 17.857 ms
[pulsar] light=false:quads=5:texture=false: FPS: 58 FrameTime: 17.241 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 40 FrameTime: 25.000 ms
[desktop] effect=shadow:windows=4: FPS: 53 FrameTime: 18.868 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 37 FrameTime: 27.027 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[ideas] speed=duration: FPS: 53 FrameTime: 18.868 ms
[jellyfish] <default>: FPS: 56 FrameTime: 17.857 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 57 FrameTime: 17.544 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 57 FrameTime: 17.544 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 57 FrameTime: 17.544 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 57 FrameTime: 17.544 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 58 FrameTime: 17.241 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
=======================================================
glmark2 Score: 54
=======================================================

Some test failed. I’m not sure if it’s because those are not implemented yet, or simply not supported by Mali-400. One interesting point is that ODROID-U2 users reports that Xubuntu is twice as fast as Ubuntu in glmark2-es2, and the culprits appear to be Unity and Compiz.

I’ve done another test to check whether WebGL would work, and I’ve got between 0 to 1 fps on both Firefox and Chromium with WebGL Aquarium. A final comment, since many people still seem to be confused with GPU and video decoding. The Mali-400 does not handle video decoding, this is done normally done by the Video Processing Unit (VPU), and AFAIK this is not currently supported in Linux on ODROID boards.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

A Selection of FOSDEM 2013 Events

February 1st, 2013 No comments

FOSDEM is a 2-day (or 3 if you include Friday beer event) event where over 5,000 members of open source communities meet, share ideas and collaborate. It’s free to attend, and there’s no registration, so you just show up to attend. FOSDEM 2013 takes place on Feb 2-3 (yep, this week-end) in Brussels

There are 7 main tracks where sessions are organized:

  • fosdem logoOperating systems
  • Open source challenges
  • Security Janson
  • Beyond operating systems
  • Web development
  • Miscellaneous
  • Robotics

There are also keynotes and devroom for a total of 488 sessions. Developers rooms that may particularly be of interest to readers of this blog are:

All in all that’s a lot of sessions, and even though I won’t attend, I’m going to select a few from the main tracks:

This talk introduces the Fedora ARM Project and in particular the work we are doing to bring Fedora to emerging 64-bit ARM server systems.

Where are we today, one year after the unveiling of the Lima driver. This talk will cover the Lima driver (ARM Mali 200/400), but also other open source GPU driver projects such as the freedreno driver (Qualcomm Adreno), open source driver for Nvidia Tegra, etnaviv project (Vivante GC) and cover the status for Broadcoms Videocore and Imaginations PowerVR GPUs.

Based on the speaker’s experience of getting the support for the new Armada 370 and Armada XP ARM processors from Marvell into the mainline Linux kernel, this talk will detail the most important steps involved in this effort, and through this, give an overview of those changes and summarize the new rules for ARM Linux support.

  • Sunday 11:00 – 11:50 – Firefox OS by Jonas Sicking

Firefox OS is the next product being developed by Mozilla. It’s an open source OS based on the web and following the principals which have made the web a success. A phone running recent builds of Firefox OS (it’s not a finished product yet) will be demoed, and  the technologies and ideas behind Firefox OS will be discussed.

The systemd project is now two years old (almost three). It found adoption as the core of many big community and commercial Linux distributions. It’s time to look back what we achieved, what we didn’t achieve, how we dealt with the various controversies, and what’s to come next.

How Aldebaran Robotics is using open source on their NAO robot.

This talk will provide an overview of the Robot Operating System (ROS), an open software integration framework for robots.

This talk describes how the automotive industry has moved to embedded Linux and Open Source to develop the next generation of In-Vehicle Infotainment (IVI) and how it has met the challenges along the way.

What, why, when, where and how SecureBoot changes the way we build F/LOSS

 

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Posibus Peripheral Emulator Powered by Emcraft SmartFusion (Cortex M3 + FPGA) Solutions

January 17th, 2013 No comments

According to Wikipedia, Digital Equipment Corporation (DEC) PDP-8 was the first successful commercial minicomputer, and was introduced in March 1965. Mike Thompson, working at Rhode Island Computer Museum (RICM), has restored a PDP-8/L system that was sold between 1968 through 1971. The system can be expanded with 4K of core, a paper tape reader (PR8/L), and/or a punch (PP8/L) controller. But the tape reader is not available anymore, so Mike decided to designe a Posibus peripheral (Tape Reader) emulator using a board with an FPGA + micro-controller. The easiest way to perform this task was to get an SoC that comes with an MCU and a FPGA to avoid having to create an FPGA <-> MCU interface. This is why he chose Emcraft Linux SmartFusion Evaluation Kit featuring a Microsemi Smartfusion cSOC with a Cortex M3 core and an embedded FPGA. The whole setup is shown below.

PDP-8L (Background) Connected to Emcraft Smartfusion Kit (Bottom Left) via a Wire Wrap Board (Bottom Center)

PDP-8L (Background) Connected to Emcraft Smartfusion Kit (Bottom Left) via a Wire Wrap Board (Bottom Center)

Three FlipChip interface boards are fitted inside the PDP-8/L, and connected to a Wire-Wrap board via 3 pairs of 34-pin ribbon cables. The signals then go through  2x 74LVC245 ICs for +5V (Posibus) to +3.3v (Emcraft board) conversion to be handled by Emcraft boards. Signals from Emcraft boards go through DS3862 and DS3662 (+3.3v to +5v) back to PDP-8/L Posibus interface. A simplified connection diagram is shown below.

Simplified Board Diagram of the Connections between PDP-8L and Emcraft A2F-LNX-EVB Board

Simplified  Connection Diagram between PDP-8L, the Wire Wrap board, and Emcraft A2F-LNX-EVB Board

That’s the hardware setup. On the software side, Mike programmed the FPGA to handle the Posibus signals, and emulate the tape reader controller. A Linux driver and application running in uClinux was also developed with the help of Emcraft Systems engineers. The Linux application reads an image of a paper tape from flash memory and writes it to the paper tape reader controller logic in the FPGA via the driver.

This setup is currently working, and Mike will soon release the documentation and software on RICM’s PDP-8/L restoration page. I’ll update the post / comment once the files are available.

The Emcraft SmartFusion evaluation board has enough I/O to emulate 8-bit devices that send data to the processor, but it does not have enough I/O to support receiving data from the processor. Therefore, a second generation of the Posibus Peripheral Emulator will use the Emcraft SmartFusion SOM Starter Kit which provides more I/O, and will allow the emulation of any Posibus peripheral such as disks and tapes.

You can get further technical details on RICM’s Posibus Peripheral Emulator page.

Disclosure: This post has been sponsored by Emcraft Systems.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Categories: Hardware, Linux Tags: Linux, actel, drivers, emcraft, fpga, som, uclinux

Board Bringup: You, Me, and I2C – ELCE 2012

January 16th, 2013 No comments

David Anders, embedded systems developer at Texas Instruments, explains how to work with I2C in Linux based embedded systems at ELCE 2012.

Abstract:

Board bring up is one of the most under documented aspects of embedded development. I2C is such a powerful, low-cost, and ubiquitous method of communication, that a basic understanding of it’s usage is essential to the embedded linux developer to quickly bring up and debug embedded designs. This presentation will look at the various software and hardware aspects of working with I2C using simple case studies highlighting the implementation of an EEPROM and a GPIO Expander. Most embedded Linux developers at some point in their career will be handed a piece of hardware that is untested. This presentation intends to provide some information about core tools and methods for bring up of I2C interfaces and assorted I2C based peripheral devices. David Anders has previously presented at Embedded Linux Conference 2012 with “Board Bringup: LCD and Display Interfaces“.

I2C_Connection_Example

The talk is divided into 3 main parts:

  • Communication Principles – Asynchronous (e.g. RS232) and Synchronous (e.g. I2C) communication
  • Drivers and Software Tools – Bootloaders & Linux kernel  GPIO bit-bang & I2C chardev, and I2C tools (i2cdetect, i2cdump,. i2cget, i2cset)
  • Board Bringup Use Cases:
    • I2C GPIO expanders
    • I2C EEPROMs

You can also download the slides for this presentation.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Your New ARM SoC Linux Support Check-List – ELCE 2012

January 16th, 2013 No comments

Thomas Petazzoni, embedded Linux engineer and trainer at Free Electrons, describes the steps he followed to add a new Marvell SoC to the mainline kernel at ELCE 2012.

Abstract:

Since Linus Torvalds raised warnings about the state of the ARM architecture support in the Linux kernel, a huge amount of effort and reorganization has happened in the way Linux supports ARM SoCs. From the addition of the device tree to the pinctrl subsystem, from the new clock framework to the new rules in code organization and design, the changes have been significant over the last one and half year in the Arm Linux kernel world.

Based on the speaker’s experience on getting the support for the new Marvell Armada 370 and Armada XP SoC support in the mainline Linux kernel, we will give an overview of those changes and summarize the new rules for ARM Linux support. We aim at helping developers willing to add support for new ARM SoCs in the Linux kernel by providing a check-list of things to do.

6 Steps to follow to get a minimal Linux image boot on a new ARM SoC

6 Steps to follow to get a minimal Linux image boot on a new ARM SoC

Here’s a summary of the main steps to go through to port a new SoC to ARM Linux:

  1. Minimal image – Write your device tree (arch/arm/boot/dts),  implement basic initialization C and header files (arch/arm/mach-foo), the timer driver (drivers/clocksource), the IRQ controller driver (drivers/irqchip),  earlyprintk support (arch/am/include/debug), and the serial port driver (drivers/tty/serial)
  2. More core infrastructure – Add pin muxing control (drivers/pinctrl), clocks (drivers/clk), and GPIO (drivers/gpio)
  3. More drivers, advanced features – Add the network driver (drivers/net), SPI controller driver (drivers/spi), SMP support, SATA controller driver (drivers/ata), Power management, and other drivers.

In all the steps above, each driver must have its own device tree binding. and they cannot include <mach/something.h> anymore as they must be supported by different platforms without having to rebuild them. Device tree is now compulsory for all new SoC, and it you have old code for an existing SoC, it’s very likely you’ll have to start from scratch due to device tree and the many changes that occurred in the kernel in the last two years.

Many ARM SoCs still do not comply with the current best practices, and Thomas recommends to have a look at the following implementations to get started:

  • arch/arm/mach-highbank
  • arch/arm/mach-socfpga
  • arch/arm/mach-bcm2835 (So having a Raspberry Pi might be a good idea to learn and experiment about device tree)
  • arch/arm/mach-mxs
  • arch/arm/mach-mvebu

You can also download the slides for this presentation.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

USB Debugging and Profiling Techniques – ELCE 2012

January 15th, 2013 No comments

Kishon Vijay Abraham and Basak Partha, respectively software design engineer and tech lead at Texas Instruments, provide an overview of techniques that can be used to debug Linux USB drivers on the host PC or/and the device itself.

Abstract:

The widespread integration of USB into embedded applications presents many developers with the challenge of debugging problems, that are difficult to detect and isolate when a USB device misbehaves. This paper discusses about the various USB debugging techniques which includes debugging at the host PC, at the device and in the cable and discuss when each of the above techniques will be handy. This paper will also discuss about the various facilities provided within Linux kernel to aid in USB debugging e.g sysfs, trace points etc. and the various user space tools available to help USB debugging e.g USBMON. This paper also discusses about the profiling techniques at various levels in the usb stack. This paper will be of interest to the Software Developers and Testers who develop and debug USB drivers.

USB Generic Linux System Architecture

USB Generic Linux System Architecture

Their talk is divided into the following sections:

  • Introduction
  • USB Generic Linux System Architecture
  • USB Mass Storage Architecture
  • Challenges in debugging – Encoded data, timing issues, out-of spec signaling errors, potocol errors…
  • USB Debugging Techniques – Main section with details about sysfs/debugfs, usbmon, dynamic debug interface, tracepoint, protocol analyzer (e.g. Elisys/Lecroy/total Phase analyzer tools)
  • Gadget Zero – USB gadget drivers used only for testing
  • Other profiling tools – IOzone (Mass Storage profiling), FFSB (Flexible Filesystem Benchmark) and dd


You can download the slides for this presentation. Beside the kernel USB documentation, they recommend using Virtual USB Analyzer, a free and open source GUI tool capable of displaying usbmon data, as well as XML data from hardware analyzers such as the Ellisys USB Explorer 200.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter