Go to advanced search

by QianFanZ
Sat Aug 08, 2015 6:13 am
Forum: Troubleshooting
Topic: Help: request_mem_region return NULL
Replies: 3
Views: 1261

Re: Help: request_mem_region return NULL

Hello:
In my **pi2**,the same things.
by QianFanZ
Sun May 17, 2015 10:51 am
Forum: Troubleshooting
Topic: Help: request_mem_region return NULL
Replies: 3
Views: 1261

Help: request_mem_region return NULL

Hello: I learning how to write linux kernel module using Raspberry Pi. I just want to flash a LED. But when i try to use function "request_mem_region" like this: 47 if(request_mem_region(GPIO_BASE,48,"GPIO")==NULL){ 48 printk("request mem region error!\n"); 49 return -1; 50 } But it always return NU...
by QianFanZ
Sun May 17, 2015 10:06 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 GPIO PERI_BASE Dom Gert BCM2836
Replies: 22
Views: 7954

Re: RPi2 GPIO PERI_BASE Dom Gert BCM2836

Hello: I don't think it's a good idea to define GPIO_BASE as a macro in your code ,0x2020_0000 or 0x3f00_0000. Instead, we should include head file <mach/platform.h> . GPIO_BASE is defined in this file . For more information,please read: http://sysprogs.com/VisualKernel/tutorials/raspberry/leddriver...
by QianFanZ
Thu May 14, 2015 6:44 am
Forum: General discussion
Topic: There are some errors to build a kernel module.
Replies: 16
Views: 2110

Re: There are some errors to build a kernel module.

I am sorry for the late reply. You could do as follows. mkdir src cd src #This directory contains my source code. git clone --depth 1 https://github.com/raspberrypi/firmware git clone --depth 1 https://github.com/raspberrypi/linux cp firmware/extra/Module7.symvers linux/Module.symvers sudo ln -s /h...
by QianFanZ
Wed May 13, 2015 9:19 am
Forum: General discussion
Topic: Guide Compiling kernel modules for Raspbian
Replies: 0
Views: 1595

Guide Compiling kernel modules for Raspbian

I am sorry about my poor English , I come from China, my English is not so good,hope that you can understand me. I tried many days to compiler kernel module, but failed almost .I can make module successful ,but when i try to insert this module to kernel ,errors occurs. The kernel says my module is I...
by QianFanZ
Wed May 13, 2015 8:15 am
Forum: General discussion
Topic: There are some errors to build a kernel module.
Replies: 16
Views: 2110

Re: There are some errors to build a kernel module.

Tkanks, QianFanZ. I know why to fail to load module. Because the gcc version to build the kernel is different from one to compile the module. Thanks again for your help. Hello: Excuse me,Can you teach me how to do ,not using rpi-source? I don't want to use rpi-source, although it's a good tool to d...
by QianFanZ
Wed May 13, 2015 8:12 am
Forum: Troubleshooting
Topic: Help: make mrproper error
Replies: 1
Views: 548

Re: Help: make mrproper error

Hello everyone: I try download raspberry pi source code from github (version is 3.18.13) , I check sha sum using shasum tool ,and the value is SHA1: B90C79284E86BC5E2C7BA71848B64469458D1DBB . However when i try 'sudo make mrproper', errors occurs, says : scripts/Makefile.clean:17: drivers/media/usb...
by QianFanZ
Wed May 13, 2015 6:32 am
Forum: Troubleshooting
Topic: Help: make mrproper error
Replies: 1
Views: 548

Help: make mrproper error

Hello everyone: I try download raspberry pi source code from github (version is 3.18.13) , I check sha sum using shasum tool ,and the value is SHA1: B90C79284E86BC5E2C7BA71848B64469458D1DBB . However when i try 'sudo make mrproper', errors occurs, says : scripts/Makefile.clean:17: drivers/media/usb/...
by QianFanZ
Tue May 12, 2015 10:09 am
Forum: General discussion
Topic: There are some errors to build a kernel module.
Replies: 16
Views: 2110

Re: There are some errors to build a kernel module.

Tkanks, QianFanZ. I know why to fail to load module. Because the gcc version to build the kernel is different from one to compile the module. Thanks again for your help. Hello: Haha, I am very happy that hear this news ,it's really a good news . QianFanZ is a Strange name in English, In fact ,it's ...
by QianFanZ
Tue May 12, 2015 3:32 am
Forum: General discussion
Topic: There are some errors to build a kernel module.
Replies: 16
Views: 2110

Re: There are some errors to build a kernel module.

Hello: You can find Module.symvers in there: https://github.com/raspberrypi/firmware/commits/master/extra/Module.symvers But i don't know is 3.18.12 is sames as 3.18.12-v7+ . Good luck. If you compiler and 'insmod' module successful ,hope that you can teach me how to do .Thanks. I just compiler mod...
by QianFanZ
Mon May 11, 2015 10:51 am
Forum: General discussion
Topic: There are some errors to build a kernel module.
Replies: 16
Views: 2110

Re: There are some errors to build a kernel module.

Mr Lawson,I do what you say. Download the 3.18 linux source. But I can't find Module.symvers. My RPI is 3.18.12-v7+ and how to get the this version of Module.symvers. Hello: You can find Module.symvers in there: https://github.com/raspberrypi/firmware/commits/master/extra/Module.symvers But i don't...
by QianFanZ
Mon May 11, 2015 8:14 am
Forum: Advanced users
Topic: Need help: compiling simple kernel module for raspbian 3.12
Replies: 8
Views: 11414

Re: Need help: compiling simple kernel module for raspbian 3

Hi, i've been trying to compile a simple kernel module for my raspberry pi. The kernel module itself is from a simple hello world example: #include <linux/module.h> #include <linux/kernel.h> int hello_init(void) { printk(KERN_ALERT "Hello World :)"); return 0; } void hello_exit(void) { printk(KERN_...
by QianFanZ
Thu Apr 30, 2015 12:22 pm
Forum: General discussion
Topic: Help:About compiler modules
Replies: 11
Views: 1617

Re: Help:About compiler modules

If I remember correctly the Linux kernel checks that the module you are trying to load was built against the headers of the exact same version of Linux that is actually running. This prevents loading module compiled against incompatible versions being loaded and then crashing everything. So check t...
by QianFanZ
Thu Apr 30, 2015 7:01 am
Forum: Other languages
Topic: 中文-simplified-chinese
Replies: 84
Views: 165270

Re: 中文-simplified-chinese

大家好,我的中文不是很好。我是来学习汉语的仅仅。
by QianFanZ
Thu Apr 30, 2015 6:16 am
Forum: General discussion
Topic: Help:About compiler modules
Replies: 11
Views: 1617

Re: Help:About compiler modules

As far as I can tell you are wanting to write and compile a Linux kernel module. The prink is a clue here. As usual a quick google search would get you an answer for example this: http://www.thegeekstuff.com/2013/07/write-linux-kernel-module/ The last time I did this I used the Linux Device Drivers...
by QianFanZ
Thu Apr 30, 2015 6:07 am
Forum: General discussion
Topic: Help:About compiler modules
Replies: 11
Views: 1617

Re: Help:About compiler modules

The last time I did this I used the Linux Device Drivers book https://lwn.net/Kernel/LDD3/ but that seems to have not been updated for a long time. That stuff still works. Makefile #DEBUG := y obj-m := hello_kernel.o ifeq ($(DEBUG),y) DEBFLAGS = -O -g else DEBFLAGS = -O2 endif EXTRA_CFLAGS += $(DEB...
by QianFanZ
Thu Apr 30, 2015 6:00 am
Forum: General discussion
Topic: Help:About compiler modules
Replies: 11
Views: 1617

Re: Help:About compiler modules

As far as I can tell you are wanting to write and compile a Linux kernel module. The prink is a clue here. As usual a quick google search would get you an answer for example this: http://www.thegeekstuff.com/2013/07/write-linux-kernel-module/ The last time I did this I used the Linux Device Drivers...
by QianFanZ
Thu Apr 30, 2015 5:39 am
Forum: General discussion
Topic: Help:About compiler modules
Replies: 11
Views: 1617

Re: Help:About compiler modules

scotty101 wrote:Which programming language are you talking about? C?
Yes,programming language is C.
by QianFanZ
Wed Apr 29, 2015 9:39 am
Forum: General discussion
Topic: STICKY: Introduce yourself!
Replies: 3498
Views: 82356

Re: Introduce yourself!

Hello: I was a student from China,my English is not good (in others worlds,bad,poor) . I very like electronic,I am a fans of Raspberry Pi,Arduino,STM32 . Also i like doing something using this. Sorry,I cannot expression myself because my poor english. Thanks. 很高兴在这里认识大家,我是一个电子爱好者,在日常的学习中,喜欢树莓派,Ardui...
by QianFanZ
Wed Apr 29, 2015 9:30 am
Forum: General discussion
Topic: Help:About compiler modules
Replies: 11
Views: 1617

Help:About compiler modules

Hello : I just wanted to compiler module,very simple,a "Hello world" module. When insert this module,print "Hello world" and when leaving,print "Goodbye"(print this message to debug message using printk). But such simple things troubled me three days. I don't know how to do ,including download sourc...

Go to advanced search