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

Re: [Xen-devel] [PATCH] Integrating applications into Mini-OS


  • To: "John D. Ramsdell" <ramsdell@xxxxxxxxx>
  • From: "Jacob Gorm Hansen" <jacobg@xxxxxxx>
  • Date: Mon, 15 May 2006 14:18:54 +0200
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 15 May 2006 05:19:17 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=jrzskR9ARdLtzor/rHhsPTZluBiDdI1UnNr/DccRCItHNUPqDZItv/XxLvpCDXjQ6/BIPoSl7WoXrfHgtSZwZcTTO1V2F87uArQX2fJ0AD35sCrPl4evjfi1ckMfGfm2GeO0o+t9R9FE7LWbntB74agHm3hiNKNqU3eAVjDI+qM=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 11 May 2006 12:34:49 -0400, John D. Ramsdell <ramsdell@xxxxxxxxx> wrote:

I'd like to make it so that there is no need to modify any Mini-OS
source files when extending it with an application.  All that is
required is a change to Makefile, and a small change to kernel.c,
printf.c, and string.c.  I have enclosed the patch.

With this patch, one could write an application in a file called, say,
app.c, and add it to the Mini-OS directory along with newlib.c and
setjmp_x86_32.S, the two files I use to adapt newlib to the Mini-OS
environment.  One would compile and link it with newlib, with the
command:

hi,

I think it would be more elegant to link the mini-os C files as a
'libminios.a' lib, and then you can replace main() with your own by
linking libminios.a from a separate Makefile somewhere else in you
tree.

I have attached a small patch to mini-os which changes the mini-os
Makefile and adds a dummy main function which you can override by
linking with your own main() first, as in:

OBJS := mymain.o

myapp: $(OBJS)
   $(LD) -N -T myapp.lds ../mini-os/x86_32.o $(OBJS) -o myapp.elf
-lminios -L../mini-os

regards,
Jacob

Attachment: miniosappsupport
Description: Binary 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®.