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

Bring dasharo+heads MSI boards from downstream Dasharo/heads to upstream #1753

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Aug 9, 2024

  • files: boards + coreboot + linux, borrowed directly from Dasharo@cb43039 tip
  • cbfs-init modified as per downstream fork dasharo+heads used modifications (flashrom)
  • ash_functions modified as per downstream fork dasharo+heads used modifications (CBFS)
  • network-init-recovery modified as per downstream fork dasharo+heads used modifications (igc)
  • modules/linux modified as per downstream fork dasharo+heads used modifications (igc)
  • modules/coreboot modified as per downstream fork dasharo+heads used modifications (also impact nv41/ns50: coreboot version bump)
  • modules/flashrom modified to user flashrom 1.4 + https://review.coreboot.org/c/flashrom/+/83854
  • Circleci: added boards being dependent of nv41

NOTES:

  • This requires Nk3 firmware to be 1.7.1+
  • Requires external programmer in case of bricking, untested and not owning the platforms.
  • dGPU support known problematic
  • kgpe-d16 patch that was still under master was unapplied on master (permitting to flash openbmc from Heads)

DISCLAIMER: UNTESTED
Sorry, not gonna cherry-pick commits from dahsharo/heads here, way too messy.


after merge, WILL superseed #1489 abandonned effort.


TODO:


OLD
DO NOT FLASH YET IF NO EXTERNAL PROGRAMMER. THIS VERSION BUMP FLASHROM SO FLASHING MASTER FROM THIS IS NEEDED Edit: fixed with #1755 commit cherry-picked.

@tlaurion tlaurion marked this pull request as draft August 9, 2024 13:28
@tlaurion

This comment was marked as outdated.

@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch 2 times, most recently from c02898d to 785d4e3 Compare August 9, 2024 13:51
@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan and others: not sure what this CONFIG_CBFS_VIA_FLASHROM in board configs is about as of now, most probably this PR totally invalid as of now, have not followed that white rabbit yet.

1- @macpijan : commit log should be clear enough: Please validate this matches all required changes downstream please.
2- Also, can you tell why/what version of flashrom this is based on? 1.3.0+ with all WP + needed chipsets/spi chips needed? Is this expected to create regression on other boards support?

@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch from 785d4e3 to b2c4351 Compare August 9, 2024 14:02
@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan I see this contains a coreboot version bump impacting nv41/ns50/MSI.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

I think I picked all files based changes from master...Dasharo:heads:master visual queues, without rebasing nor cherry-picking, simply applying changes directly in files

Not gentle reminder, but requirement: changes should be proposed upstream, not forced like that or for upstream to pick up, even less when security vuln lingering

@mkopec
Copy link
Contributor

mkopec commented Aug 9, 2024

2- Also, can you tell why/what version of flashrom this is based on?

The flashrom fork is based from this version: flashrom/flashrom@053d319

with added:

  • support for ITE EC running closed source firmware (irrelevant)
  • miscellaneous improvements for APU2 (irrelevant)
  • fixes for yocto? @macpijan if you could confirm.
  • RaptorPoint PCH support (relevant for MSI Z790)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan updated op with commit logs sourced info, need comment on those changes and insights on impacts for other boards, most specifically:

  • coreboot version bump: nv41/ns50 tested for regressions?
  • flashrom: regressionss expected for other Heads supported boards: version based? Do we finally have a --progress bar? What's in it?

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@JonathonHall-Purism would need your eyes on this too, including regression testing for your boards since flashrom version bump

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

053d319

So flashrom 1.3.0-rc1 + patches, dating from upstream commit of ~2 years ago (cc @mkopec)

commit 053d319141db5954ab1ad34cb9db61983d238134
Author: Edward O'Callaghan [email protected]
Date: Fri Aug 12 21:27:41 2022 +1000

@JonathonHall-Purism: is this a problem?
Seems like we could hit regressions here... Heads master was more recent.

@mkopec patches were not merged upstream in 1.4.0 now released? @macpijan ?

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

053d319

So flashrom 1.3.0-rc1 + patches, dating from upstream commit of ~2 years ago (cc @mkopec)

