All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ismael Luceno <iluceno@suse.de>
To: Michael Chang <mchang@suse.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 2/2] Ensure nvram is available and functional on IEEE1275
Date: Mon, 29 Aug 2022 16:40:46 +0200	[thread overview]
Message-ID: <20220829164046.441e4216@pirotess> (raw)
In-Reply-To: <20220825042416.GA14934@mazu>

On Thu, 25 Aug 2022 12:24:17 +0800
Michael Chang <mchang@suse.com> wrote:
<...> 
> Apparently there's missing grub_set_install_backup_ponr between
> successful image embedding and grub_install_register_ieee1275 and we
> should fix that as well.

Thanks for the feedback; I've sent v2.

<...>
> > +  if (linux_kmod_load("nvram"))
> > +    grub_util_error (_("%s: kernel module not found"), "nvram");
> > +  fd = open ("/dev/nvram", O_RDWR);
> > +  if (fd == -1)
> > +    grub_util_error ("/dev/nvram: %s", strerror(errno));
<...> 
> I'm wondering why it is needed. The nvram module should be loaded
> on-demand via linux kernel's request_module() and modalias trick
> whever /dev/nvram is accessed.

It was based on another patch that did so but without the extra
checking, I guess both are wrong.

It's enough checking /dev/nvram is operational; it's necessary
to fail early because other commands down the line may get ENODEV if
the module fails to load (e.g. the file may have been removed). I moved
this to an earlier point in grub-install.


      reply	other threads:[~2022-08-29 14:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 16:03 [PATCH 0/2] Fix installation issues on ppc64le Ismael Luceno
2022-08-24 16:03 ` [PATCH 1/2] Add helper to load linux kmods Ismael Luceno
2022-08-24 16:03 ` [PATCH 2/2] Ensure nvram is available and functional on IEEE1275 Ismael Luceno
2022-08-25  4:24   ` Michael Chang
2022-08-29 14:40     ` Ismael Luceno [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=20220829164046.441e4216@pirotess \
    --to=iluceno@suse.de \
    --cc=grub-devel@gnu.org \
    --cc=mchang@suse.com \
    /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.