WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "John D. Ramsdell" <ramsdell@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Integrating applications into Mini-OS
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <ogtslngh652.fsf@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <ogtslngh652.fsf@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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