Skip to content
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

kernel-builder: Work around kernels getting compiled two times #217

Merged

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Oct 4, 2020

It looks like this is not a regression from the latest changes to the kernel builder. Testing on top of ffdba8f exhibits the same issue.

This change works around the issue by doing it with one invocation of make, rather than doing it twice.

It has not been figured out at which exact version of the kernel this stops being an issue, and if it is an issue from mainline Linux outright, or something that came from Android-specific modifications.

Though it has been verified that for 3.18, both Qualcomm and Mediatek source trees exhibit the same issue.

Fixes #216


TODO:

  • figure out why it fails for asus-flo

It looks like this is not a regression from the latest changes to the
kernel builder. Testing on top of ffdba8f
exhibits the same issue.

This change works around the issue by doing it with one invocation of
`make`, rather than doing it twice.

It has not been figured out at which exact version of the kernel this
stops being an issue, and if it is an issue from mainline Linux
outright, or something that came from Android-specific modifications.

Though it has been verified that for 3.18, both Qualcomm and Mediatek
source trees exhibit the same issue.

Fixes NixOS#216
@samueldr samueldr added the 4. type: bug Something isn't working label Oct 4, 2020
@samueldr
Copy link
Member Author

samueldr commented Oct 4, 2020

With asus-flo, maybe other 3.4-based kernels:

With -j12:

mv: cannot stat 'arch/arm/boot/compressed/.misc.o.tmp': No such file or directory

Though disabling this change is enough to make it pass...

+  enableCombiningBuildAndInstallQuirk = false;

Or the following:

+  enableParallelBuilding = false;

Which makes me think this is a parallelism issue that's being brought forward by doing the build all at once. Previously the second build was done without the -j parameter. It is likely that the parallelism issue lies with the install steps only

Copy link
Contributor

@danielfullmer danielfullmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workaround looks reasonable. I couldn't find any obvious cause of the underlying issue either,

@samueldr samueldr merged commit c2e6b8c into NixOS:master Oct 4, 2020
@samueldr samueldr deleted the fix/kernel-builder-double-compilation branch October 4, 2020 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kernel builds twice
2 participants