Skip to content

chore(zone): clean up and reduce linux config - #239

Merged
alexandermerritt merged 11 commits into
mainfrom
alexm/zone-slim-config
Aug 18, 2026
Merged

chore(zone): clean up and reduce linux config#239
alexandermerritt merged 11 commits into
mainfrom
alexm/zone-slim-config

Conversation

@alexandermerritt

@alexandermerritt alexandermerritt commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Our current fragment is quite small.

What that means: default-enabled config options in Kconfig that are not explicitly disabled in our fragment, will be enabled once merged with a defconfig for the architecture. Examples include wireless hardware support and networking, bluetooth, sound, etc. which we all do not need for zone kernels.

Goals: reduce the amount of text in the kernel, second to reduce build times.

Add many is not set for any default-enabled configuration options we do not want. For future kernels, we'll need to check for any newly introduce configuration options that are default-enabled and repeat for them.

@alexandermerritt
alexandermerritt force-pushed the alexm/zone-slim-config branch 2 times, most recently from e7262ac to 3c07402 Compare August 12, 2026 03:16
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
@alexandermerritt
alexandermerritt force-pushed the alexm/zone-slim-config branch 3 times, most recently from 8566dca to 18f0343 Compare August 13, 2026 21:09
These were removed in prior versions of kernels.

Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
base zone config has gpu support explicitly disabled now

Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
No functional changes.

Options removed are prompt-less (not available for selection the
menuconfig) and KMS_HELPER resolves to y via another option that
`select`s it explicitly.

Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Remove options that are either prompt-less,
default enabled, or selected from other options.

Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
@alexandermerritt alexandermerritt changed the title chore(zone): reduce linux config chore(zone): clean up and reduce linux config Aug 13, 2026
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
@alexandermerritt

Copy link
Copy Markdown
Contributor Author

Un-drafting for the moment while I test e2e on this, to get some eyes on the changes.

@alexandermerritt
alexandermerritt marked this pull request as ready for review August 18, 2026 19:19
@alexandermerritt

Copy link
Copy Markdown
Contributor Author

I'd like to merge each commit separately... I may have to do that via individual PRs.

Comment thread configs/x86_64/zone.config

@bleggett bleggett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Goals: reduce the amount of text in the kernel, second to reduce build times.

Curious (i.e. not an ask): did you do a before/after to see if/by how much this shrinks the (uncompressed) kernel/module image?

@alexandermerritt

Copy link
Copy Markdown
Contributor Author

Goals: reduce the amount of text in the kernel, second to reduce build times.

Curious (i.e. not an ask): did you do a before/after to see if/by how much this shrinks the (uncompressed) kernel/module image?

~> ll bzImage*
-rw-rw-r-- 1 alexm alexm 26M Aug 18 20:45 bzImage.main
-rw-rw-r-- 1 alexm alexm 18M Aug 18 20:18 bzImage.slim

~> src/linux-6.18.44-x86_64/scripts/extract-vmlinux bzImage.main >vmlinux.main
extract-vmlinux: Extracted vmlinux using 'unzstd' from offset 21197

~> src/linux-6.18.44-x86_64/scripts/extract-vmlinux bzImage.slim >vmlinux.slim
extract-vmlinux: Extracted vmlinux using 'unzstd' from offset 21197

~> ll vmlinux*
-rw-rw-r-- 1 alexm alexm 104M Aug 18 20:48 vmlinux.main
-rw-rw-r-- 1 alexm alexm  76M Aug 18 20:48 vmlinux.slim

~> readelf -S vmlinux.main --wide | head
There are 45 section headers, starting at offset 0x6400228:

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        ffffffff81000000 200000 2577368 00  AX  0   0 4096
[ 2] .rodata           PROGBITS        ffffffff83600000 2800000 db5536 00  WA  0   0 4096

# 37M .text and 14M .rodata

~> readelf -S vmlinux.slim --wide | head
There are 45 section headers, starting at offset 0x4a00228:

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        ffffffff81000000 200000 184cf60 00  AX  0   0 4096
  [ 2] .rodata           PROGBITS        ffffffff82a00000 1c00000 90ff36 00  WA  0   0 4096

# 24M .text and 9M .rodata

The fetched kernel from protect's hack/kernel/fetch.sh produces a bzImage 14M in size (compared to the build above on main giving me 26M).

These are based on my builds locally, there is a 30% reduction in size, and ~13m build time on 32 cores to ~8m.

@alexandermerritt
alexandermerritt merged commit 4153237 into main Aug 18, 2026
17 checks passed
@alexandermerritt
alexandermerritt deleted the alexm/zone-slim-config branch August 18, 2026 21:41
@alexandermerritt

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants