" /> Status for Andrew DeFaria: July 3, 2005 - July 9, 2005 Archives

« June 26, 2005 - July 2, 2005 | Main | July 10, 2005 - July 16, 2005 »

July 7, 2005

CDK Packaging

The CDK was not properly packaged before. Here's what needs to be done. Because we built GDB we need to get the GDB client software into the LOS178 CDK area. This is done by performing a make package-gdb in toolchain to obtain a tarball for GDB. This process also creates a toolchain source tarball, which takes quite some time and space and it largely not needed.

Then you need to unpack this GDB tarball into the LOS178 CDK area. Then you can tar up the CDK (for Linux and Windows) or use package.sh (Solaris).

There is a problem with make package-gdb on Solaris. It uses tar naked and also uses -z. Unfortunately Solaris' tar doesn't support -z. Aliasing tar=gnutar didn't work either. I had to, temporarily, modify the Makefile to use gnutar.

July 6, 2005

Building LOS178 2.1.0 on Windows

In order to build LOS178 2.1.0 on Windows the following steps were performed:

Create LOS178 build area

  • In /build the directory 2.1.0/los178 was created
  • From a successful build on Rock the tar images:
    • 2000-00.los178_rsc_src.tar.gz
    • 2001-00.los178_src.tar.gz
    • 2013-00.los178_dev.tar.gz
    • 2015.los178_rsc_dev.tar.gz
    were extracted into /build/2.1.0/los178.
  • 2032-00.cdkwin32.tar.gz was obtaind from t3:/export/dev_archive/los178/2p1p0/20050622/solaris/media/ppc and extracted into /build/2.1.0/los178

Compile cdk

  • Sourced SETUP.bash
  • cd'ed into src/cdk
  • make install > install.log 2>&1
  • The install.log was checked for errors

Build GDB

  • The toolchain was exported, tarred, copied and extracted to /build/2.1.0/toolchain and fixup.sh was run
  • In order for GDB to compile successfully the liblcsapi.a library was extracted from t3:/export/rel_archive/archive-lcs-1.0.0/052703/10001.lcs_host.tar.gz tarball into the host environment ($ENV_PREFIX/lib, a directory that has to be made first)
  • The GDB module was compiled with make install-gdb > install.log 2>&1
  • The install.log was checked for errors
  • Move install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin/gdbserver (and gdbserver-lcs) to $ENV_PREFIX/bin.

July 5, 2005

Building LOS178 2.1.0 on Linux

In order to build LOS178 2.1.0 on Linux the following steps were performed:

Create LOS178 build area

  • In /build the directory 2.1.0/los178 was created
  • From a successful build on Rock the tar images:
    • 2000-00.los178_rsc_src.tar.gz
    • 2001-00.los178_src.tar.gz
    • 2013-00.los178_dev.tar.gz
    • 2015.los178_rsc_dev.tar.gz
    were extracted into /build/2.1.0/los178.
  • A copy of bin-image was checked out using the DEV_LOS178_2p1p0_ppc_20050705 tag to /build/2.1.0
  • The bin-image/ppc.cdklinux.tar.gz was extracted into /build/2.1.0/los178

Compile cdk

  • Sourced SETUP.bash
  • cd'ed into src/cdk
  • make install > install.log 2>&1
  • The install.log was checked for errors
  • There was an error with disasm_mips.c under elflook but I remember Vinnie reporting that elflook was not compiling completely. I assume that this error is acceptable

Build GDB

  • The toolchain was checked out to /build/2.1.0/toolchain and fixup.sh was run
  • In order for GDB to compile successfully the liblcsapi.a library was extracted from t3:/export/rel_archive/archive-lcs-1.0.0/052703/10001.lcs_host.tar.gz tarball into the host environment ($ENV_PREFIX/lib, a directory that has to be made first)
  • The GDB module was compiled with make install-gdb > install.log 2>&1
  • The install.log was checked for errors
  • Move install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin/gdbserver (and gdbserver-lcs) to $ENV_PREFIX/bin.

