From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org, Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: arm64 in grub-mkconfig and grub-file?
Date: Mon, 23 Dec 2013 05:58:26 +0100 [thread overview]
Message-ID: <52B7C2F2.3040802@gmail.com> (raw)
In-Reply-To: <1387741158.918.27.camel@opensuse.site>
[-- Attachment #1: Type: text/plain, Size: 2160 bytes --]
On 22.12.2013 20:39, Andrey Borzenkov wrote:
> Should not they have explicit arm64 support? I assume, images for arm
> and arm64 are different and not interchangeable?
>
Like attached?
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
diff --git a/grub-core/commands/file.c b/grub-core/commands/file.c
index 2723609..42d62d4 100644
--- a/grub-core/commands/file.c
+++ b/grub-core/commands/file.c
@@ -48,6 +48,8 @@ static const struct grub_arg_option options[] = {
N_("Check if FILE can be used as x86 multiboot2 kernel"), 0, 0},
{"is-arm-linux", 0, 0,
N_("Check if FILE is ARM Linux"), 0, 0},
+ {"is-arm64-linux", 0, 0,
+ N_("Check if FILE is ARM64 Linux"), 0, 0},
{"is-ia64-linux", 0, 0,
N_("Check if FILE is IA64 Linux"), 0, 0},
{"is-mips-linux", 0, 0,
@@ -107,6 +109,7 @@ enum
IS_MULTIBOOT,
IS_MULTIBOOT2,
IS_ARM_LINUX,
+ IS_ARM64_LINUX,
IS_IA64_LINUX,
IS_MIPS_LINUX,
IS_MIPSEL_LINUX,
@@ -401,6 +404,21 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
}
break;
}
+ case IS_ARM64_LINUX:
+ {
+ grub_uint32_t sig;
+
+ if (grub_file_seek (file, 0x38) == (grub_size_t) -1)
+ break;
+ if (grub_file_read (file, &sig, 4) != 4)
+ break;
+ if (sig == grub_cpu_to_le32_compile_time (0x644d5241))
+ {
+ ret = 1;
+ break;
+ }
+ break;
+ }
case IS_PAE_DOMU ... IS_DOM0:
{
struct grub_xen_file_info xen_inf;
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 02a455e..44f2d1d 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -273,7 +273,8 @@ for i in "${grub_mkconfig_dir}"/* ; do
*/\#*\#) ;;
*)
if grub_file_is_not_garbage "$i" && test -x "$i" ; then
- for platform in x86 i386-xen-pae x86_64-xen mips mipsel sparc64 powerpc ia64 arm; do
+ for platform in x86 i386-xen-pae x86_64-xen mips mipsel sparc64 powerpc ia64 arm arm64; do
+
GRUB_PLATFORM=$platform
export GRUB_PLATFORM
buf="$($i)"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
prev parent reply other threads:[~2013-12-23 4:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-22 19:39 arm64 in grub-mkconfig and grub-file? Andrey Borzenkov
2013-12-23 4:58 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B7C2F2.3040802@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
--cc=leif.lindholm@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.