Kernel boot is stuck in Uncompressing Linux... Done, booting the kernel. This seems to be a common problem. There are also a number of causes listed on the Internet, but this time I met, but Baidu did not come up with a solution, and it took me a long time to solve the problem.
I will first list several common causes of Uncompressing Linux... done and booting the kernel.
1. machine code Mismatch
Solution: Enable debug When configuring the kernel
Kernel hacking-> kernel low-level debugging functions is enabled
Kernel hacking-> kernel low-level debugging messages via s3c UART is also enabled
Choose device drivers> character devices> serial drivers to load the Samsung SOC serial support, and then select support for console on Samsung SOC serial port.
If the machine code does not match, the printed information such
Machine configuration botched (NR 182), unable to continue.
Check whether your uboot machine code matches.
If not, you can modify the definition of machine code in the uboot include/ASM-arm/mach-types.h file. Or modify the kernel ARCH/ARM/tools/Mach-types file.
The steps and Analysis of machine code modification during inner nuclear transfer are as follows:
Modify the machine code, the machine code is defined in the machine_start (test2440, "test2440") line in the 2/ARCH/ARM/mach-s3c2440/mach-test2440.c file, the second parameter doesn't matter, it is important that the first parameter, when GCC compiles this mach-test2440.c, will match test2440 to "# define mach_type_test2440 n" in/include/ASM-arm/mach-types.h here, if the mach_type_test2440 definition is not found in the mach-types.h,
An error is reported when GCC compiles the mach-test2440.c;
Also, the/include/ASM-arm/mach-types.h is generated by the ARCH/ARM/tools/Mach-types file every time you make zimage,
To sum up, modify the machine code that involves the kernel code in three places, machine_start macro, mach-types.h, Mach-types, at Initial Startup, bootloader passes a machine code to the kernel.
2. Incorrect serial port configuration
Make sure that you choose to load Samsung SOC serial support in device drivers> character devices> serial drivers when configuring the kernel, and then select support for console on Samsung SOC serial port.
3, arch/ARM/mach-s3c2440/kconfig Configuration File Settings error, a key option is not selected.
This situation is rare on the Internet, but an error may be confusing. If the chip-level or board-level key configurations are not selected or the kernel starts to enter the start_kernel function, it enters an endless loop. If the chip-level configuration is not selected, it will enter an endless loop after the kernel executes the cpu id matching function _ lookup_processor_type (). No matter how you configure the kernel debug, the serial port will no longer print information output. Code execution can be tracked only when a lamp is clicked.
In this case, after Uncompressing Linux... done and booting the kernel is printed, there will be no output, even if debug is configured.
I encountered this problem because I did not select arch_s3c2440 on ARCH/ARM/mach-s3c2440/kconfig.
As a result, Uncompressing Linux... Done, booting the kernel gets stuck.