xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Lele MA" <lelema.zh@gmail.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [Help] How to build mini-OS with libc support, like Newlib?
Date: Fri, 5 Sep 2014 16:40:11 +0800 (CST)	[thread overview]
Message-ID: <48dbe837.a449.14844f8887f.Coremail.lelema.zh@gmail.com> (raw)
In-Reply-To: <20140902105535.GF3779@type.bordeaux.inria.fr>


[-- Attachment #1.1: Type: text/plain, Size: 2210 bytes --]


在 2014-09-02 06:55:35,"Samuel Thibault" <samuel.thibault@ens-lyon.org> 写道:
>Lele Ma, le Tue 02 Sep 2014 17:36:36 +0800, a écrit :
>> On Tue, Sep 2, 2014 at 3:47 PM, Samuel Thibault
>> <samuel.thibault@ens-lyon.org> wrote:
>> >
>> > Lele MA, le Tue 02 Sep 2014 15:20:32 +0800, a écrit :
>> > > If Newlib can be used to build mini-os, how to do it? Do I have to compile a
>> > > cross-compiler first?
>> >
>> > Yes. But this all already handled by the Makefile in stubdom/, and see
>> > the end of README about the c-stubdom target which builds the c/
>> > directory.
>> >
>> 
>> Thank you so much! It is great to build newlib so conveniently. But
>> when I run 'make  c-stubdom' in stubdom/, it yields:
>> 
>>      make: *** No rule to make target `mini-os-x86_64-c', needed by
>> `c-stubdom'. Stop"
>> 
>> Do you have any idea about how this happen?
>
>It's been years since I have had a look at that build system :)
>
>Apparently the c target somehow gets disabled, but you can add it by
>hand in 
>
>TARGETS=$(STUBDOM_TARGETS) c

>


Samuel, Thank you so much, it helps! 


But I have to disable the CONFIG_TEST in /stubdom/c/minios.cfg, or it yields multiple definition:
      /media/wind/lab/xen/xen/xen-4.4.0/stubdom/mini-os-x86_64-c/test.o: In function `app_main':
      /media/wind/lab/xen/xen/xen-4.4.0/extras/mini-os/test.c:542: multiple definition of `app_main'
      /media/wind/lab/xen/xen/xen-4.4.0/stubdom/mini-os-x86_64-c/main.o:/media/wind/lab/xen/xen/xen-4.4.0/extras/mini-os/main.c:187: first defined here
Does the stubdomain allow only one app_main to run?
I have tried adding "__attribute__((weak))" before "int app_main()" in main.c, so that it will be replaced by the new definition in test.c. It builds well but the VM cannot be created with yielding erros. 


Another question confuses me a lot. The c-stub domain exit immediately after prints the "Hello world" defined in /stubdom/c/main.c. And the console functions defined in /extras/mini-os/console/console.c has no effect at all. So, how can I enable the console functions? 


The configurations and Makefiles overwhelm me. Any help would be appreciated.


Apologies if questions are too naive.


Best regards,
Lele MA

[-- Attachment #1.2: Type: text/html, Size: 4056 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-09-05  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02  7:20 [Help] How to build mini-OS with libc support, like Newlib? Lele MA
2014-09-02  7:47 ` Samuel Thibault
2014-09-02  9:36   ` Lele Ma
2014-09-02 10:55     ` Samuel Thibault
2014-09-05  8:40       ` Lele MA [this message]
2014-09-06  9:54         ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48dbe837.a449.14844f8887f.Coremail.lelema.zh@gmail.com \
    --to=lelema.zh@gmail.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).