USB Debugging and Profiling Techniques – ELCE 2012

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 […]

Linaro 12.12 Release with Linux Kernel 3.7 and Android 4.2.1

Linaro release 12.12 has just been announced, and includes Linux Kernel 3.7 and Android 4.2.1. The tracking version (stable release) uses Kernel 3.4.22. This release upgrades Android to version 4.2.1, Ubuntu images are now based on Ubuntu 12.10 (Quantal Quetzal) and Linaro U-Boot 2012.12 has been released with support for Origen 4 Quad and Arndale boards. Further improvements have been done for OpenEmbedded ARMv8, where they replaced the php Apache module by php-fpm among other things. On the kernel side, USB drivers have been refactored, and a kernel size analysis have been performed on several platforms. The power management team has mainly worked on big.LITTLE IKS and MP implementations, and it’s the first time LEG (Linaro Enterprise Group) is included in the release, and they worked on UEFI for ARM, GRUB for U-Boot, and provided a Ubuntu server image for Arndale board which can boot via UEFI or UBoot. Here […]

How to Allow Apps To Write Files to USB Mass Storage Devices in Android

When you’ve got an Android media player or mini PC, you may want to connect an external USB drive and allow write access to this drive to some applications. However, this is disabled by default in Android, although file managers appear to allow copy/paste of files to those drives without issue. Some applications may even refuse to install if they can’t find writable SD card or USB mass storage  device. I’ve tried to install the latest version of aTorrent (version 1.7.6) in my Mele A1000, and it could not install at all and returned a message like: Can’t install on SD card or USB device The solution below is adapted from a solution on XDA Developers Forums. Some instructions tells you to use an app such as Root Explorer to edit the files in Android (ES File Manager will also do, after allowing “Up to Root” option), but I personally […]

Linux 3.5 Release

Linus Torvalds has announced the release of Linux Kernel 3.5: Subject: Linux 3.5 released Ok, not a lot happened since -rc7. There’s a number of MIPS commits (for some reason MIPS has had a horrible track record with the -rc time schedule, I suspect I should just stop pulling late in the game), but most of the rest is pretty small. A couple of dm/md fixes, some gma500 work, make kgdb ‘dmesg’ command work again, some networking fixes, some xfs and cifs noise, yadda yadda. About 50% of the patch is actually the SPEAr clock name renaming that is just some search-and-replace. … Linux 3.4 brought updates to Btrfs file system, some new Intel, AMD and NVidia GPU drivers, X32 ABI, perf tool improvements and support for Yama security module and QNX6 file system. Linux 3.5 brings the following key changes: ext4 metadata checksums:  Ext4 has added the ability to […]

Unusual USB Devices in Linux Kernel

Some USB devices (especially cheap ones) are not fully compatible with the USB Stack and when you connect such devices to your target board, the kernel may output errors similar to the one below even though most other devices work perfectly. sd 3:0:0:0: SCSI error: return code = 0x10070000 end_request: I/O error, dev sda, sector 0 Buffer I/O error on device sda, logical block 0 sd 3:0:0:0: SCSI error: return code = 0x10070000 end_request: I/O error, dev sda, sector 8 Buffer I/O error on device sda, logical block 1 sd 3:0:0:0: SCSI error: return code = 0x10070000 end_request: I/O error, dev sda, sector 16 sd 3:0:0:0: SCSI error: return code = 0x10070000 end_request: I/O error, dev sda, sector 24 sd 3:0:0:0: SCSI error: return code = 0x10070000 It previously happened to us with a IDE to USB adapter based on Super Top Bridge ( VID: 0x14CD / PID: 0x6600). The […]

USB Hotplug Parameters and A Simple Linux USB Hotplug Script

USB Hotplug allows your system to detect a USB device has been inserted or removed and perform certain actions upon the USB device detection. The article below is largely inspired by which does not seem to work anymore. USB hotplugging involves: MODULE_DEVICE_TABLE support in the USB Device Driver API, so that a driver’s probe() routine is called only when it’s very likely to want to bind to a particular interface. USB always uses this. Support for invoking the hotplug helper (/sbin/hotplug by default) when devices are added or removed. This functionality is enabled only by CONFIG_HOTPLUG. That hotplug helper usually contacts a policy agent which handles the USB-level configuration or activation tasks appropriate to this device and the current system configuration. Boot-time configuration (“cold-plugging”) can be managed by the /etc/rc.d/init.d/hotplug startup script, if the “usbmodules” command line utility is available. (There is also a “diet hotplug” tool for use […]

NVIDIA Jetson AGX Orin Embedded-Box PC