Recognize raspberry pi kernel in grub-file.

This commit is contained in:
Vladimir Serbinenko 2013-12-23 05:19:42 +01:00
parent bbc52c228f
commit 95b56e3a97
2 changed files with 19 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2013-12-23 Vladimir Serbinenko <phcoder@gmail.com>
Recognize raspberry pi kernel in grub-file.
2013-12-23 Vladimir Serbinenko <phcoder@gmail.com>
Enable cache on ARM U-Boot port.

View file

@ -377,14 +377,25 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
}
case IS_ARM_LINUX:
{
grub_uint32_t sig;
grub_uint32_t sig, sig_pi;
if (grub_file_read (file, &sig_pi, 4) != 4)
break;
/* Raspberry pi. */
if (sig_pi == grub_cpu_to_le32_compile_time (0xea000006))
{
ret = 1;
break;
}
if (grub_file_seek (file, 0x24) == (grub_size_t) -1)
break;
if (grub_file_read (file, &sig, 4) != 4)
break;
if (sig != grub_cpu_to_le32_compile_time (0x016f2818))
break;
ret = 1;
if (sig == grub_cpu_to_le32_compile_time (0x016f2818))
{
ret = 1;
break;
}
break;
}
case IS_PAE_DOMU ... IS_DOM0: