-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modules and firmware includes #3312
Modules and firmware includes #3312
Conversation
5e6af61
to
0177fd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unnecessarily complicated, why not loop over required
, calls resolve()
on each entry and add all resolved paths to required
as well?
0177fd9
to
aadac1d
Compare
Okay, spent some time to get to know |
Also removed the unconditional include of modules / firmwares below an |
aadac1d
to
623881c
Compare
623881c
to
6cc4454
Compare
6cc4454
to
21b9a1a
Compare
21b9a1a
to
fb71b33
Compare
@hundeboll The ubuntu and centos initrd sizes need to be bumped by 1 in tests/test_initrd.py |
fb71b33
to
84abdc9
Compare
The kernel module include/exclude logic matches against paths below any folder in /usr/lib/modules/$(uname -r)/*/, and not just the `kernel` folder. Replace the explicitly mentioned `kernel` folder from the example path with an asterisk to make it clear the folders like `extra` and `updates` are searched too.
Some modules reference a firmware file that is just a link to a "real" file. Make sure those files are also included when needed by resolving those referenced symlinks and including their target files in the set of required firmware files.
84abdc9
to
a37fd6d
Compare
# Some firmware dependencies are symbolic links, so the targets for those must be included in the list | ||
# of required firmware files too. Intermediate symlinks are not included, and so links pointing to links | ||
# results in dangling symlinks in the final image. | ||
for fw in firmware.copy(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the call to copy
even required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise this is mutating the set while it is being iterated over, which throws a RuntimeError: Set changed size during iteration
.
In order to include out-of-tree modules (and their required firmware) installed in an
updates
subfolder, a special case is added when a file is found below that folder.Furthermore, a firmware file required by a module might be a symbolic link to the real firmware file. Add handling of this case too.