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

Add builder for Flatcar #131

Merged
merged 7 commits into from
Jun 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
builder/flatcar: override EXTRAVERSION in kernel Makefile
This is required to build Flatcar kernel compatible modules, as otherwise the
modules have the wrong version magic and can't be probed.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
  • Loading branch information
jepio committed Jun 7, 2022
commit 9227b42e4c12e4065f44ff967988a39569bb6f02
1 change: 1 addition & 0 deletions pkg/driverbuilder/builder/flatcar.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ ln -sf /usr/bin/gcc-{{ .GCCVersion }} /usr/bin/gcc
curl --silent -o /tmp/kernel.config -SL {{ .KernelConfigURL }}

cd /tmp/kernel
sed -i -e 's|^\(EXTRAVERSION =\).*|\1 -flatcar|' Makefile
make KCONFIG_CONFIG=/tmp/kernel.config oldconfig
Copy link
Contributor

@dwindsor dwindsor Apr 6, 2022

Choose a reason for hiding this comment

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

I wonder if these calls to make oldconfig and modules_prepare are necessary? I don't actually see them in any of the other builders, but this may be required for flatcar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copied this part from the vanilla builder. Our own "kernel-devel" package equivalent is compiled against newer glibc, such that it doesn't work with the old debian based builder image. Here we're pulling generic kernel sources (we don't patch our sources) and need to "prepare" those.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, thanks!

make KCONFIG_CONFIG=/tmp/kernel.config modules_prepare

Expand Down