Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1paQBG-00037A-Ep for mharc-grub-devel@gnu.org; Thu, 09 Mar 2023 19:00:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paQBC-0002z8-3S for grub-devel@gnu.org; Thu, 09 Mar 2023 19:00:14 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paQBA-0000Mn-6T for grub-devel@gnu.org; Thu, 09 Mar 2023 19:00:13 -0500 Received: by mail-pj1-x1030.google.com with SMTP id kb15so3716658pjb.1 for ; Thu, 09 Mar 2023 16:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1678406410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mg99SJGLXxZHxjMnOaxGXZ9pHXLbkDJSPUFfX7kLs4E=; b=yszAmgDHuiq5bC2yGc9O1pEiV+t0RErjSGFJghO6Y0hqMiuFH1ox9wb3N4RaP0l5jl YOTyHQzdF0NFepRrOuv3Zdd5B3Gt5vjrLR0hJO3RedzS4D2ViWYbW/ttDJdPn/omMh4b Je0s64Dabtc+RGz56YbEbfqtBtAfCLRb1J/523kQ976UxLk09/ImwJ9xtnMotaBAfYSb w+5j+mCCefprR2ULJLjirdU6l74zlT6HnrQY5LqihB4+bbZ2/WRzNvTgu/y5JSkkGaMG XIvcj75KW1rg7rA/fw1kpkMxq0hz+/6W5aKqdB/JJ8GTljljrjr3R3PcAACji0mB1Wp1 kukg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678406410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mg99SJGLXxZHxjMnOaxGXZ9pHXLbkDJSPUFfX7kLs4E=; b=ghUqjhnE4mwzsSoCR0V+/yYhkPqv4nevtuiRiE5+OuBz/AAEloM7e/MuMUzXwKRUmL SE96sy8lq2aEq9T1oNUB+dETG1Yfn1raMgBnjC+dojsAVHnsQwiXz70O/+TRZkLxP+Tx R29ZOeUbjEf5BgDPsPCITi0Zo+XTsOfBprwXWxShi2//gEPOWOCv8eyVfoPwfcY826Qo Sn+4LpUnt3yX0k/M4g3Mu+oZFqziGcujuJEKYWsSsKvbBEBJZIk57dVjcz8Jy4gGYI5+ 8aP5tnAx9rv9M4kx/lkmU6LksWgx5+NUxVmVFD3bfYXVDwPtBHyyxWh+cwwPR4bTG34Y B4OQ== X-Gm-Message-State: AO0yUKVaN/innV3jtEj1K0MfUawWq+ccptl2KIYE8Oz5d19IKkxvH+va pQYNd/W09IffsWPF069mr7V5XMobY+uK7sH8/cw= X-Google-Smtp-Source: AK7set8Dy+92H7y84uYSj/hAYCfs9ABF0vJsr3PaenbAn5OKE5SZg3vUCYaVw8Kw8/USAwRkWP8DoQ== X-Received: by 2002:a17:902:708c:b0:19a:9686:ea8b with SMTP id z12-20020a170902708c00b0019a9686ea8bmr21004054plk.28.1678406410487; Thu, 09 Mar 2023 16:00:10 -0800 (PST) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id kb4-20020a170903338400b0019ee0afcc24sm193725plb.94.2023.03.09.16.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 16:00:10 -0800 (PST) From: Atish Patra To: grub-devel@gnu.org Cc: Atish Patra , Daniel Kiper , Ard Biesheuvel , Fu Wei , Leif Lindholm , Nikita Ermakov , Atish Patra , Heinrich Schuchardt , Julian Andres Klode , Ilias Apalodimas , fvogt@suse.de, mchang@suse.com, Robbie Harwood Subject: [v8 PATCH 3/3] RISC-V: Use common linux loader Date: Thu, 9 Mar 2023 15:59:53 -0800 Message-Id: <20230309235953.1882811-4-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230309235953.1882811-1-atishp@rivosinc.com> References: <20230309235953.1882811-1-atishp@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=atishp@rivosinc.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2023 00:00:14 -0000 RISC-V doesn't have to do anything very different from other architectures to loader EFI stub linux kernel. As a result, just use the common linux loader instead of defining a RISC-V specific linux loader. Signed-off-by: Atish Patra Reviewed-by: Daniel Kiper --- grub-core/Makefile.core.def | 4 +-- grub-core/loader/riscv/linux.c | 59 ---------------------------------- 2 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 grub-core/loader/riscv/linux.c diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 3ec0e7b..5446099 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1829,8 +1829,8 @@ module = { arm_efi = loader/efi/linux.c; arm_uboot = loader/arm/linux.c; arm64 = loader/efi/linux.c; - riscv32 = loader/riscv/linux.c; - riscv64 = loader/riscv/linux.c; + riscv32 = loader/efi/linux.c; + riscv64 = loader/efi/linux.c; emu = loader/emu/linux.c; common = loader/linux.c; common = lib/cmdline.c; diff --git a/grub-core/loader/riscv/linux.c b/grub-core/loader/riscv/linux.c deleted file mode 100644 index d17c488..0000000 --- a/grub-core/loader/riscv/linux.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2018 Free Software Foundation, Inc. - * - * GRUB is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GRUB is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GRUB. If not, see . - */ - -#include -#include -#include - -GRUB_MOD_LICENSE ("GPLv3+"); - -static grub_err_t -grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), - int argc __attribute__ ((unused)), - char *argv[] __attribute__ ((unused))) -{ - grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, N_("Linux not supported yet")); - - return grub_errno; -} - -static grub_err_t -grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), - int argc __attribute__ ((unused)), - char *argv[] __attribute__ ((unused))) -{ - grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, N_("Linux not supported yet")); - - return grub_errno; -} - -static grub_command_t cmd_linux, cmd_initrd; - -GRUB_MOD_INIT (linux) -{ - cmd_linux = grub_register_command ("linux", grub_cmd_linux, 0, - N_("Load Linux.")); - cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, 0, - N_("Load initrd.")); -} - -GRUB_MOD_FINI (linux) -{ - grub_unregister_command (cmd_linux); - grub_unregister_command (cmd_initrd); -} -- 2.25.1