Tool/software: Linux
Hi,
I am using am3358 processor on a custom board with NAND fitted.
U-boot and kernel were build with sdk 03.03.
When trying to boot MLO prints: The Expected Linux image was not found. Please check your NAND configuration.
Tracing through the code this is the place it is in:
if (header->ih_os == IH_OS_LINUX) {
/* happy - was a linux */
err = nand_spl_load_image(
CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
spl_image.size,
(void *)spl_image.load_addr);
nand_deselect();
return err;
} else {
puts("The Expected Linux image was not "
"found. Please check your NAND "
"configuration.\n");
puts("Trying to start u-boot now...\n");
}
The header it extracts is the top 64 bytes of Kernel partition:
typedef struct image_header {
__be32 ih_magic; /* Image Header Magic Number */
__be32 ih_hcrc; /* Image Header CRC Checksum */
__be32 ih_time; /* Image Creation Timestamp */
__be32 ih_size; /* Image Data Size */
__be32 ih_load; /* Data Load Address */
__be32 ih_ep; /* Entry Point Address */
__be32 ih_dcrc; /* Image Data CRC Checksum */
uint8_t ih_os; /* Operating System */
uint8_t ih_arch; /* CPU architecture */
uint8_t ih_type; /* Image Type */
uint8_t ih_comp; /* Compression Type */
uint8_t ih_name[IH_NMLEN]; /* Image Name */
} image_header_t;
Looking at binary view of my zImage I can see that 29th byte is 0 when MLO expects it to be 5.
Reading about linux image headers it looks like uImage has the Header and zImage is compressed version and does not have it.
Is this correct?
Do I have to have uImage for MLO to recognise the Kernel.
Kind regards,
Ugnius