tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysutils/grub2: how to avoid module loading when builtin?



The "best" solution here would be to teach grub not to "push" modules
that are already built-in.  But that's not likely to happen!

Instead, we could teach the loader to ignore any "pushes" for modules
that already exist (even if "built-in", it's still a module!).  This
would also handle the case where one specifies "load xxx" more than
once (for the same xxx) in /boot.cfg file.

I can have a look at doing this, but it will probably take some time.
Can you file a PR for this so it doesn't get forgotten?  (And please
feel free to assign it to me.)



On Wed, 1 Aug 2018, Frédéric Fauberteau wrote:

Hi,

A look at dmesg show me:
NetBSD 8.0 (HYDRALISK) #1: Tue Jul 31 18:43:06 CEST 2018
	root@hydralisk:/usr/obj/sys/arch/amd64/compile/HYDRALISK
total memory = 3839 MB
avail memory = 3704 MB
kobj_checksyms, 1003: [ffs.kmod]: linker error: global symbol `ffs_vnodeop_opv_desc' redefined kobj_checksyms, 1003: [ffs.kmod]: linker error: global symbol `ffs_snapshot_fini' redefined
*** idem ***
kobj_checksyms, 1003: [ffs.kmod]: linker error: global symbol `ufs_direnter' redefined WARNING: module error: unable to load `ffs.kmod' pushed by boot loader, error 8

But ffs is builtin and the grub config generator unconditionally includes ffs.kmod.

Any idea on what could be the grep spell or the magic file that could be tested to know if a vfs is builtin/modularized?

Thx

!DSPAM:5b6166e826831682086510!



+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index