Install Freescale CodeWarrior license server and USB Tap on Ubuntu Linux

It was our experience that neither the CodeWarrior License Server nor USB Tap would run without tweaking our Ubuntu 10.10 environment. In this article, we review the tweaks that we made.

Note: this is a legacy article that is no longer being maintained and may be stale or inaccurate. However, if you have a question or comment about it, please submit it below.

Summary of CodeWarrior 10.0 (Eclipse Version) installation on an Ubuntu 10.10 x64 machine along with a USB Tap and a floating license server. The install of the Eclipse based CodeWarrior was relatively simple, but the installation of the license server and the USB Tap required some tweaking to the Linux host.

Installation of the License Server

At the time of this write up, the license server is Flexlm v8.4a, which is from 2004. The license server relies on an older glibc and OS ABI. The primary utility to run Flexlm is the lmgrd utility, and it doesn't run by default on a recent Ubuntu installation. The error it reports is: "symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference"

Currently, the default GLIBC version on Ubuntu 10.10 is 2.12 and running "strings /lib/libc.so.6" gives back:

GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12

As you can see, GLIBC_2.0 is not found. Rather than downgrading the library, we decided to create a chroot for flexlm and install an old Ubuntu distribution in the new environment. The oldest Ubuntu distribution we could find still being hosted on the mirrors was Dapper Drake, which was released in 2006.

Below are instructions to get this to work:

1) Make sure both schroot and debootstrap packages are installed
2) Create a /var/chroot directory
3) Edit /etc/schroot/schroot.conf and add the following:

[dapper]
description=Ubuntu Dapper
location=/var/chroot
priority=3
users=< user name >
groups=sbuild
root-groups=root

4) Create the Dapper installation in the chroot directory:

	$ sudo debootstrap --variant=buildd --arch i386 dapper /var/chroot http://mirror.anl.gov/pub/ubuntu

5) copy /etc/hosts to /var/chroot/etc/hosts

	$ sudo cp /etc/hosts /var/chroot/etc/hosts

6) Enter chroot environment:

	$ sudo chroot /var/chroot

7) Install whatever packages you may need using apt-get (e.g, vim).

	*Note: You can verify the libc.so version by running "/lib/libc.so.6 --version"  (returns 2.3.6)
*Note: You can also verify support for GLIBC_2.0 by running "strings /lib/libc.so.6"

8) Copy the flexlm binaries and license file into a directory in the chrooted environment.

	
	*Note: lmgrd can't access a license file outside of the chroot. 

9) Configure the OS ABI for the shared libraries

	$ export LD_ASSUME_KERNEL=2.4.1

10) Finally, run lmgrd inside the flexlm directory

	$ ./lmgrd -c <license file>

Installation of the USB Tap

We need to make some tweaks to our Ubuntu system to allow CodeWarrior to access the USB Tap as a non root user:

1) Create a usb group and add the CodeWarrior user to the new group:

	$ sudo addgroup usb
	$ sudo usermod -a -G usb < user name >		

2) Ascertain the USB Tap vendor id and product id:

	$ lsusb

This should return Freescale vendor id: 15a2, product id: 50b3

3) Create a new usbtap.rules rules file in /etc/udev/rules.d

	# Freescale USB tap
	ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="50b3", GROUP="usb"

4) Restart the udev daemon

	$ sudo service udev restart

5) Finally, you can verify that the new usb group now has read and write permissions for the USB Tap by performing a "lsusb" and using the Bus and Device numbers as follows:

	$ lsusb -l /dev/bus/usb/<bus>/<device>

Summary

CodeWarrior runs great on Ubuntu Linux after making a few tweaks. This article summarized the steps to install both the license server and USB Tap

Help us improve this article by adding your comment or question:

email addresses are neither displayed nor shared