From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1hyHA1-0003cS-9d for mharc-grub-devel@gnu.org; Thu, 15 Aug 2019 10:55:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60843) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyH9u-0003SV-Dr for grub-devel@gnu.org; Thu, 15 Aug 2019 10:55:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyH9p-0005TU-P1 for grub-devel@gnu.org; Thu, 15 Aug 2019 10:55:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:37246 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hyH9p-0005Rk-JA for grub-devel@gnu.org; Thu, 15 Aug 2019 10:55:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 07C38AE03 for ; Thu, 15 Aug 2019 14:55:14 +0000 (UTC) From: Andreas Schwab To: grub-devel@gnu.org Subject: [PATCH] grub-install: Define default platform for RISC-V X-Yow: Now, my ENTIRE LIFE is flashing before my EYES as I park my DODGE DART in your EXXON service area for a COMPLETE LUBRICATION!! Date: Thu, 15 Aug 2019 16:55:13 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2019 14:55:28 -0000 Signed-off-by: Andreas Schwab --- util/grub-install.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/grub-install.c b/util/grub-install.c index 8a55ad4b8..8970b73aa 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -324,6 +324,14 @@ get_default_platform (void) return "arm64-efi"; #elif defined (__amd64__) || defined (__x86_64__) || defined (__i386__) return grub_install_get_default_x86_platform (); +#elif defined (__riscv) +#if __riscv_xlen == 32 + return "riscv32-efi"; +#elif __riscv_xlen == 64 + return "riscv64-efi"; +#else + return NULL; +#endif #else return NULL; #endif -- 2.22.1 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."