linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] UML build system: patch ready
@ 2003-12-24 18:43 BlaisorBlade
  2003-12-26  8:12 ` Jeff Chua
  0 siblings, 1 reply; 7+ messages in thread
From: BlaisorBlade @ 2003-12-24 18:43 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: M A Young

Hey, I've finally fixed what I had to fix. So, if you have linux-2.6.0, and 
the -test9 UML patch(I've not tested against Ingo Molnar patches), go here:

http://web.tiscali.it/no-redirect-tiscali/blaisorblade/index.html

follow THE link and download all patches (not A-04-User_obj_makefiles.patch, 
which is old and broken). I was able to build the whole kernel with them all 
applied! There are still some special files that use their specific rules, 
but that should be no problem for now. Next I'll fix them, too and try to fix 
CONFIG_MODVERSIONS(which for now must be disabled).

Michael, maybe you'd like to add it to your bug-list web page... the A-04 fix 
is not necessary for modules themselves, but it is a needed part of the 
ModVersions fix.

Bye
-- 
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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] UML build system: patch ready
  2003-12-24 18:43 [uml-devel] UML build system: patch ready BlaisorBlade
@ 2003-12-26  8:12 ` Jeff Chua
  2003-12-26 18:56   ` BlaisorBlade
  2003-12-26 19:51   ` Nigel Cunningham
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Chua @ 2003-12-26  8:12 UTC (permalink / raw)
  To: BlaisorBlade; +Cc: UserModeLinux


On Wed, 24 Dec 2003, BlaisorBlade wrote:

> follow THE link and download all patches (not A-04-User_obj_makefiles.patch,
> which is old and broken). I was able to build the whole kernel with them all
> applied! There are still some special files that use their specific rules,
> but that should be no problem for now. Next I'll fix them, too and try to fix
> CONFIG_MODVERSIONS(which for now must be disabled).

arch/um/sys-i386/bugs.c ...
	//line 110
	struct modify_ldt_ldt_s ldt;

	//line 117
	err = modify_ldt(1, &ldt, sizeof(ldt));


It looks that modify_ldt_ldt_s is not defined anywhere and modify_ldt()
cannot be found.

I did these ...
	cd uml
	patch -p1 </tar/uml/uml-combo-2.6.0-A5
	patch -p1 </tar/uml/A-01-Fix_clean_mrproper.patch
	patch -p1 </tar/uml/A-02-Apply_altern-constants.patch
	patch -p1 </tar/uml/A-03-Module_support.patch

	and .config says "# CONFIG_MODVERSIONS is not set"

	Plain v2.6 compiles and boots ok.

Jeff.



gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -U__i386__ -Ui386 -D__arch_um__ -DSUBARCH=\"i386\"
-D_LARGEFILE64_SOURCE   -Iarch/um/include
-I/v6/src/260/uml/arch/um/kernel/skas/include -D_GNU_SOURCE -c -o
arch/um/sys-i386/bugs.o arch/um/sys-i386/bugs.c
In file included from /usr/include/linux/compiler.h:18,
                 from /usr/include/asm/sigcontext.h:4,
                 from /usr/include/bits/sigcontext.h:28,
                 from /usr/include/signal.h:307,
                 from /usr/include/sys/signal.h:1,
                 from arch/um/sys-i386/bugs.c:10:
/usr/include/linux/compiler-gcc2.h:15: warning: `__attribute_used__'
redefined
/usr/include/sys/cdefs.h:170: warning: this is the location of the
previous definition
arch/um/sys-i386/bugs.c: In function `disable_lcall':
arch/um/sys-i386/bugs.c:110: storage size of `ldt' isn't known
arch/um/sys-i386/bugs.c:117: warning: implicit declaration of function
`modify_ldt'
arch/um/sys-i386/bugs.c:110: warning: unused variable `ldt'



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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] UML build system: patch ready
  2003-12-26  8:12 ` Jeff Chua
