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

xx20/xx30/qemu q35/xx4x : coreboot 4.22.01 -> 24.02.01 VERSION BUMP + defconfig unification to oldconfig #1723

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Jul 17, 2024

THIS IS CONSIDERED LOW RISK OF BRICKING COREBOOT VERSION BUMP.
This coreboot version bump targets xx20/xx30/xx4x and has no regression expected for other boards.


This PR replaced #1715.


See commit logs for replication traces

Adds:

  • Enable CONFIG_COLLECT_TIMESTAMPS across all boards to measure coreboot stages time through cbmem
  • Switch to CONFIG_RESOURCE_ALLOCATION_TOP_DOWN (default) EDIT: deactivate for nv41/ns50: regression for dasharo coreboot fork @macpijan
  • Enable CONFIG_DRIVERS_INTEL_WIFI (default) so that ACPI tables are exposed properly to final OS
  • USB_DEBUG across all boards (beagle bone screwdriver compatible to have debug traces when bricked) TODO: reevaluate separately per fac3452 commit log
  • Turns off WIFI support under coreboot for all coreboot configs

Unrelated but modified:

  • docker image v0.2.0+latest pushed (made by commit b05fbf6) see notes below.

TODO before merging:

  • Make sure latest docker image points to v0.2.0 (see https://hub.docker.com/r/tlaurion/heads-dev-env/tags)
    • Note that pushing a same version docker image version changes some docker image layers since not replicable across Heads commits (contains bits linked to commit on which it was pushed but replicable on same Heads commit that created the docker image.
    • Might need to investigate this later: pushing now whole biggest c2b332aae211 docker image layer and some others.
  • Create issues to track other coreboot settings that should be unified across all boards (old and new defaults that we didn't kept track of)
  • test qemu (@tlaurion local build with latest/v0.2.0 docker image)
  • test x230 (@tlaurion) : reownership+setting LUKS DUK + booting into Q4.2.1 (no regression)
  • test w530 (@tlaurion) reownership+setting LUKS DUK + booting into Q4.2.1 (no regression)
  • Add willing board owners from Platform blobs, collaborators/maintainers/testers for faster problems resolution #692 to test coreboot version bump
  • rename untested boards to UNTESTED_BORDNAME/UNTESTED_BOARDNAME/ on 2024-07-26*
  • move untested boards to unmaintained on 2024-07-26

TESTING NEEDED FROM BOARD OWNERS WITH EXTERNAL PROGRAMMER BEFORE MERGE (as per 214cb22 tagged testers from #692 for boards not under unmaintained_boards):

Laptops

xx20 (Sandy):

xx30 (Ivy):

xx4x(Haswell):

Librems:

Clevo:

Desktops/Servers


OLD (fixed under current PR's b05fbf6)
Might miss something because librems still have CONFIG_HEAP_SIZE=0x100000 @JonathonHall-Purism

user@localhost:~/heads$ sudo grep -R HEAP config/coreboot-*
config/coreboot-kgpe-d16_server.config:CONFIG_HEAP_SIZE=0xc0000
config/coreboot-kgpe-d16_server.config:CONFIG_SMM_MODULE_HEAP_SIZE=0x4000
config/coreboot-kgpe-d16_server-whiptail.config:CONFIG_HEAP_SIZE=0xc0000
config/coreboot-kgpe-d16_server-whiptail.config:CONFIG_SMM_MODULE_HEAP_SIZE=0x4000
config/coreboot-kgpe-d16_workstation.config:CONFIG_HEAP_SIZE=0xc0000
config/coreboot-kgpe-d16_workstation.config:CONFIG_SMM_MODULE_HEAP_SIZE=0x4000
config/coreboot-kgpe-d16_workstation-usb_keyboard.config:CONFIG_HEAP_SIZE=0xc0000
config/coreboot-kgpe-d16_workstation-usb_keyboard.config:CONFIG_SMM_MODULE_HEAP_SIZE=0x4000
config/coreboot-librem_11.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_13v2.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_13v4.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_14.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_15v3.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_15v4.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_l1um.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_l1um.config:CONFIG_SMM_MODULE_HEAP_SIZE=0x4000
config/coreboot-librem_l1um_v2.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_mini.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-librem_mini_v2.config:CONFIG_HEAP_SIZE=0x100000
config/coreboot-nitropad-ns50.config:CONFIG_HEAP_SIZE=0x10000
config/coreboot-nitropad-nv41.config:CONFIG_HEAP_SIZE=0x10000
config/coreboot-p8z77-m_pro-tpm1.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-qemu-tpm1.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-qemu-tpm2.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-t420.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-t420-maximized.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-t430-legacy.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-t430-legacy-flash.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-t430-maximized.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-t440p.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-t520-maximized.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-t530-dgpu-maximized.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-t530-maximized.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-talos-2.config:CONFIG_HEAP_SIZE=0x200000
config/coreboot-w530-dgpu-K1000m-maximized.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-w530-dgpu-K2000m-maximized.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-w530-maximized.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-w541.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-x220.config:CONFIG_HEAP_SIZE=0x4000
config/coreboot-x220-maximized.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-x230-legacy.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-x230-legacy-flash.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-x230-maximized.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-x230-maximized-fhd_edp.config:CONFIG_HEAP_SIZE=0x400000
config/coreboot-z220-cmt.config:CONFIG_HEAP_SIZE=0x400000

EDIT: Fixed under b05fbf6 with confirmation trace under #1723 (comment)

Don't test on anything else then xx20/xx30/xx41: I bricked my nv41, most probably because of this change #1723 (comment).: EDIT: fixed under b319959

@tlaurion tlaurion changed the title xx20/xx30/qeu q35/xx4x : coreboot 2402 VERSION BUMP from 4.22.01 + defconfig unification to oldconfig xx20/xx30/qemu q35/xx4x : coreboot 2402 VERSION BUMP from 4.22.01 + defconfig unification to oldconfig Jul 17, 2024
@tlaurion tlaurion self-assigned this Jul 17, 2024
@tlaurion tlaurion marked this pull request as draft July 17, 2024 18:41
@tlaurion
Copy link
Collaborator Author

Was bad order of operations. Force pushing

@tlaurion tlaurion force-pushed the ivy_coreboot_2402-defconfig_unification_to_oldconfig branch from bd69fb5 to b05fbf6 Compare July 18, 2024 14:10
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jul 18, 2024

Only boards not having proper HEAP_SIZE in oldconfig format from defconfig->oldconfig are:

sudo grep -R HEAP config/coreboot-* | grep -v "400000"| awk -F ":" {'print $1'} | awk -F "/" {'print $2'}| sort | uniq | while read coreboot_config_file; do grep -R $coreboot_config_file boards/| awk -F "/" {'print $2'} ;done
UNMAINTAINED_kgpe-d16_server
UNMAINTAINED_kgpe-d16_server-whiptail
UNMAINTAINED_kgpe-d16_workstation
UNMAINTAINED_kgpe-d16_workstation-usb_keyboard
librem_l1um
nitropad-ns50
nitropad-nv41
talos-2

Which is as expected since all those boards depend on coreboot < 24.02.01 and are unaffected by 24.02.01 introduced new jpeg parser.


@macpijan : note that patches under patches/coreboot-24.02.01 are needed as well under 24.05 for newer coreboot releases and that upstream commits need review (integrated also under purism fork).
See commit log 51d10b2

@JonathonHall-Purism I wonder if Heads community boards should simply depend on purism 24.02.01 fork instead of coreboot release on this one?

@tlaurion tlaurion marked this pull request as ready for review July 18, 2024 14:19
@tlaurion tlaurion changed the title xx20/xx30/qemu q35/xx4x : coreboot 2402 VERSION BUMP from 4.22.01 + defconfig unification to oldconfig xx20/xx30/qemu q35/xx4x : coreboot 4.22.01 -> 24.02.01 VERSION BUMP + defconfig unification to oldconfig + usb_debug Jul 18, 2024
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jul 18, 2024

Just to be kosher, invalidating CircleCI cache on my instance, so that builds are produced with updated v0.2.0 docker imagage and not reuse past CircleCI cache layers.

(This is CircleCI -> Project Settings -> Environment Variables -> add/rename CACHE_VERSION with unique name (I used datestamp: 20240718).

Rebuilding clean for artifacts to be tested by all.

Note: past artifacts successfully tested on x230 and w530 with

  • factory reset and authenticated heads enabled successfully
  • unmodified bootsplash showing
  • no basic regression observed: won't cause bricks.... unless proven otherwise.

Will test builds from https://app.circleci.com/pipelines/github/tlaurion/heads/2673/workflows/7049203e-3f5c-44e0-87ba-d7cec24e1077 on x230 and w530, modify OP and do official call for testers.

@tlaurion
Copy link
Collaborator Author

@fhvyhjriur what machines/variants you use so I can add you under #692 where you aren't presently tagged there? Please comment there so I can update #692 OP and then tag all current testers and remove outdated ones not previously replying in previous PRs.

As per #1723 (comment) I expect no regression (since tested on x230 and w530)!

Thanks!

@tlaurion
Copy link
Collaborator Author

Bricked my nv41. Putting back as draft and won't have time to downgrade before tomoorw morning. Will investigate config changes that might break other boards then the ones touched here.

@tlaurion tlaurion marked this pull request as draft July 18, 2024 18:49
@@ -603,7 +603,7 @@ CONFIG_INTEL_GMA_HAVE_VBT=y
CONFIG_INTEL_GMA_ADD_VBT=y
# CONFIG_SOFTWARE_I2C is not set
CONFIG_I2C_TRANSFER_TIMEOUT_US=500000
# CONFIG_RESOURCE_ALLOCATION_TOP_DOWN is not set
CONFIG_RESOURCE_ALLOCATION_TOP_DOWN=y
Copy link
Collaborator Author

@tlaurion tlaurion Jul 18, 2024

Choose a reason for hiding this comment

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

Might be what caused my nv41 brick.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed back to not set under b319959

Copy link
Collaborator Author

@tlaurion tlaurion Jul 19, 2024

Choose a reason for hiding this comment

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

Rebuilding with crossgcc CircleCI cache with
837723b at https://app.circleci.com/pipelines/github/tlaurion/heads/2675/workflows/d226fa64-4d27-4d08-a86a-f04d243c7001 so that prusim boards also depend on 24.02.01 shared buildstack

@tlaurion
Copy link
Collaborator Author

Flashed https://output.circle-artifacts.com/output/job/737cc0e6-6658-4e63-a140-36ba1189266b/artifacts/0/build/x86/nitropad-nv41/heads-nitropad-nv41-v0.2.0-2226-g837723b.zip on nv41 and running it typing this with TPM DUK setuped booting Q4.2.2 successfully.

Ready for review.

@tlaurion tlaurion marked this pull request as ready for review July 19, 2024 18:38
@tlaurion tlaurion force-pushed the ivy_coreboot_2402-defconfig_unification_to_oldconfig branch from 73f00a9 to 214cb22 Compare July 22, 2024 12:55
@tlaurion tlaurion changed the title xx20/xx30/qemu q35/xx4x : coreboot 4.22.01 -> 24.02.01 VERSION BUMP + defconfig unification to oldconfig + usb_debug xx20/xx30/qemu q35/xx4x : coreboot 4.22.01 -> 24.02.01 VERSION BUMP + defconfig unification to oldconfig Jul 22, 2024
@tlaurion
Copy link
Collaborator Author

Op modified for call for testing. Untested boards will be renamed to UNTESTED_* on 2024-07-26.

@tlaurion tlaurion force-pushed the ivy_coreboot_2402-defconfig_unification_to_oldconfig branch from 214cb22 to 9f6fe97 Compare July 22, 2024 14:26
@srgrint
Copy link
Contributor

srgrint commented Jul 22, 2024

Tested heads-t440p-maximized-v0.2.0-2228-g9f6fe97.rom on t440p. No concerns.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Jul 22, 2024

Not sure why nv41 CircleCI build constantly hang up (fails to build within 1h max time window) on dasahro coreboot fork pull.
3rd retry failed https://app.circleci.com/pipelines/github/tlaurion/heads?branch=ivy_coreboot_2402-defconfig_unification_to_oldconfig

Investigating but cannot replicate locally.

@tlaurion tlaurion force-pushed the ivy_coreboot_2402-defconfig_unification_to_oldconfig branch 2 times, most recently from d47f09d to 7b0d995 Compare July 22, 2024 19:08
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jul 22, 2024

@fhvyhjriur @3hhh t530 needs to be tested as per 7b0d995 commit's CircleCI built artifacts. Please report back. Only iGPU supported as per this PR.

@pcm720
Copy link

pcm720 commented Jul 22, 2024

Everything's working fine on x230-fhd/edp.
I've noticed that there are two separate 2560x1440 displays in kexec'd system now (built-in and Unknown 31"), but not sure if that's something that regressed with later Linux/GNOME versions or something related to coreboot since I ran the system update right after booting with the latest Heads ROM.

@srgrint
Copy link
Contributor

srgrint commented Jul 22, 2024

Everything also working on x220-maximized

@fhvyhjriur
Copy link
Contributor

@fhvyhjriur @3hhh t530 needs to be tested as per 7b0d995 comkit's CircleCI built artifacts. Please report back. Only iGPU supported as per this PR.

I am happy to report back, that i do not have to open the T530 after flashing https://output.circle-artifacts.com/output/job/11c26e5e-4a05-4a12-8899-0cb1a595cc67/artifacts/0/build/x86/t530-maximized/heads-t530-maximized-v0.2.0-2229-g7b0d995.rom . It start up fine.

I see T420 is not been tested. I would test the T420 (dGPU version, but does not matter for iGPU/boot test) before the release timeout on 2024-07-26.
I see T440p have been already tested and i do not have to test there. I currently can not test any coreboot/rom image on T440p (without opening it) because of this unfixed situation at the moment: #1722 . Maybe someone have some idea why its like this and could report in the discussion thread.

tlaurion and others added 14 commits July 26, 2024 15:36
…onfig (see new defaults from 4.22.01)

grep -R 24.02.01 boards/ | awk -F "/" {'print $2'} | while read board; do sudo make BOARD=$board coreboot.save_in_oldconfig_format_in_place; done

Signed-off-by: Thierry Laurion <[email protected]>
sed -i '/# CONFIG_COLLECT_TIMESTAMPS is not set/d' config/*.config

Signed-off-by: Thierry Laurion <[email protected]>
sed -i '/# CONFIG_RESOURCE_ALLOCATION_TOP_DOWN is not set/d' config/*.config

Signed-off-by: Thierry Laurion <[email protected]>
sed -i '$a CONFIG_USBDEBUG=y' config/coreboot-*.config
grep -R CONFIG_COREBOOT_VERSION boards/ | awk -F "/" {'print $2'} | while read board; do if ! sudo make BOARD=$board coreboot.save_in_defconfig_format_in_place > /dev/null 2>&1; then echo $board failed;fi; done

Signed-off-by: Thierry Laurion <[email protected]>
This is needed so that ACPI tables are generated from coreboot for final OS to not apply quirks to support wifi cards

TODO: bluethooth not activated here, maybe we should.

sed -i '/# CONFIG_DRIVERS_INTEL_WIFI is not set/d' config/coreboot-*.config

Signed-off-by: Thierry Laurion <[email protected]>
…t configs in oldconfig format

Signed-off-by: Thierry Laurion <[email protected]>
…N=y': turns nv41 into a brick under current used coreboot Dasharo fork

Signed-off-by: Thierry Laurion <[email protected]>
Reuse the toolchain from coreboot-24.02.01 for coreboot-purism (based
on 24.02.01) instead of compiling a separate toolchain.

Signed-off-by: Jonathon Hall <[email protected]>
sed -i '$a CONFIG_USBDEBUG=n' config/coreboot-*.config
grep -R CONFIG_COREBOOT_VERSION boards/ | awk -F "/" {'print $2'} | while read board; do if ! sudo make BOARD=$board coreboot.save_in_oldconfig_format_in_place  > /dev/null 2>&1; then echo $board failed;fi; done

Note:
Boards that are unmaintained accumulates settings addition per the sed call.

Why deactivate:
- Well, this is equivalent of cbmem -c which gives way too much information from attacker.

TODO: add an helper later on so that builds aimed at testing coreboot version bump pass to release mode or something.

As of this commit, we accept that bricks might happen and that troubleshooting will be made in a case basis?!

Signed-off-by: Thierry Laurion <[email protected]>
…sters)

Those are currently known to be willing testers of coreboot/linux version bumps PRs to not cause bricks under Heads master

Signed-off-by: Thierry Laurion <[email protected]>
…imized boards for 24.02.01 + add Makefile helper + add back to CircleCI

Signed-off-by: Thierry Laurion <[email protected]>
…ot 24.02.01 version bumped and no news from expected board testers in time for merge

Replication notes:
- w541-hotp-maximized is a makefile inclusion of w541-maximized so order of ops is important

docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:v0.2.1 -- make -d BOARD=w541-hotp-maximized board.move_tested_to_untested
time docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:v0.2.1 -- make -d BOARD=w541-maximized board.move_tested_to_untested
git status
git add boards/UNTESTED_w541-hotp-maximized/UNTESTED_w541-hotp-maximized.config boards/UNTESTED_w541-maximized/UNTESTED_w541-maximized.config boards/w541-hotp-maximized/w541-hotp-maximized.config boards/w541-maximized/w541-maximized.config .circleci/config.yml
git commit --signoff

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion tlaurion force-pushed the ivy_coreboot_2402-defconfig_unification_to_oldconfig branch from 3fe554d to 1b6d26a Compare July 26, 2024 19:50
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jul 26, 2024

@JonathonHall-Purism quick review would be appreciated so I can merge within successful build. I stopped last build commit because my CircleCI instance was running 4 builds in parallel.

GitHub will eventually refresh, build is happening at https://app.circleci.com/pipelines/github/tlaurion/heads/2704/workflows/7809e666-43dc-4f1a-8ab1-b81ec4379067

…ig: Path is hardcoded to non hotp variant inclusion...

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion
Copy link
Collaborator Author

Off channel discussion is to unify wifi off for both intel and mediatek across all boards whatever defconfig says

@JonathonHall-Purism
Copy link
Collaborator

The changes to all Librem boards except L1UM look fine to me. That's a no-op because the oldconfig value for heap size is not used, that Kconfig is not considered configurable.

L1UM got the Intel Wi-Fi coreboot driver enabled, I would prefer to test this before merging it, which I don't have time to do until about a week from now 😢 Discussion off channel as above is to revert this change. Once that's done the only change to L1UM will be defconfig->oldconfig, and I have offered to table any further discussion on defconfig versus oldconfig until September, as we are both tired of it 😛

I'm not familiar with this Kconfig offhand, I can see coreboot does generate an ACPI table specific to Intel Wi-Fi but I'm not sure how it makes sense for the firmware to have to be aware of every card that could be plugged into a PCIe slot. Stranger things have happened though.

…will turn on case by case.

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jul 26, 2024

Merging.

a9e6dfe might cause regressions, on which I will be happy to deeply discuss why those are important or not. IF it is, I vote to enable it, and also invest time into createin base config and #1628

It caused regression on Wi-Fi modules init code needed

Input for #1724 (comment)

@tlaurion tlaurion merged commit e313c18 into linuxboot:master Jul 26, 2024
2 of 4 checks passed
@gaspar-ilom
Copy link
Contributor

gaspar-ilom commented Jul 28, 2024

Sorry, @tlaurion, for my late reply in this PR, I was not available and could not test in time. I just tested the W541 with the current master. So it would be great to mark the board as tested again. Should I open a PR to revert 1b6d26a and d0b0eef?

@tlaurion
Copy link
Collaborator Author

Sorry, @tlaurion, for my late reply in this PR, I was not available and could not test in time. I just tested the W541 with the current master. So it would be great to mark the board as tested again. Should I open a PR to revert 1b6d26a and d0b0eef?

Yes please revert those 2 commits in a PR @gaspar-ilom

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.

9 participants