cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
8,285 Views
Registered: ‎06-23-2013

blink: no symbol version for module_layout

Jump to solution

Has anybody succeeded  to insmod blink.ko onto Zynq running Ubuntu ?

What is the remedy for the dmesg below ?

 

dmesg has,

blink: no symbol version for module_layout 

 

Googling for this message finds recommended remedy is:

make -C /lib/modules/`uname -r`/ M=`pwd` modules

 

but the git clone linux has no directory lib/modules/`uname -r`

 

whilst ug873-design-files Makefile has,

KER_DIR := /home/doreen/Xilinx/gitLinux/linux-xlnx
all:

    make ARCH=$(ARCH) -C $(KER_DIR) M=$(PWD) modules

 

 

    At the linux-xlnx directory of the Ubuntu kernel:
      cp ./arch/arm/configs/xilinx_zynq_defconfig .config
       make oldconfig
    make prepare
    make modules

 

$ make modules
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  Building modules, stage 2.
  MODPOST 20 modules

 

The module was built with the kernel sources version matching the running kernel.
# uname -r                                                                                                                                                         
3.8.0-xilinx-00015-gabc285b      # modinfo blink.ko                                                                                                                                                 
filename:       blink.ko                                                                                                                                                                        
license:        GPL v2                                                                                                                                                                          
description:    Xilinx Blink Driver                                                                                                                                                             
author:         Doreen Yen                                                                                                                                                                      
depends:                                                                                                                                                                                        
vermagic:       3.8.0-xilinx-00015-gabc285b SMP preempt mod_unload modversions ARMv7 p2v8       

 

 

 

 

dogbytes
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
11,536 Views
Registered: ‎06-23-2013

To fix the subject line message, copied from the board, /proc/config.gz to the root of the linux sources, directory linux-xlnx

zcat config.gz > .config

make oldconfig

make prepare

make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE uImage

make modules

 

cd to your directory having blink.c

make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE clean
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE

scp blink.ko to your board, ~/App/

# insmod blink.ko

 

Happily, no error message and it is there,

 

# lsmod                                                                                                                                                                           
Module                  Size  Used by                                                                                                                                                           
blink                   2011  0                                                                                                                                                                 
ipv6                  227727  20   

 

 

dogbytes

View solution in original post

0 Kudos
3 Replies
Highlighted
Explorer
Explorer
11,537 Views
Registered: ‎06-23-2013

To fix the subject line message, copied from the board, /proc/config.gz to the root of the linux sources, directory linux-xlnx

zcat config.gz > .config

make oldconfig

make prepare

make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE uImage

make modules

 

cd to your directory having blink.c

make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE clean
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE

scp blink.ko to your board, ~/App/

# insmod blink.ko

 

Happily, no error message and it is there,

 

# lsmod                                                                                                                                                                           
Module                  Size  Used by                                                                                                                                                           
blink                   2011  0                                                                                                                                                                 
ipv6                  227727  20   

 

 

dogbytes

View solution in original post

0 Kudos
Highlighted
Explorer
Explorer
8,260 Views
Registered: ‎06-23-2013

Oh yeah, the printk messages of the init_module are not output to serial console,

dmesg |tail

 

dogbytes
0 Kudos
Highlighted
Explorer
Explorer
8,255 Views
Registered: ‎06-23-2013

Hey, use the zc706-bist system.bit and change blink.c address was for zc702, instead use for zc706,

#define BLINK_CTRL_REG     0x41220000

the address is found in the

/zc706_bist.sdk/SDK/SDK_Export/zynq_fsbl_bsp/ps7_cortexa9_0/include/xparameters.h

 

Then blink.ko and linux_blinkleds_app will give you the console menu to turn LED_0 on with a 1, off with a 0, and some other digit to quit the menu, eg. 2, the comment in the code about 0 quitting menu is wrong.

 

dogbytes
0 Kudos