@ 2003-12-26 18:56   ` BlaisorBlade
  2003-12-26 19:51   ` Nigel Cunningham
  1 sibling, 0 replies; 7+ messages in thread
From: BlaisorBlade @ 2003-12-26 18:56 UTC (permalink / raw)
  To: user-mode-linux-devel

> arch/um/sys-i386/bugs.c ...
[...]
> It looks that modify_ldt_ldt_s is not defined anywhere and modify_ldt()
> cannot be found.
It's true, but they should be defined by /usr/include/asm/ldt.h. So it's not 
my fault(unless you succeed in compiling a 2.6 with the -test9 patch).
Have you got a Debian? This problem has appeared on Debian unstable also for 
2.4, since that file is from the 2.6 headers.
The quick fix is to make /usr/include/asm and /usr/include/linux be symlinks 
into a 2.4 kernel tree, but only for compiling UML(for the other programs, in 
fact, they must stay as they are).

> arch/um/sys-i386/bugs.c: In function `disable_lcall':
> arch/um/sys-i386/bugs.c:110: storage size of `ldt' isn't known
> arch/um/sys-i386/bugs.c:117: warning: implicit declaration of function
> `modify_ldt'
> arch/um/sys-i386/bugs.c:110: warning: unused variable `ldt'

> I did these ...
> 	cd uml
> 	patch -p1 </tar/uml/uml-combo-2.6.0-A5
> 	patch -p1 </tar/uml/A-01-Fix_clean_mrproper.patch
> 	patch -p1 </tar/uml/A-02-Apply_altern-constants.patch
> 	patch -p1 </tar/uml/A-03-Module_support.patch

That's ok(apart for the uml-combo, I didn't test it), but I wasn't clear about 
A-04.
You can apply A-04-User_obj_makefiles-v2.patch(note the -v2), while you must 
not apply A-04-User_obj_makefiles.patch (now I've seen this wasn't uploaded). 
However that is unrelated to the above problem. Also, if you want some more 
to test, see my new message "UML patches against vanilla 2.6.0", which 
describes a more complete group of patches.

-- 
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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] UML build system: patch ready
  2003-12-26  8:12 ` Jeff Chua
  2003-12-26 18:56   ` BlaisorBlade
@ 2003-12-26 19:51   ` Nigel Cunningham
  2003-12-27 18:33     ` BlaisorBlade
  2004-01-06  2:59     ` Jeff Dike
  1 sibling, 2 replies; 7+ messages in thread
From: Nigel Cunningham @ 2003-12-26 19:51 UTC (permalink / raw)
  To: Jeff Chua; +Cc: BlaisorBlade, UserModeLinux

Hi.

On Fri, 2003-12-26 at 21:12, Jeff Chua wrote:

[...]


> arch/um/sys-i386/bugs.c ...
> 	//line 110
> 	struct modify_ldt_ldt_s ldt;
> 
> 	//line 117
> 	err = modify_ldt(1, &ldt, sizeof(ldt));
> 
> 
> It looks that modify_ldt_ldt_s is not defined anywhere and modify_ldt()
> cannot be found.

If you can get this sorted out (and tell me how), I may be able to get
software suspend [a bit closer to] working under UML. The lack of
support for modifying ldts was where I blocked when I briefly looked at
it a while ago.

Regards,

Nigel

-- 
My work on Software Suspend is graciously brought to you by
LinuxFund.org.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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] UML build system: patch ready
  2003-12-26 19:51   ` Nigel Cunningham
