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

[Xen-devel] Writing C program on Stubdom

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Writing C program on Stubdom
From: "阮安邦" <augustime@xxxxxxxxx>
Date: Fri, 12 Dec 2008 17:01:06 +0800
Delivery-date: Fri, 12 Dec 2008 01:01:48 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=FW5jNmG62+zg4jAXxTS4Xl7XpReHC6sBwL476vFUGcU=; b=ohzCGJ6OQptGNDmxtkZ09jISjGKaeflbanXvVR7QZpJWW4ZQTQl6AnSAEHG5wUQn6g CphyjEZw9Mq21IhMJsTD6o6cObrFOSRD54vjXp08vkf8HHPbgJIDCZrLSNcRa21st+Ql ksEWMcORcbi6GG7olCxGCMunm+06nRPYn3IH4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=LBIhS3SP4As9ckc4pW2mjmY/MUu8dMpFv+PK6F+6Nv3oZxL+pwI5/Gqd23HReREnLR 11TjvvkKZDvk0voX8zfQgR9A8N+uIgns+yf45BZaPtoTiLC5Vw9xE5y6iIB708UPyiwz 9MuCgpJA3doaSn9SrnyWMbdp5xES/2adcLVLw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi, list!

          Currently I am trying to write C programs on Stubdom. 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?

          I successfully compiled the c-stubdom ( by "make c-stubdom" in XEN_ROOT/stubdom ), and i got the mini-os.gz. 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? But i get the VMWare crash when i tried to do this. ( Yes, i deployed XEN 3.3 in VMware).

         On the other hand, to find out how stubdom links applications (such ioemu, grub) with MiniOS, I examined the Makefile in XEN_ROOT/stubdom, I noticed that it is achieved by passing "APP_OBJ= target objects" to the make command of miniOS. In the Makefile of MiniOS, I found the following scripts:

$(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?

then:

$(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?

         Thanks!
        
--
Regards!
Ryan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>