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] Writing C program on Stubdom

To: 阮安邦 <augustime@xxxxxxxxx>
Subject: Re: [Xen-devel] Writing C program on Stubdom
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Fri, 12 Dec 2008 10:24:21 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 12 Dec 2008 01:24:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <98207b4f0812120101y5aca4632m73dd48208ce886be@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, 阮安邦 <augustime@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <98207b4f0812120101y5aca4632m73dd48208ce886be@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Hello,

阮安邦, le Fri 12 Dec 2008 17:01:06 +0800, a écrit :
> In my understanding, the c-stubdom is trying to show us that we can
> just write standard C programs, linking it to mini-os,(with the
> APP_OBJS points to the appropriate obj files), then we can run the
> program as a separate Xen Domain, am I right?

Yes.

> Does it mean that i can use it as a kernel to create a new domain, and
> what it would do is simply out put "hello wolrd" then hangs up?

Yes.

> But i get the VMWare crash when i tried to do this. (
> Yes, i deployed XEN 3.3 in VMware).

You mean _VMWare_ crashes?  Well that's our fault then :)

> $(OBJ_DIR)/$(TARGET)_app.o: $(APP_OBJS) app.lds
>     $(LD) -r -d $(LDFLAGS) -\( $^ -\) $(APP_LDLIBS) --undefined main -o $@
>          
>          Is the purpose of this scrpits to adjust the APP_OBJS according to
> app.lds, so it can be linked to MiniOS?

Yes.

> $(OBJ_DIR)/$(TARGET): links $(OBJS) $(OBJ_DIR)/$(TARGET)_app.o arch_lib
>     $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJ_DIR)/$(TARGET)_app.o $(OBJS) $
> (LDARCHLIB) $(LDLIBS) -o $@.o
>     $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
> 
>          Above scripts replaces the "__attribute__((weak)) int app_main
> (start_info_t *si)" within XEN_ROOT/Extra/Mini-os/Kernel.c with the adjusted
> APP_OBJS?

Yes, in order to replace the default "test" app_main of mini-os.

Samuel

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

<Prev in Thread] Current Thread [Next in Thread>