2

I would like to disable or remove 8250.c (low level UART driver) module and to implement the same with basic functionally so as it will perform read and write request from user-space

Here are my questions :

  1. How to remove / disable the 8250.0 module
  2. If possible give me some reference links / examples to implement the 8250 driver with basic functionality.

I am newbie for Linux device driver, excuse myself if I am wrong. I have googled a lot but didn't get the proper solution

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
tamil_innov
  • 223
  • 1
  • 7
  • 16
  • Device driver selection requires a kernel (re-)build. The Linux kernel has a configuration interface; the CLI version is `menuconfig` and invoked through the `make` program, i.e. `make menuconfig`. – sawdust Apr 12 '13 at 18:53
  • Since the 8250 can be found at a variety of addresses, it may be possible to get it out of the way by runtime configuration to tell it not to probe the address where yours actually is - you'd have to check the documentation or code. – Chris Stratton May 06 '14 at 17:07
  • Restored original poster's description of what they have tried, and their level of understanding, which is important to producing suitable answers. – Chris Stratton May 06 '14 at 17:11

1 Answers1

2

Answer 1) If your current system has 8250 driver built as module, just unload it:

$ lsmod | grep 8250
# rmmod 8250-driver-name

(I don't checked the exact name of the driver)

If your current system has 8250 driver built within the kernel (or you are building the Linux kernel for a new system), you must compile the kernel. You must edit your current configuration end remove the driver. You can use:

$ make xconfig

or

$ make menuconfig

for a graphic interface (run one on these commands inside the Linux kernel source). You can also manually edit the .config file and remove the driver

 CONFIG_SERIAL_8250=n

or compile it as module by setting:

 CONFIG_SERIAL_8250=m

(it is not recommended for this driver, read the documentation with xconfig or menuconfig)

If you already have a working configuration file, you can copy it in your kernel source as .config

cp /path/to/you/config/file /path/to/your/kernel/source/.config

then, edit the field CONFIG_SERIAL_8250 as above.

Answer 2) The best example that I can link is the 8250.c driver. But if you want learn how to develop Linux driver, you can read Linux Device Driver

Federico
  • 3,782
  • 32
  • 46
  • From your Answers I have understood that , in order to remove/disable 8250.o . I should use make config /.config to disable for the fresh installation of new kernel. Is it possible for me to remove/disable 8250.o from current ruuning kernel – tamil_innov Apr 13 '13 at 06:53
  • If it's not a loaded as kernel module and built into the kernel, then it's probably going to take a lot of kernel space hacking. Seriously a lot easier to just recompile the kernel IMHO – tangrs Apr 13 '13 at 12:41
  • @tamil_innov It depends on your current configuration, or if you are building the kernel for a new system. I'm editing the answer to clarify – Federico Apr 15 '13 at 08:17