Test build of LOS178 2.1.0

  • Rebuilt LOS178 2.1.0 in preparation for release of LOS178 2.1.0

Building LOS178

Solaris

Use /int/bin/build_los178 which performs all the necessary steps. Solaris builds have not changed

Linux

There is no need to build LOS178 on Linux but there is a need to build the CDK since what is in the bin-image tarball is not complete. There's also a need to build gdb client portions.

"Building" of LOS178 on Linux therefore consists of:

  1. Creating a "build" area
  2. Extracting sources from 2000-00.los178_rsc_src.tar.gz and 2001-00.los178_src.tar.gz

Windows

Similarly there is no need to build LOS178 on Windows but there is a need to build the CDK since what is in the bin-image tarball is not complete. There's also a need to build gdb client portions.

"Building" of LOS178 on Windows therefore consists of:

  1. Setup PC with Cygwin properly (if not already set up)
  2. Start a cmd shell and execute the VCVARS32.bat file
  3. Execute the cygnus.bat script to enter Cygwin
  4. Create build area
  5. Extract sources from 2000-00.los178_rsc_src.tar.gz and 2001-00.los178_src.tar.gz (May also need 2013-00.los178_dev.tar.gz and 2015-00.los178_rsc_dev.tar.gz)

Building CDK

Solaris

There is no CDK to build on Solaris as it is contained in the ppc.cdksol.tar.gz

Linux

For Linux, cd to your build area and:

  1. SETUP.bash
  2. cd src/cdk and make install. This builds parts of the CDK not contained in bin-image.

Windows

Make sure you have a proper setup:

  1. Setup PC with Cygwin properly (if not already set up)
  2. Start a cmd shell and execute the VCVARS32.bat file
  3. Execute the cygnus.bat script to enter Cygwin
  4. SETUP.bash
  5. cd src/cdk and make install. This builds parts of the CDK not contained in bin-image.

Packaging CDK

The CDKs for all of Solaris, Linux and Windows need to be properly packaged for the customer. Currently package.sh is designed to handle both cdksol and cdklinux. Thus after building CDK on Linux one can tar it up and deposit it into the Solaris build area and use package.sh to create the proper packaging.

The rename.sh also handles renaming cdk[sol|linux|win32] tarballs it finds with the proper package #.

So the remaining issue is how to deal with the oddball win32... The issue is that it was thought that the cdk could not be easily tarred up and moved over because symlinks in the tar would be messed up. This does not appear to be the case as a little test shows that Cygwin's B20 tar will properly store the symlink on the Windows side and the Unix/Linux tar will properly unpack it.

GDB Madness

GDB, which consists of a gdbserver part that needs to eventually be put into $ENV_PREFIX/bin as it is built into a different area (why isn't a make install-gdb putting it in the right place) and some client parts (Just gdb in install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin? Or do we include the other files like insight, tclsh8.4 and wish8.4?). These parts need to be placed in the build area.

So, for example, for Linux one needs to follow the above and then:

  • Check out the toolchain from CVS (tag: DEV_LOS178_2p1p0_ppc_20050705)
  • Run fixup.sh
  • Source SETUP.bash from a LOS178 area
    Remember: You need to use SETUP.bash from a dev area build. Using pdn will result in an error as the build is unable to find libbsd.a!

    Also: Install the liblcsapi.a library from the t3:/export/rel_archive/archive-lcs-1.0.0/052703/10001.lcs_host.tar.gz tarball into the host environment ($ENV_PREFIX/lib).
  • make install-gdb > install.log 2>&1
  • Check for errors and if successful, make package.

With the build of gdb successful:

  • Move install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin/gdbserver (and gdbserver-lcs) to $ENV_PREFIX/bin.
    Note: Since $ENV_PREFIX is set to dev then this means that gdbserver goes to dev. Should it also be put in pdn?