0

I have some basics knowledge on Linux (RHEL 5.4) Device Driver and Kernel internals and wish to gain expertise on same. I came to know of raspberry pi board.

My question is that the same code that I write on a Linux server will work there - is their architecture and concepts same. Kindly note that if it is not the same case then I need to buy a desktop PC otherwise for offline practicing purpose.

Note - I was unable to add raspberry pi group hence needed to remove the same and add the below ones.

3 Answers 3

1

Yes it depends on Architecture and the same code compiled on x86 will not wrok on Pi. However, there are ways to get around it.

As mentioned in the above post, use a cross compile toolchain(that comes with its own libc) to comile your code (kernel/userspace) to try it out on R pi. Again doing this, you will still not be able to test your code. To do that get a VM tool like qemu. I am not sure if there is a qemu port for R pi but in general a ARM 11 (ARMv6) based qemu should do. The following link should get you going with initial kernel development on your PC without owning a R pi.

http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/

Cheers Subbu

Sign up to request clarification or add additional context in comments.

Comments

0
Is their architecture and concepts same??

I would like to clarify that Rasperry Pi is ARM based board. Mostly I guess your server is running on X86.

Device drivers meant for devices. Rasperry Pi should have the device which you are writing driver for. I suggest you to study the data sheet of rasperry pi and linux driver model.

Linux driver model is architexture independent only. so you need only some effort for porting your X86 driver to ARM. You need to concentrate on hardware part.

2 Comments

Well one clarification - what host can we use to boot Rasperry PI? I plan to write a sample character device driver and study the HOST kernel data structures - in RHEL inside a char device driver I can access kernel data structures - like what are the tasks, thread currently running, stopped etc and many more. It would give me 2 folds benefits - a) writing device drivers in Rasperry and b) Understanding the host Kernel
@Prakash lifehacker.com/5976912/… is some what informative.
0

You might need to cross compile your code for ARM arch. if you are using x86 machine on your Linux Server.You can cross compile your modules for ARM using GNU ARM toolchain and then run on Raspberry pi.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.