Commit b9e07ec
authored
Use addonx64.efi.stub, not linuxx64.efi.stub, for UKI addons (#704)
UKI addons were being built using linuxx64.efi.stub, the full
systemd-stub meant for main UKIs that embed kernel/initrd. This worked
by coincidence on current systemd 255 builds, but is incorrect per
upstream systemd design, and will fail with later versions of systemd
that ship a larger linuxx64.efi.stuf, which leaves no room for the
appended .cmdline section data (systemd 258 already triggers this).
Since systemd 254, ukify ships a dedicated, minimal addonx64.efi.stub,
whose PE header reserves space for appended sections. When --linux is
not specified, ukify auto-selects the addon stub by default. Our code
overrides this with --stub=, so we need to pass the correct stub
explicitly.
Using the linux stub for addons produces PE binaries where the appended
.cmdline section data may land at or beyond EOF depending on stub size
and alignment, causing `objcopy --dump-section .cmdline` to fail with
"file truncated". The addon stub avoids this by design.
<!-- Description: Please provide a summary of the changes and the
motivation behind them. -->
---
### **Checklist**
- [ ] Tests added/updated
- [ ] Documentation updated (if needed)
- [ ] Code conforms to style guidelines1 parent be27eae commit b9e07ec
2 files changed
Lines changed: 47 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | | - | |
| 387 | + | |
| 388 | + | |
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
| |||
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
508 | | - | |
| 509 | + | |
509 | 510 | | |
510 | 511 | | |
511 | 512 | | |
| |||
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
| 632 | + | |
631 | 633 | | |
632 | 634 | | |
633 | 635 | | |
| |||
638 | 640 | | |
639 | 641 | | |
640 | 642 | | |
641 | | - | |
| 643 | + | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
| |||
724 | 726 | | |
725 | 727 | | |
726 | 728 | | |
727 | | - | |
| 729 | + | |
728 | 730 | | |
729 | 731 | | |
730 | 732 | | |
| |||
738 | 740 | | |
739 | 741 | | |
740 | 742 | | |
741 | | - | |
| 743 | + | |
742 | 744 | | |
743 | 745 | | |
744 | 746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
| |||
0 commit comments