Skip to content

Add kconfig to use blobs on 24.12 boards coreboot configs and proper build output to console #1943

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

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Apr 2, 2025

Copy link
Collaborator Author

@tlaurion tlaurion left a comment

Choose a reason for hiding this comment

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

@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 3, 2025

@tlaurion Build completed without errors 👍

Originally posted by @Oessel in #1940 (comment)

@miczyg1
Copy link
Contributor

miczyg1 commented Apr 3, 2025

When rebuilding a target after cleaning up the coreboot repo under build/x86/coreboot-24.12 I also get:

mkdir -p "/home/miczyg/heads/build/x86/libgpg-error-1.46/"
tar -xf "/home/miczyg/heads/packages/x86/libgpg-error-1.46.tar.bz2" --strip 1 -C "/home/miczyg/heads/build/x86/libgpg-error-1.46/"
if [ -r patches/libgpg-error-1.46.patch ]; then ( git apply --verbose --reject --binary --directory build/x86/libgpg-error-1.46 ) < patches/libgpg-error-1.46.patch || exit 1 ; fi
Checking patch build/x86/libgpg-error-1.46/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h...
error: build/x86/libgpg-error-1.46/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h: already exists in working directory
make: *** [Makefile:578: /home/miczyg/heads/build/x86/libgpg-error-1.46/.canary] Error 1

Command: ./docker_repro.sh make V=1 BOARD=t430-maximized

Another module not cleaned properly?

@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 3, 2025

@miczyg1

When rebuilding a target after cleaning up the coreboot repo under build/x86/coreboot-24.12 I also get:

mkdir -p "/home/miczyg/heads/build/x86/libgpg-error-1.46/"
tar -xf "/home/miczyg/heads/packages/x86/libgpg-error-1.46.tar.bz2" --strip 1 -C "/home/miczyg/heads/build/x86/libgpg-error-1.46/"
if [ -r patches/libgpg-error-1.46.patch ]; then ( git apply --verbose --reject --binary --directory build/x86/libgpg-error-1.46 ) < patches/libgpg-error-1.46.patch || exit 1 ; fi
Checking patch build/x86/libgpg-error-1.46/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h...
error: build/x86/libgpg-error-1.46/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h: already exists in working directory
make: *** [Makefile:578: /home/miczyg/heads/build/x86/libgpg-error-1.46/.canary] Error 1

Command: ./docker_repro.sh make V=1 BOARD=t430-maximized

Another module not cleaned properly?

Yes: same issue for files created by patches as for your other comment #1943 (comment)

Heads creates some files through patches/* files and therefore why the dev cycles helpers in global Makefile :/

heads/Makefile

Lines 939 to 950 in 4035abb

real.remove_canary_files-extract_patch_rebuild_what_changed:
@echo "Removing 'canary' files to force Heads to restart building board configurations..."
@echo "This will check package integrity, extract them, redo patching on files, and rebuild what needs to be rebuilt."
@echo "It will also reinstall the necessary files under './install'."
@echo "Limitations: If a patch creates a file in an extracted package directory, this approach may fail without further manual actions."
@echo "In such cases, Git will inform you about the file that couldn't be created as expected. Simply delete those files and relaunch the build."
@echo "This approach economizes time since most build artifacts do not need to be rebuilt, as the file dates should be the same as when you originally built them."
@echo "Only a minimal time is needed for rebuilding, which is also good for your SSD."
@echo "*** USE THIS APPROACH FIRST ***"
find ./build/ -type f -name ".canary" -print -delete
find ./install/*/* -print -exec rm -rf {} + 2>/dev/null || true
$(call overwrite_canary_if_coreboot_git)

  • rm build/x86/libgpg-error-1.46/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h needs to be removed manually (not git repo here: tarball+ patch applied for muslc ppc64)
  • rm -rf build/x86/coreboot-24.12/src/mainboard/lenovo/sklkbl_thinkpad/variants/t480s since the bin files created for t480s by unmerged t480 patchset are bin files created.

The ther Makefile global dev cycles helpers will radically remove more artifacts, and consequently take more time to rebuild rom to be tested :/

The alternative of using helpers is to nuke the heads dir and start fresh from git clone. I have not found better alternatives if patches are not upstreamed, which is one of the many reasons I push so much for patches to be upstreamed.

@tlaurion tlaurion marked this pull request as draft April 8, 2025 20:17
@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 8, 2025

Still working on the helper to have patches reversal working properly.

…ed on git repo now

Repro:
sudo sed -i 's/# CONFIG_USE_BLOBS is not set/CONFIG_USE_BLOBS=y/g' config/coreboot-*
sudo git restore config/coreboot-kgpe-d16_server.config config/coreboot-kgpe-d16_workstation-usb_keyboard.config config/coreboot-kgpe-d16_workstation.config
./docker_repro.sh
find ./boards/ -type d | awk -F "/" {'print $3'} | while read board; do make BOARD=$board coreboot.save_in_oldconfig_format_in_place; done

Test @miczyg1 hypothesis from linuxboot#1940 (comment)
- We use git repo for coreboot 24.12 as opposed to tarball for previous 22.04.01
  - 3rdparty microcode git submodule might be empty for some reason if not instructed to be synced by kconfig)
    - TODO: Review linuxboot#1940 (comment)

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion tlaurion force-pushed the add_kconfig_to_use_blobs_on_2412_boards_coreboot_configs branch from 8884abc to eaebd8d Compare April 10, 2025 22:39
@tlaurion tlaurion changed the title Add kconfig to use blobs on 24.12 boards coreboot configs, dev cycle helper and proper build output to console Add kconfig to use blobs on 24.12 boards coreboot configs and proper build output to console Apr 10, 2025
@tlaurion tlaurion added the bug label Apr 10, 2025
@tlaurion
Copy link
Collaborator Author

ready

Will be fixed by #1952 separate issue

@tlaurion tlaurion marked this pull request as ready for review April 10, 2025 22:53
@tlaurion
Copy link
Collaborator Author

Waiting for build to succeed to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants