Re: [uml-user] Compiling modules on UML

2009-08-05 Thread Manish Katiyar
On Wed, Aug 5, 2009 at 4:46 PM, Flaviofbcyb...@gmail.com wrote:
 2009/8/5 Manish Katiyar mkati...@gmail.com:
 My question is how do people build modules which are specific to a
 particular architecture on UML ? Is it possible ?
 Sure!
 Are you compiling the kernel modules from the host system? If not,
 try to do it.
 The exact procedure is the following:
 # mount -o loop rootfs loop_dir/
 # cd /uml/src/linux
 # make modules ARCH=um
 # make modules_install INSTALL_MOD_PATH=/uml/loop_dir ARCH=um
 # umount /uml/loop_dir

 Then, boot the UML again.

Hi Flavio,

I have done that step and my UML kernel boots fine. My question is in
UML environment what will the ARCH resolve to ? will it be um or x86 ?

Thanks -
Manish



 Flavio




-- 
Thanks -
Manish

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: [uml-user] Compiling modules on UML

2009-08-05 Thread H M Thalib

Hi  Manish,

Manish Katiyar wrote:

On Wed, Aug 5, 2009 at 4:46 PM, Flaviofbcyb...@gmail.com wrote:

2009/8/5 Manish Katiyar mkati...@gmail.com:

My question is how do people build modules which are specific to a
particular architecture on UML ? Is it possible ?

Sure!
Are you compiling the kernel modules from the host system? If not,
try to do it.
The exact procedure is the following:
# mount -o loop rootfs loop_dir/
# cd /uml/src/linux
# make modules ARCH=um
# make modules_install INSTALL_MOD_PATH=/uml/loop_dir ARCH=um
# umount /uml/loop_dir

Then, boot the UML again.


Hi Flavio,

I have done that step and my UML kernel boots fine. My question is in
UML environment what will the ARCH resolve to ? will it be um or x86 ?

Thanks -
Manish



Flavio







It will um. Actualy UML is a port of the Linux kernel as a normal Intel 
Linux process.


--
Thanks  Regards,
H M Thalib.

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: [uml-user] Compiling modules on UML

2009-08-05 Thread Manish Katiyar
On Wed, Aug 5, 2009 at 8:44 PM, H M Thalibhmtha...@gmail.com wrote:
 Hi  Manish,

 Manish Katiyar wrote:

 On Wed, Aug 5, 2009 at 4:46 PM, Flaviofbcyb...@gmail.com wrote:

 2009/8/5 Manish Katiyar mkati...@gmail.com:

 My question is how do people build modules which are specific to a
 particular architecture on UML ? Is it possible ?

 Sure!
 Are you compiling the kernel modules from the host system? If not,
 try to do it.
 The exact procedure is the following:
 # mount -o loop rootfs loop_dir/
 # cd /uml/src/linux
 # make modules ARCH=um
 # make modules_install INSTALL_MOD_PATH=/uml/loop_dir ARCH=um
 # umount /uml/loop_dir

 Then, boot the UML again.

 Hi Flavio,

 I have done that step and my UML kernel boots fine. My question is in
 UML environment what will the ARCH resolve to ? will it be um or x86 ?

 Thanks -
 Manish


 Flavio





 It will um. Actualy UML is a port of the Linux kernel as a normal Intel
 Linux process.

So that would mean that any new kernel module that I compile has to be
prefixed with ARCH=um ??? because my kernel source resides on host and
has been configured as um. If I compile any x86 module from UML it
will fail because the asm directory in kernel source points to asm-um
and not asm-x86. Isn't it ?? Or I am just talking senseless :-( ...

Below is how my directory structures look like.

-bash-3.2# ls -l /lib/modules/2.6.30.4/source/include/
total 120
-rw-r--r--  1 mkatiyar 5573   218 Jul 30 18:34 Kbuild
drwxr-xr-x  3 mkatiyar 5573  4096 Jul 30 18:34 acpi
lrwxrwxrwx  1 mkatiyar 5573 6 Aug  5 06:16 asm - asm-um

