-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
WiP: Switch master flashrom to dasharo/flashrom #1251
base: master
Are you sure you want to change the base?
Conversation
25c5986
to
8e28a32
Compare
48de52f
to
87dcfcd
Compare
Building clean over https://app.circleci.com/pipelines/github/tlaurion/heads/1350/workflows/b83b0668-6851-4b4a-81ce-9d3051c8e83a/jobs/14071 for commit Dasharo/flashrom@2c4392e as changed in modules/flashrom to build for ast1100 for x86 and ast2400+mtd for ppc64.
|
Reported outcome of switching flashrom 1.2 to dasharo/flashrom from latest commit at Dasharo/flashrom#11 (comment) (cross-referencing) |
9243702
to
ac7ebfb
Compare
d01a3d5
to
d0aab9a
Compare
Now compiles correctly for x86 (NOTHING + Internal + dummy + ast1100 for kgpe-d16 support) but fails for ppc64 (Talos II with NOTHING + mtd + dummy + AST2400) Reported at Dasharo/flashrom#11 (comment) d0aab9a adds flashrom dependency for libusb to be built firts, which even if uneeded, flashrom tests against (is not a reason for current build failing though, but added for good measure) |
6b58252
to
8aa05d2
Compare
8d7947d
to
a01b43e
Compare
Newer flashrom don't accept compile option as a make argument, but requires those configuration options to be passed as environment variables preceding the make call. Consequently, prior builds were compiling the whole flashrom binary, not respecting CONFIG_NOTHING and then building only modules/flashrom arch specific statements (x86 builds for internal, dummy and ast1100, while ppc64 builds now only for the MTD programmer) needed to upgrade internally. |
40c653f
to
135aeee
Compare
Resetted CircleCI project's setting env variable's CACHE_VERSION to 2023-01-16 to reuse cache. Restarting build |
135aeee
to
c301d14
Compare
…ix-sh_argument_expected-yubikey-oem-factory-reset_dasharo-flashrom Daily driver test fo x230-hotp-maximized on coreboot 4.19, with debug, yubikey test regression for oem-factory-reset, optimized for space (03-O2->Os) and fix for sh: argument expected, with local CONFIG_DEBUG_OUTPUT enabled and fused in ROM. Includes linuxboot#1317, linuxboot#1121, linuxboot#1312, linuxboot#1305, linuxboot#1251 for test on daily driver
6dba93f
to
9121f45
Compare
…ix-sh_argument_expected-yubikey-oem-factory-reset_dasharo-flashrom Daily driver test fo x230-hotp-maximized on coreboot 4.19, with debug, yubikey test regression for oem-factory-reset, optimized for space (03-O2->Os) and fix for sh: argument expected, with local CONFIG_DEBUG_OUTPUT enabled and fused in ROM. Includes osresearch#1317, osresearch#1121, osresearch#1312, osresearch#1305, osresearch#1251 for test on daily driver
Using x230-hotp-maximized from CircleCI builds as of now. Nothing to report as of now as regression. |
Past patches have been upstreamed into dasharo/flashrom Dasharo/flashrom@6b2061b changing commit and rebasing on master |
9121f45
to
52035b8
Compare
|
Local build before passing to -Os
|
Local build after passing -Os
4750040 - 4749400=positive footprint (increase of 640 bytes?!?!) |
Using x230-hotp-maximized as a reference, just because this is board that is building from clean commit over CI (thanks to cache layers, since a module/* changed, we are reusing coreboot cache + musl-cross-cache to speed up the builds, without using package build cache as can be seen under https://app.circleci.com/pipelines/github/tlaurion/heads/1487/workflows/cd665149-b87a-49b1-9ecb-162772c2f27d/jobs/17348/parallel-runs/0/steps/0-108). x230-maximized without -Os (Was -O2):
x230-hotp-maximized with -Os passed https://app.circleci.com/pipelines/github/tlaurion/heads/1488/workflows/bba93be4-e40c-4673-b2ff-3f98cf593e37/jobs/17353/parallel-runs/0/steps/0-103
4732632-4727512=5120 @JonathonHall-Purism : regression on librems? (Internal programmer worked in past tests on x230 and mtd for Talos) |
52035b8
to
8650139
Compare
Adresses @easrentai suggestion to pass modules build optimization for space here: linuxboot#590 (comment) - Uniformized module's $(CROSS_TOOLS) being passed as environment variable, prior of ./configure call - Includes linuxboot#1251 (should be rebased on top of it merged)
Increase of 12% (122kb) in size footprint as opposed to flashrom currently used under master.... |
@tlaurion I tested this on Librem 14 and L1UM, functionality is fine. I do see the 127K size increase though. I took a look over the commit log and we gained a lot of commits (many upstream, some from dasharo), maybe we can bisect the size increase? |
…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
8650139
to
46c142c
Compare
rebased on master |
#1371 (comment) shows that current cost of passing to newer flashrom with ast1100 support and WP is 0.01mb The main concern is always t520-maximized board https://app.circleci.com/pipelines/github/tlaurion/heads/1605/workflows/26753865-ac5a-4097-8e06-eccc85d748bf/jobs/20855?invite=true#step-103-888 which would now have 0.87mb empty after merge. @rbreslow : another newer addition is the t440p-hotp-maximized, which after this merge (and mrc.bin requirement to fixate CBFS_SIZE to 8mb) would now have https://app.circleci.com/pipelines/github/tlaurion/heads/1605/workflows/26753865-ac5a-4097-8e06-eccc85d748bf/jobs/20936?invite=true#step-103-818 0.178mb left prior of failing building.... EDIT: there is another empty region of 0.67mb at https://app.circleci.com/pipelines/github/tlaurion/heads/1605/workflows/26753865-ac5a-4097-8e06-eccc85d748bf/jobs/20936?invite=true&invite=true#step-103-816, not sure how cbfs add will deal with file injection, but it is expected that no problem there. |
@JonathonHall-Purism In the light of prior comments, are we willing to merge this?
Well, we could. But we might find more space optimizing kernel options even more |
Yes, we can merge this. We discussed separately whether these changes will be upstreamed (dasharo is 244 commits behind right now), hopefully at least the WP bits will be. If we run into any issue down the line where we need something from upstream I'm willing to revisit then. |
To be tested on top of #1381 |
Wp support is now part of flashrom 1.3. Needs testing otherwise builds fails combined with gnupg 2.4 and 5.10.x on legacy platforms, reopening consideration to drop legacy board support. As of today, ast1100 supoort, which dahsaro-flashrom is providing, doesn't seem to be used/tested by the community. It is aimed to support BMC spi flashing from heads and requires optional asmb4 chip which noooe seems to own beside myself, also leading to max fan speed since fan regulation on kgpe-d16 depends on the BMC doing that job, leading people to complain about kgpe-d16 electricity consumption, combined with CPU watt consumption which is higher combined to other newer platforms. |
|
||
# Default options for flashrom | ||
flashrom_cfg := \ | ||
WARNERROR=no \ | ||
CONFIG_NOTHING=yes \ | ||
CONFIG_INTERNAL=yes \ | ||
CONFIG_INTERNAL_X86=yes \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try removing CONFIG_INTERNAL
Further testing under #1420 |
Dasharo/flashrom includes many changes that are not included inside of flashrom/flashrom project:
We couldn't switch to dasharo/flashrom prior of this patch to not cause regression on KGPE-D16 platform.
Note that as of today, having CircleCI build the kgpe-d16 boards fail on top of debian-11 docker image because of a race condition inside of the builds. Also note that KGPE-d16 and librem server, based on coreboot 4.11, were removed from CircleCI for those reasons a while back.
Transient build test of flashrom against version reported in commit to test Dasharo/flashrom#11 until successful
To test prior of merging on Heads side: