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

Bump remaining 4.14 boards kernel to 5.10.5 (and coreboot to 4.19) #1381

Merged
merged 21 commits into from
Jul 4, 2023

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Apr 21, 2023

This PR brings a lot of cleanup to linux configs after bumping configs from 4.14 to 5.10.5, unifying those to easy compare boards across each other. Detailed changes:
Modules:

  • fixed coreboot and linux with helpers used to produce the following changes (save_defconfig, save_oldconfig, modify_oldconfig modify_defconfig etc. Do make BOARD=xyz and abuse of autocomplete with tab)

Linux configs:

  • Only the modules possibly packed in modules.cpio under initrd are compiled
  • Crypto backend has been brought to the minimal needed for cryptsetup to work (you might want to raise issues if you use twofish or serpent, but it is not clear why those should be added as well, since perf is way beyond with AES-XTS on the platforms, since the CPU has accelerated extensions for AES)
  • GENERIC_X86 CPU support is changed to CONFIG_MCORE2 which also brings pentium6+ NOP operations and accelerated checksuming support
  • Important to note that CONFIG_RANDOM_TRUST_CPU=y was added in the configs to get rid of reading non-random bytes on early init (entropy pool is filled by TPM and CPU extension here. Should be good enough)
  • CONFIG_PREEMPT_NONE=y: Remove preemptiveness as for servers. Under heads, we are single tasking. No point having this big thing in kernel https://lwn.net/Articles/746780/
  • IO scheduler: only enable CONFIG_MQ_IOSCHED_DEADLINE=y since we want maximum throughput and do not have concurrent tasks (outside of the gpg-agent working in the background)
  • CONFIG_CPU_ISOLATION=y : Enable CPU Isolation across all boards: this permits to make sure that the kernel tasks running on a core are not distrurbed by user tasks. full dynticks are not in.
  • CONFIG_MULTIUSER not defined: Removing cluttering since we are single root user under Heads anyway, for now.
  • CONFIG_IO_URING=y : limit number of copy operations between kernel and user space from apps
  • CONFIG_ZONE_DMA not defined: relevant for older hardware (less then 32bit addressing space)
  • CONFIG_X86_MPPARSE not defined: relevant for older smp systems
  • CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is enabled and SCHEDUTIL is disabled: we want performance with CPU sched with deadline IO. No need for having other schedules compiled in.
  • CONFIG_PERF_EVENTS_INTEL_UNCORE and CONFIG_PERF_EVENTS_INTEL_CSTATE not defined: we want max perf on Heads.
  • CONFIG_X86_VSYSCALL_EMULATION not defined: no need for syscall emulation under Heads
  • CONFIG_SECCOMP not defined : useful if BPF is enabled and used. Not the case here.
  • CONFIG_ACPI_SPCR_TABLE=y : useful for serial redirection table and earlycon
  • CONFIG_PCI_MMCONFIG CONFIG_MMCONF_FAM10H unset but for kgpe-d16 which is either fam10h of fam15h
  • CONFIG_DM_SNAPSHOT=y CONFIG_DM_THIN_PROVISIONING=y so that recovery shell can provide LVM/DM functionality in later PR.
  • CONFIG_EXFAT_FS=y so that exfat preformated thumb drives can work out of the box.
  • Adjust CONFIG_HW_RANDOM per platform, removing CONFIG_HW_RANDOM_TIMERIOMEM which is useful only if added hardware is present, which is unknown of and could add static memory reading into entropy pool otherwise.
  • Only support processor family needed per board (AMD only AMD, Intel only Intel, removing other cpu support in kernel:
    • removed CONFIG_CPU_SUP_HYGON CONFIG_CPU_SUP_HYGON CONFIG_CPU_SUP_CENTAUR CONFIG_CPU_SUP_ZHAOXIN CONFIG_CPU_SUP_ZHAOXIN everywhere

coreboot configs:

Here: all boards have coreboot config modified to pass proper kernel options to Heads kernel to expose fb address needed by kexec patch and a non compressed fb buffer (i915 specific).


Tested:

  • qemu-coreboot-whiptail-tpm1 oem-factory-reset, disk unlock key setup on debian-11 setup
  • x230-maximized oem-factory-reset, disk unlock key setup on qubes setup

@lankredotp41
Copy link

Just a note regarding kexec-tools newer than v2.0.22. Because of this commit: horms/kexec-tools@dbc151e Kexec will now boot with multiboot2 by default instead of multiboot if -t multiboot-x86 option is not specified. And for multiboot2 segment 0 will no longer be 0 and the code in kexec patch that hacks ebda into segment 0 will no longer work: https://github.com/osresearch/heads/blob/bca26c17ea8b7dbfce9cddb0fb745b6e4952deb3/patches/kexec-2.0.26.patch

Confirmed not needed per 4f88f35 at #1381

Will close this PR because it contained way too much directions exploration. Discussion can continue under #1381

Kexec works without this patch on Legacy BIOS (I've tested this in QEMU with BIOS) but it won't work without this patch on UEFI-only system.
I've tested this in QEMU with UEFI and without this patch kexec will just reboot after kexec -e but it works fine with this patch.
Xen in QEMU with UEFI works with this patch:
https://forum.qubes-os.org/t/how-to-kexec-into-qubes-from-linux-livecd/17712/19?u=disp6252
This most probably is unrelated to Heads as of right now since it only works on firmware with CSM.
I guess it was fixed in Xen upstream only specifically for BIOS. I'll try to look into it.

@tlaurion
Copy link
Collaborator Author

@lankredotp41 I'm confused by your last comment

  • efi systems provides GOP through FSP blobs. Also Heads is mainly coreboot based as of now, unless we talk about using Linuxboot here with heads as payload instead of u-root, to fit into DXE as a replacement? Otherwise there is no EFI.
  • kexec patch here if ran with -d -l will show different entry point for video setup. EFI is different setup as well.
  • QEMU if ran to launch kernel and united from command line will use qemu seabios wrapper internally to setup VGA. I would need to read your qemu command line to understand what we are talking about

@lankredotp41
Copy link

lankredotp41 commented Apr 22, 2023

Maybe I'm confisung something myself since I still don't understand all internal workings.
I'm trying to kexec from Debian into Qubes OS 4.2 installer iso in QEMU with UEFI.
I've installed Debian 11 on QEMU disk and boot from it:

qemu-system-x86_64 -drive format=raw,if=pflash,file=/usr/share/OVMF/OVMF_CODE_4M.fd,readonly=on \
	-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \
	-drive file="debian.qcow2",format=qcow2 \
	-drive file="Qubes-4.2.202304081519-x86_64.iso",media=cdrom \
	-machine q35,accel=kvm:tcg \
	-rtc base=utc \
	-smp "$(nproc)" \
	-vga none \
	-device bochs-display \
	-m 2048 \
	-serial stdio \
	-device qemu-xhci,id=usb \
	-device usb-tablet \
	-device usb-kbd \
	-net none

I've copied initrd-latest.img and vmlinuz-latest from /images/pxeboot/ on Qubes OS 4.2 installer iso and use them with kexec.
I've also built Xen 4.17 with my patch using qubes-builder and got patched xen-4.17.0.gz from xen-hypervisor-4.17.0-8.fc32.x86_64.rpm package to use with kexec.
I'm kexec'ing from debian into Qubes OS 4.2 installer iso like this:

kexec -d -l xen-4.17.0.gz -t multiboot-x86 --command-line="acpi_rsdp=0x7fb7d014 com1=115200,8n1 console=com1,vga loglvl=all guest_loglvl=all no-real-mode reboot=no vga=current edd=off sync_console=true sched_debug iommu=verbose apic_verbosity=debug console_timestamps" --module="vmlinuz-latest inst.stage2=hd:LABEL=QUBES-4-2-202304081519-X86-64 plymouth.ignore-serial-consoles" --module="initrd-latest.img"
kexec -e

If I use unpatched kexec 2.0.26 then system just reboots after executing kexec -e:

unpatched kexec -d -l

Try gzip decompression.
kernel: 0x7fa937ec6010 kernel_size: 0x241ae4
MEMORY RANGES
0000000000000400-000000000009ffff (0)
0000000000100000-0000000000805fff (0)
0000000000806000-0000000000807fff (3)
0000000000808000-000000000080ffff (0)
0000000000810000-00000000008fffff (3)
0000000000900000-000000007ee77fff (0)
000000007ee78000-000000007ef79fff (1)
000000007ef7a000-000000007f8edfff (0)
000000007f8ee000-000000007f9edfff (1)
000000007f9ee000-000000007faedfff (1)
000000007faee000-000000007fb6dfff (1)
000000007fb6e000-000000007fb7dfff (2)
000000007fb7e000-000000007fbfdfff (3)
000000007fbfe000-000000007febbfff (0)
000000007febc000-000000007ff3ffff (1)
000000007ff40000-000000007fffffff (3)
00000000b0000000-00000000bfffffff (1)
sym: sha256_starts info: 12 other: 00 shndx: 1 value: 1130 size: 48
sym: sha256_starts value: 2130 addr: 1002
R_X86_64_64
sym: sha256_update info: 12 other: 00 shndx: 1 value: 3b40 size: 19
sym: sha256_update value: 4b40 addr: 100f
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 8 value: 40 size: 100
sym: sha256_regions value: 6040 addr: 101a
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 8 value: 40 size: 100
sym: sha256_regions value: 6140 addr: 1044
R_X86_64_64
sym: sha256_finish info: 12 other: 00 shndx: 1 value: 3b60 size: 15c
sym: sha256_finish value: 4b60 addr: 105b
R_X86_64_64
sym: sha256_digest info: 11 other: 00 shndx: 8 value: 20 size: 20
sym: sha256_digest value: 6020 addr: 106f
R_X86_64_64
sym: memcmp info: 12 other: 00 shndx: 1 value: 5a5 size: 25
sym: memcmp value: 15a5 addr: 1079
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4dd0 addr: 108d
R_X86_64_64
sym: printf info: 12 other: 00 shndx: 1 value: 4be size: a3
sym: printf value: 14be addr: 109b
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e00 addr: 10a5
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4df0 addr: 10b3
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e06 addr: 10d3
R_X86_64_64
sym: sha256_digest info: 11 other: 00 shndx: 8 value: 20 size: 20
sym: sha256_digest value: 6020 addr: 10e1
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e08 addr: 10ef
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e00 addr: 1105
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e06 addr: 1117
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e18 addr: 1136
R_X86_64_64
sym: printf info: 12 other: 00 shndx: 1 value: 4be size: a3
sym: printf value: 14be addr: 1142
R_X86_64_64
sym: setup_arch info: 12 other: 00 shndx: 1 value: 772 size: 56
sym: setup_arch value: 1772 addr: 114f
R_X86_64_64
sym: skip_checks info: 11 other: 00 shndx: 8 value: 0 size: 4
sym: skip_checks value: 6000 addr: 115b
R_X86_64_64
sym: verify_sha256_digest info: 12 other: 00 shndx: 1 value: 0 size: 134
sym: verify_sha256_digest value: 1000 addr: 116a
R_X86_64_64
sym: post_verification_setup_arch info: 12 other: 00 shndx: 1 value: 800 size: 58
sym: post_verification_setup_arch value: 1800 addr: 117c
R_X86_64_64
sym: putchar info: 12 other: 00 shndx: 1 value: d9e size: 11d
sym: putchar value: 1d9e addr: 118f
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e2a addr: 12d1
R_X86_64_64
sym: vsprintf info: 12 other: 00 shndx: 1 value: 187 size: 2a1
sym: vsprintf value: 1187 addr: 14a4
R_X86_64_64
sym: vsprintf info: 12 other: 00 shndx: 1 value: 187 size: 2a1
sym: vsprintf value: 1187 addr: 153f
R_X86_64_64
sym: entry32 info: 10 other: 00 shndx: 1 value: 5d0 size: 0
sym: entry32 value: 15cc addr: 15dd
R_X86_64_PC32
sym: entry32 info: 10 other: 00 shndx: 1 value: 5d0 size: 0
sym: entry32 value: 15cc addr: 15f2
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 615c addr: 160d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 613c addr: 1614
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4ce4 addr: 161a
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 61ac addr: 1620
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cbc addr: 1626
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d51 addr: 1659
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d60 addr: 1660
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d6b addr: 1667
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d76 addr: 166e
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d81 addr: 1675
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d8c addr: 167c
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d97 addr: 1683
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d86 addr: 168a
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 6271 addr: 1691
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d7c addr: 16a3
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4dac addr: 16b9
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cec addr: 16cc
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cf4 addr: 16d3
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cfc addr: 16da
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d04 addr: 16e1
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d0c addr: 16e8
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d14 addr: 16ef
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d1c addr: 16f6
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d24 addr: 16fd
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d2c addr: 1704
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d34 addr: 170b
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d3c addr: 1712
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d44 addr: 1719
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d4c addr: 1720
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d54 addr: 1727
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d5c addr: 172e
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d64 addr: 1735
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d6c addr: 173b
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4dac addr: 1743
R_X86_64_PC32
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8004 addr: 175d
R_X86_64_PC32
sym: .bss info: 03 other: 00 shndx: a value: 0 size: 0
sym: .bss value: 9ffc addr: 1764
R_X86_64_PC32
sym: purgatory info: 12 other: 00 shndx: 1 value: 134 size: 53
sym: purgatory value: 1130 addr: 1769
R_X86_64_PLT32
sym: entry64 info: 10 other: 00 shndx: 1 value: 6a0 size: 0
sym: entry64 value: 169c addr: 176e
R_X86_64_PLT32
sym: reset_vga info: 11 other: 00 shndx: 8 value: 2012 size: 1
sym: reset_vga value: 8012 addr: 1774
R_X86_64_64
sym: x86_reset_vga info: 12 other: 00 shndx: 1 value: ebb size: 232
sym: x86_reset_vga value: 1ebb addr: 1783
R_X86_64_64
sym: legacy_pic info: 11 other: 00 shndx: 8 value: 2011 size: 1
sym: legacy_pic value: 8011 addr: 1790
R_X86_64_64
sym: x86_setup_legacy_pic info: 12 other: 00 shndx: 1 value: 10ed size: 35
sym: x86_setup_legacy_pic value: 20ed addr: 179f
R_X86_64_64
sym: legacy_pic info: 11 other: 00 shndx: 8 value: 2011 size: 1
sym: legacy_pic value: 8011 addr: 17ae
R_X86_64_64
sym: x86_setup_legacy_pic info: 12 other: 00 shndx: 1 value: 10ed size: 35
sym: x86_setup_legacy_pic value: 20ed addr: 17bd
R_X86_64_64
sym: cmdline_end info: 11 other: 00 shndx: 8 value: 2000 size: 8
sym: cmdline_end value: 8000 addr: 17ca
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8008 addr: 17dc
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e3b addr: 17eb
R_X86_64_64
sym: sprintf info: 12 other: 00 shndx: 1 value: 428 size: 96
sym: sprintf value: 1428 addr: 17f5
R_X86_64_64
sym: panic_kernel info: 11 other: 00 shndx: 8 value: 2010 size: 1
sym: panic_kernel value: 8010 addr: 1802
R_X86_64_64
sym: crashdump_backup_memory info: 12 other: 00 shndx: 1 value: cc3 size: 3e
sym: crashdump_backup_memory value: 1cc3 addr: 1811
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8008 addr: 181e
R_X86_64_64
sym: x86_setup_jump_back_entry info: 12 other: 00 shndx: 1 value: 7c8 size: 38
sym: x86_setup_jump_back_entry value: 17c8 addr: 182e
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8008 addr: 183d
R_X86_64_64
sym: x86_setup_jump_back_entry info: 12 other: 00 shndx: 1 value: 7c8 size: 38
sym: x86_setup_jump_back_entry value: 17c8 addr: 184d
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8047 addr: 1877
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 804f addr: 187d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8075 addr: 189d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 807f addr: 18a3
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8089 addr: 18a9
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8093 addr: 18af
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8076 addr: 18b6
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 808d addr: 18bd
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 806d addr: 1987
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8075 addr: 198d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 809b addr: 19ad
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80a5 addr: 19b3
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80af addr: 19b9
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80b9 addr: 19bf
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80e2 addr: 1a02
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 812b addr: 1a45
R_X86_64_PC32
sym: backup_src_size info: 11 other: 00 shndx: 8 value: 2070 size: 8
sym: backup_src_size value: 8070 addr: 1cc5
R_X86_64_64
sym: backup_start info: 11 other: 00 shndx: 8 value: 2080 size: 8
sym: backup_start value: 8080 addr: 1cd7
R_X86_64_64
sym: backup_src_start info: 11 other: 00 shndx: 8 value: 2078 size: 8
sym: backup_src_start value: 8078 addr: 1ce9
R_X86_64_64
sym: memcpy info: 12 other: 00 shndx: 1 value: 58b size: 1a
sym: memcpy value: 158b addr: 1cf6
R_X86_64_64
sym: serial_base info: 11 other: 00 shndx: 8 value: 2090 size: 2
sym: serial_base value: 8090 addr: 1d03
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8088 addr: 1d13
R_X86_64_64
sym: serial_baud info: 11 other: 00 shndx: 8 value: 208c size: 4
sym: serial_baud value: 808c addr: 1d4a
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8088 addr: 1d78
R_X86_64_64
sym: console_vga info: 11 other: 00 shndx: 8 value: 2093 size: 1
sym: console_vga value: 8093 addr: 1da0
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8098 addr: 1db6
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8098 addr: 1e18
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8094 addr: 1e2e
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8094 addr: 1e48
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8094 addr: 1e78
R_X86_64_64
sym: console_serial info: 11 other: 00 shndx: 8 value: 2092 size: 1
sym: console_serial value: 8092 addr: 1e8c
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1d01 addr: 1ea0
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 1 value: 1180 size: 28a1
sym: sha256_process value: 2180 addr: 4a7f
R_X86_64_64
sym: memcpy info: 12 other: 00 shndx: 1 value: 58b size: 1a
sym: memcpy value: 158b addr: 4ae4
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 1 value: 1180 size: 28a1
sym: sha256_process value: 2180 addr: 4af6
R_X86_64_64
sym: memcpy info: 12 other: 00 shndx: 1 value: 58b size: 1a
sym: memcpy value: 158b addr: 4b24
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4a30 addr: 4b47
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4a30 addr: 4ba8
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80a0 addr: 4bb7
R_X86_64_64
sym: entry16 info: 10 other: 00 shndx: 1 value: 860 size: 0
sym: entry16 value: 1860 addr: 4ce8
R_X86_64_64
sym: entry32 info: 10 other: 00 shndx: 1 value: 5d0 size: 0
sym: entry32 value: 15d0 addr: 4d70
R_X86_64_64
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d80 addr: 4d82
R_X86_64_64
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4db0 addr: 4db2
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1000 addr: 4e78
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1134 addr: 4eac
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1187 addr: 4ee0
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1428 addr: 4f2c
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 14be addr: 4f48
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1561 addr: 4f80
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1574 addr: 4f94
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 158b addr: 4fa8
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 15a5 addr: 4fbc
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1772 addr: 4fe8
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 17c8 addr: 5008
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1800 addr: 501c
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1cc3 addr: 5058
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1d01 addr: 5088
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1d9e addr: 509c
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1ebb addr: 50d0
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 20ed addr: 5100
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 2130 addr: 5130
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 2180 addr: 5144
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4a30 addr: 5190
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4b40 addr: 51f4
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4b60 addr: 5208
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 6140 addr: 6142
R_X86_64_64
Try gzip decompression.
Try gzip decompression.
kexec_load: entry = 0x1740 flags = 0x3e0000
nr_segments = 6
segment[0].buf = 0x563bf72fe5a0
segment[0].bufsz = 0x198
segment[0].mem = (nil)
segment[0].memsz = 0x1000
segment[1].buf = 0x563bf72f7120
segment[1].bufsz = 0x70e0
segment[1].mem = 0x1000
segment[1].memsz = 0x9000
segment[2].buf = 0x563bf72fe980
segment[2].bufsz = 0x20e
segment[2].mem = 0xa000
segment[2].memsz = 0x1000
segment[3].buf = 0x7fa937ec6090
segment[3].bufsz = 0x2419a8
segment[3].mem = 0x200000
segment[3].memsz = 0x3b7000
segment[4].buf = 0x7fa937456010
segment[4].bufsz = 0xa6f160
segment[4].mem = 0x900000
segment[4].memsz = 0xa70000
segment[5].buf = 0x7fa9313e4010
segment[5].bufsz = 0x60719dc
segment[5].mem = 0x1370000
segment[5].memsz = 0x6072000

If I use patched kexec 2.0.26 with ebda hack then I'm booting into Qubes OS 4.2 installer just fine:

patched kexec -d -l

Try gzip decompression.
kernel: 0x7f2e96f79010 kernel_size: 0x241ae4
MEMORY RANGES
0000000000000400-000000000009ffff (0)
0000000000100000-0000000000805fff (0)
0000000000806000-0000000000807fff (3)
0000000000808000-000000000080ffff (0)
0000000000810000-00000000008fffff (3)
0000000000900000-000000007ee77fff (0)
000000007ee78000-000000007ef79fff (1)
000000007ef7a000-000000007f8edfff (0)
000000007f8ee000-000000007f9edfff (1)
000000007f9ee000-000000007faedfff (1)
000000007faee000-000000007fb6dfff (1)
000000007fb6e000-000000007fb7dfff (2)
000000007fb7e000-000000007fbfdfff (3)
000000007fbfe000-000000007febbfff (0)
000000007febc000-000000007ff3ffff (1)
000000007ff40000-000000007fffffff (3)
00000000b0000000-00000000bfffffff (1)
sym: sha256_starts info: 12 other: 00 shndx: 1 value: 1130 size: 48
sym: sha256_starts value: 2130 addr: 1002
R_X86_64_64
sym: sha256_update info: 12 other: 00 shndx: 1 value: 3b40 size: 19
sym: sha256_update value: 4b40 addr: 100f
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 8 value: 40 size: 100
sym: sha256_regions value: 6040 addr: 101a
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 8 value: 40 size: 100
sym: sha256_regions value: 6140 addr: 1044
R_X86_64_64
sym: sha256_finish info: 12 other: 00 shndx: 1 value: 3b60 size: 15c
sym: sha256_finish value: 4b60 addr: 105b
R_X86_64_64
sym: sha256_digest info: 11 other: 00 shndx: 8 value: 20 size: 20
sym: sha256_digest value: 6020 addr: 106f
R_X86_64_64
sym: memcmp info: 12 other: 00 shndx: 1 value: 5a5 size: 25
sym: memcmp value: 15a5 addr: 1079
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4dd0 addr: 108d
R_X86_64_64
sym: printf info: 12 other: 00 shndx: 1 value: 4be size: a3
sym: printf value: 14be addr: 109b
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e00 addr: 10a5
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4df0 addr: 10b3
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e06 addr: 10d3
R_X86_64_64
sym: sha256_digest info: 11 other: 00 shndx: 8 value: 20 size: 20
sym: sha256_digest value: 6020 addr: 10e1
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e08 addr: 10ef
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e00 addr: 1105
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e06 addr: 1117
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e18 addr: 1136
R_X86_64_64
sym: printf info: 12 other: 00 shndx: 1 value: 4be size: a3
sym: printf value: 14be addr: 1142
R_X86_64_64
sym: setup_arch info: 12 other: 00 shndx: 1 value: 772 size: 56
sym: setup_arch value: 1772 addr: 114f
R_X86_64_64
sym: skip_checks info: 11 other: 00 shndx: 8 value: 0 size: 4
sym: skip_checks value: 6000 addr: 115b
R_X86_64_64
sym: verify_sha256_digest info: 12 other: 00 shndx: 1 value: 0 size: 134
sym: verify_sha256_digest value: 1000 addr: 116a
R_X86_64_64
sym: post_verification_setup_arch info: 12 other: 00 shndx: 1 value: 800 size: 58
sym: post_verification_setup_arch value: 1800 addr: 117c
R_X86_64_64
sym: putchar info: 12 other: 00 shndx: 1 value: d9e size: 11d
sym: putchar value: 1d9e addr: 118f
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e2a addr: 12d1
R_X86_64_64
sym: vsprintf info: 12 other: 00 shndx: 1 value: 187 size: 2a1
sym: vsprintf value: 1187 addr: 14a4
R_X86_64_64
sym: vsprintf info: 12 other: 00 shndx: 1 value: 187 size: 2a1
sym: vsprintf value: 1187 addr: 153f
R_X86_64_64
sym: entry32 info: 10 other: 00 shndx: 1 value: 5d0 size: 0
sym: entry32 value: 15cc addr: 15dd
R_X86_64_PC32
sym: entry32 info: 10 other: 00 shndx: 1 value: 5d0 size: 0
sym: entry32 value: 15cc addr: 15f2
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 615c addr: 160d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 613c addr: 1614
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4ce4 addr: 161a
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 61ac addr: 1620
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cbc addr: 1626
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d51 addr: 1659
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d60 addr: 1660
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d6b addr: 1667
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d76 addr: 166e
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d81 addr: 1675
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d8c addr: 167c
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d97 addr: 1683
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d86 addr: 168a
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 6271 addr: 1691
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d7c addr: 16a3
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4dac addr: 16b9
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cec addr: 16cc
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cf4 addr: 16d3
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4cfc addr: 16da
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d04 addr: 16e1
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d0c addr: 16e8
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d14 addr: 16ef
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d1c addr: 16f6
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d24 addr: 16fd
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d2c addr: 1704
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d34 addr: 170b
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d3c addr: 1712
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d44 addr: 1719
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d4c addr: 1720
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d54 addr: 1727
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d5c addr: 172e
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d64 addr: 1735
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d6c addr: 173b
R_X86_64_PC32
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4dac addr: 1743
R_X86_64_PC32
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8004 addr: 175d
R_X86_64_PC32
sym: .bss info: 03 other: 00 shndx: a value: 0 size: 0
sym: .bss value: 9ffc addr: 1764
R_X86_64_PC32
sym: purgatory info: 12 other: 00 shndx: 1 value: 134 size: 53
sym: purgatory value: 1130 addr: 1769
R_X86_64_PLT32
sym: entry64 info: 10 other: 00 shndx: 1 value: 6a0 size: 0
sym: entry64 value: 169c addr: 176e
R_X86_64_PLT32
sym: reset_vga info: 11 other: 00 shndx: 8 value: 2012 size: 1
sym: reset_vga value: 8012 addr: 1774
R_X86_64_64
sym: x86_reset_vga info: 12 other: 00 shndx: 1 value: ebb size: 232
sym: x86_reset_vga value: 1ebb addr: 1783
R_X86_64_64
sym: legacy_pic info: 11 other: 00 shndx: 8 value: 2011 size: 1
sym: legacy_pic value: 8011 addr: 1790
R_X86_64_64
sym: x86_setup_legacy_pic info: 12 other: 00 shndx: 1 value: 10ed size: 35
sym: x86_setup_legacy_pic value: 20ed addr: 179f
R_X86_64_64
sym: legacy_pic info: 11 other: 00 shndx: 8 value: 2011 size: 1
sym: legacy_pic value: 8011 addr: 17ae
R_X86_64_64
sym: x86_setup_legacy_pic info: 12 other: 00 shndx: 1 value: 10ed size: 35
sym: x86_setup_legacy_pic value: 20ed addr: 17bd
R_X86_64_64
sym: cmdline_end info: 11 other: 00 shndx: 8 value: 2000 size: 8
sym: cmdline_end value: 8000 addr: 17ca
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8008 addr: 17dc
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 4e3b addr: 17eb
R_X86_64_64
sym: sprintf info: 12 other: 00 shndx: 1 value: 428 size: 96
sym: sprintf value: 1428 addr: 17f5
R_X86_64_64
sym: panic_kernel info: 11 other: 00 shndx: 8 value: 2010 size: 1
sym: panic_kernel value: 8010 addr: 1802
R_X86_64_64
sym: crashdump_backup_memory info: 12 other: 00 shndx: 1 value: cc3 size: 3e
sym: crashdump_backup_memory value: 1cc3 addr: 1811
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8008 addr: 181e
R_X86_64_64
sym: x86_setup_jump_back_entry info: 12 other: 00 shndx: 1 value: 7c8 size: 38
sym: x86_setup_jump_back_entry value: 17c8 addr: 182e
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 8008 addr: 183d
R_X86_64_64
sym: x86_setup_jump_back_entry info: 12 other: 00 shndx: 1 value: 7c8 size: 38
sym: x86_setup_jump_back_entry value: 17c8 addr: 184d
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8047 addr: 1877
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 804f addr: 187d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8075 addr: 189d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 807f addr: 18a3
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8089 addr: 18a9
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8093 addr: 18af
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8076 addr: 18b6
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 808d addr: 18bd
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 806d addr: 1987
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8075 addr: 198d
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 809b addr: 19ad
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80a5 addr: 19b3
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80af addr: 19b9
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80b9 addr: 19bf
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80e2 addr: 1a02
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 812b addr: 1a45
R_X86_64_PC32
sym: backup_src_size info: 11 other: 00 shndx: 8 value: 2070 size: 8
sym: backup_src_size value: 8070 addr: 1cc5
R_X86_64_64
sym: backup_start info: 11 other: 00 shndx: 8 value: 2080 size: 8
sym: backup_start value: 8080 addr: 1cd7
R_X86_64_64
sym: backup_src_start info: 11 other: 00 shndx: 8 value: 2078 size: 8
sym: backup_src_start value: 8078 addr: 1ce9
R_X86_64_64
sym: memcpy info: 12 other: 00 shndx: 1 value: 58b size: 1a
sym: memcpy value: 158b addr: 1cf6
R_X86_64_64
sym: serial_base info: 11 other: 00 shndx: 8 value: 2090 size: 2
sym: serial_base value: 8090 addr: 1d03
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8088 addr: 1d13
R_X86_64_64
sym: serial_baud info: 11 other: 00 shndx: 8 value: 208c size: 4
sym: serial_baud value: 808c addr: 1d4a
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8088 addr: 1d78
R_X86_64_64
sym: console_vga info: 11 other: 00 shndx: 8 value: 2093 size: 1
sym: console_vga value: 8093 addr: 1da0
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8098 addr: 1db6
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8098 addr: 1e18
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8094 addr: 1e2e
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8094 addr: 1e48
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 8094 addr: 1e78
R_X86_64_64
sym: console_serial info: 11 other: 00 shndx: 8 value: 2092 size: 1
sym: console_serial value: 8092 addr: 1e8c
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1d01 addr: 1ea0
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 1 value: 1180 size: 28a1
sym: sha256_process value: 2180 addr: 4a7f
R_X86_64_64
sym: memcpy info: 12 other: 00 shndx: 1 value: 58b size: 1a
sym: memcpy value: 158b addr: 4ae4
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 1 value: 1180 size: 28a1
sym: sha256_process value: 2180 addr: 4af6
R_X86_64_64
sym: memcpy info: 12 other: 00 shndx: 1 value: 58b size: 1a
sym: memcpy value: 158b addr: 4b24
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4a30 addr: 4b47
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4a30 addr: 4ba8
R_X86_64_64
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 80a0 addr: 4bb7
R_X86_64_64
sym: entry16 info: 10 other: 00 shndx: 1 value: 860 size: 0
sym: entry16 value: 1860 addr: 4ce8
R_X86_64_64
sym: entry32 info: 10 other: 00 shndx: 1 value: 5d0 size: 0
sym: entry32 value: 15d0 addr: 4d70
R_X86_64_64
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4d80 addr: 4d82
R_X86_64_64
sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 4db0 addr: 4db2
R_X86_64_64
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1000 addr: 4e78
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1134 addr: 4eac
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1187 addr: 4ee0
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1428 addr: 4f2c
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 14be addr: 4f48
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1561 addr: 4f80
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1574 addr: 4f94
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 158b addr: 4fa8
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 15a5 addr: 4fbc
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1772 addr: 4fe8
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 17c8 addr: 5008
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1800 addr: 501c
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1cc3 addr: 5058
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1d01 addr: 5088
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1d9e addr: 509c
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 1ebb addr: 50d0
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 20ed addr: 5100
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 2130 addr: 5130
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 2180 addr: 5144
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4a30 addr: 5190
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4b40 addr: 51f4
R_X86_64_PC32
sym: .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 4b60 addr: 5208
R_X86_64_PC32
sym: .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 6140 addr: 6142
R_X86_64_64
Try gzip decompression.
Try gzip decompression.
hack ebda into segment 0!
kexec_load: entry = 0x1740 flags = 0x3e0000
nr_segments = 6
segment[0].buf = 0x55bc55e694e0
segment[0].bufsz = 0x1000
segment[0].mem = (nil)
segment[0].memsz = 0x1000
segment[1].buf = 0x55bc55e60120
segment[1].bufsz = 0x70e0
segment[1].mem = 0x1000
segment[1].memsz = 0x9000
segment[2].buf = 0x55bc55e67980
segment[2].bufsz = 0x20e
segment[2].mem = 0xa000
segment[2].memsz = 0x1000
segment[3].buf = 0x7f2e96f79090
segment[3].bufsz = 0x2419a8
segment[3].mem = 0x200000
segment[3].memsz = 0x3b7000
segment[4].buf = 0x7f2e96509010
segment[4].bufsz = 0xa6f160
segment[4].mem = 0x900000
segment[4].memsz = 0xa70000
segment[5].buf = 0x7f2e90497010
segment[5].bufsz = 0x60719dc
segment[5].mem = 0x1370000
segment[5].memsz = 0x6072000

I've attached boot log of successful kexec into Qubes OS 4.2 installer with patched kexec.
patched-kexec-boot.log

@lankredotp41
Copy link

I've tested some more and found that kexec 2.0.26 works in QEMU with BIOS without ebda hack patch for multiboot2, but if I specify -t multiboot-x86 then it won't work without patch. So it was fixed upstream only for multiboot2 and if you want to boot with multiboot then it'll fail.
This is the root of my problem, since I'm using multiboot and not multiboot2 to boot in QEMU with UEFI.
I guess I'll need to check how it was implemented for BIOS in multiboot2.
But this problem is unrelated to Heads so sorry about off-topic.

tlaurion added a commit to tlaurion/heads that referenced this pull request May 3, 2023
tlaurion added a commit to tlaurion/heads that referenced this pull request May 3, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 3, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 3, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 3, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 3, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 5, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.
 - Removed unneedead crypto support for ivy and sandy bridge (no AVX2, and AVX support needed only for AES (ctypestup is XTS-AES on most deployments)
 - removed CDROM support and SCSI support

Note: those two commands are really useful to analyse in-kernel sizes.
Summary, to dig down in directory reported as being biggest:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ for f in */built-in.a; do size -t $f | tail -1 | sed "s|(TOTALS)|$f|"; done | sort -nr
Detailed view of biggest built-in components and objects linked:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ size -t $(find ./ -name built-in.a) | tail -n +2 | sort -n -r -k 4|less
Then follow those amazing guides to axe/hammer kernel size:
Axing: https://lwn.net/Articles/746780/
General: https://elinux.org/Kernel_Size_Tuning_Guide
And analyse needs of each module/kernel config option: https://www.kernelconfig.io

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 5, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.
 - Removed unneedead crypto support for ivy and sandy bridge (no AVX2, and AVX support needed only for AES (ctypestup is XTS-AES on most deployments)

Note: those two commands are really useful to analyse in-kernel sizes.
Summary, to dig down in directory reported as being biggest:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ for f in */built-in.a; do size -t $f | tail -1 | sed "s|(TOTALS)|$f|"; done | sort -nr
Detailed view of biggest built-in components and objects linked:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ size -t $(find ./ -name built-in.a) | tail -n +2 | sort -n -r -k 4|less
Then follow those amazing guides to axe/hammer kernel size:
Axing: https://lwn.net/Articles/746780/
General: https://elinux.org/Kernel_Size_Tuning_Guide
And analyse needs of each module/kernel config option: https://www.kernelconfig.io

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 5, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.
 - Removed unneedead crypto support for ivy and sandy bridge (no AVX2, and AVX support needed only for AES (ctypestup is XTS-AES on most deployments)
 - Added required crypto hash HMAC

Note: those two commands are really useful to analyse in-kernel sizes.
Summary, to dig down in directory reported as being biggest:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ for f in */built-in.a; do size -t $f | tail -1 | sed "s|(TOTALS)|$f|"; done | sort -nr
Detailed view of biggest built-in components and objects linked:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ size -t $(find ./ -name built-in.a) | tail -n +2 | sort -n -r -k 4|less
Then follow those amazing guides to axe/hammer kernel size:
Axing: https://lwn.net/Articles/746780/
General: https://elinux.org/Kernel_Size_Tuning_Guide
And analyse needs of each module/kernel config option: https://www.kernelconfig.io

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 6, 2023
Moved boards to 5.10.5
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.
 - Removed unneedead crypto support for ivy and sandy bridge (no AVX2, and AVX support needed only for AES (ctypestup is XTS-AES on most deployments)
 - Added required crypto hash HMAC

Note: those two commands are really useful to analyse in-kernel sizes.
Summary, to dig down in directory reported as being biggest:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ for f in */built-in.a; do size -t $f | tail -1 | sed "s|(TOTALS)|$f|"; done | sort -nr
Detailed view of biggest built-in components and objects linked:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ size -t $(find ./ -name built-in.a) | tail -n +2 | sort -n -r -k 4|less
Then follow those amazing guides to axe/hammer kernel size:
Axing: https://lwn.net/Articles/746780/
General: https://elinux.org/Kernel_Size_Tuning_Guide
And analyse needs of each module/kernel config option: https://www.kernelconfig.io

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
tlaurion added a commit to tlaurion/heads that referenced this pull request May 7, 2023
Moved boards to 5.10.5, staging for 5.10.178 (LTS)
kernel configs to not cause regression on crypto backend, both with cryptsetup and current gpg toolstack
modules/linux added 5.10.178 but nothing migrated at this stage.
modules/linux includes Android tethering modules to be packed when needed per board configs (maximized only)
Kernel configs for x230 good to go.
 - Removed unneedead crypto support for ivy and sandy bridge (no AVX2, and AVX support needed only for AES (ctypestup is XTS-AES on most deployments)
 - Added required crypto hash HMAC

Note: those two commands are really useful to analyse in-kernel sizes.
Summary, to dig down in directory reported as being biggest:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ for f in */built-in.a; do size -t $f | tail -1 | sed "s|(TOTALS)|$f|"; done | sort -nr
Detailed view of biggest built-in components and objects linked:
user@heads-tests:~/heads/build/x86/linux-5.10.5/linux-x230-maximized$ size -t $(find ./ -name built-in.a) | tail -n +2 | sort -n -r -k 4|less
Then follow those amazing guides to axe/hammer kernel size:
Axing: https://lwn.net/Articles/746780/
General: https://elinux.org/Kernel_Size_Tuning_Guide
And analyse needs of each module/kernel config option: https://www.kernelconfig.io

u-root module containing bases for using exp/tcz and wget (with only root ca module included)
qemu kernel config includes changes needed to support CGROUPS and
busybox upgraded and config changed to include adduser/addgroup/delgoup/deluser per determist/systems requirements, but still failing
Makefile: adds packing of u-root under initrd if requested
initrd/bin/tinycorePoC: requires manual activation of libraries under u-root module

kexec patch still carries old multiboot patch. Not sure wasa good idea to remove since user could decide to use old default multiboot1 (default is now multiboot2 under kexec 2.0.26 under master)
CircleCI changes revisioning to 4.19 (textual, not changing any behavior)
@tlaurion tlaurion force-pushed the xx20_xx30_kernel_510_bump branch from 400f71d to 5379bfd Compare May 8, 2023 16:35
@pcm720
Copy link

pcm720 commented May 8, 2023

x230-maximized-fhd_edp works on my 1440p X230 without any apparent issues.

@tlaurion
Copy link
Collaborator Author

tlaurion commented May 8, 2023

Comparing t520-hotp-maximized (know spi limited) build logs for this pr against current master's

Master's:

"/root/project/build/x86/coreboot-4.19/t520-hotp-maximized/cbfstool" "/root/project/build/x86/coreboot-4.19/t520-hotp-maximized/coreboot.rom" print
FMAP REGION: COREBOOT
Name                           Offset     Type           Size   Comp
cbfs_master_header             0x0        cbfs header        32 none
fallback/romstage              0x80       stage           74024 none
cpu_microcode_blob.bin         0x12240    microcode       26624 none
fallback/ramstage              0x18a80    stage          115942 LZMA (252272 decompressed)
build_info                     0x34fc0    raw               101 none
fallback/dsdt.aml              0x35080    raw             14522 none
vbt.bin                        0x38980    raw              1389 LZMA (3985 decompressed)
cmos_layout.bin                0x38f40    cmos_layout      2108 none
fallback/postcar               0x397c0    stage           22200 none
fallback/payload               0x3eec0    simple elf    7001613 none
(empty)                        0x6ec500   null           914916 none
bootblock                      0x7cbb00   bootblock       17088 none
2023-05-06 12:01:18-04:00 INSTALL   build/x86/coreboot-4.19/t520-hotp-maximized/coreboot.rom => build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1550-gbc148f1.rom

PR's:

"/root/project/build/x86/coreboot-4.19/t520-hotp-maximized/cbfstool" "/root/project/build/x86/coreboot-4.19/t520-hotp-maximized/coreboot.rom" print
FMAP REGION: COREBOOT
Name                           Offset     Type           Size   Comp
cbfs_master_header             0x0        cbfs header        32 none
fallback/romstage              0x80       stage           74024 none
cpu_microcode_blob.bin         0x12240    microcode       26624 none
fallback/ramstage              0x18a80    stage           96246 LZMA (208636 decompressed)
build_info                     0x30300    raw               101 none
fallback/dsdt.aml              0x303c0    raw             14522 none
vbt.bin                        0x33cc0    raw              1389 LZMA (3985 decompressed)
cmos_layout.bin                0x34280    cmos_layout      2108 none
fallback/postcar               0x34b00    stage           22200 none
fallback/payload               0x3a200    simple elf    7024308 none
(empty)                        0x6ed100   null           911844 none
bootblock                      0x7cbb00   bootblock       17088 none
2023-05-08 13:24:34-04:00 INSTALL   build/x86/coreboot-4.19/t520-hotp-maximized/coreboot.rom => build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1553-g5379bfd.rom

master empty - pr empty = cost of current config kernel version bump
914916 - 911844 = 3072 bytes (increase) where there is still 911844 bytes free.

@tlaurion
Copy link
Collaborator Author

tlaurion commented May 8, 2023

As per current config on xx30 as opposed to removing it:

-CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
-CONFIG_INIT_ON_FREE_DEFAULT_ON=y
+# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
+# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set

Add around 1 second of boot time.

It takes around 6 seconds between coreboot loading the kernel and jumping into it, and then between 2 to 6 seconds depending of kernel config. Testing things.

@tlaurion
Copy link
Collaborator Author

tlaurion commented May 10, 2023

Well, I'm not convinced on local tests of this branch as-is for newcomers to the project.
I'm used to not have any screen until i915 driver loads on my main x230 laptop (since QubesOS, which is multiboot kexec codepath, which is different from kexec'ing into another OS without Xen involved, which is a different story. But since Heads is not meant to only boot into QubesOS, the more general kexec use case of simply booting into replacement kernel and initrd should work for all OSes which at least provides VESAFB.)

But the delay before having a working display under Heads alone is increasing over time (the more the payload is heavy, the more it takes time to be read from slow SPI, and the more kernel security features slow down the kernel boot time).

The reality unfolds to the following:

  • The bigger becomes coreboot payload, the longer it takes to read it from SPI flash (SPI is slow). As of now this is 7-8 seconds prior of coreboot being able to jump into the kernel (this is 8 seconds without video output here!)
  • Then, the more security features inside the kernel, and the slower it takes for the kernel to finally initialize drm+i915 driver (same would apply to any GPU driver in kernel here). From my tests, if we remove memory stack and heap initialization (new feature, adds 1.5s to kernel being ready to use): it still takes 2 seconds to arrive in a console

This is ~10 seconds before reaching to the graphic framebuffer initialized by the kernel alone.


I've been experimenting with libgfxinit, which is imperfect (bootsplash jpeg code is 14 years old and requires old framebuffer sizes as of now: eg 1024x768 instead of 1366x768 required for x230), where fbwhiptail requires VSYNC ioctl, not provided by linux CONFIG_FB_SIMPLE=y which can be prepared by coreboot libgfxinit alongside of linux being aware of that fb through CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=y

It would have been amazing that FB_SIMPLE would have been enough to drive FBWHIPTAIL, since the chicken egg problem here would have been resolved:

  • libgfxinit provides a splashscreen on boot (while coreboot reads the payload from slow SPI flash, there is something on screen)
  • CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT permits that linear framebuffer to be passed to linux CONFIG_FB_SIMPLE which reuses it to draw on screen.
  • Consequently, if that was working, the whole DRM+i915+hack on kexec could be dodged entirely.
  • That means that gpu kernel code (2mb compressed resulting into 500kb of freed compiled-in kernel modules) would be removed
    • And then, ironically, would also reduce the boot time accordingly, since payload is smaller to read from SPI

But. Since FBWHIPTAIL requires VSYNC ioctl which returns ENOTTY, we still need drm+i915 for the moment until fbwhiptail is adapted for this more generalized use case across all boards.

PoC still is interesting:

  • There is 1024x768 splashscreen on boot (user not scared of bricks) which in background reads payload
  • kernel loads drm+gpu drivers and then take ownership of screen with current hacks of kexec patch, coreboot krnel command line arguments telling to leak fb address so we can kexec into next kernel only driving VESA fb (tinycore has a working console here)

Teaser from work that happened in my personal branch :
We get into framebuffer in a couple of msec:
signal-2023-05-10-142807_003
Then it takes ~8 seconds to jump in kernel:
signal-2023-05-10-142807_002
Heads is ready around 3 seconds later (kernel boot)
signal-2023-05-10-142807_004
Basically getting under Heads in about 10 seconds, but without things being scary for the user.

Thoughts?


Short version of the debate:

  • libgfxinit + linux coreboot framebuffer handover + fb_simple linux driver would leave us in same situation then on master: we would continue to depend on gnat6 for maximized platforms in that scenario.
  • Otherwise, we accept to be "blind" until drm+gpu kernels are loaded and ready for the user.

The reasoning on this is that reading from SPI is slow. The more we take space in flash, the more it takes time to read from SPI (cbmem log above showing jump to payload after 7-8 seconds), and relaying solely on kernel drivers to obtain full-fledged accelerated and feature rich framebuffer leaves the user blind until that happens.

@miczyg1
Copy link
Contributor

miczyg1 commented May 10, 2023

If I915 driver is present in heads it will initialize framebuffer anyways, right?

Why not enable legacy VGA text mode with libgfxinit? Then you could print some strings on the screen, like "heads payload is loading"

@tlaurion
Copy link
Collaborator Author

As a comparison to current x230-maximized rom from this PR at commit 5379bfd:

signal-2023-05-10-145804
signal-2023-05-10-145814

All things compared, both jumps inside of a working Heads payload under 10 seconds. The difference is on size and being let in the dark doing so.

This is not a blocker for this PR itself alone, but might be a consideration for the future. Without libgfxinit, the user is currently left in the dark until drm+gpu is inititalized by the kernel.

Putting this PR ready for review

@tlaurion tlaurion marked this pull request as ready for review May 10, 2023 19:01
@JonathonHall-Purism
Copy link
Collaborator

@tlaurion

This is ~10 seconds before reaching to the graphic framebuffer initialized by the kernel alone.

Yeah, this is not great. We have similar problems with memory training delays, users just assume it is not booting without waiting long enough. That's a longer delay (30-60 seconds, not every boot thank goodness), but 10 seconds is still uncomfortable IMO. We have to put our foot down somewhere.

where fbwhiptail requires VSYNC ioctl, not provided by linux CONFIG_FB_SIMPLE=y

This could be changed pretty easily, just tolerate ENOTTY from that ioctl instead of giving up. Result is just screen tearing, which isn't that bad on fbwhiptail.

You would still need libgfxinit, but I think this would solve everything else (no DRM stack in kernel, so kernel is smaller, no double GFX init, early splash, probably no kexec hacks).

reading from SPI is slow

It sounds like this is worse on your boards than mine (which would make sense). Is there any chance that maybe dual I/O is not enabled in your IFD? On the off chance it isn't, it should give you a significant speedup. There's also quad mode (even better), but it has to be hooked up on the board and assumes you do not have any hardware write protect switch/jumper (the /WP pin is repurposed as an I/O).

@tlaurion
Copy link
Collaborator Author

tlaurion commented May 10, 2023

If I915 driver is present in heads it will initialize framebuffer anyways, right?

Why not enable legacy VGA text mode with libgfxinit? Then you could print some strings on the screen, like "heads payload is loading"

@miczyg1 The question here, sorry if that was left unclear, is with or without ligfxinit (which means depending on gnat/ada or not). Meaning leaving user in the dark while everything becomes ready without libgfxinit, or enabling libgfxinit and then why not, include a bootsplash (as shown under #1381 (comment)).

Sorry for the confusion there! And thanks for challenging this!

Edit: showing text/splashscreen at this point is irrelevant. People would prefer graphics then text, of course. Which is what is shown above for what, maybe 50kb including jpg and additional code to do it.

@tlaurion
Copy link
Collaborator Author

Testing request under #1398.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Jun 26, 2023

linux-x230-legacy.config removes net_core net_dev but keeps generic CONFIG_NET, which is required by crypto backend. A reminder that its mostly impossible to remove CONFIG_NET since mostly everything requires a socket.

Could be revisited next round of #590, things are getting externalized at each linux kernel version!
TODO:


EDIT:

Houla. Same story as with 4.14.x. I unselected CONFIG_NET. saved config in oldconfig and see what is automatically deactivated:

user@heads-tests-deb12:~/heads$ git diff | grep -e "^-" -e "^+"
--- a/config/linux-x230-legacy.config
+++ b/config/linux-x230-legacy.config
-# CONFIG_POSIX_MQUEUE is not set
-# CONFIG_AUDIT is not set
-CONFIG_BPF=y
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_DIAG is not set
-CONFIG_UNIX=y
-CONFIG_UNIX_SCM=y
-# CONFIG_UNIX_DIAG is not set
-# CONFIG_INET is not set
-# CONFIG_NETWORK_SECMARK is not set
-# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_PHONET is not set
-# CONFIG_IEEE802154 is not set
-# CONFIG_NET_SCHED is not set
-# CONFIG_DCB is not set
-# CONFIG_BATMAN_ADV is not set
-# CONFIG_VSOCKETS is not set
-# CONFIG_NETLINK_DIAG is not set
-# CONFIG_MPLS is not set
-# CONFIG_NET_NSH is not set
-# CONFIG_HSR is not set
-# CONFIG_QRTR is not set
-CONFIG_RPS=y
-CONFIG_RFS_ACCEL=y
-CONFIG_XPS=y
-CONFIG_NET_RX_BUSY_POLL=y
-CONFIG_BQL=y
-# CONFIG_BPF_JIT is not set
-CONFIG_NET_FLOW_LIMIT=y
-
-#
-# Network testing
-#
-# end of Network testing
-# end of Networking options
-
-# CONFIG_HAMRADIO is not set
-# CONFIG_CAN is not set
-# CONFIG_BT is not set
-# CONFIG_WIRELESS is not set
-# CONFIG_WIMAX is not set
-# CONFIG_RFKILL is not set
-# CONFIG_NET_9P is not set
-# CONFIG_CAIF is not set
-# CONFIG_NFC is not set
-# CONFIG_PSAMPLE is not set
-# CONFIG_NET_IFE is not set
-# CONFIG_LWTUNNEL is not set
-# CONFIG_FAILOVER is not set
-# CONFIG_ETHTOOL_NETLINK is not set
+# CONFIG_NET is not set
-# CONFIG_CONNECTOR is not set
-# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_ATA_OVER_ETH is not set
-# CONFIG_SCSI_FC_ATTRS is not set
-CONFIG_SCSI_ISCSI_ATTRS=y
-# CONFIG_NETDEVICES is not set
-# CONFIG_N_GSM is not set
-# CONFIG_PTP_1588_CLOCK is not set
-# CONFIG_THERMAL_NETLINK is not set
-# CONFIG_USBIP_CORE is not set
-CONFIG_NETWORK_FILESYSTEMS=y
-CONFIG_CRYPTO_RNG=y
-CONFIG_CRYPTO_USER=y
-CONFIG_CRYPTO_USER_API=y
-CONFIG_CRYPTO_USER_API_HASH=y
-CONFIG_CRYPTO_USER_API_SKCIPHER=y
-CONFIG_CRYPTO_USER_API_RNG=y
-CONFIG_CRYPTO_USER_API_AEAD=y
-# CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE is not set
-# CONFIG_CRYPTO_STATS is not set
-CONFIG_GENERIC_NET_UTILS=y
-CONFIG_CPU_RMAP=y
-CONFIG_DQL=y
-CONFIG_NLATTR=y

…_LEAK_PHYS_SMEM=y

It was impossible to use directly 4.14 defconfig and apply it to 5.10.
Saving 4.14 in oldconfig, then editing in 5.10 was necessary.
- E1000E module (as kernel module support...) was lost in conversion and needed to be added back.

Also tuned things up:
- legacy-flash has no RETPOLINE, no security policy at all. Has expected usb controllers modules, exFAT and bare minimal support for flashrom.
  - IMPORTANT: CONFIG_X86_IOPL_IOPERM kernel option is required by flashrom
- legacy adds sata, retpoline, additional modules (ethernet), security policy related material on top of legacy-flash config
- maximized adds MMC card support, mousedev+synaptic (to report presence through oem-system-info-xx30), thin provisioning+snapshot support
- tuned with linux.prompt_for_new_config_options_for_kernel_version_bump

Current storage format is oldconfig from now on for proper analysis. If needed, once can save back in defconfig prior of bumping to newer version.
…E=y for basic qemu-coreboot board config

advanced qemu-coreboot-*-tpm*-* boards enables virtio qemu/kvm through command line option.
qemu-coreboot-* (whiptail or fbwhiptail) basic boards are using bochs gpu emulation, provided through qemu

linux-qemu.config, if shared as of now, needs to provide both virtio (no need of FB_SIMPLE because DRM) and BOCHS+SIMPLE_FB
…ments

- add additional kernel boot params for i915 where needed:
  - adds : drm_kms_helper.drm_leak_fbdev_smem=1 i915.enable_fbc=0 ( to permit kexec into vesa fb of kexec'ed kernel for i915 driven gpus without framebuffer compression, leaking smem fbdev address for kexec to pickup )
…modate additioaally added DRM+FB for testing
…n oldconfig/defconfig formats

both linux/coreboot:
- save_in_defconfig_format_in_place : takes whatever coreboot config file for a make BOARD=xyz statement and saves it in defconfig
- save_in_oldefconfig_format_in_place : takes whatever coreboot config file for a make BOARD=xyz statement and saves it in oldefconfig

linux:
- linux.prompt_for_new_config_options_for_kernel_version_bump:
  - The most useful helper as of now when doing kernel version bump.
  - Requires to save current kernel config in oldconfig (make BOARD=xyz linux.save_in_oldefconfig_format_in_place) first, then bump kernel version in board config and then use that helper to review new options and save in tree.
… same kernel versions and across versions

kgpe-d16 linux configs: converted to oldconfig as well
TODO: talos-2
qemu-coreboot-*-tpm* boards are way more feature rich to test/develops Heads


Selects blobs/ThePlexus-bootsplash-1024x768.jpg under blobs/bootsplash-1024x768.jpg (symlink used in coreboot configs)
… requirements

Remove CONFIG_NO_GFX_INIT from configs having CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE=y
Add CONFIG_BOOTSPLASH_IMAGE from configs having CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE=y
Add CONFIG_LINEAR_FRAMEBUFFER from configs having CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE=y
Set BOOTSPLASH parameters to match bootsplash and jpeg requirements
 +CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=768
 +CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1024
 +CONFIG_BOOTSPLASH=y

Others paramaters defined per board default setting with coreboot.save_oldconfig_in_place helper
…l and reorgagnize per coreboot ver

add coreboot 4.19 builddir into save_cache
… keeping important board related perks

CONFIG_PREEMPT_NONE=y: Remove preemptiveness for servers. Under heads, we are single tasking. No point having this big thing in kernel https://lwn.net/Articles/746780/
IO scheduler: only enable CONFIG_MQ_IOSCHED_DEADLINE=y since we want maximum throughput and do not have concurrent tasks
CONFIG_CPU_ISOLATION=y : Enable CPU Isolation accross all boards: this permits to make sure that the kernel tasks running on a CPU are not distrurbed bu user tasks
CONFIG_MULTIUSER not defined: Removing cluttering since we are single root user under Heads anyway
CONFIG_IO_URING=y : limit number of copy operations between kernel and user space from apps
CONFIG_ZONE_DMA not defined: relevant for older hardware (less then 32bit addressing space)
CONFIG_X86_MPPARSE not defined: relevant for older smp systems
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is enabled and SCHEDUTIL is disabled: we want performance with CPU sched with deadline IO.
CONFIG_PERF_EVENTS_INTEL_UNCORE and CONFIG_PERF_EVENTS_INTEL_CSTATE not defined: we want max perf on Heads
CONFIG_X86_VSYSCALL_EMULATION not defined: no need for syscall emulation under Heads
CONFIG_SECCOMP not defined : usefull if BPF is enabled and used.
CONFIG_ACPI_SPCR_TABLE=y : usefull for serial redirection table and earlycon
CONFIG_PCI_MMCONFIG CONFIG_MMCONF_FAM10H unset but for kgpe-d16 which is either fam10h of fam15h
CONFIG_DM_SNAPSHOT=y CONFIG_DM_THIN_PROVISIONING=y so that recovery shell can provide LVM/DM functionality in later PR.
CONFIG_EXFAT_FS=y so that exfat preformated thumb drives can work out of the box
Adjust CONFIG_HW_RANDOM per platform, removing CONFIG_HW_RANDOM_TIMERIOMEM
Only support processor family needed per board (AMD only AMD, Intel only Intel, removing CONFIG_CPU_SUP_HYGON CONFIG_CPU_SUP_HYGON CONFIG_CPU_SUP_CENTAUR CONFIG_CPU_SUP_ZHAOXIN CONFIG_CPU_SUP_ZHAOXIN everywhere
qemu: support both AMD and INTEL as an exception for the above.

Removed unused compiled modules unpacked under modules.cpio
Removed not needed crypto modules compiled in or as modules, reviewed from linuxboot#1396 (comment) :
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_AKCIPHER2=y
CONFIG_CRYPTO_KPP2=y
CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_USER=y
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_NULL2=y
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_AUTHENC=y
CONFIG_CRYPTO_SIMD=y
CONFIG_CRYPTO_GLUE_HELPER_X86=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_ESSIV=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CRC32C_INTEL=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA1_SSSE3=y
CONFIG_CRYPTO_SHA256_SSSE3=y
CONFIG_CRYPTO_SHA512_SSSE3=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES_NI_INTEL=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_USER_API_RNG=y
CONFIG_CRYPTO_USER_API_AEAD=y
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_LIB_SHA256=y
…ocompletion still works

removal of qemu-coreboot board made autocomplete apparition of modules helpers vanish
…g CONFIG_NET active (crypto need)

Since legacy boards do not have e1000e as opposed to maximized builds (no network), we also deactivate:
+# CONFIG_INET is not set
+# CONFIG_ETHTOOL_NETLINK is not set
+# CONFIG_NETDEVICES is not set

This makes gpg24 and newer flashrom bump possible
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jun 27, 2023

Ok time for comparisons!!!!

Master last commit includes sizes.txt report. We will use t520-hotp-maximized sizes output step to compare cost of PR addition here. The raw output is available here. which we will use with diff to see what changed.

user@heads-tests-deb12:~/heads$ wget "https://circleci.com/api/v1.1/project/github/tlaurion/heads/25385/output/105/0?file=true&allocation-id=649b0eaaf3a6663e16e77f46-0-build%2F5439CA72" -O 1381 -q
user@heads-tests-deb12:~/heads$ wget "https://circleci.com/api/v1.1/project/gh/osresearch/heads/10347/output/105/0?file=true&allocation-id=649b06dff63182304a39a9bb-0-build%2F9ED89B0" -O master -q
user@heads-tests-deb12:~/heads$ diff master 1381
1,10c1,10
< 2023-06-27 11:59:09-04:00 91f65bed793c0165203b1cbb9ac4f390f15ffa0e clean
<  3039696:/root/project/build/x86/t520-hotp-maximized/bzImage
<   684032:/root/project/build/x86/t520-hotp-maximized/modules.cpio
< -----
<   304272:./lib/modules/e1000e.ko
<    64800:./lib/modules/ehci-hcd.ko
<    10728:./lib/modules/ehci-pci.ko
<   159840:./lib/modules/xhci-hcd.ko
<    10568:./lib/modules/xhci-pci.ko
<   132360:./lib/modules/usb-storage.ko
---
> 2023-06-27 12:32:14-04:00 6245339200d79ebcdb63d1518cb5143c371267a5 clean
>  3055264:/root/project/build/x86/t520-hotp-maximized/bzImage
>   685056:/root/project/build/x86/t520-hotp-maximized/modules.cpio
> -----
>   304040:./lib/modules/e1000e.ko
>    63272:./lib/modules/ehci-hcd.ko
>    10896:./lib/modules/ehci-pci.ko
>   165024:./lib/modules/xhci-hcd.ko
>    11544:./lib/modules/xhci-pci.ko
>   128632:./lib/modules/usb-storage.ko
68c68
<      699:./etc/config
---
>      698:./etc/config
138,139c138,139
<  3977216:build/x86/t520-hotp-maximized/initrd.cpio.xz
<  8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1577-g91f65be.rom
---
>  3979776:build/x86/t520-hotp-maximized/initrd.cpio.xz
>  8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1597-g6245339.rom

@tlaurion
Copy link
Collaborator Author

Some analysis on above data.

Reminders:

  • bzImage is compressed kernel image including built in drivers and new kernel features between kernel version bumps. Here, this includes i915drmfb, which is the biggest culprit in increase of size, alongside countless improvements.
  • modules.cpio is the result of kernel modules being compiled as modules, then stripped and packed alongside tools.cpio (built+stripped binaries and libraries) and heads.cpio (raw content of in tree initrd/, this is policies, scripts etc)
  • initrd.cpio.xz is then the compressed result of all combined cpios (heads, tools, modules)
<  3039696:/root/project/build/x86/t520-hotp-maximized/bzImage
<   684032:/root/project/build/x86/t520-hotp-maximized/modules.cpio
< -----
<   304272:./lib/modules/e1000e.ko
<    64800:./lib/modules/ehci-hcd.ko
<    10728:./lib/modules/ehci-pci.ko
<   159840:./lib/modules/xhci-hcd.ko
<    10568:./lib/modules/xhci-pci.ko
<   132360:./lib/modules/usb-storage.ko
---
> 2023-06-27 12:32:14-04:00 6245339200d79ebcdb63d1518cb5143c371267a5 clean
>  3055264:/root/project/build/x86/t520-hotp-maximized/bzImage
>   685056:/root/project/build/x86/t520-hotp-maximized/modules.cpio
> -----
>   304040:./lib/modules/e1000e.ko
>    63272:./lib/modules/ehci-hcd.ko
>    10896:./lib/modules/ehci-pci.ko
>   165024:./lib/modules/xhci-hcd.ko
>    11544:./lib/modules/xhci-pci.ko
>   128632:./lib/modules/usb-storage.ko
  • And then consequently:
<  3977216:build/x86/t520-hotp-maximized/initrd.cpio.xz
<  8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1577-g91f65be.rom
---
>  3979776:build/x86/t520-hotp-maximized/initrd.cpio.xz
>  8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1597-g6245339.rom

So in short:

  • bzImage increased:
<  3039696:/root/project/build/x86/t520-hotp-maximized/bzImage
>  3055264:/root/project/build/x86/t520-hotp-maximized/bzImage
  • initrd.cpio.xz increased:
<  3977216:build/x86/t520-hotp-maximized/initrd.cpio.xz
>  3979776:build/x86/t520-hotp-maximized/initrd.cpio.xz

@tlaurion
Copy link
Collaborator Author

tlaurion commented Jun 28, 2023

Removed CPU_ISOLATION from discussions under #1398 (comment)

--- 1398	2023-06-27 15:19:56.470000000 -0400
+++ no_isolation	2023-06-28 12:13:36.348000000 -0400
-2023-06-27 14:25:07-04:00 1a607830d5e2e382d8119b0e498cb2ebb6327f70 clean
- 3055264:/root/project/build/x86/t520-hotp-maximized/bzImage
+2023-06-28 10:30:12-04:00 0ffb8cd5150d9cece8d914965b1f8e9a10c3c606 clean
+ 3053888:/root/project/build/x86/t520-hotp-maximized/bzImage

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.

5 participants