-bash-3.2# ls -l /lib/modules/2.6.30.4/
total 64
lrwxrwxrwx 1 root root   42 Aug  4 13:36 build -
/home/mkatiyar/personal/uml/linux-2.6.30.4
drwxr-xr-x 6 root root 4096 Aug  5 06:18 kernel
-rw-r--r-- 1 root root  265 Aug  5 11:01 modules.alias
..
...
-rw-r--r-- 1 root root  189 Aug  5 11:01 modules.usbmap
lrwxrwxrwx 1 root root   42 Aug  5 06:18 source -
/home/mkatiyar/personal/uml/linux-2.6.30.4

-bash-3.2# ls -l /home/mkatiyar
total 0
lrwxrwxrwx 1 root root 32 Aug  4 14:48 personal -
/mnt/host/home/mkatiyar/personal


-bash-3.2# mount
/dev/ubda on / type auto (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /mnt/host type hostfs (rw)


Thanks -
Manish




 --
 Thanks  Regards,
 H M Thalib.




-- 
Thanks -
Manish

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: [uml-user] Compiling modules on UML

2009-08-05 Thread H M Thalib

Hi

Manish Katiyar wrote:

On Wed, Aug 5, 2009 at 8:44 PM, H M Thalibhmtha...@gmail.com wrote:

Hi  Manish,

Manish Katiyar wrote:

On Wed, Aug 5, 2009 at 4:46 PM, Flaviofbcyb...@gmail.com wrote:

2009/8/5 Manish Katiyar mkati...@gmail.com:

My question is how do people build modules which are specific to a
particular architecture on UML ? Is it possible ?

Sure!
Are you compiling the kernel modules from the host system? If not,
try to do it.
The exact procedure is the following:
# mount -o loop rootfs loop_dir/
# cd /uml/src/linux
# make modules ARCH=um
# make modules_install INSTALL_MOD_PATH=/uml/loop_dir ARCH=um
# umount /uml/loop_dir

Then, boot the UML again.

Hi Flavio,

I have done that step and my UML kernel boots fine. My question is in
UML environment what will the ARCH resolve to ? will it be um or x86 ?

Thanks -
Manish



Flavio





It will um. Actualy UML is a port of the Linux kernel as a normal Intel
Linux process.


So that would mean that any new kernel module that I compile has to be
prefixed with ARCH=um ??? because my kernel source resides on host and
has been configured as um. If I compile any x86 module from UML it
will fail because the asm directory in kernel source points to asm-um
and not asm-x86. Isn't it ?? Or I am just talking senseless :-( ...



Yes, When you compile don't forget to specify the ARCH=um. If you didn't 
specify the ARCH then kernel build system will configure it for the 
host/development system mostly your x86 PC.


Mostly it modules should fail. but I am not sure.


Below is how my directory structures look like.

-bash-3.2# ls -l /lib/modules/2.6.30.4/source/include/
total 120
-rw-r--r--  1 mkatiyar 5573   218 Jul 30 18:34 Kbuild
drwxr-xr-x  3 mkatiyar 5573  4096 Jul 30 18:34 acpi
lrwxrwxrwx  1 mkatiyar 5573 6 Aug  5 06:16 asm - asm-um

-bash-3.2# ls -l /lib/modules/2.6.30.4/
total 64
lrwxrwxrwx 1 root root   42 Aug  4 13:36 build -
/home/mkatiyar/personal/uml/linux-2.6.30.4
drwxr-xr-x 6 root root 4096 Aug  5 06:18 kernel
-rw-r--r-- 1 root root  265 Aug  5 11:01 modules.alias
..
...
-rw-r--r-- 1 root root  189 Aug  5 11:01 modules.usbmap
lrwxrwxrwx 1 root root   42 Aug  5 06:18 source -
/home/mkatiyar/personal/uml/linux-2.6.30.4

-bash-3.2# ls -l /home/mkatiyar
total 0
lrwxrwxrwx 1 root root 32 Aug  4 14:48 personal -
/mnt/host/home/mkatiyar/personal


-bash-3.2# mount
/dev/ubda on / type auto (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /mnt/host type hostfs (rw)


Thanks -
Manish




--
Thanks  Regards,
H M Thalib.








--
Thanks  Regards,
H M Thalib.

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