Re: scull compilation/insmod problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 4/17/06, Arun Srinivasan <arunlkml@xxxxxxxxx> wrote:
Hi grp,

I am trying out the cross-compliation of the scull module from LDD2 for arm. I had 2 issues here:

1) I set the kernel sources correctly in the Rules.make (given in the source code from the book). For the arch. specific makefile, I set the
ARCHMAKEFILE variable in the Rules.make as:

(ps: I am not using the Makefile.arm given along with the source code of the book).

$ARCHMAKEFILE=/usr/src/linux/arch/arm/Makefile

The module dosent get compiled in the above case. It seems to stop somewhere between the arch/arm/Makefile.The error I get is :

[root@consult02 scull]# make
Makefile:35: warning: overriding commands for target `install'
/home/asrinivasan/k002/linux-xscale-le/arch/arm/Makefile:321: warning: ignoring old commands for target `install'
  Making asm-arm/arch -> asm-arm/arch-pxa symlink
ln: creating symbolic link `include/asm-arm/arch' to `arch-pxa': No such file or directory
make: *** [include/asm-arm/.arch] Error 1

2) Now, If I make a copy of the "/usr/src/linux/arch/arm/Makefile" as " Makefile.arm" in the local dir. where I am cross-compiling the scull modules and the  module  gets complied successfully. Now, when I do 'insmod scull.o' in an arm-proc. machine, the module gets loaded. I can see tht using 'lsmod'. But I dont see it in /proc/devices? But neither does the

result = register_chrdev(scull_major, "scull", &scull_fops);
    if (result < 0) {
        printk(KERN_WARNING "scull: can't get major %d\n",scull_major);
        return result;
    }

piece of code , report failure in case of no major number assigned. Can someone give pointers, regarding what might be the problem ?

The 2nd part is solved now. The 2.4 kernel sources had "devfs support" enabled (sorry, I didnt  take notice of tht) and hence it had used "devfs_mk_dir();" instead of "register_chrdev()" to register the device. Anyway, I disabled the devfs support in the kernel and now it works fine.

But, still confused about my 1st question? 

--
"There are 10 people in the world - those who understand binary and those who dont !"



--
"There are 10 people in the world - those who understand binary and those who dont !"

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux