My LINUX notes: Install Ubuntu7.10 and write the first driver

Source: Internet
Author: User
My LINUX notes: Install Ubuntu7.10 and write the first driver-general Linux technology-Linux technology and application information. For more information, see the following. The installation of linux on a CD is obviously very simple, and because I have installed the XP system on my computer, and my computer does not have an optical drive, therefore, I downloaded an ISO file and Related Materials for ubuntu, a popular linux distribution, from the Internet, to implement hard disk installation under xp:

1. Prepare grub for dos, ubuntu-7.10-desktop-i386.iso file.

Copy the grub.exe, grldr, and menu. lst files to the c root directory, modify the boot. ini file under the root directory, and add the c: \ = grldr item.

Copy ubuntu-7.10-effectop-i386.iso,vmlinuz,initrd.gz to the root directory of any partition.

4. Start ubuntu installation after restart.

Note: The above files are stored in the linux \ ubuntu7.10 directory of the DATA3 partition on my computer.

Praise: Now linux is really powerful. I remember that when I used linux in, the ntfs file format was not recognized by default, and there were a lot of things to do with it. Now, after I installed ubuntu7.10, all the ntfs partitions are automatically placed on the desktop, and the desktop is also very beautiful. The layout is more practical than xp. It is worth mentioning that the installer is so powerful.

Now linux installed, it is imperative to write a driver for our JVS-C801 monitoring card, and then write an application to show the collected video. Since we will be fully engaged in the above work next week, we will take the time this week to familiarize ourselves with driver development.

I downloaded the linux device drivers 3rd edition from the internet. I have read the pdf English documents. Thanks to the win32 driver development experience, I think PCI control and register settings should be the same. For me, the main solution is to understand the write driver mode in linux. So I start by writing a hello world Driver.

Download the source code of the ldd3 example, go to the corresponding directory, find the makfile file, and delete the content about compiling the other examples. c compilation, and then input make on the terminal, and the hello will be compiled successfully. ko driver. Then install it with insmod without any error prompts, but there is no hello world in the book. Then the book says that if it does not appear, it may be related to the implementation mechanism of the specific linux version, for example, it is stored in the/var/log/messages file, but my linux does not put the print information in the above file, but in the/var/log/kern. log File.

In addition, you do not need to re-compile the kernel or module to compile the driver. If you need to check the kernel source code, you can choose to install the kernel source code package by running the synaptic program, open synaptic, and search for linux-source to find the corresponding kernel source code package, they are not installed by default in ubuntu7.10. However, the corresponding header files have been installed.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.