1. Previous work:
(1) Re-port the 3.4.2 kernel, modify the partitions, and create the jffs2 file system
http://blog.csdn.net/fengyuwuzu0519/article/details/69802922
(2) Modify the kernel to support yffs2, create a yffs2 file system, trim the kernel, and create patches
http://blog.csdn.net/fengyuwuzu0519/article/details/70162666
(3) Transplant kernel to support DM9000C network card driver (can use mount nfs) and three-way serial port
http://blog.csdn.net/fengyuwuzu0519/article/details/72846205
So far, the kernel we have ported is basically complete and includes the network card driver, but there are still too few drivers. Now we port the previously written 2.6.22 driver to linux3.4.2 to expand the system driver.
The next job:
There are many kernel upgrades, and many header files will be deleted, or some macros will be renamed or no longer used, resulting in some header files in the driver being no longer valid and some functions being unable to be used as before. Therefore, when we modify the driver, we mainly address the function changes brought about by the kernel upgrade, because the compilation of the driver depends on the kernel.
2. Transplant linux2.26LED, button and other drivers to 3.4.2 kernel
1. Driver migration method between kernels
1. Compile
2. Solve the error
2.1 Wrong header file: remove or rename
2.2 Wrong macro: rename and use a new macro
2.3 Some functions are gone: rename and use new functions
2. Transplantation process
(1) Transplant LED driver
Update the kernel directory in the kernel, which needs to be compiled in advance
Make directly and see what errors there are
Some header files no longer exist, just remove them and see
Compile again
If there is a problem with the class_create declaration, then see how other kernel drivers use this function.
It should be the missing header file, including:
Compile again
I found that this function is black, so it should be no longer used. So search for class_create.
The function name is changed to: device_create
The export function is renamed to: device_destroy(firstdrv_class, MKDEV(major, 0));
Compile successfully and copy to the board
Loading Driver
This is the LED driver transplantation result.
(2) Transplanting the key driver
Modify the makefile and then make directly
Add the above header files
Pin declaration is gone
See which function is used, kernel search
The solution is given below
Continue compiling
After this is expanded, there is this variable, which should be due to some headers not being included.
Missing header file, see how others use this function
Continue compiling
How to use the search request_irq
The name of the macro has changed. How to use this function?
Many drivers are similar, we can modify them by comparing the software:
Continue compiling:
Uninstall error:
The function parameters have changed
Kill the application that uses it before uninstalling the driver.
Previous article:06-S3C2440 learning: transplanting 2012u-boot to S3C2440 (transplantation process 1) creating a new board + modifying the clock + SDRAM + UART
Next article:05-S3C2440 learning kernel (porting) linux3.4.2 porting (3) support DM9000C network card and modify support serial port 2
Recommended ReadingLatest update time:2024-11-21 20:28
- Popular Resources
- Popular amplifiers
- Follow me Season 2 Episode 3 Mission Code
- Microgrid Stability Analysis and Control Microgrid Modeling Stability Analysis and Control to Improve Power Distribution and Power Flow Control (
- MATLAB and FPGA implementation of wireless communication
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- The agency predicts that my country's public electric vehicle charging piles will reach 3.6 million this year, accounting for nearly 70% of the world
- U.S. senators urge NHTSA to issue new vehicle safety rules
- Giants step up investment, accelerating the application of solid-state batteries
- Guangzhou Auto Show: End-to-end competition accelerates, autonomous driving fully impacts luxury...
- Lotus launches ultra-900V hybrid technology "Luyao" to accelerate the "Win26" plan
- Light Sabers and Light Sabers Made with CPX
- Frontier Silicon DAB/FM/AM Radio and CD Music Platform
- Free Download: ADI Servo Motor Control Solutions
- God is angry and people are resentful! Let’s talk about vaccines. What should we do?
- PWM switching regulator and its application circuit
- Mobile phone giants actively respond to the "energy gap"
- Coal industry automation based on private network wireless communication technology
- PCB package design of electronic devices
- Ku-Band Locked Ferrite Phase Shifter
- 【RT-Thread Reading Notes】9. RT-Thread Study Chapters 14-16 Reading Notes