Development Environment
Host development environment: Ubuntu 12.04
BootLoader: u-boot-2012.04.01
kernel:linux-3.4.2
CPU: s3c2440
Development board: TQ2440
step
I have previously ported the linux-2.6.30.4 kernel, and this time I will try to port a higher version of the kernel, Linux-3.4.2
1. Download kernel source code
Download address: Kernel download address
Copy to the virtual machine and decompress the kernel
tar -jxvf linux-3.4.2.tar.bz2
2. Add support for ARM in the system
3. Modify the platform input clock
If you don't modify it, garbled characters will appear when you start the kernel
The corresponding single board file found in the kernel source code is archarmmach-s3c24xxmach-smdk2440.c file. In the smdk2440_map_io function, it can be seen that there is a problem with the crystal oscillator setting. The TQ2440 board has a 12M crystal oscillator, so the modification is as follows:
4. Select the kernel configuration file and compile
Enter the default configuration file directory of the ARM architecture board:
cd arch/arm/configs/
Go back to the root directory, configure the kernel, compile and generate the UImage image
make s3c2410_defconfig
make uImage
5. Download to the development board for testing
tftp 30000000 uImage
bootm 30000000
Unable to mount root file system temporarily
6. Modify the kernel mtd partition table
Enter
arch/arm/mach-s3c24xx/common-smdk.c
The previous kernel partition table was
change into
7. Modify the kernel source code to support DM9000 network card driver
The SMDK2440 development board used in the previous configuration does not support the DM9000 network card driver by default, so the network card needs to be transplanted. According to Wei Dongshan's transplantation method, the file system cannot be mounted. I have tried it many times, so I won't post the pictures here. So I suspect that something is missing, and then I think about it carefully. My board is TQ2440. I can try the previous method of transplanting the 2.6.30.4 kernel and transplant the DM9000 network card according to Tianqian's method.
Enter the kernel source directory and find
arch/arm/mach-s3c24xx/mach-smdk2440.c
For specific methods, please refer to my blog on porting the linux-2.6.30.4 kernel: https://editor.csdn.net/md/?articleId=105127813
The method of modifying mach-smdk2440.c is basically the same as Wei Dongshan's, and then I modified it according to Tianqian's method
linux-3.4.2/drivers/net/ethernet/davicom/dm9000.c
8. Compile the kernel and test the NFS method to mount the file system
Because the kernel has supported the network card driver, try to mount the file system in NFS mode first.
make uImage
Copy the image to the TFTP folder and start the development board
Modify u-boot environment variables
setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.192:/source/rootfs ip=192.168.1.6 init=linuxrc console=ttySAC0,115200
An error occurred. The file was clearly mounted, but a kernel error occurred. After searching for information, refer to the blog: Reference article
It was found that the compiler used the eabi interface (Embedded Application Binary Interface) when compiling, but the configuration was not enabled in the kernel, so the kernel prompted that this was an illegal instruction.
7. Configure the kernel to support EABI interface
Enter the kernel directory
make menuconfig
make uImage
8. Multiple ways to mount the root file system
After the above kernel configuration, the root file system is successfully mounted
(1) The file system uses Wei Dongshan's
(2) The file system is made according to the Tianjian
(3) Configure the kernel to support the Yaffs file system. Please refer to my blog: Porting the Yaffs file system
The file system used is the yaffs2 file system made by Wei Dongshan. I will build the file system myself when I have time.
Postscript: After several nights of hard work, I encountered various problems and almost gave up. Finally, my hard work paid off and I successfully ported the linux-3.4.2 kernel to TQ2440!
Previous article:Production of busybox root file system based on TQ2440
Next article:Porting uboot-2012.04.01 to TQ2440
Recommended ReadingLatest update time:2024-11-16 10:34
- Popular Resources
- Popular amplifiers
- Network Operating System (Edited by Li Zhixi)
- 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)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Contract issues
- Industrial 4-20mA Circuit
- c# System.Object class and safe transformation of data
- Please reinstate the invitation of 8 people, please, I beg you, I thought I would never give any suggestions again, I beg the maintenance staff on behalf of my boss
- Embedded software squeezes out the lowest power mode
- Sharing of experience in single board circuit design (2) -- Power socket selection
- 4-20mA current output design
- How to calculate the inductance of a Helmholtz coil in maxwell3d?
- The output signal of the inverse proportional op amp is wrong
- MSP430F5529 generates PWM waves with CCS