[meta-xilinx] system.bit from digilent

Edward Vidal vidal.develone at gmail.com
Mon Feb 24 13:05:18 PST 2014


Hello,
I had made changes to my system.bit following the
http://www.digilentinc.com/Data/Documents/Product%20Documentation/ZedBoard_ELHoT.zip
What this did was demo creating a new myled IP.
Using the the linux-digilent kernel It created a module with myled.c using
Makefile
I added
                myled {

                    compatible = "dglnt,myled-1.00.a";

                    reg = <0x7e400000 0x10000>;

                 };

 The file fromdtb_myled.dts was use  create my  devicetree.dtb
After booting in /sys/devices I see 7e400000.myled
I have been trying compile the module in 3.12 kernel tree like I did in 3.6
kernel tree.
No having any success.  After making the following changes to the Makefile
obj-m := myled.o
all:
        make -C ../git/ M=$(PWD) modules
clean:
        make -C ../git/ M=$(PWD) clean
The digilent path
/home/vidal/Tutorial/drivers
The 3.12 path

/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers

make
make -C ../git/
M=/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers modules
make[1]: Entering directory
`/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/git'
  CC [M]
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.o
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c: In
function 'proc_myled_open':
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:68:2:
error: implicit declaration of function 'kmalloc'
[-Werror=implicit-function-declaration]
  buf = (char *)kmalloc(size * sizeof(char), GFP_KERNEL);
  ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:79:3:
error: implicit declaration of function 'kfree'
[-Werror=implicit-function-declaration]
   kfree(buf);
   ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c: At
top level:
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:124:22:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'myled_probe'
 static int __devinit myled_probe(struct platform_device *pdev)
                      ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:162:51:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'__devinitconst'
 static const struct of_device_id myled_of_match[] __devinitconst = {
                                                   ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:176:21:
error: 'myled_of_match' undeclared here (not in a function)
   .of_match_table = myled_of_match},
                     ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:177:11:
error: 'myled_probe' undeclared here (not in a function)
  .probe = myled_probe,
           ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:178:2:
error: implicit declaration of function '__devexit_p'
[-Werror=implicit-function-declaration]
  .remove = __devexit_p(myled_remove),
  ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:178:2:
error: initializer element is not constant
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:178:2:
error: (near initialization for 'myled_driver.remove')
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:180:1:
error: initializer element is not constant
 };
 ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:180:1:
error: (near initialization for 'myled_driver.shutdown')
In file included from
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:2:0:
include/linux/module.h:88:32: error: '__mod_of_device_table' aliased to
undefined symbol 'myled_of_match'
 extern const struct gtype##_id __mod_##gtype##_table  \
                                ^
include/linux/module.h:146:3: note: in expansion of macro
'MODULE_GENERIC_TABLE'
   MODULE_GENERIC_TABLE(type##_device,name)
   ^
/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.c:169:1:
note: in expansion of macro 'MODULE_DEVICE_TABLE'
 MODULE_DEVICE_TABLE(of, myled_of_match);
 ^
cc1: some warnings being treated as errors
make[2]: ***
[/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers/myled.o]
Error 1
make[1]: ***
[_module_/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/drivers]
Error 2
make[1]: Leaving directory
`/home/vidal/linux-topic/3.12+gitAUTOINC+b0f1cdb587-r0/git'
make: *** [all] Error 2
Any and all help is appreciated.
Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20140224/d2cef53b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myled.c
Type: text/x-csrc
Size: 5960 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20140224/d2cef53b/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fromdtb_myled.dts
Type: application/octet-stream
Size: 12069 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20140224/d2cef53b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 117 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20140224/d2cef53b/attachment-0001.obj>


More information about the meta-xilinx mailing list