beautypg.com

0b0bintroduction, 1b1bbuilding the dfu-util program, Introduction – Maxim Integrated 73S12xxF USB-CCID Linux DFU Host Application User Manual

Page 4: Building the dfu-util program, Figure 1: usb ccid-dfu system, Linux host pc reader device

background image

73S12xxF USB-CCID Linux DFU Host Application Users Guide

UG_12xxF_038

4

Rev. 1.0

1. Introduction

The Linux DFU host application program, dfu-util, is an open source user space program that
provides the host-side ability to upgrade firmware in a compatible device over a standard USB
connection. To communicate with a device, this program uses the user space USB API as supplied by
the library module libusb in the Linux operating system. A specialized driver is not needed.

For more information about and how to download the source code of dfu-util program, visit

http://wiki.openmoko.org/wiki/Dfu-util

.


The version of dfu-util host program described in this document is based on the original code
obtained from openmoko.org website. The code has been modified specifically to communicate with a
smart card reader device that has been programmed with the CCID-DFU version of the TSC smart card
reader firmware, for the purpose of upgrading the firmware in that device. This program is also used as a
tool to demonstrate and test the implementation of the device-side of the USB DFU protocol in TSC smart
card reader firmware. From this point on in this user guide, the name dfu-util refers to the
TSC-modified version of the program.

The physical setup of the USB CCID-DFU system is shown in Figure 1. This document applies to the
gray box. The Reader Device (herein referred to as Device) is connected to the Linux host PC via a
standard USB cable.

USB CCID

Protocol

dfu-util

12XX based Smart

Card Reader Device

running CCID-DFU

firmware

Smart

Card

ISO7816

libusb.so

Linux Host PC

Reader Device

pscsd

libccid.so

Figure 1: USB CCID-DFU System

2. Building the dfu-util Program

Follow these steps to build the dfu-util program:

1. Go to

http://wiki.openmoko.org/wiki/Dfu-util

. In the Source Code section of the

website, it states that for certain versions of Linux, library modules such as libusb-dev need to be
installed before building the original dfu-util program. Follow these instructions if this prerequisite
applies to you.

2. Download the appropriate source package for the version of the Linux operating system that you use.

As an alternative, if a svn client has been installed on your Linux PC, you can retrieve the
uncompressed source files directly from the archives at openmoko.org by executing the following
commands from command line: (Suppose there is a directory named /home/user/ in your Linux
PC.)

cd /home/user
svn co

https://svn.openmoko.org/trunk/src/host/dfu-util/


After running this command, go to step 4.

3. Depending on the type of source package that you downloaded in previous step, use the appropriate

method to have the source files decompressed and installed. For example, if your operating system
is Fedora 10, you should download an rpm package. In this case run the rpm --install
command. For Ubuntu users, the package downloaded is in a .deb file. Double-click on the file