All versions of Linux source code can be downloaded from https://github.com/torvalds/linux/. The Linux source code used in this document is linux-2.6.39 (Network Disk: http://pan.baidu.com/s/1dDxjNl3).
1. Unzip the source code
Unzip the source code to the working directory. Here we use the 7za command in the p7zip tool. Using the unzip command will prompt the error "File name too long".
# Enter the working directory
# 7za x /media/sf_ShareDIR/MICRO2440/source/linux-2.6.39.zip
# cd ./linux-2.6.39
2. Linux kernel compilation
In the kernel tree of Linux 2.6.39, the mini2440 development board is already supported. The micro2440 is an upgraded version of the mini2440, so many configurations are compatible. Therefore, the configuration of the mini2440 development board can be selected.
a) Modify Makefile (the red words are the modified or added parts)
#vim Makefile
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
b) Generate mini2440 development board configuration
# make mrproper
# make mini2440_defconfig
c) Compile the kernel
# make uImage
d) Download the kernel to RAM and run it through U-BOOT (NOR)
The kernel can be downloaded to RAM and run through the NOR U-BOOT made in the article "Transplanting U-BOOT-2.14.07 to MICRO2440 Development Board.doc".
# tftp 0x30008000 /MICRO2440/uImage
#bootm
To facilitate debugging, you can set the U-BOOT startup command to download the kernel boot through TFTP.
# setenv bootcmd 'tftp 0x30008000 /MICRO2440/uImage;bootm'
As shown in the figure above, the kernel can be started normally, but it is stuck at "Uncompressing Linux... done, booting the kernel." This is usually caused by not setting the startup parameters (console= is not set) or the machine code of U-BOOT and the kernel is inconsistent. After testing, after setting the startup parameters (bootargs) in U-BOOT, it can be started normally. There may be a BUG in 2.6.39. I did not set any machine code here, and all used the default. U-BOOT uses 193 (arch/arm/include/asm/mach-types.h) and LINUX uses 1999 (arch/arm/tools/mach-types). The machine code is inconsistent, but it can still be started. After testing, other versions of LINUX cannot be started. The machine code must be consistent to start.
Previous article:Porting U-BOOT-2.14.07 to MICRO2440 development board
Next article:Module mode debugging driver (Micro2440 + linux 2.6.39)
Recommended ReadingLatest update time:2024-11-16 19:37
- 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
- Difficulty in UHF reader design - anti-collision
- How to use MSP430 hardware I2C - Taking BH1710 and AT24C02 as examples
- Master the direct drive configuration of GaN devices in one article!
- Is it just a problem with the PCB backplane?
- [RISC-V MCU CH32V103 Review] Changing the PWM output channel to adjust the LED light
- RT-Thread driver chapter: hwtimer reload value algorithm
- Convert ASC fonts for OLED display
- Do you really understand POE switches?
- Happy May Day everyone~
- Let's build an infrared temperature gun