Today, we use the mainline Linux kernel to port to MINI6410. The mainline kernel 2.6.37.1 basically supports the MINI6410 board, so it is very simple to port to the stage where it can be started. However, a common problem still occurs during the porting:
-
MINI6410 # bootm 0x50008000
-
## Booting kernel from Legacy Image at 50008000 ...
-
Image Name: Linux-2.6.37.1
-
Image Type: ARM Linux Kernel Image (uncompressed)
-
Data Size: 3800644 Bytes = 3.6 MiB
-
Load Address: 50008000
-
Entry Point: 50008040
-
Verifying Checksum ... OK
-
XIP Kernel Image ... OK
-
OK
-
Starting kernel ...
-
Uncompressing Linux... done, booting the kernel.
-
Stopped and didn't move~~~~~
This problem is quite common. Due to the limited output information, it is not easy to find the cause. It is also troublesome to track it in the code. When looking for the cause and solving this problem, I found some possible reasons, which are summarized here:
1. Machine type does not match
After the kernel self-decompression is completed, the kernel will first enter the bl __lookup_machine_type function (in arch/arm/kernel/head.S) to check whether the machine_type matches. If it does not match, it will jump to the __error_a function (in arch/arm/kernel/head-common.S), causing startup failure.
For example, arch/arm/mach-s3c64xx/mach-mini6410.c looks at the following structure:
MACHINE_START( MINI6410 , "MINI6410" )
/* Maintainer: Darius Augulis
*/ . boot_params = S3C64XX_PA_SDRAM + 0x100,
. init_irq = s3c6410_init_irq,
. map_io = mini6410_map_io,
. init_machine = mini6410_machine_init,
. timer = & s3c24xx_timer,
MACHINE_END
This macro is defined in arch/arm/include/asm/mach/arch.h
/*
* Set of macros to define architecture features. This is built into
* a table by the linker.
*/
# define MACHINE_START( _type , _name) /
static const struct machine_desc __mach_desc_# # _type /
__used /
__attribute__( ( __section__( ".arch.info.init" ) ) ) = { /
.nr = MACH_TYPE_##_type, /
. name = _name,
# define MACHINE_END /
} ;
The machine type after this macro definition is expanded becomes MACHINE_TYPE_MIN6410.The macro MACHINE_TYPE_MIN6410 is defined in include/generated/mach-types.h
-
-
# define MACH_TYPE_MINI6410 2520
machine type在u-boot
Configuration in board/samsung/mini6410/mini6410.c
-
-
/*
-
* Miscellaneous platform dependent initialisations
-
*/
-
-
int board_init( void )
-
{
-
s3c64xx_gpio * const gpio = s3c64xx_get_base_gpio( ) ;
-
-
. . . . .
-
-
gd- > bd- > bi_arch_number = MACH_TYPE ;
-
gd- > bd- > bi_boot_params = PHYS_SDRAM_1 + 0x100;
-
-
return 0;
-
}
This macro is defined in: include/configs/mini6410.h
-
-
/*
-
* Architecture magic and machine type
-
*/
-
# define MACH_TYPE 2520
As long as these two numbers match, it's fine.
2. The serial port driver is not compiled into the kernel
I made this mistake when I was working on MINI6410, because there is no default configuration file for MINI6410, so I have to select this one myself. The location is in Device Drivers->Character devices->Serial drivers
-
<*> Samsung SoC serial support
-
[*] Support for console on Samsung SoC serial port
-
<*> Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port support
3. Kernel startup parameter settings are incorrect
The same error can also be caused by errors in the kernel startup parameters.
For example, there is a configuration:
-
noinitrd root=/dev/mtdblock4 rootfstype=jffs2 rw console=ttySAC0,115200 init=/linuxrc mem=64M
The key is console=ttySAC0,115200. If ttySAC0 is wrong or the baud rate is incorrect, there will be problems.
The console of different CPUs may be different, for example, some may be ttyS0.
Previous article:Friendly Arm 6410 set static IP
Next article:Porting yaffs2 file system
Recommended ReadingLatest update time:2024-11-15 15:51
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- The left side is connected to the microcontroller, and the right side is the button. Why is the IO port always at a high level?
- The stm32f103zet6 system board drives OV2640 and collects data incorrectly
- Quickly obtain TI industrial motor drive resources and answer questions to win prizes
- [Flower carving DIY] Interesting and fun music visualization series of small projects (13) --- organic stick column lamp
- [Silicon Labs BG22-EK4108A Bluetooth Development Review] + Unboxing Experience
- Dialog Semiconductor Software Application Engineer (BLE Low Energy Bluetooth Products)
- Power consumption optimization design in embedded DSP design
- Activity/Inactivity recognition of LSM6DSL
- EEWORLD University - What you don't know about C language
- Today at 10:00 AM Live: Introduction to ON Semiconductor's Photovoltaic and Energy Storage Products