Error: unrecognized/unsupported machine ID
原因:
This kind of error message happens if the machine ID which is set in U-Boot doesn't match the kernel's ID(s). Unfortunately a standard U-Boot sets the machine ID on AT91RM9200DK boards not to MACH_TYPE_AT91RM9200DK but to the generic MACH_TYPE_AT91RM9200. You can either this in board/at91rm9200dk/at91rm9200dk.c; I would recommend to obtain a new machine ID and create your own U-Boot board type, using board/at91rm9200dk as a template. The list of machine IDs can be found in include/asm-arm/mach-types.h.
The Linux kernel has to be changed accordingly to the above machine ID. There you can find the information in arch/arm/tools/mach-types arch/arm/boot/compressed/head-at91rm9200.S arch/arm/mach-at91rm9200/board-dk.c
具体资料如下:
U-boot端include/asm-arm/mach-types.h支持的at91rm9200的machine类型有:
#define MACH_TYPE_AT91RM9200 251
#define MACH_TYPE_AT91RM9200DK 262
但是在board/at91rm9200dk/at91rm9200dk.c中,虽然注释中说明使用的是AT91RM9200DK-Board,但是实际使用的是MACH_TYPE_AT91RM9200。
|
Linux内核端:
arch/arm/tools/mach-types支持的at91rm9200的machine的ID有:
at91rm9200 ARCH_AT91RM9200 AT91RM9200 251
at91rm9200dk ARCH_AT91RM9200DK AT91RM9200DK 262
at91rm9200tb ARCH_AT91RM9200TB AT91RM9200TB 380
at91rm9200kr MACH_AT91RM9200KR AT91RM9200KR 450
at91rm9200ek MACH_AT91RM9200EK AT91RM9200EK 705
at91rm9200utl MACH_AT91RM9200UTL AT91RM9200UTL 821
at91rm9200kg MACH_AT91RM9200KG AT91RM9200KG 975
at91rm9200rb MACH_AT91RM9200RB AT91RM9200RB 1060
at91rm9200df MACH_AT91RM9200DF AT91RM9200DF 1119
arch/arm/boot/compressed/head-at91rm9200.S支持的有:
|
真正的配置信息是在arch/arm/mach-at91rm9200/board-dk.c中。
|
由此可以看出,Uboot使用的AT91RM9200的machine ID,而内核配置的是at91rm9200 dk的machine
ID,在这种情况下就出现了不一致。所以更改的方法:
方法一、把Uboot中board init中更改为MACH_TYPE_AT91RM9200DK
方法二、把MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")更改为MACHINE_START(AT91RM9200, "Atmel AT91RM9200-DK")。
只要U-boot和Linux kernel一致即可。