Melvin Anderson
2007-Apr-13 15:52 UTC
[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.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Keir Fraser
2007-Apr-17 11:22 UTC
Re: [Xen-devel] Using Mini-OS with GNU cross development chain and Red Hat Newlib
On 13/4/07 16:52, "Melvin Anderson" <Melvin.Anderson@hp.com> wrote:> 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.I suggest breaking this up into logical subpatches where possible. For example, the console enhancements are useful independent of changes to the minios build system. Can you give some more motivation for why you''d want to change the tool chain to add a new build target? It doesn''t seem a great place to add customisations and complexity! -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel