Uncompressing linux___ done, booting the Kernel_tekkamanninja-chinaunix blog

Source: Internet
Author: User

Today, with the mainline Linux kernel ported to MINI6410, the mainline kernel 2.6.37.1 basically has supported the MINI6410 board, so porting to start up stage is very simple, but there is a more common problem when 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. I can't stop moving. ~ ~ ~
This problem is more common, because the output of information is limited, is not very easy to find the reason, if the code to trace the word is also more troublesome. When looking for a reason to solve this problem, I found some possible reasons to summarize here:
1. Machinetype does not match
after the kernel self-extracting is complete, the kernel will first enter the BL __lookup_machine_type function (in Arch/arm/kernel/head. s), check whether the Machine_type matches, and if not, jump into the __error_a function (in Arch/arm/kernel/head-common. s), causing the start to fail.
For example ARCH/ARM/MACH-S3C64XX/MACH-MINI6410.C view the following structure:
  1. Machine_start(MINI6410, "MINI6410")
  2. / * Maintainer:darius augulis <[email protected]> * /
  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
The definition of this macro is in Arch/arm/include/asm/mach/arch.h
  1. /*
  2. * Set of macros to define architecture features. This was 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. };
This macro defines the machine type after the extension is     machine_type_min6410.    MACHINE_TYPE_MIN6410 This macro is defined in Include/generated/mach-types.h
      1. #define mach_type_mini6410  2520
Machine
type in 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 are on the right.
2, serial port driver is not compiled into the kernel

I made this mistake when I was MINI6410, because there is no default profile for MINI6410, all of which you have to choose. Location in device Drivers->character devices->serial Drivers

    1. <*> Samsung SoC serial Support
    2. [*] Support-console on Samsung SoC serial port
    3. <*> Samsung s3c6400/s3c6410/s5p6440/s5p6450/s5pc100 Serial Port Support

3, kernel boot parameter setting error

Errors in the kernel's startup parameters can also cause the same error, but there are several possible errors:

(1) Console serial port configuration string mismatch

For example, there is a configuration:

    1. NOINITRD root=/dev/mtdblock4 rootfstype=jffs2 rw console=ttysac0,115200 init=/linuxrc Mem=64M

The key is on the console=ttysac0,115200, if the ttySAC0 is mistaken, or the baud rate is wrong, there will be problems.

The console of different CPUs may not be the same, for example:

Some may be ttyS0,

Samsung's CPUs are generally ttySAC0,

The early Ti ARM processor is generally ttyS2,

later, the high-version kernel of the TI OMAP series became ttyO2. Turn "S" into "O", representing Omap. Narcissism Ah ~ ~ ~

(2) Memory size configuration errorIf you are in the mem=64m" This parameter is configured with a problem, such as the configuration is too large, the same phenomenon will occur." note the matching relationship between your system memory and this value. 4. Open and configure the external bus (GPMC) in bootloaderwhen porting the cores of the TI OMAP series, it is also the case that if a bank in the GPMC is opened and configured in Uboot, it can cause a failure to start. This may be related to the GPMC register read and setup at startup in the Linux kernel and has not yet been parsed. the solution is to use the external bus in the bootloader, the control to the kernel before, shut off the external bus, let the kernel to configure itself. Or just don't open it.

Uncompressing linux___ done, booting the Kernel_tekkamanninja-chinaunix blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.