* [uml-devel] uml kbuild cleanup (cross-build) - some fixes and comments
@ 2005-02-10 18:39 Blaisorblade
2005-02-10 19:04 ` [uml-devel] " Al Viro
2005-02-10 20:11 ` Al Viro
0 siblings, 2 replies; 7+ messages in thread
From: Blaisorblade @ 2005-02-10 18:39 UTC (permalink / raw)
To: Alexander Viro, Jeff Dike; +Cc: user-mode-linux-devel
First, Al, thanks a lot for succeeding in solving this... I had tried a lot of
time ago to make sure that O= worked... (I think that -j already worked,
unless somebody re-broke it after I fixed that). Plus you fix a lot of other
stuff.
There are (at least) two bugs to fix about this patch, plus some comments:
http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.11-rc3-mm1/patches/cross-build
1) typo here: "objtre" should be "objtree"
Index: linux-2.6.10/arch/um/kernel/Makefile
===================================================================
@@ -50,7 +50,7 @@
quiet_cmd_quote2 = QUOTE $@
cmd_quote2 = sed -e '/CONFIG/{' \
-e 's/"CONFIG"\;/""/' \
- -e 'r $(obj)/config.tmp' \
+ -e 'r $(objtre)/config.tmp' \
2) More serious: the value for SETOPTIONS should be the 2.4 one, not the 2.6
one which is incompatible with 2.4 host kernel (it's an issue for 2.6 headers
in general).
In fact, a built UML binary must work on top of a 2.4 host kernel, too.
This IMHO would be a general issue about ABI compatibility, except that only
userspace headers must define the correct value (the old, 2.4-compatible
one)...
#define PTRACE_OLDSETOPTIONS 21
I just noticed we forgot to merge the patch for this in the current tree,
which is:
+#ifndef PTRACE_OLDSETOPTIONS
+#define PTRACE_OLDSETOPTIONS PTRACE_SETOPTIONS
+#endif
and then use OLDSETOPTIONS instead of SETOPTIONS.
I'm sending it now for 2.6.11.
Then, some more comments:
3) I don't understand how vmlinux.lds.S is created... it's a symlink, but it's
created nowhere after the patch - maybe I overlook something, maybe you
didn't do "make clean" and retest.
4) Since you went with gen-asm-offsets, I think it would be nice (but also
long, so if I find time I'll work on it) to use directly the generated
headers, instead of compiling a program which mangles their content and
reprints the same info in different form.
5) About the USER_OBJS: it was rejected in the current form for going in
scripts/Makefile long time ago... the proposed alternatives where:
a) rebuild the thing from scratch, without using the obj-[ymn] code (a lot of
code); or
b) do a) in a way which could also work for klibc (problem: klibc is not
linked inside the kernel image)
when I have time, I'll try to get people to simply accept a way to specificate
CFLAGS for some files which totally replace the normal ones.
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [uml-devel] Re: uml kbuild cleanup (cross-build) - some fixes and comments
2005-02-10 18:39 [uml-devel] uml kbuild cleanup (cross-build) - some fixes and comments Blaisorblade
@ 2005-02-10 19:04 ` Al Viro
2005-02-10 19:16 ` Blaisorblade
2005-02-10 20:11 ` Al Viro
1 sibling, 1 reply; 7+ messages in thread
From: Al Viro @ 2005-02-10 19:04 UTC (permalink / raw)
To: Blaisorblade; +Cc: Jeff Dike, user-mode-linux-devel
On Thu, Feb 10, 2005 at 07:39:23PM +0100, Blaisorblade wrote:
> 3) I don't understand how vmlinux.lds.S is created... it's a symlink, but it's
> created nowhere after the patch - maybe I overlook something, maybe you
> didn't do "make clean" and retest.
Not a symlink anymore. It's right there in the patch -
+#include <linux/config.h>
+#ifdef CONFIG_LD_SCRIPT_STATIC
+#include "uml.lds.S"
+#else
+#include "dyn.lds.S"
+#endif
and it gives you want you want without any symlinks. And it will get a
dependency (see .vmlinux.lds.cmd after build) on the right things:
deps_arch/um/kernel/vmlinux.lds := \
/home/users/al/kernel/RC11-rc3-bk6-current/arch/um/kernel/vmlinux.lds.S \
$(wildcard include/config/ld/script/static.h) \
/home/users/al/kernel/RC11-rc3-bk6-current/include/linux/config.h \
$(wildcard include/config/h.h) \
/home/users/al/kernel/RC11-rc3-bk6-current/arch/um/kernel/uml.lds.S \
/home/users/al/kernel/RC11-rc3-bk6-current/include/asm-generic/vmlinux.lds.h \
include2/asm/common.lds.S \
It gets rebuilt if vmlinux.lds.S changes or uml.lds.S changes or
CONFIG_LD_SCRIPT_STATIC gets changed.
That was from build with LD_SCRIPT_STATIC; turn it off and that will
a) trigger rebuild of vmlinux.lds (include/config/ld/script/static.h
dependency will take care of that)
b) replace dependency on uml.lds.S with that on dyn.lds.S.
No need to mess with symlinks, these files are going through preprocessor
anyway, so we have #ifdef and #include...
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] Re: uml kbuild cleanup (cross-build) - some fixes and comments
2005-02-10 19:04 ` [uml-devel] " Al Viro
@ 2005-02-10 19:16 ` Blaisorblade
2005-02-10 20:16 ` Al Viro
0 siblings, 1 reply; 7+ messages in thread
From: Blaisorblade @ 2005-02-10 19:16 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Al Viro, Jeff Dike
On Thursday 10 February 2005 20:04, Al Viro wrote:
> On Thu, Feb 10, 2005 at 07:39:23PM +0100, Blaisorblade wrote:
> > 3) I don't understand how vmlinux.lds.S is created... it's a symlink, but
> > it's created nowhere after the patch - maybe I overlook something, maybe
> > you didn't do "make clean" and retest.
> Not a symlink anymore. It's right there in the patch -
Nice trick.
In this case, it got lost in the version at that URL (I don't know whose is
the fault). I triple-checked that the file is missing at that URL.
Btw, did you also fix the typo I mentioned?
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [uml-devel] Re: uml kbuild cleanup (cross-build) - some fixes and comments
2005-02-10 18:39 [uml-devel] uml kbuild cleanup (cross-build) - some fixes and comments Blaisorblade
2005-02-10 19:04 ` [uml-devel] " Al Viro
@ 2005-02-10 20:11 ` Al Viro
2005-02-10 20:19 ` Blaisorblade
2005-02-10 23:11 ` Jeff Dike
1 sibling, 2 replies; 7+ messages in thread
From: Al Viro @ 2005-02-10 20:11 UTC (permalink / raw)
To: Blaisorblade; +Cc: Jeff Dike, user-mode-linux-devel
On Thu, Feb 10, 2005 at 07:39:23PM +0100, Blaisorblade wrote:
> First, Al, thanks a lot for succeeding in solving this... I had tried a lot of
> time ago to make sure that O= worked... (I think that -j already worked,
> unless somebody re-broke it after I fixed that). Plus you fix a lot of other
> stuff.
>
> There are (at least) two bugs to fix about this patch, plus some comments:
>
> http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.11-rc3-mm1/patches/cross-build
>
> 1) typo here: "objtre" should be "objtree"
>
> Index: linux-2.6.10/arch/um/kernel/Makefile
> ===================================================================
>
> @@ -50,7 +50,7 @@
> quiet_cmd_quote2 = QUOTE $@
> cmd_quote2 = sed -e '/CONFIG/{' \
> -e 's/"CONFIG"\;/""/' \
> - -e 'r $(obj)/config.tmp' \
> + -e 'r $(objtre)/config.tmp' \
Where had that come from? The patch I've done is on
ftp://ftp.linux.org.uk/pub/people/viro/UML-kbuild. I don't see that
chunk in there. The closest I can find is
-QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ; $$config =~ s/\n/\\n"\n"/g ; while(<STDIN>) { $$_ =~ s/CONFIG/$$config/; print $$_ }'
+QUOTE = 'my $$config=`cat $(objtree)/.config`; $$config =~ s/"/\\"/g ; $$config =~ s/\n/\\n"\n"/g ; while(<STDIN>) { $$_ =~ s/CONFIG/$$config/; print $$_ }'
quiet_cmd_quote = QUOTE $@
cmd_quote = $(PERL) -e $(QUOTE) < $< > $@
targets += config.c
-$(obj)/config.c : $(src)/config.c.in $(TOPDIR)/.config FORCE
+$(obj)/config.c : $(src)/config.c.in $(objtree)/.config FORCE
Note that it's not -mm-based; problem with porting to -mm, maybe? Or
I might have equivalent typo in one of the older versions of patch and
it migrated...
BTW, that chunk in your patch looks bogus regardless of typos - you have
config.tmp in clean-files, so it'd better be in arch/um/kernel, not in
the root...
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] Re: uml kbuild cleanup (cross-build) - some fixes and comments
2005-02-10 19:16 ` Blaisorblade
@ 2005-02-10 20:16 ` Al Viro
0 siblings, 0 replies; 7+ messages in thread
From: Al Viro @ 2005-02-10 20:16 UTC (permalink / raw)
To: Blaisorblade; +Cc: user-mode-linux-devel, Jeff Dike
On Thu, Feb 10, 2005 at 08:16:52PM +0100, Blaisorblade wrote:
> On Thursday 10 February 2005 20:04, Al Viro wrote:
> > On Thu, Feb 10, 2005 at 07:39:23PM +0100, Blaisorblade wrote:
> > > 3) I don't understand how vmlinux.lds.S is created... it's a symlink, but
> > > it's created nowhere after the patch - maybe I overlook something, maybe
> > > you didn't do "make clean" and retest.
>
> > Not a symlink anymore. It's right there in the patch -
> Nice trick.
> In this case, it got lost in the version at that URL (I don't know whose is
> the fault). I triple-checked that the file is missing at that URL.
>
> Btw, did you also fix the typo I mentioned?
See another reply upthread. BTW, patch is going to be split - right now
it's a big lump of unrelated fixes. I'm waiting for Sam to return with
comments on headers layout...
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uml-devel] Re: uml kbuild cleanup (cross-build) - some fixes and comments
2005-02-10 20:11 ` Al Viro
@ 2005-02-10 20:19 ` Blaisorblade
2005-02-10 23:11 ` Jeff Dike
1 sibling, 0 replies; 7+ messages in thread
From: Blaisorblade @ 2005-02-10 20:19 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Al Viro, Jeff Dike
On Thursday 10 February 2005 21:11, Al Viro wrote:
> On Thu, Feb 10, 2005 at 07:39:23PM +0100, Blaisorblade wrote:
> > First, Al, thanks a lot for succeeding in solving this... I had tried a
> > lot of time ago to make sure that O= worked... (I think that -j already
> > worked, unless somebody re-broke it after I fixed that). Plus you fix a
> > lot of other stuff.
> >
> > There are (at least) two bugs to fix about this patch, plus some
> > comments:
> >
> > http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.11-rc3-mm1/pa
> >tches/cross-build
> >
> > 1) typo here: "objtre" should be "objtree"
> >
> > Index: linux-2.6.10/arch/um/kernel/Makefile
> > ===================================================================
> >
> > @@ -50,7 +50,7 @@
> > quiet_cmd_quote2 = QUOTE $@
> > cmd_quote2 = sed -e '/CONFIG/{' \
> > -e 's/"CONFIG"\;/""/' \
> > - -e 'r $(obj)/config.tmp' \
> > + -e 'r $(objtre)/config.tmp' \
>
> Where had that come from? The patch I've done is on
> ftp://ftp.linux.org.uk/pub/people/viro/UML-kbuild. I don't see that
> chunk in there. The closest I can find is
>
> -QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ;
> $$config =~ s/\n/\\n"\n"/g ; while(<STDIN>) { $$_ =~ s/CONFIG/$$config/;
> print $$_ }' +QUOTE = 'my $$config=`cat $(objtree)/.config`; $$config =~
> s/"/\\"/g ; $$config =~ s/\n/\\n"\n"/g ; while(<STDIN>) { $$_ =~
> s/CONFIG/$$config/; print $$_ }'
>
> quiet_cmd_quote = QUOTE $@
> cmd_quote = $(PERL) -e $(QUOTE) < $< > $@
>
> targets += config.c
> -$(obj)/config.c : $(src)/config.c.in $(TOPDIR)/.config FORCE
> +$(obj)/config.c : $(src)/config.c.in $(objtree)/.config FORCE
>
> Note that it's not -mm-based; problem with porting to -mm, maybe?
No, porting to the Jeff's tree, I guess now - it's on top of another patch not
yet in -mm.
> Or
> I might have equivalent typo in one of the older versions of patch and
> it migrated...
>
> BTW, that chunk in your patch looks bogus regardless of typos - you have
> config.tmp in clean-files, so it'd better be in arch/um/kernel, not in
> the root...
Jeff, please fix it.
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [uml-devel] Re: uml kbuild cleanup (cross-build) - some fixes and comments
2005-02-10 20:11 ` Al Viro
2005-02-10 20:19 ` Blaisorblade
@ 2005-02-10 23:11 ` Jeff Dike
1 sibling, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2005-02-10 23:11 UTC (permalink / raw)
To: Al Viro; +Cc: Blaisorblade, user-mode-linux-devel
viro@parcelfarce.linux.theplanet.co.uk said:
> Where had that come from? The patch I've done is on ftp://
> ftp.linux.org.uk/pub/people/viro/UML-kbuild. I don't see that chunk
> in there. The closest I can find is
My fault. There were some clashes with other patches in my tree, and that
was the result of fixing one of them.
Jeff
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-02-11 2:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-10 18:39 [uml-devel] uml kbuild cleanup (cross-build) - some fixes and comments Blaisorblade
2005-02-10 19:04 ` [uml-devel] " Al Viro
2005-02-10 19:16 ` Blaisorblade
2005-02-10 20:16 ` Al Viro
2005-02-10 20:11 ` Al Viro
2005-02-10 20:19 ` Blaisorblade
2005-02-10 23:11 ` Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox