On a dom0 with Pentium D 64bit, i want to compile the kernel for 32bit since my domU will be 32bit OS. However when i try to compile the kernel, it only gives the option to compile the kernel for x84_64 cpu. How do i force it to compile for 32 bit cpu ? -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Harald Schioeberg
2006-Jun-22 14:24 UTC
Re: [Xen-users] need to compile 32bit on x86_64 cpu
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anand Gupta wrote:> On a dom0 with Pentium D 64bit, i want to compile the kernel for 32bit > since > my domU will be 32bit OS. > > However when i try to compile the kernel, it only gives the option to > compile the kernel for x84_64 cpu. How do i force it to compile for 32 bit > cpu ? > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-usersARCH="i386" make menuconfig Harald -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQFEmqgJJgyxs71kcx4RAgj/AJ9Y0rmKztRU3c8QJHLl9t4aVu0ftgCfaNbH r8QBUzhG/XoU9y1WD84skME=E0jz -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Harry Butterworth
2006-Jun-22 14:28 UTC
Re: [Xen-devel] need to compile 32bit on x86_64 cpu
I have a dual boot machine with a 32 bit OS installed to compile 32 bit kernels and a 64 bit OS for 64 bit kernels. This is pretty lame but it does obviously work. I''d be interested in a better solution too :-) On Thu, 2006-06-22 at 19:46 +0530, Anand Gupta wrote:> On a dom0 with Pentium D 64bit, i want to compile the kernel for 32bit > since my domU will be 32bit OS. > > However when i try to compile the kernel, it only gives the option to > compile the kernel for x84_64 cpu. How do i force it to compile for 32 > bit cpu ? > > -- > regards, > > Anand Gupta > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anand Gupta
2006-Jun-22 14:36 UTC
[Xen-devel] Re: [Xen-users] need to compile 32bit on x86_64 cpu
Hi Harald! Can you please explain it ? Right now what i use is from the README file make linux-2.6-xen-config CONFIGMODE=menuconfig If i specify ARCH="i386" after this in the same line, it still tries to compile for x86_64 cpu. On 6/22/06, Harald Schioeberg <schioebe@net.in.tum.de> wrote:> > ARCH="i386" make menuconfig >Thanks. -- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 22 Jun 2006, at 15:28, Harry Butterworth wrote:> I have a dual boot machine with a 32 bit OS installed to compile 32 bit > kernels and a 64 bit OS for 64 bit kernels. This is pretty lame but it > does obviously work. I''d be interested in a better solution too :-)In Cambridge we chroot into a 32-bit filesystem to build 32-bit binaries on 64-bit host. Works fine. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hans-Christian Armingeon
2006-Jun-22 15:13 UTC
Re: [Xen-devel] need to compile 32bit on x86_64 cpu
Hi, Am Donnerstag, 22. Juni 2006 16:28 schrieb Harry Butterworth:> I have a dual boot machine with a 32 bit OS installed to compile 32 bit > kernels and a 64 bit OS for 64 bit kernels. This is pretty lame but it > does obviously work. I''d be interested in a better solution too :-)I have the following setup: aptitude install linux32 mkdir /dapper32 deboostrap --arch i386 dapper /dapper32 linux32 chroot /dapper32 /bin/bash source /etc/profile There you have your 32bit environment on amd64. See man debootstrap. Johnny> [...]-- jabber:johnny@wh-netz.de icq:236971856 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hans-Christian Armingeon
2006-Jun-22 15:14 UTC
[Xen-users] Re: [Xen-devel] need to compile 32bit on x86_64 cpu
Hi, [I didn''t see, that this thread is on xen users, too. Just for completeness.] Am Donnerstag, 22. Juni 2006 16:28 schrieb Harry Butterworth:> I have a dual boot machine with a 32 bit OS installed to compile 32 bit > kernels and a 64 bit OS for 64 bit kernels. This is pretty lame but it > does obviously work. I''d be interested in a better solution too :-)I have the following setup: aptitude install linux32 mkdir /dapper32 deboostrap --arch i386 dapper /dapper32 linux32 chroot /dapper32 /bin/bash source /etc/profile There you have your 32bit environment on amd64. See man debootstrap. Johnny> [...]-- jabber:johnny@wh-netz.de icq:236971856 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Jun-22 16:41 UTC
[Xen-users] Re: [Xen-devel] need to compile 32bit on x86_64 cpu
Anyone has any other ideas on how to do this ? -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Reading the README i found a way to do this export XEN_TARGET_ARCH=i386 or export XEN_TARGET_ARCH=x86_32 Then do make linux-2.6-xen-config CONFIGMODE=menuconfig Now menuconfig shows the 32bit cpu''s. However when i run the build command, it fails badly giving the following errors: make -f buildconfigs/mk.linux-2.6-xen build make[1]: Entering directory `/home/xen/xen-3.0.2-2'' if grep "^CONFIG_MODULES=" linux-2.6.16-xen/.config ; then \ make -C linux-2.6.16-xen ARCH=i386 modules ; \ make -C linux-2.6.16-xen ARCH=i386 INSTALL_MOD_PATH=/home/xen/xen- 3.0.2-2/dist/install modules_install ; \ fi CONFIG_MODULES=y make[2]: Entering directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' CHK include/linux/version.h CC arch/i386/kernel/asm-offsets.s In file included from include/linux/thread_info.h:20, from include/linux/preempt.h:10, from include/linux/spinlock.h:50, from include/linux/capability.h:45, from include/linux/sched.h:7, from arch/i386/kernel/asm-offsets.c:7: include/linux/bitops.h: In function `generic_hweight64'': include/linux/bitops.h:142: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:142: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:143: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:143: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:144: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:144: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:145: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:145: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:146: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:146: warning: integer constant is too large for "unsigned long" type In file included from include/linux/timex.h:61, from include/linux/sched.h:11, from arch/i386/kernel/asm-offsets.c:7: include/asm/timex.h: In function `get_cycles'': include/asm/timex.h:25: warning: left shift count >= width of type include/asm/timex.h: In function `get_cycles_sync'': include/asm/timex.h:38: warning: left shift count >= width of type In file included from include/asm/semaphore.h:43, from include/linux/sched.h:20, from arch/i386/kernel/asm-offsets.c:7: include/linux/rwsem.h:27:65: asm/rwsem.h: No such file or directory In file included from include/asm/semaphore.h:43, from include/linux/sched.h:20, from arch/i386/kernel/asm-offsets.c:7: include/linux/rwsem.h: In function `down_read'': include/linux/rwsem.h:45: warning: implicit declaration of function `__down_read'' include/linux/rwsem.h: In function `down_read_trylock'': include/linux/rwsem.h:56: warning: implicit declaration of function `__down_read_trylock'' include/linux/rwsem.h: In function `down_write'': include/linux/rwsem.h:68: warning: implicit declaration of function `__down_write'' include/linux/rwsem.h: In function `down_write_trylock'': include/linux/rwsem.h:79: warning: implicit declaration of function `__down_write_trylock'' include/linux/rwsem.h: In function `up_read'': include/linux/rwsem.h:90: warning: implicit declaration of function `__up_read'' include/linux/rwsem.h: In function `up_write'': include/linux/rwsem.h:100: warning: implicit declaration of function `__up_write'' include/linux/rwsem.h: In function `downgrade_write'': include/linux/rwsem.h:110: warning: implicit declaration of function `__downgrade_write'' In file included from arch/i386/kernel/asm-offsets.c:7: include/linux/sched.h: At top level: include/linux/sched.h:309: error: field `mmap_sem'' has incomplete type In file included from include/asm/suspend.h:6, from include/linux/suspend.h:5, from arch/i386/kernel/asm-offsets.c:10: include/asm/desc.h: In function `_set_gate'': include/asm/desc.h:97: warning: right shift count >= width of type include/asm/desc.h: In function `set_tssldt_descriptor'': include/asm/desc.h:137: warning: right shift count >= width of type include/asm/desc.h: In function `set_seg_base'': include/asm/desc.h:164: warning: cast from pointer to integer of different size include/asm/desc.h:165: warning: cast from pointer to integer of different size arch/i386/kernel/asm-offsets.c: In function `foo'': arch/i386/kernel/asm-offsets.c:28: error: structure has no member named `eax'' arch/i386/kernel/asm-offsets.c:29: error: structure has no member named `ebx'' arch/i386/kernel/asm-offsets.c:30: error: structure has no member named `ecx'' arch/i386/kernel/asm-offsets.c:31: error: structure has no member named `edx'' arch/i386/kernel/asm-offsets.c:32: error: structure has no member named `esi'' arch/i386/kernel/asm-offsets.c:33: error: structure has no member named `edi'' arch/i386/kernel/asm-offsets.c:34: error: structure has no member named `ebp'' arch/i386/kernel/asm-offsets.c:35: error: structure has no member named `esp'' arch/i386/kernel/asm-offsets.c:36: error: structure has no member named `eip'' arch/i386/kernel/asm-offsets.c:43: error: structure has no member named `hard_math'' arch/i386/kernel/asm-offsets.c:69: error: structure has no member named `esp0'' arch/i386/kernel/asm-offsets.c:74: error: `VSYSCALL_BASE'' undeclared (first use in this function) arch/i386/kernel/asm-offsets.c:74: error: (Each undeclared identifier is reported only once arch/i386/kernel/asm-offsets.c:74: error: for each function it appears in.) make[3]: *** [arch/i386/kernel/asm-offsets.s] Error 1 make[2]: *** [prepare0] Error 2 make[2]: Leaving directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' make[2]: Entering directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map-b /home/xen/xen- 3.0.2-2/dist/install -r 2.6.16-xenx86_32; fi make[2]: Leaving directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' make -C linux-2.6.16-xen ARCH=i386 INSTALL_PATH=/home/xen/xen-3.0.2-2/dist/install vmlinuz make[2]: Entering directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' make[2]: Nothing to be done for `vmlinuz''. make[2]: Leaving directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' make -C linux-2.6.16-xen ARCH=i386 INSTALL_PATH=/home/xen/xen-3.0.2-2/dist/install install make[2]: Entering directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' sh /home/xen/xen-3.0.2-2/linux-2.6.16-xen/arch/i386/boot/install.sh 2.6.16-xenx86_32 arch/i386/boot/bzImage System.map "/home/xen/xen-3.0.2-2 /dist/install" *** Missing file: arch/i386/boot/bzImage *** You need to run "make" before "make install". make[3]: *** [install] Error 1 make[2]: *** [install] Error 2 make[2]: Leaving directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' make[1]: *** [build] Error 2 make[1]: Leaving directory `/home/xen/xen-3.0.2-2'' make: *** [linux-2.6-xen-install] Error 2 My guess is that its complaining about some libraries for 32bit and since the os is 64bit, they are not present. Can anyone please shed more light on this ? Thanks. -- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Petersson, Mats
2006-Jun-22 17:00 UTC
[Xen-users] RE: [Xen-devel] need to compile 32bit on x86_64 cpu
I tried using "setarch i386 bash" "make clean dist" It''s still compiling, but it looks like it might work... [You may need to install setarch on your machine, as some machines don''t have it installed as default. setarch allows the machine to set a flag so that when something like uname is asking "What processor is this" the answer will be "i686" instead of "x86_64", and thus tools that use for example "uname -m" to find the CPU type, will figure that it''s a 32-bit processor instead of 64-bit. However, you may need to have certain libraries and other tools installed on the machine to build 32-bit binaries. -- Mats ________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Anand Gupta Sent: 22 June 2006 17:42 To: Xen Users Cc: Harry Butterworth; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] need to compile 32bit on x86_64 cpu Anyone has any other ideas on how to do this ? -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2006-Jun-22 17:02 UTC
RE: [Xen-users] Re: [Xen-devel] need to compile 32bit on x86_64 cpu
You need to clean the linux kernel directory (probably with "mrproper" note: mrproper will remove your .config file too, so copy that if you have made any changes...) -- Mats ________________________________ From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Anand Gupta Sent: 22 June 2006 17:58 To: Xen Users Cc: Keir Fraser; Harry Butterworth; xen-devel@lists.xensource.com Subject: [Xen-users] Re: [Xen-devel] need to compile 32bit on x86_64 cpu Reading the README i found a way to do this export XEN_TARGET_ARCH=i386 or export XEN_TARGET_ARCH=x86_32 Then do make linux-2.6-xen-config CONFIGMODE=menuconfig Now menuconfig shows the 32bit cpu''s. However when i run the build command, it fails badly giving the following errors: make -f buildconfigs/mk.linux-2.6-xen build make[1]: Entering directory `/home/xen/xen-3.0.2-2'' if grep "^CONFIG_MODULES=" linux-2.6.16-xen/.config ; then \ make -C linux-2.6.16-xen ARCH=i386 modules ; \ make -C linux-2.6.16-xen ARCH=i386 INSTALL_MOD_PATH=/home/xen/xen-3.0.2-2/dist/install modules_install ; \ fi CONFIG_MODULES=y make[2]: Entering directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' CHK include/linux/version.h CC arch/i386/kernel/asm-offsets.s In file included from include/linux/thread_info.h:20, from include/linux/preempt.h:10, from include/linux/spinlock.h:50, from include/linux/capability.h:45, from include/linux/sched.h:7, from arch/i386/kernel/asm-offsets.c:7: include/linux/bitops.h: In function `generic_hweight64'': include/linux/bitops.h:142: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:142: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:143: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:143: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:144: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:144: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:145: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:145: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:146: warning: integer constant is too large for "unsigned long" type include/linux/bitops.h:146: warning: integer constant is too large for "unsigned long" type In file included from include/linux/timex.h:61, from include/linux/sched.h:11, from arch/i386/kernel/asm-offsets.c:7: include/asm/timex.h: In function `get_cycles'': include/asm/timex.h:25: warning: left shift count >= width of type include/asm/timex.h: In function `get_cycles_sync'': include/asm/timex.h:38: warning: left shift count >= width of type In file included from include/asm/semaphore.h:43, from include/linux/sched.h:20, from arch/i386/kernel/asm-offsets.c:7: include/linux/rwsem.h:27:65: asm/rwsem.h: No such file or directory In file included from include/asm/semaphore.h:43, from include/linux/sched.h:20, from arch/i386/kernel/asm-offsets.c:7: include/linux/rwsem.h: In function `down_read'': include/linux/rwsem.h:45: warning: implicit declaration of function `__down_read'' include/linux/rwsem.h: In function `down_read_trylock'': include/linux/rwsem.h:56: warning: implicit declaration of function `__down_read_trylock'' include/linux/rwsem.h: In function `down_write'': include/linux/rwsem.h:68: warning: implicit declaration of function `__down_write'' include/linux/rwsem.h: In function `down_write_trylock'': include/linux/rwsem.h:79: warning: implicit declaration of function `__down_write_trylock'' include/linux/rwsem.h: In function `up_read'': include/linux/rwsem.h:90: warning: implicit declaration of function `__up_read'' include/linux/rwsem.h: In function `up_write'': include/linux/rwsem.h:100: warning: implicit declaration of function `__up_write'' include/linux/rwsem.h: In function `downgrade_write'': include/linux/rwsem.h:110: warning: implicit declaration of function `__downgrade_write'' In file included from arch/i386/kernel/asm-offsets.c:7: include/linux/sched.h: At top level: include/linux/sched.h:309: error: field `mmap_sem'' has incomplete type In file included from include/asm/suspend.h:6, from include/linux/suspend.h:5, from arch/i386/kernel/asm-offsets.c:10: include/asm/desc.h: In function `_set_gate'': include/asm/desc.h:97: warning: right shift count >= width of type include/asm/desc.h: In function `set_tssldt_descriptor'': include/asm/desc.h:137: warning: right shift count >= width of type include/asm/desc.h: In function `set_seg_base'': include/asm/desc.h:164: warning: cast from pointer to integer of different size include/asm/desc.h:165: warning: cast from pointer to integer of different size arch/i386/kernel/asm-offsets.c: In function `foo'': arch/i386/kernel/asm-offsets.c:28: error: structure has no member named `eax'' arch/i386/kernel/asm-offsets.c:29: error: structure has no member named `ebx'' arch/i386/kernel/asm-offsets.c:30: error: structure has no member named `ecx'' arch/i386/kernel/asm-offsets.c:31: error: structure has no member named `edx'' arch/i386/kernel/asm-offsets.c:32: error: structure has no member named `esi'' arch/i386/kernel/asm-offsets.c:33: error: structure has no member named `edi'' arch/i386/kernel/asm-offsets.c:34: error: structure has no member named `ebp'' arch/i386/kernel/asm-offsets.c:35: error: structure has no member named `esp'' arch/i386/kernel/asm-offsets.c:36: error: structure has no member named `eip'' arch/i386/kernel/asm-offsets.c:43: error: structure has no member named `hard_math'' arch/i386/kernel/asm-offsets.c:69: error: structure has no member named `esp0'' arch/i386/kernel/asm-offsets.c:74: error: `VSYSCALL_BASE'' undeclared (first use in this function) arch/i386/kernel/asm-offsets.c:74: error: (Each undeclared identifier is reported only once arch/i386/kernel/asm-offsets.c:74: error: for each function it appears in.) make[3]: *** [arch/i386/kernel/asm-offsets.s] Error 1 make[2]: *** [prepare0] Error 2 make[2]: Leaving directory `/home/xen/xen-3.0.2-2 /linux-2.6.16-xen'' make[2]: Entering directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map -b /home/xen/xen-3.0.2-2/dist/install -r 2.6.16-xenx86_32 ; fi make[2]: Leaving directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' make -C linux-2.6.16-xen ARCH=i386 INSTALL_PATH=/home/xen/xen-3.0.2-2/dist/install vmlinuz make[2]: Entering directory `/home/xen/xen-3.0.2-2 /linux-2.6.16-xen'' make[2]: Nothing to be done for `vmlinuz''. make[2]: Leaving directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' make -C linux-2.6.16-xen ARCH=i386 INSTALL_PATH=/home/xen/xen-3.0.2-2/dist/install install make[2]: Entering directory `/home/xen/xen-3.0.2-2/linux-2.6.16-xen'' sh /home/xen/xen-3.0.2-2/linux-2.6.16-xen/arch/i386/boot/install.sh 2.6.16-xenx86_32 arch/i386/boot/bzImage System.map "/home/xen/xen-3.0.2-2 /dist/install" *** Missing file: arch/i386/boot/bzImage *** You need to run "make" before "make install". make[3]: *** [install] Error 1 make[2]: *** [install] Error 2 make[2]: Leaving directory `/home/xen/xen- 3.0.2-2/linux-2.6.16-xen'' make[1]: *** [build] Error 2 make[1]: Leaving directory `/home/xen/xen-3.0.2-2'' make: *** [linux-2.6-xen-install] Error 2 My guess is that its complaining about some libraries for 32bit and since the os is 64bit, they are not present. Can anyone please shed more light on this ? Thanks. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 6/22/06, Petersson, Mats <Mats.Petersson@amd.com> wrote:> > I tried using > "setarch i386 bash" > "make clean dist" > It''s still compiling, but it looks like it might work... > > [You may need to install setarch on your machine, as some machines don''t > have it installed as default. setarch allows the machine to set a flag so > that when something like uname is asking "What processor is this" the answer > will be "i686" instead of "x86_64", and thus tools that use for example > "uname -m" to find the CPU type, will figure that it''s a 32-bit processor > instead of 64-bit. > > However, you may need to have certain libraries and other tools installed > on the machine to build 32-bit binaries. >The libraries is going to be one major problem i guess as already the same libraries are installed in 64bit mode and the system won''t allow both to be installed :( -- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Harry Butterworth
2006-Jun-22 17:15 UTC
Re: [Xen-devel] need to compile 32bit on x86_64 cpu
What''s wrong with the chroot option that Keir mentioned? On Thu, 2006-06-22 at 22:36 +0530, Anand Gupta wrote:> On 6/22/06, Petersson, Mats <Mats.Petersson@amd.com> wrote: > I tried using > "setarch i386 bash" > "make clean dist" > It''s still compiling, but it looks like it might work... > > [You may need to install setarch on your machine, as some > machines don''t have it installed as default. setarch allows > the machine to set a flag so that when something like uname is > asking "What processor is this" the answer will be "i686" > instead of "x86_64", and thus tools that use for example > "uname -m" to find the CPU type, will figure that it''s a > 32-bit processor instead of 64-bit. > > However, you may need to have certain libraries and other > tools installed on the machine to build 32-bit binaries. > > > The libraries is going to be one major problem i guess as already the > same libraries are installed in 64bit mode and the system won''t allow > both to be installed :( > > -- > regards, > > Anand Gupta > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
"Anand Gupta" <xen.mails@gmail.com> writes:> On 6/22/06, Petersson, Mats <Mats.Petersson@amd.com> wrote: > > > > I tried using > > "setarch i386 bash" > > "make clean dist" > > It''s still compiling, but it looks like it might work... > > > > [You may need to install setarch on your machine, as some machines don''t > > have it installed as default. setarch allows the machine to set a flag so > > that when something like uname is asking "What processor is this" the answer > > will be "i686" instead of "x86_64", and thus tools that use for example > > "uname -m" to find the CPU type, will figure that it''s a 32-bit processor > > instead of 64-bit.Or linux32 ... setarch is a RHism.> > > > However, you may need to have certain libraries and other tools installed > > on the machine to build 32-bit binaries. > > > > The libraries is going to be one major problem i guess as already the same > libraries are installed in 64bit mode and the system won''t allow both to be > installed :(It works on most distributions (SUSE, RH, Mandrake) if you have the right compat RPMs installed because they follow LSB properly. Normally the 64bit install should install the right compat rpms by default together with the 64bit libraries. The main offenders which seem to be unable to get this right are the Debian derived ones (Ubunutu etc.) and Slackware. On those you need to use a chroot hack. Complain to them. Basically if your distribution has "lib64" and it isn''t a symlink to lib you should be ok. Kerrnel compile fine without any libraries BTW - just user tools need them. -Andi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anand Gupta
2006-Jun-22 17:33 UTC
[Xen-users] Re: [Xen-devel] need to compile 32bit on x86_64 cpu
On 6/22/06, Harry Butterworth <harry@hebutterworth.freeserve.co.uk> wrote:> > What''s wrong with the chroot option that Keir mentioned? >There is nothing wrong with it. Thats what i setting up now since other solutions are not working (atleast on my machine). Thanks. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 22 Jun 2006 19:16:18 +0200, Andi Kleen <ak@suse.de> wrote:> > It works on most distributions (SUSE, RH, Mandrake) if you have the > right compat RPMs installed because they follow LSB properly. Normally > the 64bit install should install the right compat rpms by default > together with the 64bit libraries. > > The main offenders which seem to be unable to get this right are the > Debian derived > ones (Ubunutu etc.) and Slackware. On those you need to use a chroot hack. > Complain to them. > > Basically if your distribution has "lib64" and it isn''t a symlink to lib > you should be ok. > > Kerrnel compile fine without any libraries BTW - just user tools > need them. >I am trying this on centos 4.3 and its complaining. I posted the entire compile errors earlier. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Keir! I loop mount a 32bit image and do a chroot to it. Inside it the cpu is still showing as x86_64. So i installed setarch and use it to set it as i386 and then try a yum update/ use yum to install any package, it gives an error Traceback (most recent call last): File "/usr/bin/yum", line 4, in ? import yum File "__init__.py", line 33, in ? File "updates.py", line 18, in ? File "arch.py", line 218, in ? File "arch.py", line 208, in getCanonArch File "arch.py", line 139, in getCanonX86Arch IOError: [Errno 2] No such file or directory: ''/proc/cpuinfo'' When i try to cat /proc/cpuinfo, it seems it doesn''t exist :( Any ideas where i am going wrong ? Thanks. On 6/22/06, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:> > In Cambridge we chroot into a 32-bit filesystem to build 32-bit > binaries on 64-bit host. Works fine. >-- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> I am trying this on centos 4.3 and its complaining. I posted the entire > compile errors earlier.Then you either didn''t install the right compat libraries or didn''t use setarch correctly. -Andi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 6/22/06, Andi Kleen <ak@suse.de> wrote:> > > > I am trying this on centos 4.3 and its complaining. I posted the entire > > compile errors earlier. > > Then you either didn''t install the right compat libraries or > didn''t use setarch correctly. >This is what i did setarch i386 bash And the machine is a fresh install of centos 4.3 x86_64. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Luciano Miguel Ferreira Rocha
2006-Jun-22 17:56 UTC
Re: [Xen-devel] need to compile 32bit on x86_64 cpu
On Thu, Jun 22, 2006 at 11:14:45PM +0530, Anand Gupta wrote:> IOError: [Errno 2] No such file or directory: ''/proc/cpuinfo'' > > When i try to cat /proc/cpuinfo, it seems it doesn''t exist :(under the chroot: mount /proc outside: mount -t proc none /path/to/chroot/proc (You''ll have to unmount it prior to unmounting the image, when you''re finished with it.) -- lfr 0/0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Furthermore, i manually created /proc/cpuinfo (don''t know why i did, just did it). Just to clarify this /proc/cpuinfo is inside the chrooted file image i am working on. Now yum works fine. However inside xen, when i do make help or any other option, it gives the following error: Config.mk:42: /home/xen-unstable.hg/config/i386.mk: No such file or directory Config.mk:42: /home/xen-unstable.hg/config/i386.mk: No such file or directory make: *** No rule to make target `/home/xen-unstable.hg/config/i386.mk''. Stop. Inside the config directory there are following files ia64.mk x86_32.mk x86_64.mk Now when i use setarch x86_32, it gives the following error: Don''t know how to set arch to x86_32 Thanks for all the help. -- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thursday 22 June 2006 19:54, Anand Gupta wrote:> On 6/22/06, Andi Kleen <ak@suse.de> wrote: > > > > > > > I am trying this on centos 4.3 and its complaining. I posted the entire > > > compile errors earlier. > > > > Then you either didn''t install the right compat libraries or > > didn''t use setarch correctly. > > > > This is what i did > > setarch i386 bash > > And the machine is a fresh install of centos 4.3 x86_64.Then likely the compat rpms are not installed. I don''t know they are called on RH and Clones, on SUSE they are called *-32bit.rpm -Andi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Luciano! On 6/22/06, Luciano Miguel Ferreira Rocha <strange@nsk.no-ip.org> wrote:> > On Thu, Jun 22, 2006 at 11:14:45PM +0530, Anand Gupta wrote: > > IOError: [Errno 2] No such file or directory: ''/proc/cpuinfo'' > > > > When i try to cat /proc/cpuinfo, it seems it doesn''t exist :( > under the chroot: mount /proc > outside: mount -t proc none /path/to/chroot/proc > > (You''ll have to unmount it prior to unmounting the image, when you''re > finished with it.) >I used the above method and now there is a complete /proc inside the chroot environment. Thanks. -- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Petersson, Mats
2006-Jun-22 18:10 UTC
RE: [Xen-users] Re: [Xen-devel] need to compile 32bit on x86_64 cpu
What do you use for the "make" command. It looks like you''re setting XEN_TARGET_ARCH=i386, wihich I don''t think works, it should be x86_32 to work correctly. -- Mats ________________________________ From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Anand Gupta Sent: 22 June 2006 19:04 To: Keir Fraser Cc: Harry Butterworth; xen-devel@lists.xensource.com; Xen Users Subject: [Xen-users] Re: [Xen-devel] need to compile 32bit on x86_64 cpu Furthermore, i manually created /proc/cpuinfo (don''t know why i did, just did it). Just to clarify this /proc/cpuinfo is inside the chrooted file image i am working on. Now yum works fine. However inside xen, when i do make help or any other option, it gives the following error: Config.mk:42: /home/xen-unstable.hg/config/i386.mk: No such file or directory Config.mk:42: /home/xen-unstable.hg/config/i386.mk: No such file or directory make: *** No rule to make target `/home/xen-unstable.hg/config/i386.mk''. Stop. Inside the config directory there are following files ia64.mk x86_32.mk x86_64.mk Now when i use setarch x86_32, it gives the following error: Don''t know how to set arch to x86_32 Thanks for all the help. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Andi! On 6/22/06, Andi Kleen <ak@suse.de> wrote:> > > Then likely the compat rpms are not installed. > > I don''t know they are called on RH and Clones, on SUSE they are called > *-32bit.rpm >I have the following compat rpms installed already on the machine. compat-libstdc++-33-3.2.3-47.3 compat-db-4.1.25-9 compat-libstdc++-296-2.96-132.7.2 compat-libgcc-296-2.96-132.7.2 compat-libcom_err-1.0-5 compat-openldap-2.1.30-4 I installed the following as well compat-gcc-32-3.2.3-47.3.x86_64.rpm compat-gcc-32-c++-3.2.3-47.3.x86_64.rpm compat-glibc-2.3.2-95.30.i386.rpm compat-glibc-2.3.2-95.30.x86_64.rpm compat-glibc-headers-2.3.2-95.30.x86_64.rpm Now using setarch the compile is going on so far and has given no errors. I will post results once the compilation is done and the domU is booted up with the kernel. Thanks for all the help. -- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I finally got the compilation done and copied the kernel and init image for use for domU for 32bit OS. When i try to use the kernel i get an error "Error: (9, ''Bad file descriptor'')" Here is the extract from xend.log, [2006-06-22 13:33:16 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch [2006-06-22 13:33:16 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch [2006-06-22 13:33:30 xend.XendDomainInfo] INFO (XendDomainInfo:836) Domain has shutdown: name=anand01 id=5 reason=poweroff. [2006-06-22 13:33:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy : domid=5 [2006-06-22 13:33:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) XendDomainInfo.destroyDomain(5) [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) XendDomainInfo.create([''vm'', [''name'', ''anand01''], [''memory'', 256], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/home/vmlinuz- 2.6.16.13-xen-x86_32''], [''ramdisk'', ''/home/initrd-2.6.16-xen-x86_32.img''], [''ip'', ''x.x.x.x: 1.2.3.4:y.y.y.y:255.255.255.128::eth0:off''], [''root'', ''/dev/sda1 ro''], [''args'', ''selinux=0 3'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01''], [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01-swap''], [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', '' x.x.x.x''], [''mac'', ''00:16:00:18:99:FB''], [''vifname'', ''anand01''], [''bridge'', ''xenbr0'']]]]) [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:284) parseConfig: config is [''vm'', [''name'', ''anand01''], [''memory'', 256], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/home/vmlinuz- 2.6.16.13-xen-x86_32''], [''ramdisk'', ''/home/initrd-2.6.16-xen-x86_32.img''], [''ip'', ''x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off''], [''root'', ''/dev/sda1 ro''], [''args'', ''selinux=0 3'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01''], [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01-swap''], [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', '' x.x.x.x''], [''mac'', ''00:16:00:18:99:FB''], [''vifname'', ''anand01''], [''bridge'', ''xenbr0'']]]] [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:380) parseConfig: result is {''ssidref'': None, ''uuid'': None, ''on_crash'': None, ''on_reboot'': None, ''image'': [''linux'', [''kernel'', ''/home/vmlinuz- 2.6.16.13-xen-x86_32''], [''ramdisk'', ''/home/initrd-2.6.16-xen-x86_32.img''], [''ip'', ''x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off''], [''root'', ''/dev/sda1 ro''], [''args'', ''selinux=0 3'']], ''on_poweroff'': None, ''cpus'': None, ''name'': ''anand01'', ''backend'': [], ''vcpus'': 1, ''cpu_weight'': None, ''vcpu_avail'': None, ''memory'': 256, ''device'': [(''vbd'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01''], [''dev'', ''sda1''], [''mode'', ''w'']]), (''vbd'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01-swap''], [''dev'', ''sda2''], [''mode'', ''w'']]), (''vif'', [''vif'', [''ip'', '' x.x.x.x''], [''mac'', ''00:16:00:18:99:FB''], [''vifname'', ''anand01''], [''bridge'', ''xenbr0'']])], ''bootloader'': None, ''cpu'': None, ''maxmem'': None} [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) XendDomainInfo.construct : None 0 [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1196) XendDomainInfo.initDomain: 6 1.0 [2006-06-22 13:34:10 xend] DEBUG (balloon:126) Balloon: free 257; need 257; done. [2006-06-22 13:34:10 xend] INFO (image:135) buildDomain os=linux dom=6 vcpus=1 [2006-06-22 13:34:10 xend] DEBUG (image:173) dom = 6 [2006-06-22 13:34:10 xend] DEBUG (image:174) image = /home/vmlinuz- 2.6.16.13-xen-x86_32 [2006-06-22 13:34:10 xend] DEBUG (image:175) store_evtchn = 1 [2006-06-22 13:34:10 xend] DEBUG (image:176) console_evtchn = 2 [2006-06-22 13:34:10 xend] DEBUG (image:177) cmdline = ip=x.x.x.x: 1.2.3.4:y.y.y.y:255.255.255.128::eth0:off root=/dev/sda1 ro selinux=0 3 [2006-06-22 13:34:10 xend] DEBUG (image:178) ramdisk = /home/initrd- 2.6.16-xen-x86_32.img [2006-06-22 13:34:10 xend] DEBUG (image:179) vcpus = 1 [2006-06-22 13:34:10 xend] DEBUG (image:180) features [2006-06-22 13:34:10 xend.XendDomainInfo] ERROR (XendDomainInfo:190) Domain construction failed Traceback (most recent call last): File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 183, in create vm.initDomain() File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1225, in initDomain channel_details = self.image.createImage() File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 118, in createImage return self.createDomain() File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 137, in createDomain result = self.buildDomain() File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 188, in buildDomain features = self.features) error: (9, ''Bad file descriptor'') [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy: domid=6 [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) XendDomainInfo.destroyDomain(6) [2006-06-22 13:34:10 xend] ERROR (xmlrpclib2:124) (9, ''Bad file descriptor'') Traceback (most recent call last): File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/util/xmlrpclib2.py", line 103, in _marshaled_dispatch response = self._dispatch(method, params) File "/usr/lib64/python2.3/SimpleXMLRPCServer.py", line 407, in _dispatch return func(*params) File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/server/XMLRPCServer.py", line 63, in domain_create info = XendDomain.instance().domain_create(config) File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomain.py", line 227, in domain_create dominfo = XendDomainInfo.create(config) File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 183, in create vm.initDomain() File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1225, in initDomain channel_details = self.image.createImage() File "/home/xen/xen- 3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 118, in createImage return self.createDomain() File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 137, in createDomain result = self.buildDomain() File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 188, in buildDomain features = self.features) error: (9, ''Bad file descriptor'') This probably would mean that the kernel compiled is a non xen kernel ? (Please correct me if i am wrong) I used the following to compile the kernel (after i used setarch linux32 bash) make linux-2.6-xen-config CONFIGMODE=menuconfig make linux-2.6-xen-build I then copied the dist/install/lib/modules to /lib/modules and then used depmod and mkinitrd to create the initrd image. Moved the kernel from dist/install/boot to /home where i call them from inside the config files. Can anyone tell me how to resolve the above problem ? -- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jerone Young
2006-Jun-22 20:57 UTC
[Xen-users] Re: [Xen-devel] Re: need to compile 32bit on x86_64 cpu
If you are using paravirutal Xen (which I believe you are). You "cannot" use a 32-bit Xen domU kernel with it. You have you use 64-bit Xen domU kernel with it. I can tell by the path you are using 64bit Xen "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py". Best to stick with 32-bit Xen if you want to run 32bit domUs. On Fri, 2006-06-23 at 02:18 +0530, Anand Gupta wrote:> I finally got the compilation done and copied the kernel and init > image for use for domU for 32bit OS. > > When i try to use the kernel i get an error "Error: (9, ''Bad file > descriptor'')" > > Here is the extract from xend.log, > > [2006-06-22 13:33:16 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) > XendDomainInfo.handleShutdownWatch > [2006-06-22 13:33:16 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) > XendDomainInfo.handleShutdownWatch > [2006-06-22 13:33:30 xend.XendDomainInfo] INFO (XendDomainInfo:836) > Domain has shutdown: name=anand01 id=5 reason=poweroff. > [2006-06-22 13:33:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) > XendDomainInfo.destroy : domid=5 > [2006-06-22 13:33:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) > XendDomainInfo.destroyDomain(5) > [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) > XendDomainInfo.create([''vm'', [''name'', ''anand01''], [''memory'', 256], > [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/home/vmlinuz- > 2.6.16.13-xen-x86_32''], [''ramdisk'', > ''/home/initrd-2.6.16-xen-x86_32.img''], [''ip'', > ''x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off''], [''root'', > ''/dev/sda1 ro''], [''args'', ''selinux=0 3'']]], [''device'', [''vbd'', > [''uname'', ''phy:/dev/vg01/anand01''], [''dev'', ''sda1''], [''mode'', ''w'']]], > [''device'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01-swap''], [''dev'', > ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', '' x.x.x.x''], > [''mac'', ''00:16:00:18:99:FB''], [''vifname'', ''anand01''], [''bridge'', > ''xenbr0'']]]]) > [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:284) > parseConfig: config is [''vm'', [''name'', ''anand01''], [''memory'', 256], > [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/home/vmlinuz- > 2.6.16.13-xen-x86_32''], [''ramdisk'', > ''/home/initrd-2.6.16-xen-x86_32.img''], [''ip'', > ''x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off''], [''root'', > ''/dev/sda1 ro''], [''args'', ''selinux=0 3'']]], [''device'', [''vbd'', > [''uname'', ''phy:/dev/vg01/anand01''], [''dev'', ''sda1''], [''mode'', ''w'']]], > [''device'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01-swap''], [''dev'', > ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', '' x.x.x.x''], > [''mac'', ''00:16:00:18:99:FB''], [''vifname'', ''anand01''], [''bridge'', > ''xenbr0'']]]] > [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:380) > parseConfig: result is {''ssidref'': None, ''uuid'': None, ''on_crash'': > None, ''on_reboot'': None, ''image'': [''linux'', [''kernel'', ''/home/vmlinuz- > 2.6.16.13-xen-x86_32''], [''ramdisk'', > ''/home/initrd-2.6.16-xen-x86_32.img''], [''ip'', > ''x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off''], [''root'', > ''/dev/sda1 ro''], [''args'', ''selinux=0 3'']], ''on_poweroff'': None, > ''cpus'': None, ''name'': ''anand01'', ''backend'': [], ''vcpus'': 1, > ''cpu_weight'': None, ''vcpu_avail'': None, ''memory'': 256, ''device'': > [(''vbd'', [''vbd'', [''uname'', ''phy:/dev/vg01/anand01''], [''dev'', ''sda1''], > [''mode'', ''w'']]), (''vbd'', [''vbd'', [''uname'', > ''phy:/dev/vg01/anand01-swap''], [''dev'', ''sda2''], [''mode'', ''w'']]), > (''vif'', [''vif'', [''ip'', '' x.x.x.x''], [''mac'', ''00:16:00:18:99:FB''], > [''vifname'', ''anand01''], [''bridge'', ''xenbr0'']])], ''bootloader'': None, > ''cpu'': None, ''maxmem'': None} > [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) > XendDomainInfo.construct : None 0 > [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1196) > XendDomainInfo.initDomain: 6 1.0 > [2006-06-22 13:34:10 xend] DEBUG (balloon:126) Balloon: free 257; need > 257; done. > [2006-06-22 13:34:10 xend] INFO (image:135) buildDomain os=linux dom=6 > vcpus=1 > [2006-06-22 13:34:10 xend] DEBUG (image:173) dom = 6 > [2006-06-22 13:34:10 xend] DEBUG (image:174) image > = /home/vmlinuz-2.6.16.13-xen-x86_32 > [2006-06-22 13:34:10 xend] DEBUG (image:175) store_evtchn = 1 > [2006-06-22 13:34:10 xend] DEBUG (image:176) console_evtchn = 2 > [2006-06-22 13:34:10 xend] DEBUG (image:177) cmdline > ip=x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off root=/dev/sda1 ro > selinux=0 3 > [2006-06-22 13:34:10 xend] DEBUG (image:178) ramdisk > = /home/initrd- 2.6.16-xen-x86_32.img > [2006-06-22 13:34:10 xend] DEBUG (image:179) vcpus = 1 > [2006-06-22 13:34:10 xend] DEBUG (image:180) features > [2006-06-22 13:34:10 xend.XendDomainInfo] ERROR (XendDomainInfo:190) > Domain construction failed > Traceback (most recent call last): > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 183, in create > vm.initDomain() > File > "/home/xen/xen-3.0.2-2 /dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1225, in initDomain > channel_details = self.image.createImage() > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 118, in createImage > return self.createDomain() > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 137, in createDomain > result = self.buildDomain() > File > "/home/xen/xen-3.0.2-2 /dist/install/usr/lib64/python/xen/xend/image.py", line 188, in buildDomain > features = self.features) > error: (9, ''Bad file descriptor'') > [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) > XendDomainInfo.destroy: domid=6 > [2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) > XendDomainInfo.destroyDomain(6) > [2006-06-22 13:34:10 xend] ERROR (xmlrpclib2:124) (9, ''Bad file > descriptor'') > Traceback (most recent call last): > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/util/xmlrpclib2.py", line 103, in _marshaled_dispatch > response = self._dispatch(method, params) > File "/usr/lib64/python2.3/SimpleXMLRPCServer.py", line 407, in > _dispatch > return func(*params) > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/server/XMLRPCServer.py", line 63, in domain_create > info = XendDomain.instance().domain_create(config) > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomain.py", line 227, in domain_create > dominfo = XendDomainInfo.create(config) > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 183, in create > vm.initDomain() > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1225, in initDomain > channel_details = self.image.createImage() > File "/home/xen/xen- > 3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 118, in > createImage > return self.createDomain() > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 137, in createDomain > result = self.buildDomain() > File > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 188, in buildDomain > features = self.features) > error: (9, ''Bad file descriptor'') > > This probably would mean that the kernel compiled is a non xen > kernel ? (Please correct me if i am wrong) > > I used the following to compile the kernel (after i used setarch > linux32 bash) > > make linux-2.6-xen-config CONFIGMODE=menuconfig > make linux-2.6-xen-build > > I then copied the dist/install/lib/modules to /lib/modules and then > used depmod and mkinitrd to create the initrd image. Moved the kernel > from dist/install/boot to /home where i call them from inside the > config files. > > Can anyone tell me how to resolve the above problem ? > > -- > regards, > > Anand Gupta > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Jun-22 21:25 UTC
[Xen-users] Re: [Xen-devel] Re: need to compile 32bit on x86_64 cpu
On 6/23/06, Jerone Young <jyoung5@us.ibm.com> wrote:> > If you are using paravirutal Xen (which I believe you are). You "cannot" > use a 32-bit Xen domU kernel with it. You have you use 64-bit Xen domU > kernel with it. I can tell by the path you are using 64bit Xen > "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py". > Best to stick with 32-bit Xen if you want to run 32bit domUs. >So i would need to compile and install 32bit version of xen on the dom0 now ? Shouldn''t the 64bit allow me to run 32bit domU''s as well as 64bit domU''s ? (atleast thats what i thought it would allow) Thanks. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2006-Jun-22 21:34 UTC
RE: [Xen-users] Re: [Xen-devel] Re: need to compile 32bit on x86_64 cpu
No, you can only run the same-bitness for Xenified guests. Xen 3.x supports unmodified guests at any level of bitness (up to whatever Xen itself is, you obviously can''t run a 64-bit unmodified guest on top of a 32-bit Xen). But for Xenified guests, the Xen-build and the Guest-OS must be the same - this is because it''s actually quite complicated to translate the different page-table levels and map the memory such that the guest can access it, etc [not exactly rocket science, of course, but it does make life more difficult for the hypervisor]. It has been discussed to make a shim-layer that translates the Xen-calling interface. Is there any particular reason you feel that you must run a 32-bit guest-OS. Almost all applications will work just fine in a 64-bit guest. Of course, there are some exceptions... If so, then you do need to move to 32-bit host-OS as well as guest-OS, yes. -- Mats ________________________________ From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Anand Gupta Sent: 22 June 2006 22:25 To: Jerone Young Cc: xen-devel@lists.xensource.com; Harry Butterworth; Xen Users; Andi Kleen Subject: [Xen-users] Re: [Xen-devel] Re: need to compile 32bit on x86_64 cpu On 6/23/06, Jerone Young <jyoung5@us.ibm.com> wrote: If you are using paravirutal Xen (which I believe you are). You "cannot" use a 32-bit Xen domU kernel with it. You have you use 64-bit Xen domU kernel with it. I can tell by the path you are using 64bit Xen "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomain Info.py". Best to stick with 32-bit Xen if you want to run 32bit domUs. So i would need to compile and install 32bit version of xen on the dom0 now ? Shouldn''t the 64bit allow me to run 32bit domU''s as well as 64bit domU''s ? (atleast thats what i thought it would allow) Thanks. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-Jun-22 21:43 UTC
Re: [Xen-users] Re: [Xen-devel] Re: need to compile 32bit on x86_64 cpu
Thanks for all the explanation Mats. Well i didn''t think of running 64bit on top of 32bit xen, however i certainly thought about vice-versa. However your explanation has made it clear it isn''t possible. Thanks for all the help. On 6/23/06, Petersson, Mats <Mats.Petersson@amd.com> wrote:> > No, you can only run the same-bitness for Xenified guests. Xen 3.xsupports unmodified guests at any level of bitness (up to whatever Xen > itself is, you obviously can''t run a 64-bit unmodified guest on top of a > 32-bit Xen). > > But for Xenified guests, the Xen-build and the Guest-OS must be the same - > this is because it''s actually quite complicated to translate the different > page-table levels and map the memory such that the guest can access it, > etc [not exactly rocket science, of course, but it does make life more > difficult for the hypervisor]. > > It has been discussed to make a shim-layer that translates the Xen-calling > interface. > > Is there any particular reason you feel that you must run a 32-bit > guest-OS. Almost all applications will work just fine in a 64-bit guest. Of > course, there are some exceptions... If so, then you do need to move to > 32-bit host-OS as well as guest-OS, yes. >-- regards, Anand Gupta _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel