Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Device drive (Linux) /****** Makefile ******/ KERNELDIR=/lib/modules/`uname -r`/build #Change the names here to your file name MODULES = helloWorld.ko obj-m += helloWorld.o all: make -C

Device drive (Linux)

image text in transcribed

/****** Makefile ******/

KERNELDIR=/lib/modules/`uname -r`/build

#Change the names here to your file name MODULES = helloWorld.ko obj-m += helloWorld.o

all: make -C $(KERNELDIR) M=$(PWD) modules

clean: make -C $(KERNELDIR) M=$(PWD) clean

install: make -C $(KERNELDIR) M=$(PWD) modules_install

quickInstall: cp $(MODULES) /lib/modules/`uname -r`/extra

Background: The Linux operating system consists of the Kernel some other minor components and then a large number of Device Drivers. Device drivers are the key to how various hardware devices interface with the computer. Task: Develop a skeleton device driver that can be loaded and run in Linux. Then add some minor functionality to the device driver such as the user/application passing in a value to the device driver and the device driver returns that nth word from a file. Include a document on how to build, load and interact with the device driver along with screen shots of output. Requirements: It must be written in C. It must be a valid an loadable device driver with at least some minimal user/application functionality. That includes an open, release, read, write, and at least one ioctl command. It must also be able to be unloaded, and indicate that it has unloaded from the system. Make use of the printk and copy_to_user functions. You should also write a user application that utilizes your device driver. Example: Create a calculator device driver. Open your device driver and write a series of numbers, use ioctl to perform an operation like summation, then use read to get the result. Close (release) the driver when you are done. Submission: Submit your write-up as a PDF on iLearn, your code and Makefile (modify that provided) in Git along with the PDF. Hint: The provided makefile is a key to building kernel modules

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

Discus 3D Graphics.

Answered: 1 week ago

Question

Excel caculation on cascade mental health clinic

Answered: 1 week ago