This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

about leopard dm365

hi to all

wll i m using leopard dm365 a new linux kenel is there

how to insert modules in the newly build kernel

any idea:: and one more thing is that /lib/modules/(kernelversion)/linux/build is showing directory not found

but build is there in linux

any help

kailash

  • You might want to refer this page

    http://linux.die.net/man/8/insmod

  • hi nagabhusana

    well ur link is useful but i think u misunderstod or i hve written wrong ques

    sry abt it

    actually make command is not working insmod is a later process

    well i m trying to build module on newly build kernel on leopard 365

    i have created c file for simple module and make file for it

    here are the details

    this is my Makefile

    obj-m +=startup.o
    all:
            make -C $(KERN_SRC) ARCH=arm CROSS_COMPILE=armeb-linux- M='pwd' modules
    clean:
            make -C $(KERN_SRC) ARCH=arm CROSS_COMPILE=aemeb-linux- M='pwd' clean

     

    root@192.168.72.120:~/kailash# make                                            
    make: Warning: File `Makefile' has modification time 3.4e+08 s in the future   
    make -C  ARCH=arm CROSS_COMPILE=armeb-linux- M='pwd' modules                   
    make: *** ARCH=arm: No such file or directory.  Stop.                          
    make: *** [all] Error 2 

    any suggestions

    thanxx

    kailash

     

  • If you trying to make a loadable module outside the kernel, you need to make a 2 pass makefile. Something like this.

    ifeq ($(KERNELRELEASE),)
    #PASS 1 Local context
    all:
        make -C $(KERN_SRC) ARCH=arm CROSS_COMPILE=armeb-linux- M='pwd' modules
    clean:
        rm -vrf startup.o your_module.ko
    else
    #PASS 2 Kernel context
    your_module-objs := startup.o
    obj-m := your_module.o
    endif

    Just to be sure. Your source file startup.c and makefile are NOT in the kernel directory.

     

  • hi

    thanxx wong for reply

    but its not working

    well kernel directory mean which

    one is which i get after root access which is emty

    and second is coming after cd / contains

    bin                               home    opt   sys                   var      
    boot                              jhazba  proc  tmp                            
    dev                               lib     root  uImage                         
    dm365_flash_image_2_10_01_18.tar  media   sbin  uImage-dm365-evm.bin           
    etc                               mnt     srv   usr                          

    well i ve tried in both same error is coming ie

    make: Warning: File `Makefile' has modification time 3.4e+08 s in the future   
    make -C  ARCH=arm CROSS_COMPILE=armeb-linux- M='pwd' modules                   
    make: *** ARCH=arm: No such file or directory.  Stop.                          
    make: *** [all] Error 2 

    kailash

  • Kernel directory is where the corresponding kernel source is.

  • hii

    well  kernel source is the path of dir that we r giving in rootpath?

    for me its /home/dm365/workdir/filesys

    whenever i m entering as root i m entering in the folder root in this filesys

    and whenver i m doing cd /

     i m coming to filesys again

    well filesys contain

    bin
    boot
    dev
    etc
    home
    lib
    media
    mnt
    opt
    proc
    root
    sbin
    srv
    sys
    tmp
    usr
    var

    im entering in root folder

    thanxx

    kailash

     

     

  • What you are referring 2 is file system.

    Ex: Arago kernel sources are here