-
Notifications
You must be signed in to change notification settings - Fork 1
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
Kgpe patch rebase #11
Conversation
6fb2455
to
2c4ec5a
Compare
Add support for AST1100 and AST2400, available on ASUS KGPE-D16 Based originally on: https://github.com/osresearch/heads/blob/master/patches/flashrom-b1f858f65b2abd276542650d8cb9e382da258967/0100-enable-kgpe-d16.patch Change-Id: I7dce35b63c446562a057114d15e83f8a92892a85 Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> Signed-off-by: Karol Zmyslowski <karol.zmyslowski@3mdeb.com>
2c4ec5a
to
2ad07b2
Compare
@macpijan Unfortunately, as opposed to dasharo/flashrom I previously tested under linuxboot/heads@f79100b in the progress of fixing linuxboot/heads#1230, which was building successfully at that time https://app.circleci.com/pipelines/github/tlaurion/heads/1232/workflows/de278590-3dd3-496e-b3c2-ca524f1845e3/jobs/11320/parallel-runs/0/steps/0-103, switching to 2ad07b2 is not building successfully, with the traces provided below. As per 2ad07b2
Snippet of build error:
log tarballs are available as artifacts under CircleCI for 30 days: |
The cache used by CircleCI was second level (musl-cross-make + coreboot cache): https://app.circleci.com/pipelines/github/tlaurion/heads/1277/workflows/13fbc913-b2f5-487a-b359-8e09af2d49ec/jobs/12701/parallel-runs/0/steps/0-108 since only submodules definitions changed, trying to reuse biggest cache possible to reduce build time only building for modules, not musl-cross-make and coreboot's musl-cross's buildstack, but failed. Removing CircleCI project's CACHE_VERSION's environmenet variable to test a clean build from source without any cache layer. (I doubt it will change anything, but this will make sure of it without needing to exchange too much and exposing directly log traces for everything happening in the build). CircleCI Builds for PR linuxboot/heads#1251 can be compared under https://app.circleci.com/pipelines/github/tlaurion/heads?branch=dasharo_flashrom_test https://app.circleci.com/pipelines/github/tlaurion/heads/1277/workflows/bb2d24a9-7f4d-47dd-9f22-c496765ab917 is building from source without any cache. |
@macpijan @3mdeb-karolzmyslowski : same result when built from checkout without cache as can be seen under https://app.circleci.com/pipelines/github/tlaurion/heads/1277/workflows/bb2d24a9-7f4d-47dd-9f22-c496765ab917/jobs/12705?invite=true#step-103-1572 with same build errors as already reported under previous comment at #11 (comment) The same build recipe (as per module) is used as before https://github.com/osresearch/heads/blob/61f72f8d512fd9459cba8158a521875eb62a7959/modules/flashrom#L11-L38:
|
Thanks, I'll see if it can be reproduced locally with heads toolchain, as the build passed for me as well when building flashrom locally under Ubuntu 22.04 default toolchain
|
I can confirm that |
Change-Id: Ie355daf467b1e50b7a71e3512f908cbd0176e0e7 Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
With this the errors in ast files went away. The remaining problems with pcidev.c look like pciutils bug when building with LTO (?) https://bugs.gentoo.org/640836 |
No LTO building here. I wish though. :) |
… test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Poiting to Dasharo/flashrom#11 so that CircleCI shows success where work is happening
@macpijan : Have updated build which are happening on top of musl-cross-cache, which builds output will show success/fail and permit me to see pending errors that you are talking about on which we will be able to talk about, pointing to lines from the build output to reduce ping pong time and work more efficiently under: |
|
Change-Id: I3eba9bf58ebfdf02dc3c8c54643c09f0a9a0a53f Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Ok, I guess my last change makes no sense and could not help here. |
Means something changed recently and that some static configuration needs to be provided under modules/flashrom.
|
@macpijan agreed
|
Found the solution for the above problem related to Heads and pkg-config:
Which now gives the same result from local build as with Heads crossbuild:
Note that fdaf4c8 is being used here, and that Some unrelated work will be needed under Heads once |
@macpijan : Some more progress, invalidating past reply here: Seems like the make statement is the one creating problems!
Any idea why this happens? The idea behind stating
But CONFIG_NOTHING cannot be combined to ASTs:
|
Not sure why AST11000 would be included for PPC64, where my understanding is that only MTD is required under Heads? @SergiiDmytruk This is under Heads master:
|
@tlaurion I probably just did minimal change to the configuration. |
@macpijan : any progress on #11 (comment) ? |
Please try with following diff:
I think it should help for the mmio stuff. There is still one error left for me, causing the compilation to fail.
|
The above one is fixed by reverting this commit: Although, I'm not sure how it would work for the POWER case 🤷♂️ |
|
Yeah, I just though that at some point we wanted to use the ast2400 driver, which is present on the Raptor, I believe. If not there is no problem of course. |
Something isn't right in verbose output (-V -o) printing The redirection from flashrom -p internal -V -o /tmp/test.log
I hacked around flash.sh to export the flashrom_progress function and sourced it. The culprit is at Lines 482 to 483 in 1011196
Please poke me when this debugging output is removed to not cause regression. Sidenote: |
[WORKAROUND] Due to the fact that --progress is broken, heads relies on debug output to track the progress. This call makes the debug output so much cluttered. See: #11 (comment) Change-Id: Icd0f7de8a59382a4cf89afc63150ab1e7ca308dd Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Do you mean something like this: I am not a huge fan of this, though. Maybe this belongs more as a heads patch, if is specific for heads workaround.
What can I say about that... Was it this ticket, or some other one: https://ticket.coreboot.org/issues/390 ? |
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41 NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call Attempt to get successful builds for Dasharo/flashrom#11 CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested. Bug upstream which is not tested against NOTHING Collaboration happened under Dasharo/flashrom#11
Yes. Rebuilding under Heads pointing to that commit.
In what case are those lines helpful to be printed in verbose mode? If it is useful then Heads can have patch against this... Let me know.
It was referred linuxboot/heads#1222 (comment) and addressed under linuxboot/heads#1230 (comment) where flashrom master provides progress output, while imperfect. Yes, upstream problem is under https://ticket.coreboot.org/issues/390, fixed under 1.3 https://review.coreboot.org/c/flashrom/+/69283 and https://review.coreboot.org/c/flashrom/+/49643 (untested on my side) |
👍
Let's start with this patch here (as it is already done) and we will see.
If fixed upstream, we can try to rebase here and keep testing ;) |
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41 NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call Attempt to get successful builds for Dasharo/flashrom#11 CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested. Bug upstream which is not tested against NOTHING Collaboration happened under Dasharo/flashrom#11
@macpijan 82f021ec1e5677aec4c98352cf52695d82a0fb41 caused no regression flashing with flashrom_progress parsing verbose logs! |
In such a case, I will go ahead and merge. We might try to rebase to latest flashrom on next release, or so. |
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41 NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call Attempt to get successful builds for Dasharo/flashrom#11 CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested. Bug upstream which is not tested against NOTHING Collaboration happened under Dasharo/flashrom#11
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
…asharo/flashrom commit Dasharo/flashrom@6b2061b NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call Attempt to get successful builds for Dasharo/flashrom#11 CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested. Bug upstream which is not tested against NOTHING Collaboration happened under Dasharo/flashrom#11
…11246 from work under https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq - flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only NOTES: - newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call - CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested. Collaboration happened under Dasharo/flashrom#11
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41 NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call Attempt to get successful builds for Dasharo/flashrom#11 CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested. Bug upstream which is not tested against NOTHING Collaboration happened under Dasharo/flashrom#11
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41 NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call Attempt to get successful builds for Dasharo/flashrom#11 CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested. Bug upstream which is not tested against NOTHING Collaboration happened under Dasharo/flashrom#11
@macpijan the size increase of the binaries, even if optimized for space, is way bigger :( diffoscope of tools.cpio of Heads (master vs -Os branch of dasharo/flashrom):L
|
…11246 from work under https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq - flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only NOTES: - newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call - CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested. Collaboration happened under Dasharo/flashrom#11
…11246 from work under https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq - flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only NOTES: - newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call - CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested. Collaboration happened under Dasharo/flashrom#11
…11246 from work under https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening Changes: - "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore - ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits - INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable to build properly - flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq - flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only NOTES: - newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call - CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested. Collaboration happened under Dasharo/flashrom#11
…ess workaround works in absence of flashrom --progress Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked See Dasharo/flashrom#11 (comment) Signed-off-by: Thierry Laurion <insurgo@riseup.net>
…ess workaround works in absence of flashrom --progress Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked See Dasharo/flashrom#11 (comment) Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Asked why upstream --progress still unfixed https://matrix.to/#/!EhaGFZyYcbyhdSgStq:matrix.org/$VmOqrKd4o-T2fHu2DAlP0WG67CyPO_H-o_A0PDvRWs4?via=matrix.org&via=sibnsk.net&via=nope.chat |
…ess workaround works in absence of flashrom --progress Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked See Dasharo/flashrom#11 (comment) Signed-off-by: Thierry Laurion <insurgo@riseup.net>
…ess workaround works in absence of flashrom --progress Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked See Dasharo/flashrom#11 (comment) Signed-off-by: Thierry Laurion <insurgo@riseup.net>
No description provided.