commit 053d319141db5954ab1ad34cb9db61983d238134
Author: Edward O'Callaghan [email protected]
Date: Fri Aug 12 21:27:41 2022 +1000

@JonathonHall-Purism: is this a problem? Seems like we could hit regressions here... Heads master was more recent.

@mkopec patches were not merged upstream in 1.4.0 now released? @macpijan ?

1.4.0 was released 2 weeks ago https://github.com/flashrom/flashrom/releases/tag/v1.4.0

@mkopec @macpijan is everything you need under 1.4.0?
See flashrom/flashrom@053d319...eace095

@macpijan
Copy link
Contributor

macpijan commented Aug 9, 2024

@mkopec @macpijan is everything you need under 1.4.0?

I think the Dasharo/flashrom@24b8fcf will be missing. I cannot see it being submitted into upstream, can you confirm @miczyg1 ?

@miczyg1
Copy link
Contributor

miczyg1 commented Aug 9, 2024

@mkopec @macpijan is everything you need under 1.4.0?

I think the Dasharo/flashrom@24b8fcf will be missing. I cannot see it being submitted into upstream, can you confirm @miczyg1 ?

I think it is not in upstream flashrom (I believe we didn't even send a patch)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@mkopec @macpijan is everything you need under 1.4.0?

I think the Dasharo/flashrom@24b8fcf will be missing. I cannot see it being submitted into upstream, can you confirm @miczyg1 ?

I think it is not in upstream flashrom (I believe we didn't even send a patch)

@miczyg1 thats problematic.
Bumped to 1.4.0 at 445d70f will try to put your unupstreamed patch into a Head patch. There is no way Head can regress to 2 years ago flashrom version since other stakeholders need flashrom too.

@macpijan
Copy link
Contributor

macpijan commented Aug 9, 2024

@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch 2 times, most recently from ba477ab to 88513e3 Compare August 9, 2024 15:05
@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@tlaurion Updated patch: Dasharo/flashrom@7db77d3

https://review.coreboot.org/c/flashrom/+/83854

EDITED: @macpijan fails to build see e8aaaab

EDITED2: @miczyg1 patch won't build see above

@macpijan
Copy link
Contributor

macpijan commented Aug 9, 2024

Another rev (the same link: https://review.coreboot.org/c/flashrom/+/83854) builds, tested to probe the chip on MSI.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan please review ab74127

Copy link
Contributor

@macpijan macpijan left a comment

Choose a reason for hiding this comment

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

@macpijan please review ab74127

Reviewed, could not spot any obvious problems in the configs ordering.

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z690-A DDR4"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@macpijan that's ok? used in config overrides and dmidecode output for branding

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z690-A DDR5"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@macpijan that's ok? used in config overrides and dmidecode output for branding

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z790-P DDR4"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@macpijan that's ok? used in config overrides and dmidecode output for branding

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z790-P DDR5"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@macpijan that's ok? used in config overrides and dmidecode output for branding

@macpijan
Copy link
Contributor

Seems like flashrom 1.4 is missing some patches for nv41.

I am not aware of any extra patches needed for ADL-P.

We have not been carrying any for it, on the older flashrom version.

On your screen, the chipset gets detected just fine.

One important difference with newer flashrom is that on Intel chipsets it seems to detect the exect flash chip, not just the opaque flash chip as it used to before. Maybe there is some problem here, or with support for this particular chip.

@tlaurion
Copy link
Collaborator Author

@macpijan @SergiiDmytruk : not only legacy is getting deprecated but code was deleted recently. Houston, we have a problem https://review.coreboot.org/c/flashrom/+/83852/2

@SergiiDmytruk
Copy link
Contributor

not only legacy is getting deprecated but code was deleted recently.

That happened after v1.4 release and thus doesn't affect this PR which points at flashrom/flashrom@eace095. Maybe the new code works fine, I don't know much about it.

@tlaurion
Copy link
Collaborator Author

not only legacy is getting deprecated but code was deleted recently.

That happened after v1.4 release and thus doesn't affect this PR which points at flashrom/flashrom@eace095. Maybe the new code works fine, I don't know much about it.

@SergiiDmytruk
My point is that even if I switched to legacy, this codepath is now deprecated so patch downstream would not be picked up in next release. Definitely a bug and not a feature. What's the way forward here to have this fixed in master?

You can test this PR on one of your nv41, on my side my wson probe will die and I cannot afford a brick I cannot recover at this point.

@SergiiDmytruk
Copy link
Contributor

Maybe the issue is somewhere else, it was just a guess. If there is a bug in that code, it will likely depend more on flash chip contents/operation rather than on hardware, because that code doesn't deal directly with hardware.

@tlaurion
Copy link
Collaborator Author

@i-c-o-n: is flashprog

If so, I will invest time switching from flashrom to flashprog. Flashrom is a real mess, ecosystem fragmented: sigh.

@i-c-o-n
Copy link

i-c-o-n commented Aug 29, 2024

@i-c-o-n: is flashprog

  • supporting flashrom partial region WP

WP is a huge topic, what do you need specifically?

What works (since ~2018):

  • Writing specific regions when others are write-protected. The user has to specify the layout (e.g. --layout/--ifd/--fmap).
  • Reading/writing specific regions when others are read-protected. Requires a layout as above, writes additionally need --noverify-all.

Support to configure protections of the flash chip itself is WIP, with the CLI design needing some opinion. I don't have a use-case right now, so I didn't want to merge it when no potential user had a look at it. Support to perform such configuration with the internal programmer on Intel systems is delicate and not worked on yet.

  • Ivy, sandy, haswell, alder lake, raptor lake

yes, yes, yes, yes, and yes but Raptor Lake is untested (I don't expect any issues as the hardware should behave the same)

Still opaque with flashprog. I'm not aware of any regression.

Yes, quite similar, plus a moving bar.

If so, I will invest time switching from flashrom to flashprog. Flashrom is a real mess, ecosystem fragmented: sigh.

Thanks. I know the situation bugs everybody. If I hadn't seen similar issues two years ago already, I never would have agreed to the fork.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 29, 2024

@i-c-o-n: is flashprog

  • supporting flashrom partial region WP

WP is a huge topic, what do you need specifically?

Raw braindump.

As of today, only thing used in the wild (known to be used) is for d16:

For other platforms, some are adventuring, but soldering/unsoldering WP to GND is making this work for highly paranoid people:

WP work funded by NlNet which you can see deliverables under #1741 and follow white rabbit there.

What works (since ~2018):

  • Writing specific regions when others are write-protected. The user has to specify the layout (e.g. --layout/--ifd/--fmap).
  • Reading/writing specific regions when others are read-protected. Requires a layout as above, writes additionally need --noverify-all.

Support to configure protections of the flash chip itself is WIP, with the CLI design needing some opinion. I don't have a use-case right now, so I didn't want to merge it when no potential user had a look at it. Support to perform such configuration with the internal programmer on Intel systems is delicate and not worked on yet.

  • Ivy, sandy, haswell, alder lake, raptor lake

yes, yes, yes, yes, and yes but Raptor Lake is untested (I don't expect any issues as the hardware should behave the same)

Still opaque with flashprog. I'm not aware of any regression.

Yes, quite similar, plus a moving bar.

If so, I will invest time switching from flashrom to flashprog. Flashrom is a real mess, ecosystem fragmented: sigh.

Thanks. I know the situation bugs everybody. If I hadn't seen similar issues two years ago already, I never would have agreed to the fork.

Will look into this after your feedback on WP above @i-c-o-n .

Thanks for doing what you do, much much appreciated, the ecosystem is thanking you in silence, I do it here in all gratitude.

@i-c-o-n
Copy link

i-c-o-n commented Aug 29, 2024

WP is a huge topic, what do you need specifically?

Raw braindump.

As of today, only thing used in the wild (known to be used) is for d16:

...

That's the topic that would need the aforementioned CLI update. Patches are written for flashprog, but only been rebased in the past 18 months. I'll give them a look and a little testing later.

The flashchip database may need some updates for specific cases. But those can usually be written and reviewed within hours.

Fortunately the D16 is AMD, which should just work the same as external programmers. But extending this to Intel is a bummer, hard to make brick resilient because one is partially flying blindly (unless using an external programmer).

coreboot has limited support for this too, btw. Around config BOOTMEDIA_LOCK_CHIP.

Support to configure protections of the flash chip itself is WIP, with the CLI design needing some opinion. I don't have a use-case right now, so I didn't want to merge it when no potential user had a look at it. Support to perform such configuration with the internal programmer on Intel systems is delicate and not worked on yet.

@i-c-o-n
Copy link

i-c-o-n commented Aug 30, 2024

WP is a huge topic, what do you need specifically?

Raw braindump.
As of today, only thing used in the wild (known to be used) is for d16:
...

That's the topic that would need the aforementioned CLI update. Patches are written for flashprog, but only been rebased in the past 18 months. I'll give them a look and a little testing later.

Still working fine 😄 Added a few bits for the chips I had at hand. More testing welcome!

@tlaurion tlaurion mentioned this pull request Aug 30, 2024
@tlaurion
Copy link
Collaborator Author

WP is a huge topic, what do you need specifically?

Raw braindump.
As of today, only thing used in the wild (known to be used) is for d16:
...

That's the topic that would need the aforementioned CLI update. Patches are written for flashprog, but only been rebased in the past 18 months. I'll give them a look and a little testing later.

Still working fine 😄 Added a few bits for the chips I had at hand. More testing welcome!

@i-c-o-n I see you worked on this yersterday!!!! Busy bee! Issue to be tracked would be #1546

@tlaurion
Copy link
Collaborator Author

@macpijan @SergiiDmytruk @i-c-o-n : What would be missing from flashrom today to be a direct replacement of flashrom? Please detail under #1546. Not sure flashrom deserves the energy needed to be fixed at this point, but you know way better then I do so please continue under #1546 tagging where/if needed.

We need

  • current platforms supported
  • WP missing, and clarifications on SPI not supporting what we need and needing resoldering, that was not clear before but now it is
  • Switch to flashprog
  • Be happier.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Sep 2, 2024

#1251 resolves the issue.

@macpijan opinions?

@tlaurion
Copy link
Collaborator Author

tlaurion commented Sep 2, 2024

Can be tested under #1773. Worked great on x230 and nv41

@tlaurion
Copy link
Collaborator Author

tlaurion commented Sep 9, 2024

#1251 resolves the issue.

@macpijan opinions?

#1769 (flashprog) is way better fit. Would dasharo consider switching to flashprog?

@tlaurion tlaurion mentioned this pull request Sep 9, 2024
15 tasks
…/heads fork to upstream

- files: boards + coreboot + linux, borrowed directly from Dasharo@cb43039 tip
- cbfs-init modified as per downstream fork dasharo+heads used modifications (flashrom)
- ash_functions modified as per downstream fork dasharo+heads used modifications (CBFS)
- network-init-recovery modified as per downstream fork dasharo+heads used modifications (igc)
- modules/linux modified as per downstream fork dasharo+heads used modifications (igc)
- modules/coreboot modified as per downstream fork dasharo+heads used modifications (also impact nv41/ns50: coreboot version bump)
- Circleci: added boards being dependent of nv41

This requires Nk3 firmware to be 1.7.1+ as per https://www.nitrokey.com/blog/2024/heads-v25-and-nitrokey-3-firmware-v171-security-updatehttps://www.nitrokey.com/blog/2024/heads-v25-and-nitrokey-3-firmware-v171-security-update

DISCLAIMER: UNTESTED

Sorry, not gonna cherry-pick commits here, way too messy.

Signed-off-by: Thierry Laurion <[email protected]>
Signed-off-by: Thierry Laurion <[email protected]>
… released 2 weeks ago. Expected that patches from 2 years ago were merged upstream

- delete unapplied kgpe-d16 patch (will need to be brought back, was not applied currently on master
- add patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/0001-Add_RaptorPoint_PCH_support.patch which was not submitted to flashrom and needed by MSI
- point modules/flashrom to release 1.4.0 commit

FAILED:
https://github.com/Dasharo/flashrom/commit/24b8fcfccef31fbb95bc1dd308180f57d5cdb64c.patch
Cannot be applied over 1.4.0:
if [ -d patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38 ] && [ -r patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38 ] ; then for patch in patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/*.patch ; do echo "Applying patch file : $patch " ; ( git apply --verbose --reject --binary --directory build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38 ) < $patch || exit 1 ; done ; fi
Applying patch file : patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/0001-Add_RaptorPoint_PCH_support.patch
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c...
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_ELKHART_LAKE:
	case CHIPSET_APOLLO_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:607
error: while searching for:
		break;
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
		boot_straps = boot_straps_pch500;
		break;

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:714
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:749
Hunk #4 succeeded at 1017 (offset 5 lines).
error: while searching for:
	{0x8086, 0x7a83, B_S,    NT,  "Intel", "Q670",				enable_flash_pch600},
	{0x8086, 0x7a84, B_S,    DEP, "Intel", "Z690",				enable_flash_pch600},
	{0x8086, 0x7a88, B_S,    NT,  "Intel", "W680",				enable_flash_pch600},
	{0x8086, 0x7a8a, B_S,    NT,  "Intel", "W685",				enable_flash_pch600},
	{0x8086, 0x7a8d, B_S,    NT,  "Intel", "WM690",				enable_flash_pch600},
	{0x8086, 0x7a8c, B_S,    NT,  "Intel", "HM670",				enable_flash_pch600},
	{0x8086, 0x7e23, B_S,    DEP, "Intel", "Meteor Lake-P/M",		enable_flash_mtl},
	{0},

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:2175
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c...
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_ELKHART_LAKE:
	case CHIPSET_JASPER_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:48
error: while searching for:
	case CHIPSET_C620_SERIES_LEWISBURG:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_GEMINI_LAKE:
	case CHIPSET_JASPER_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:77
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:215
error: while searching for:
		return freq_str[2][value];
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
		return freq_str[3][value];
	case CHIPSET_ELKHART_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:313
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:361
error: while searching for:
	    cs == CHIPSET_400_SERIES_COMET_POINT ||
	    cs == CHIPSET_500_SERIES_TIGER_POINT ||
	    cs == CHIPSET_600_SERIES_ALDER_POINT ||
	    cs == CHIPSET_JASPER_LAKE || cs == CHIPSET_METEOR_LAKE) {
		const char *const master_names[] = {
			"BIOS", "ME", "GbE", "unknown", "EC",

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:489
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_GEMINI_LAKE:
	case CHIPSET_JASPER_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:1087
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:1246
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:1291
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c...
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:1884
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:1923
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:1984
error: while searching for:
		case CHIPSET_400_SERIES_COMET_POINT:
		case CHIPSET_500_SERIES_TIGER_POINT:
		case CHIPSET_600_SERIES_ALDER_POINT:
		case CHIPSET_METEOR_LAKE:
		case CHIPSET_APOLLO_LAKE:
		case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:2064
error: while searching for:
		case CHIPSET_400_SERIES_COMET_POINT:
		case CHIPSET_500_SERIES_TIGER_POINT:
		case CHIPSET_600_SERIES_ALDER_POINT:
		case CHIPSET_METEOR_LAKE:
		case CHIPSET_APOLLO_LAKE:
		case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:2103
error: while searching for:
	     ich_gen == CHIPSET_300_SERIES_CANNON_POINT ||
	     ich_gen == CHIPSET_400_SERIES_COMET_POINT ||
	     ich_gen == CHIPSET_500_SERIES_TIGER_POINT ||
	     ich_gen == CHIPSET_600_SERIES_ALDER_POINT)) {
		msg_pdbg("Enabling hardware sequencing by default for 100+ series PCH.\n");
		ich_spi_mode = ich_hwseq;
	}

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:2140
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/include/programmer.h...
error: while searching for:
	CHIPSET_400_SERIES_COMET_POINT,
	CHIPSET_500_SERIES_TIGER_POINT,
	CHIPSET_600_SERIES_ALDER_POINT,
	CHIPSET_METEOR_LAKE,
	CHIPSET_APOLLO_LAKE,
	CHIPSET_GEMINI_LAKE,

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/include/programmer.h:376
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/util/ich_descriptors_tool/ich_descriptors_tool.c...
Hunk #1 succeeded at 239 (offset 1 line).
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Hunk #4 applied cleanly.
Rejected hunk #5.
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c with 9 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk linuxboot#7.
Rejected hunk #8.
Rejected hunk #9.
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c with 6 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/include/programmer.h with 1 reject...
Rejected hunk #1.
Applied patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/util/ich_descriptors_tool/ich_descriptors_tool.c cleanly.
make: *** [Makefile:565: /home/user/heads/build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/.canary] Error 1

Signed-off-by: Thierry Laurion <[email protected]>
…upstream fails to build on 1.4.0

2024-08-09 15:08:07+00:00 MAKE flashrom
tail /home/user/heads/build/x86/log/flashrom.log
-----
ichspi.c:2152:2: note: previously used here
  case CHIPSET_METEOR_LAKE:
  ^~~~
/home/user/heads/crossgcc/x86/bin/x86_64-linux-musl-gcc -fdebug-prefix-map=/home/user/heads=heads -gno-record-gcc-switches -D__MUSL__ --sysroot  /home/user/heads/install/x86 -isystem /home/user/heads/install/x86/include -L/home/user/heads/install/x86/lib  -MMD -Os -I/home/user/heads/install/x86/include/pci -Iinclude -I/home/user/heads/install/x86//include -D'HAVE_GETOPT_H=1'   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_DELAY_MINIMUM_SLEEP_US=100000' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'__FLASHROM_HAVE_OUTB__=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="1.4.0 (git:v0.2.0-2284-g88513e3f06)"'  -o hwaccess_x86_io.o -c hwaccess_x86_io.c
ichspi.c: In function 'init_ich_default':
ichspi.c:2381:48: error: expected ';' before ')' token
       ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
                                                ^
                                                ;
ichspi.c:2381:48: error: expected statement before ')' token
ichspi.c:2381:49: error: expected statement before ')' token
       ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
                                                 ^
ichspi.c:2504:1: error: expected declaration or statement at end of input
 }
 ^
/home/user/heads/crossgcc/x86/bin/x86_64-linux-musl-gcc -fdebug-prefix-map=/home/user/heads=heads -gno-record-gcc-switches -D__MUSL__ --sysroot  /home/user/heads/install/x86 -isystem /home/user/heads/install/x86/include -L/home/user/heads/install/x86/lib  -MMD -Os -I/home/user/heads/install/x86/include/pci -Iinclude -I/home/user/heads/install/x86//include -D'HAVE_GETOPT_H=1'   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_DELAY_MINIMUM_SLEEP_US=100000' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'__FLASHROM_HAVE_OUTB__=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="1.4.0 (git:v0.2.0-2284-g88513e3f06)"'  -o hwaccess_physmap.o -c hwaccess_physmap.c
make[1]: *** [Makefile:1050: ichspi.o] Error 1

Signed-off-by: Thierry Laurion <[email protected]>
…nder Heads

repro:
git fetch https://review.coreboot.org/flashrom refs/changes/54/83854/3 && git format-patch -1 --stdout FETCH_HEAD > patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/0001-Add_RaptorPoint_PCH_support.patch

Signed-off-by: Thierry Laurion <[email protected]>
… config layout against qemu-coreboot-fbwhiptail-tpm2

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch from 1a8fe4d to 83fe731 Compare September 9, 2024 20:15
@tlaurion
Copy link
Collaborator Author

tlaurion commented Sep 9, 2024

Rebased on master, needs cleanup (come commits unrelevant as of now) but will wait for decision on flashrom/flashprog and letting it bitrot until then.

@tlaurion
Copy link
Collaborator Author

@SergiiDmytruk
Copy link
Contributor

@SergiiDmytruk : #1753 (comment) https://review.coreboot.org/c/flashrom/+/84102 is still not merged.

I just gave it +2 after Anastasia has finished the work, so the change will probably be merged soon.

Do we go #1769 ?

Up to you :)

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.

7 participants