From: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm@vger.kernel.org
Subject: Re: uClibc compatibility or static linking support
Date: Sun, 06 Jul 2008 13:07:44 +0300 [thread overview]
Message-ID: <1215338864.4175.59.camel@localhost> (raw)
In-Reply-To: <48707BFE.4030207@qumranet.com>
Hello,
On Sun, 2008-07-06 at 11:02 +0300, Avi Kivity wrote:
> Cristi Magherusan wrote:
> > Hello,
> >
> > As part of my GSoC project I'm working to create a small coreboot
> > payload containing a KVM-enabled Linux kernel and the KVM tools.
> >
> > This involves either compiling and linking KVM against uClibc, or making
> > a static binary linked against glibc.
> >
> > Has anyone tried compiling kvm against uClibc before? I did and it seems
> > it has some issues. I have fixed some by including aio support inside
> > uClibc, but it still won't work and I get some linking errors..I can
> > provide more details if needed.
> >
> >
>
> Please post the build log.
Sorry, the part about incompatibility with uClibc was an error on my
side. It were just my build tools.
I had some errors in the Makefile I'm using for KVM which are now
partially fixed and now I got rid of that error, but I have another
strange one which again seems to be caused by my Makefile.
For building all the stuff I'm using a somehow modified version of
coreboot's buildrom.
This is my build log:
http://rafb.net/p/DXMwsg76.html
And this is my Makefile that triggers the kvm make command:
http://tinyurl.com/66objx
Currently, in order to reproduce it some steps must be done manually but
those will be patched in the sources later on...
So if you want to reproduce it yourself, these are the steps:
git clone git://repo.or.cz/kvm-coreboot.git
Then cd into the dir and type "make"
Beware, it will download and compile some stuff, including a 2.6.22
linux kernel, busybox and uClibc, so it will take a while to complete.
Also, note that gcc-4.3 will fail to build the kernel and you'll either
have to use gcc <=4.2.x or add a strange CFLAG to the kernel Makefile,
at the CFLAGS_KERNEL. I'll search for that one and include a patch for
it by default, but for now I'm sticking to gcc-4.2.4.
After everything builds, kvm-70 will break at some point. First rsync -R
will fail, and you must remove the line containing
"$(LINUX)"/./include/asm-*/kvm*.h from
work/kvm-tools/kvm-70/kernel/Makefile
It's strange that the first compilation fails with this message:
/tmp/kvm-coreboot/work/kvm-tools/kvm-70/qemu/hw/i8254-kvm.c: In function
‘kvm_pit_save’:
/tmp/kvm-coreboot/work/kvm-tools/kvm-70/qemu/hw/i8254-kvm.c:36: error:
storage size of ‘pit’ isn’t known
/tmp/kvm-coreboot/work/kvm-tools/kvm-70/qemu/hw/i8254-kvm.c:41: warning:
implicit declaration of function ‘kvm_get_pit’.......
Then if you run make again it will pass over that point and you'll get
some errors caused by u32 and u64 in
work/kvm-tools/kvm-70/kernel/include/linux/kvm_para.h
to fix those run this command:
sed -i -e 's/u32/uint32_t/;s/u64/uint64_t/' \
work/kernel/linux-2.6.22.2/include/linux/kvm_para.h
then include <sys/user.h> in the same file.
Run make again and then you get the error I'm facing now.
> > Also, it seems that currently there's no way to build it statically
> > linked against glibc, so that I can include it in my BIOS image in this
> > way. I used the -static CFLAG, but it seems it is still linked
> > dinamically against the same libs. Any ideas?
> >
>
> I don't see any reason for that. Perhaps the build logs will tell.
I hope I won't need to do this and that uClibc will be enough.
Thanks for your answer,
Cristi
--
Ing. Cristi Măgherușan,
Universitatea Tehnică din Cluj-Napoca
Centrul de Comunicații "Pusztai Kalman"
Tel. 0264/401247 http://cc.utcluj.ro
next prev parent reply other threads:[~2008-07-06 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-05 19:56 uClibc compatibility or static linking support Cristi Magherusan
2008-07-06 8:02 ` Avi Kivity
2008-07-06 10:07 ` Cristi Magherusan [this message]
2008-07-06 14:44 ` Avi Kivity
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=1215338864.4175.59.camel@localhost \
--to=cristi.magherusan@net.utcluj.ro \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.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