Porting Linux-3.4.2 to TQ2440

Publisher:bin0990Latest update time:2021-07-22 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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

insert image description here

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:

insert image description here

4. Select the kernel configuration file and compile

Enter the default configuration file directory of the ARM architecture board:


cd arch/arm/configs/

insert image description here

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

insert image description here

6. Modify the kernel mtd partition table

Enter


arch/arm/mach-s3c24xx/common-smdk.c


The previous kernel partition table was

insert image description here

change into

insert image description here

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 

insert image description here

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

insert image description here
insert image description here

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

insert image description here
insert image description here

(2) The file system is made according to the Tianjian

insert image description here

(3) Configure the kernel to support the Yaffs file system. Please refer to my blog: Porting the Yaffs file system

insert image description here

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!

Reference address:Porting Linux-3.4.2 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

CT107D Blue Bridge Cup dynamic digital tube example (4)
Today I will tell you about the display of CT107D Blue Bridge Cup digital tube. I won't go into detail about the specific principles of digital tubes, because I'm afraid you'll get dizzy if I say too much. If you want to understand the principles, you can do some BD yourself. Let's find the circuit: As you can s
[Microcontroller]
CT107D Blue Bridge Cup dynamic digital tube example (4)
Xiaomi Mi 10 Pro first sale results announced: sales across all platforms exceeded 200 million yuan in 55 seconds
     As promised, Xiaomi Mi 10 Pro officially went on sale at 10am this morning. Xiaomi just announced the first sale of the new phone: 55 seconds, sales across all platforms exceeded 200 million yuan. In comparison, Xiaomi Mi 10 was first sold on February 14, and within one minute of its launch, sales on all platform
[Mobile phone portable]
51 Single Chip Microcomputer (2) Flowing Light Experiment
1. Control the on and off of one or more lights Assembly Implementation ;Notes   LOOP:   ;SETB P1.1 ;(1) Turn off the light   MOV P1,#0FFH;   LCALL DELAY; (2) Delay for a period of time   ;CLR P1.1 ;(3) Turn on the light   MOV P1,#0FDH;   LCALL DELAY; (4) Delay for a period of time      AJMP LOOP ;(5) Jump
[Microcontroller]
A comprehensive review of the four most widely used biometric technologies in life
According to the forecast of Transparency Market Research, a US consulting firm, the global biometric technology market will grow from US$11.24 billion in 2015 to US$23.3 billion in 2020, with a compound annual growth rate of 15.7%. The biometric market is growing rapidly. With the continuous advancement of technolo
[Embedded]
A comprehensive review of the four most widely used biometric technologies in life
Two points to note when selecting measuring instruments
1. Selection of instrument accuracy level The higher the accuracy level of the instrument (i.e. the smaller the value), the more accurate the measurement result. However, the higher the accuracy of the instrument, the more expensive it is and the more troublesome it is to repair. Therefore, the accuracy level of the i
[Test Measurement]
Two points to note when selecting measuring instruments
Detailed explanation of how to create a new project and a new file in Keil4
To learn about microcontrollers, you need to use code compilation software such as Keil. Beginners need to start from the first step of creating a new project. Only by doing the first step well can they go further and further. Tools/Raw Materials Computer, Keil software Methods/Steps Open the Keil software,
[Microcontroller]
Detailed explanation of how to create a new project and a new file in Keil4
Sharp AQUOS Zero 2 may be released: 240Hz screen
       On May 22, Sharp AQUOS Zero 2 was launched in Taiwan, China, priced at NT$21,990 (approximately RMB 5,200).   Sharp AQUOS Zero 2 features a slim design, and its body weight is only 141g. According to the official introduction, AQUOS Zero 2 uses a gradient back cover with a metal hairline texture, which has a st
[Mobile phone portable]
Sharp AQUOS Zero 2 may be released: 240Hz screen
ARM development step by step into the NandFlash 4KB breakthrough
Experimental purpose: Break through the 4KB Steppingstone storage space limit, read the code after 4KB in NandFlash to implement the "lighting method", and master the operation of NandFlash. Experimental environment and instructions: Hengyi S3C2410 development board H2410. The NandFlash of the H2410 core board uses S
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号