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

flashrom: bump flashrom to upstream 1.3 and fix flash.sh progress_bar #1423

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Jun 26, 2023

Based on commit JonathonHall-Purism@2bb58f7

  • Extended to not have the progress bar stuck at 99%. Progress bar drawing under Heads still needed until properly implemented upstream see https://ticket.coreboot.org/issues/390
  • Removes flashrom DUMMY and AST1100 on both x86 and ppc64.
    • AST1100 can be added through board config option instead of bloating smaller SPI boards ROMs.

TODO: probably split flashrom into flashrom-stable/flashrom-upstream/flashrom-dasharo and have boards use the one needed. I suspect flashrom-stable will be even smaller.


Good news is that #1422 #1381 and this PR merged under #1398 can be compiled for legacy boards, dodging #1421 issue for the moment.

@tlaurion tlaurion changed the title flashrom: bump flashrom to upsream 1.3 and fix flash.sh progress_bar flashrom: bump flashrom to upstream 1.3 and fix flash.sh progress_bar Jun 26, 2023
@tlaurion
Copy link
Collaborator Author

Testing request under #1398.

@tlaurion
Copy link
Collaborator Author

Now that master has sizes.txt and console output of sizes of built binaries etc, rebasing on master and addressing @JonathonHall-Purism comment #1398 (comment)

JonathonHall-Purism and others added 2 commits June 27, 2023 12:23
Update flashrom - in particular, this includes support for new chipsets
like Jasper Lake.

CONFIG_INTERAL_X86 was created so CONFIG_INTERNAL could apply to other
platforms, enable it for x86.

The default build target now requires sphinx, just build flashrom
itself.

Update flashrom_progress - filter out noise in newer flashrom that
chokes the progress bar implementation, make size detection more
robust, improve progress bar implementation slightly.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Co-signed by: Thierry Laurion <insurgo@riseup.net.
…e MTD only for ppc64, have AST1100 enablement configurable for kgpe-d16 (patch not in)
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jun 27, 2023

Ok time for comparisons!!!!

Master last commit includes sizes.txt report. We will use t520-hotp-maximized sizes output step to compare cost of PR addition here. The raw output is available here. which we will use with diff to see what changed.

user@heads-tests-deb12:~/heads$ wget "https://circleci.com/api/v1.1/project/gh/osresearch/heads/10347/output/105/0?file=true&allocation-id=649b06dff63182304a39a9bb-0-build%2F9ED89B0" -O master -q
user@heads-tests-deb12:~/heads$ wget "https://circleci.com/api/v1.1/project/github/tlaurion/heads/25477/output/105/0?file=true&allocation-id=649b17e27435013fd1874c52-0-build%2F409A789B" -O 1423 -q
user@heads-tests-deb12:~/heads$ diff -u master 1423
--- master	2023-06-27 13:21:15.804000000 -0400
+++ 1423	2023-06-27 13:22:12.887000000 -0400
@@ -1,4 +1,4 @@
-2023-06-27 11:59:09-04:00 91f65bed793c0165203b1cbb9ac4f390f15ffa0e clean
+2023-06-27 13:11:31-04:00 979c9dd3187e25df9777be5cf4dd8f258eaa91b1 clean
  3039696:/root/project/build/x86/t520-hotp-maximized/bzImage
   684032:/root/project/build/x86/t520-hotp-maximized/modules.cpio
 -----
@@ -9,7 +9,7 @@
    10568:./lib/modules/xhci-pci.ko
   132360:./lib/modules/usb-storage.ko
 -----
-10793984:/root/project/build/x86/t520-hotp-maximized/tools.cpio
+10875904:/root/project/build/x86/t520-hotp-maximized/tools.cpio
 -----
   596544:./lib/libc.so
   491024:./lib/libcairo.so.2
@@ -40,7 +40,7 @@
     5904:./bin/qrenc
   118424:./bin/tpm
    73600:./bin/lspci
-  580568:./bin/flashrom
+  662264:./bin/flashrom
    50952:./bin/cryptsetup
    58200:./bin/cryptsetup-reencrypt
    28432:./bin/veritysetup
@@ -76,7 +76,7 @@
      237:./bin/cbfs.sh
     5557:./bin/config-gui.sh
     2612:./bin/flash-gui.sh
-    6653:./bin/flash.sh
+    6990:./bin/flash.sh
      411:./bin/flashrom-kgpe-d16-openbmc.sh
     1345:./bin/generic-init
     9056:./bin/gpg-gui.sh
@@ -135,5 +135,5 @@
      924:./sbin/config-dhcp.sh
     1064:./sbin/insmod
 -----
- 3977216:build/x86/t520-hotp-maximized/initrd.cpio.xz
- 8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1577-g91f65be.rom
+ 3981824:build/x86/t520-hotp-maximized/initrd.cpio.xz
+ 8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1579-g979c9dd.rom

@tlaurion
Copy link
Collaborator Author

tlaurion commented Jun 27, 2023

Some analysis

  • flashrom being a binary is stripped and then packed under tools.cpio to fainlly be packed under initrd.cpio.xz, which is explained by the data above:
-  580568:./bin/flashrom
+  662264:./bin/flashrom
-10793984:/root/project/build/x86/t520-hotp-maximized/tools.cpio
+10875904:/root/project/build/x86/t520-hotp-maximized/tools.cpio
- 3977216:build/x86/t520-hotp-maximized/initrd.cpio.xz
+ 3981824:build/x86/t520-hotp-maximized/initrd.cpio.xz

This is a direct free coreboot cbfs free space of 3981824-3977216=4608 (compressed) bytes

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.

2 participants