Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1or64x-00041P-PK for mharc-grub-devel@gnu.org; Fri, 04 Nov 2022 19:26:27 -0400 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 1or64w-00041G-Av for grub-devel@gnu.org; Fri, 04 Nov 2022 19:26:26 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1or64r-0008HG-6y for grub-devel@gnu.org; Fri, 04 Nov 2022 19:26:26 -0400 Received: by mail-pj1-x1031.google.com with SMTP id d59-20020a17090a6f4100b00213202d77e1so9567714pjk.2 for ; Fri, 04 Nov 2022 16:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; 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=JN4miwGrMwTAr8vuA+CxQiPVjqHRbd4U4l+JJ7oe008=; b=h5vV/xqQ3L18apNZxguO6/c99oLpO8RHPtFia3QgUoxqDbG8wfC8jpNxbu0s9KjFAT F5UWD480HN84eGv3cJRKI3I5cju+m/00thFh9A31tWM29KSg9bpl0wTUipUxlMERf4h1 C5Zjo7GaweDQVIcLb4OJkYbk1Yta3VdC7Ombk4F8p+R8hjdyQFi/AUJUuMfhln1hngSt lGVLjV2C6awm57CBcigvZJpykCGw+eKiKGewBWW6hsD7MIXVtYJBymn9Qk/Ct5p2oMtS SRJ9IsKbNwZ0B3EypvLPNkvt1LUraUpYiLEN73oViXPD1MjQ6bhzBUqzki2JOOmTuKsB /2zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=JN4miwGrMwTAr8vuA+CxQiPVjqHRbd4U4l+JJ7oe008=; b=YEL81jC+rz2X/QDWotSpVA7LfjwLYu/r4Cmllm9aUiB2/EKJvyW2ls5PlwRXCYcqmV yW8OpCo0D3EefMOETUHVXZP+4b6oCJ5QtXP8Wqwl0YO226connOrkNIRvEIDGiydAUD1 O/DHzASSd0iG7Ph1zX3FuLq2ydflhdiaraTwuMNdfTgecMT1HBHNmRfWSOKOx1KomY5B YQG0oKZ5O8hDroPDypKGKLiEPWnQqGbWMEudoeKX8hNs5NZK8EyHYB5QFSBkrLGO5V08 wbrYz5wfLUhrKOprhHtKSoVVOs1bNvJIx2Y1cCvF7yON26xajQlEcLRE0aGXXiGTk6py MmdA== X-Gm-Message-State: ACrzQf0e/iWlzkD61eqVYogWcpdVPrEADKJJfL0l3DQojrHUAoe8evi2 lCyslbPt6QFzJMAKzKDXWlxeeAFnzyKupw== X-Google-Smtp-Source: AMsMyM5GZvApe41FeQwtjPrWoP7UWl+RNNzvunBRt0NcG0rcTSES3JSd3ybwzAdgEuAS+MeYCvwTwA== X-Received: by 2002:a17:90a:9f01:b0:213:258e:7435 with SMTP id n1-20020a17090a9f0100b00213258e7435mr379899pjp.137.1667604378774; Fri, 04 Nov 2022 16:26:18 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id k1-20020a170902760100b00186abb95bfdsm296198pll.25.2022.11.04.16.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 16:26:18 -0700 (PDT) From: Atish Patra To: grub-devel@gnu.org Cc: Atish Patra , Ard Biesheuvel , Daniel Kiper , Fu Wei , Leif Lindholm , Nikita Ermakov , Atish Patra , Heinrich Schuchardt , Julian Andres Klode , Ilias Apalodimas Subject: [v6 PATCH 3/3] RISC-V: Use common linux loader Date: Fri, 4 Nov 2022 16:26:07 -0700 Message-Id: <20221104232607.1938285-4-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221104232607.1938285-1-atishp@rivosinc.com> References: <20221104232607.1938285-1-atishp@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=atishp@rivosinc.com; helo=mail-pj1-x1031.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, T_SPF_TEMPERROR=0.01 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, 04 Nov 2022 23:26:26 -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 --- 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 ce95c76eaffa..d6cb8a673e1b 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1820,8 +1820,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; common = loader/linux.c; common = lib/cmdline.c; enable = noemu; diff --git a/grub-core/loader/riscv/linux.c b/grub-core/loader/riscv/linux.c deleted file mode 100644 index d17c488e118d..000000000000 --- 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