[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] Ensure nvram is available and functional on IEEE1275
From: |
Ismael Luceno |
Subject: |
Re: [PATCH 2/2] Ensure nvram is available and functional on IEEE1275 |
Date: |
Mon, 29 Aug 2022 16:40:46 +0200 |
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.