Uncompressing Linux... done, booting the kernel

Publisher:自由探索Latest update time:2024-10-15 Source: cnblogsKeywords:Uncompressing  Linux  done  booting  the  kernel Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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:

  1. MINI6410 # bootm 0x50008000

  2. ## Booting kernel from Legacy Image at 50008000 ...

  3. Image Name: Linux-2.6.37.1

  4. Image Type: ARM Linux Kernel Image (uncompressed)

  5. Data Size: 3800644 Bytes = 3.6 MiB

  6. Load Address: 50008000

  7. Entry Point: 50008040

  8. Verifying Checksum ... OK

  9. XIP Kernel Image ... OK

  10. OK

  11. Starting kernel ...

  12. Uncompressing Linux... done, booting the kernel.

  13. 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:
  1. MACHINE_START( MINI6410 , "MINI6410" )

  2. /* Maintainer: Darius Augulis */

  3. . boot_params    = S3C64XX_PA_SDRAM + 0x100,

  4. . init_irq    = s3c6410_init_irq,

  5. . map_io = mini6410_map_io,

  6. . init_machine    = mini6410_machine_init,

  7. . timer        = & s3c24xx_timer,

  8. MACHINE_END

This macro is defined in arch/arm/include/asm/mach/arch.h

  1. /*

  2. * Set of macros to define architecture features. This is built into

  3. * a table by the linker.

  4. */

  5. # define MACHINE_START( _type , _name)             /

  6. static const struct machine_desc __mach_desc_# # _type    /

  7. __used                            /

  8. __attribute__( ( __section__( ".arch.info.init" ) ) ) = {     /

  9. .nr        = MACH_TYPE_##_type,         /

  10. . name        = _name,


  11. # define MACHINE_END                /

  12. } ;

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

    1. # define MACH_TYPE_MINI6410 2520

machine type在u-boot

Configuration in board/samsung/mini6410/mini6410.c
    1. /*

    2. * Miscellaneous platform dependent initialisations

    3. */


    4. int board_init( void )

    5. {

    6. s3c64xx_gpio * const gpio = s3c64xx_get_base_gpio( ) ;


    7. . . . . .


    8. gd- > bd- > bi_arch_number = MACH_TYPE ;

    9. gd- > bd- > bi_boot_params = PHYS_SDRAM_1 + 0x100;


    10. return 0;

    11. }

This macro is defined in: include/configs/mini6410.h
    1. /*

    2. * Architecture magic and machine type

    3. */

    4. # 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

  1. <*> Samsung SoC serial support

  2. [*] Support for console on Samsung SoC serial port

  3. <*> 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:

  1. 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.


Keywords:Uncompressing  Linux  done  booting  the  kernel Reference address:Uncompressing Linux... done, booting the kernel

Previous article:Friendly Arm 6410 set static IP
Next article:Porting yaffs2 file system

Recommended ReadingLatest update time:2024-11-15 15:51

OK6410A Development Board (VIII) 54 linux-5.11 OK6410A Page Fault Exception Example Analysis
Abort Exception Interpretation (Prefetch Abort & Data Abort) instruction fetch memory abort data access memory abort cancel During the memory access process, the ARM processor may have an exception The cause of the exception is abort (abnormal access), which is divided into three types: MMU faults (4 types) T
[Microcontroller]
A method for realizing a unified interface of multiple serial buses based on Linux system
    introduction     When implementing multiple bus drivers such as TTY, I2C, SPI, ISA, USB, etc. separately in the Linux kernel, the implementation of each bus has its own characteristics, such as different parameter settings and different implementation structures. Taking TTY and I2C as examples, TTY adopts a three-
[Microcontroller]
A method for realizing a unified interface of multiple serial buses based on Linux system
linux2.6.32.2 mini2440 platform transplantation--ADC driver transplantation
1.2.1 About the ADC and touch screen interface of S3C2440 The Linux-2.6.32.2 kernel does not provide an ADC driver that supports S3C2440, so we designed one ourselves. This driver is relatively simple and is a character device. In the S3C2440 chip, the AD input and touch screen interface use a common A/D converter,
[Microcontroller]
linux2.6.32.2 mini2440 platform transplantation--ADC driver transplantation
OK6410A Development Board (VIII) 38 linux-5.11 OK6410A Why do we need so many memory managers?
Can't I just use memblock in the end? Is it not possible to skip memblock and directly set buddy? The difference between memblock and buddy Why is buddy the basis of memory manager and other managers? Why do we need to create slab and vmalloc after creating buddy? What are the characteristics of these memory man
[Microcontroller]
File descriptors in the Linux kernel (IV) -- allocation of fd -- get_unused_fd
Kernel version:2.6.14 CPU architecture:ARM920T Author:ce123(http://blog.csdn.net/ce123) There are two main functions in the Linux kernel that involve the allocation of file descriptors: get_unused_fd and locate_fd. This article mainly explains get_unused_fd, and will introduce locate_fd in the next article. First,
[Microcontroller]
Linux2.6.18 kernel S3C2410 platform transplantation notes
The experimental box I use is Embest EDUKIT-III, the onboard resource CPU: SAMSUNG S3C2410A, FLASH: K9F5608U0 (Samsung NAND 32MiB), and the burning tool: embest flash programmer. Because the manufacturer comes with a 2.4 kernel, the ones currently used for learning and development are basically 2.6 kernels, and the ch
[Microcontroller]
I2C Analysis of ARM-Linux s3c2440
Kernel version linux-2.6.30.4 I2C is a subsystem under Bus in Linux. It consists of client driver, i2c-core, i2c adapter driver, and algorithm aglorithm. There are two i2c adapters in s3c2440. As platform_device devices, they are registered and added when the system starts. Let's analyze the implementation process of
[Microcontroller]
OK6410A development board (VIII) 1 linux-5.11 OK6410A ethernet dm9000 porting
Code: https://github.com/lisider/linux/tree/ok6410a-linux-5.11 Submit id: 4459e78a4d845f08286623b98546bcefbb45ddb9 defconfig : arch/arm/configs/ok6410A_sdboot_mini_net_defconfig Configuration CONFIG_DM9000=y driver drivers/net/ethernet/davicom/dm9000.c device $ git diff arch/arm/mach-s3c/mach-smdk6410.c  diff --
[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号