@ 2003-12-27 18:33     ` BlaisorBlade
  2003-12-28  0:50       ` Jeff Chua
  2004-01-06  2:59     ` Jeff Dike
  1 sibling, 1 reply; 7+ messages in thread
From: BlaisorBlade @ 2003-12-27 18:33 UTC (permalink / raw)
  To: user-mode-linux-devel

Alle 20:51, venerdì 26 dicembre 2003, Nigel Cunningham ha scritto:
> On Fri, 2003-12-26 at 21:12, Jeff Chua wrote:
> > arch/um/sys-i386/bugs.c ...
> > 	//line 110
> > 	struct modify_ldt_ldt_s ldt;
> >
> > 	//line 117
> > 	err = modify_ldt(1, &ldt, sizeof(ldt));
> >
> >
> > It looks that modify_ldt_ldt_s is not defined anywhere

There is only one definition in the asm/ldt.h header: only the struct name has 
changed between 2.4 and 2.6. This is the only problem. Rename that struct and 
you're done.

> > and modify_ldt()
> > cannot be found.
That is only a warning: in fact this function's prototype has never had a 
declaration in system headers.

> If you can get this sorted out (and tell me how), I may be able to get
> software suspend [a bit closer to] working under UML. The lack of
> support for modifying ldts was where I blocked when I briefly looked at
> it a while ago.

-- 
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&opÌk
_______________________________________________
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] UML build system: patch ready
  2003-12-27 18:33     ` BlaisorBlade
@ 2003-12-28  0:50       ` Jeff Chua
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Chua @ 2003-12-28  0:50 UTC (permalink / raw)
  To: BlaisorBlade; +Cc: UserModeLinux


On Sat, 27 Dec 2003, BlaisorBlade wrote:

> Alle 20:51, venerdì 26 dicembre 2003, Nigel Cunningham ha scritto:
>
> There is only one definition in the asm/ldt.h header: only the struct name has
> changed between 2.4 and 2.6. This is the only problem. Rename that struct and
> you're done.
>
> > If you can get this sorted out (and tell me how), I may be able to get
> > software suspend [a bit closer to] working under UML. The lack of
> > support for modifying ldts was where I blocked when I briefly looked at
> > it a while ago.

Ok, here's my patches to make uml works. It seems to work even with
CONFIG_MODVERSIONS=y.


"linux" (host) .config
	CONFIG_MODVERSIONS=y
	CONFIG_PROC_MM=y


"guest" (uml) .config
	CONFIG_MODVERSIONS=y
	CONFIG_MODE_SKAS=y
	# CONFIG_PROC_MM is not set


I'll post the compile patch for a plain linux-2.6.0 next.

Thanks,
Jeff


--- uml/arch/um/sys-i386/bugs.c.org	Sat Dec 27 23:28:01 2003
+++ uml/arch/um/sys-i386/bugs.c	Sat Dec 27 23:29:19 2003
@@ -16,6 +16,9 @@

 #define MAXTOKEN 64

+extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
+
+
 /* Set during early boot */
 int host_has_cmov = 1;
 int host_has_xmm = 0;
@@ -107,7 +110,7 @@

 static void disable_lcall(void)
 {
-	struct modify_ldt_ldt_s ldt;
+	struct user_desc ldt;
 	int err;

 	bzero(&ldt, sizeof(ldt));


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&opÌk
_______________________________________________
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] UML build system: patch ready
  2003-12-26 19:51   ` Nigel Cunningham
  2003-12-27 18:33     ` BlaisorBlade
@ 2004-01-06  2:59     ` Jeff Dike
  1 sibling, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2004-01-06  2:59 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: Jeff Chua, BlaisorBlade, UserModeLinux

ncunningham@clear.net.nz said:
> I may be able to get software suspend [a bit closer to] working under
> UML. The lack of support for modifying ldts was where I blocked when I
> briefly looked at it a while ago.

swsusp for UML is now reality, see sbuml.sf.net for details.  The one hitch
is that it's not up to date with the current UML.  I'm sure that help fixing
that would be appreciated.

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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:[~2004-01-06  2:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-24 18:43 [uml-devel] UML build system: patch ready BlaisorBlade
2003-12-26  8:12 ` Jeff Chua
2003-12-26 18:56   ` BlaisorBlade
2003-12-26 19:51   ` Nigel Cunningham
2003-12-27 18:33     ` BlaisorBlade
2003-12-28  0:50       ` Jeff Chua
2004-01-06  2:59     ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox