From: http://www.latelee.org/programming-under-linux/145.html
This problem is also classic. It means that the machine ID passed by U-boot is incorrect. The articles I see on the Internet are almost exactly the same: There are two methods: one is to modify the head of the kernel. s (in. /ARCH/ARM/kernel directory). The second is to modify the U-boot code. Unfortunately, the source code file that appears in the second method is not found in the version I transplanted.
My prompt message is as follows:
Error: Unrecognized/unsupported machine ID (r1 = 0x33f4fee8 ).
Available machine support:
ID (HEX) Name
201700c1 smdk2410
000003f0 smdk2440
Please check your kernel config and/or bootloader.
(Note: The Kernel used here was used for the second Linux transplant long ago. -- I can't help remembering the days of hard work .)
In the U-Boot Code (./board/Samsung/smdk2440/smdk2440.c), the Code for assigning a machine ID is as follows:
GD-> BD-> bi_arch_number = mach_type_smdk2440;
In the Linux kernel (./ARCH/ARM/mach-s3c2440/mach-smdk2440.c), the Code is as follows:
Machine_start (smdk2440, "smdk2440 ")
The two are the same, both are 1008 (= 0x3f0 ).
In addition, I can print the Board information in U-boot to see the machine ID (the first line of arch_number is ):
Late2440 $ BD
Arch_number = 0x000003f0
Env_t = 0x00000000
Boot_params = 0x30000100
DRAM bank = 0x00000000
-> Start = 0x30000000
-> Size = 0x04000000
Ethaddr = 6C: 61: 74: 65: 6C: 65
Ip_addr = 192.168.1.200
Baudrate = 115200 BPS
It is reasonable to say that, since everyone is consistent, it is the right thing to guide normally. Unfortunately, it still does not work.
So I modified the head. s file. However, this method is not recommended.
Later, I added a line of debug information to the do_bootm_linux function in the cmd_bootm.c file:
/* New add for debug ll 2011-03-09 */
Debug ("# ll Debug: Machine ID: % x, Params: % x \ n", machid, BD-> bi_boot_params, & (BD-> bi_boot_params ));
/* We assume that the kernel is in place */
Printf ("\ nstarting kernel... \ n ");
Cleanup_before_linux ();
Thekernel (0, machid, BD-> bi_boot_params );
The following information is displayed at startup:
# Transferring control to Linux (at address 30008000 )...
# Ll Debug: Machine ID: 3f0, Params: 30000100: 33f4ffd4
Starting kernel...
Uncompressing
Linux ....................................... ........................................ ........................................ ..... done, booting the kernel.
Note that this line of starting kernel... is printed by U-boot.
The above information confirms that the machine ID or 0x3f0 is normal at the moment before the kernel is started. I do not know why it cannot be guided.
This problem has been solved for a long time, but this afternoon it can be guided. That is, do not modify the head. s file, or modify the U-boot key code (add a debug message.
The following is the startup information:
Late2440 $ bootm
* Kernel: default image load address = 0x33000000
# Booting kernel from legacy image at 33000000...
Image name: linux-2.6.30.2
Created: 6:33:57 UTC
Image Type: ARM Linux kernel image (uncompressed)
Data size: 1979832 bytes = 1.9 MIB
Load address: 30008000
Entry Point: 30008000
Verifying checksum... OK
Kernel data at 0x33000040, Len = 0x001e35b8 (1979832)
Loading kernel image... OK
OK
Kernel loaded at 0x30008000, end = 0x301eb5b8
# Transferring control to Linux (at address 30008000 )...
# Ll Debug: Machine ID: 3f0, Params: 30000100: 33f4ffd4
Starting kernel... uncompressing Linux ...................................... ........................................ ........................................ ...... done, booting the kernel.
Linux version 2.6.30.2 (latelee @ fightnow) (GCC version 4.3.2 (sourcery g ++ lite 2008q3-72) #50 wed Mar 9 14:27:24 CST 2011
Shan Ren does not understand what the strange problem is.