[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Using Mini-OS with GNU cross development chain and Red Hat Newlib



We have been doing some experiments using Mini-OS together with a
GNU cross development toolchain to allow small applications to be
layered on top of Red Hat Newlib and Mini-OS.  The use of Red Hat
Newlib and Mini-OS was inspired by the work John Ramsdell did.  The
additional contribution offered here is a set of patches to add a new
target architecture to the GNU cross development toolchain, making
application development easier, although at the cost of making
building the toolchain more complex.

This patch contains:

-- patches to the GNU development chain in extras/devenv/patches:

   binutils-2.16.1.patch  gcc-4.1.0.patch  gmp-4.2.1.patch
   newlib-1.14.0.patch 

-- documentation explaining how to build the cross-development
   toolchain in extras/devenv/docs/build-cross-dev-env

-- patches to Mini-OS needed for the cross development chain and Red
   Hat Newlib port.

The changes to Mini-OS in detail are:

-- rename gettimeofday() to _xgettimeofday() because of clash with
   function of same name but different signature in Newlib.

   Files changed:

   extras/mini-os/arch/ia64/time.c
   extras/mini-os/arch/x86/time.c
   extras/mini-os/include/time.h
   extras/mini-os/sched.c

-- add very simple console input handling

   Files changed:

   extras/mini-os/console/console.c
   extras/mini-os/include/console.h

-- Correct domain_config to fix wrong kernel name

   Files changed:

   extras/mini-os/domain_config

-- Add simple implementation of _xrealloc() for Newlib

   Files changed:

   extras/mini-os/lib/xmalloc.c
   extras/mini-os/include/xmalloc.h

-- Modify kernel.c so the application is called main(), and comment
   out the rest of the test code.  This is needed so that autoconf
   etc. can compile and link small test programs without getting
   undefined symbols.  It also makes it easier to port small
   applications.

   Files changed:

   extras/mini-os/kernel.c

-- When using Mini-OS to run an application in a lightweight domain,
   if the application called by Mini-OS exits quickly, "xm create"
   fails.  Is this a race?  Has the Mini-OS domain exited before xm
   has time to see it?  Adding a delay loop seems to get round the
   problem: 

    for (i = 0; i < 1000000000; i++)
        ;

   Files changed:

   extras/mini-os/kernel.c

-- Add functions for sti and cli replacement -- thanks to John
   Ramsdell.

   File added:

   extras/mini-os/sticli.c

Thanks are due to HP for permission to publish this work, and to the
Open Trusted Computing project http://www.opentc.net/, of which this
work was a part.

Regards,

Melvin Anderson.


Attachment: mini-os-cross-devel.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.