Manish Katiyar wrote:
> On Wed, Aug 5, 2009 at 8:44 PM, H M Thalib<hmthalib@...> wrote:
>> Hi Manish,
>> Manish Katiyar wrote:
>>> On Wed, Aug 5, 2009 at 4:46 PM, Flavio<fbcyborg@...> wrote:
>>>> 2009/8/5 Manish Katiyar <mkatiyar@...>:
>>>>> My question is how do people build modules which are specific to a
>>>>> particular architecture on UML ? Is it possible ?
>>>> 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 -
>> 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/18.104.22.168/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/22.214.171.124/
> total 64
> lrwxrwxrwx 1 root root 42 Aug 4 13:36 build ->
> 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 ->
> -bash-3.2# ls -l /home/mkatiyar
> total 0
> lrwxrwxrwx 1 root root 32 Aug 4 14:48 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 -
>> Thanks & Regards,
>> H M Thalib.
Thanks & Regards,
H M Thalib.