From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VuxbM-0002WF-Li for mharc-grub-devel@gnu.org; Sun, 22 Dec 2013 23:58:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuxbF-0002W5-QI for grub-devel@gnu.org; Sun, 22 Dec 2013 23:58:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vuxb3-0004jv-Jq for grub-devel@gnu.org; Sun, 22 Dec 2013 23:58:41 -0500 Received: from mail-ee0-x22e.google.com ([2a00:1450:4013:c00::22e]:60217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vuxb3-0004jq-Bz for grub-devel@gnu.org; Sun, 22 Dec 2013 23:58:29 -0500 Received: by mail-ee0-f46.google.com with SMTP id d49so2098061eek.33 for ; Sun, 22 Dec 2013 20:58:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=f2E1SI4ift74vIiiLmYIdbE+x1IK3KphgpI4y97VV0g=; b=L94i3lSkc1U00wmXOkYTv9D8v/dOuBMSCh6vXxtcoOWsbifjCAWsFBK7jKE9UyxRpB hYHVXx0ngjtiNH2FLYwI1CRqfHU9NvyZi172cD+WBsrVCZXbEuTMVKmSJmYUeeYbyzdX /i9HkbZFy2swikHdM7yVUPG/CNn8cnopbvopeKSY0fijTkxVo0af4Hvcq4C+eJW6pwW/ MzPdXMAlffkVW9n2c/DSebmKSfsvdd0SRuaMaUh/XqgPeecsOrF1+SPtQbbCt+Sw+abr HStZeVS8rSr7rSSQmqiiNx1yhOhb3AjHepNtweqySJKl0mEYRILo9TstqFQoRydCVW7Y uGZQ== X-Received: by 10.14.119.136 with SMTP id n8mr18675eeh.82.1387774708473; Sun, 22 Dec 2013 20:58:28 -0800 (PST) Received: from [192.168.1.16] (85-188.196-178.cust.bluewin.ch. [178.196.188.85]) by mx.google.com with ESMTPSA id e3sm42078652eeg.11.2013.12.22.20.58.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 22 Dec 2013 20:58:27 -0800 (PST) Message-ID: <52B7C2F2.3040802@gmail.com> Date: Mon, 23 Dec 2013 05:58:26 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: grub-devel@gnu.org, Leif Lindholm Subject: Re: arm64 in grub-mkconfig and grub-file? References: <1387741158.918.27.camel@opensuse.site> In-Reply-To: <1387741158.918.27.camel@opensuse.site> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QnvnujnlxKo1k2fCviELsrj40cGbpuT80" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22e X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 04:58:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QnvnujnlxKo1k2fCviELsrj40cGbpuT80 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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? >=20 Like attached? >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 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[] =3D { 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) =3D=3D (grub_size_t) -1) + break; + if (grub_file_read (file, &sig, 4) !=3D 4) + break; + if (sig =3D=3D grub_cpu_to_le32_compile_time (0x644d5241)) + { + ret =3D 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 power= pc ia64 arm; do + for platform in x86 i386-xen-pae x86_64-xen mips mipsel sparc64 power= pc ia64 arm arm64; do + GRUB_PLATFORM=3D$platform export GRUB_PLATFORM buf=3D"$($i)" --QnvnujnlxKo1k2fCviELsrj40cGbpuT80 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlK3wvIACgkQmBXlbbo5nOvMrwD5AfX2ST++WyDquBB55PHXNMHg im07rX/4kDZWHDqdLpAA+gMhGASx+fz9KRyk8LteM7V18h4+XazJedRoU2P71jgw =10UT -----END PGP SIGNATURE----- --QnvnujnlxKo1k2fCviELsrj40cGbpuT80--