-
Notifications
You must be signed in to change notification settings - Fork 12
wip: l2 images #42
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
base: main
Are you sure you want to change the base?
wip: l2 images #42
Changes from all commits
10ab948
4a1202d
447a823
145218b
c8dc66e
323947c
ed22ad0
7e48660
c41a2cd
865b9f8
7ad9288
9c28591
e85b24d
77f5ff3
427002a
0b05056
570bce3
37bd948
c8a56c2
8bf1851
82d871d
0254a5a
8fe02a3
4de008e
29504ab
119c18a
76a69d3
e7954c7
26bff23
cf2f4b2
b4cde36
2f1891c
3282d7e
45e6026
cd4c2d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,22 @@ | ||
| # mkosi artifacts | ||
|
|
||
| build/ | ||
| mkosi/ | ||
| build.*/ | ||
| env.json | ||
| mkosi.packages/ | ||
| mkosi.cache/ | ||
| mkosi.builddir/ | ||
| *.qcow2 | ||
| .claudesync/ | ||
| .claudeignore | ||
| mkosi.cache/ | ||
| mkosi.packages/ | ||
| mkosi/ | ||
|
|
||
| # temporary files | ||
|
|
||
| .temp | ||
| tmp/ | ||
|
|
||
| # IDEs/agents/whatnot | ||
|
|
||
| .claudeignore | ||
| .claudesync/ | ||
| .vscode | ||
| *.qcow2 | ||
| NvVars |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ilyaluk any idea why this file was moved?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need this in buildernet/l2 stuff at the moment, AFAIU, defer question to @0x416e746f6e
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They both have their own persistent mounting specifics
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's not in use in l2 |
alexhulbert marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,20 @@ if [[ -n "${KERNEL_CONFIG_SNIPPETS:-}" ]]; then | |
| IFS=',' read -ra snippets <<< "$KERNEL_CONFIG_SNIPPETS" | ||
| for snippet in "${snippets[@]}"; do | ||
| snippet_file="$SRCDIR/$snippet" | ||
| [[ -f "$snippet_file" ]] && cat "$snippet_file" >> "$config_file" | ||
| if [[ -f "$snippet_file" ]]; then | ||
| cat "$snippet_file" >> "$config_file" || true | ||
| fi | ||
| done | ||
| fi | ||
| for snippets_var in "${!KERNEL_CONFIG_SNIPPETS_@}"; do | ||
| IFS=',' read -ra snippets <<< "${!snippets_var}" | ||
| for snippet in "${snippets[@]}"; do | ||
| snippet_file="$SRCDIR/$snippet" | ||
| if [[ -f "$snippet_file" ]]; then | ||
| cat "$snippet_file" >> "$config_file" || true | ||
| fi | ||
| done | ||
| done | ||
|
|
||
| # Calculate cache key and paths | ||
| config_hash=$(sha256sum "$config_file" | cut -d' ' -f1 | cut -c1-12) | ||
|
|
@@ -37,12 +48,15 @@ else | |
| # Build kernel | ||
| cd "$build_dir" | ||
| cp "$config_file" .config | ||
| export KBUILD_BUILD_TIMESTAMP="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%s)})" | ||
| export KBUILD_BUILD_TIMESTAMP="$(date -u -d @$(git log -1 --pretty=%ct))" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably just hard code it to zero
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe pinning the timestamps to the commit one is a standard practice |
||
| export KBUILD_BUILD_USER="mkosi" KBUILD_BUILD_HOST="mkosi-builder" | ||
|
|
||
| mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" make olddefconfig | ||
| mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" make -j "$(nproc 2>/dev/null || echo 2)" bzImage ARCH=x86_64 CONFIG_EFI_STUB=y | ||
|
|
||
| echo "# kernel config:" | ||
| mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" cat .config | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too verbose
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this snippet was necessary to understand what's going on with non-reproducible builds of the kernel under ubuntu kernel config. can be removed now, I guess. |
||
|
|
||
| # Cache result | ||
| mkdir -p "$cache_dir" | ||
| cp arch/x86_64/boot/bzImage "$cache_dir/" | ||
|
|
||
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.
What's the purpose of this?
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.
to make sure that
/etc/sysconfigdirectory is always present (vault-agent renders some of the secrets into the envs of the systemd services)