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

CircleCi on ubuntu 2104 #1038

Closed
wants to merge 15 commits into from
Closed

Conversation

tlaurion
Copy link
Collaborator

CircleCI was stuck to debian 10 for a while.
Thanks @bluecmd and @itworksfinebro for individual proposed fixes, that merged together in this PR, should permit building of older boards on newer OSes.

This PR:

Should fix :
#983
#1036

Close #1035

Waiting for the result of the build here. My CircleCI is rate limiting threads since i'm overusing my instance. Pushing it as PR should use @osresearch's and give faster result.

@tlaurion
Copy link
Collaborator Author

At the current stage, it is impossible to build older boards based on either 4.8.1 nor 4.11.

Building locally with debian-11/on CircleCI with Ubuntu 21.04

make CPUS=2 BOARD=x230-hotp-maximized V=1

make[2]: Entering directory '/home/user/heads/build/coreboot-4.8.1'
toolchain.inc:186: The coreboot toolchain version of iasl '20210105' was not found
toolchain.inc:212: 
toolchain.inc:213: To build the entire coreboot toolchain: run 'make crossgcc'
toolchain.inc:215: To build just IASL: run 'make iasl'
toolchain.inc:217: For more toolchain build targets: run 'make help_toolchain'
toolchain.inc:218: 
toolchain.inc:220: To try to use any toolchain in your path, run 'make menuconfig', then select
toolchain.inc:222: the config option: 'General setup', and 'Allow building with any toolchain'
toolchain.inc:224: Note that this is NOT supported. Using it means you're on your own.
toolchain.inc:226: 
toolchain.inc:228: *** Halting the build.  Stop.
make[2]: Leaving directory '/home/user/heads/build/coreboot-4.8.1'
make[1]: *** [Makefile:455: /home/user/heads/build/coreboot-4.8.1/x230-hotp-maximized/.build] Error 1
make[1]: Leaving directory '/home/user/heads'
make: *** [Makefile:668: all] Error 2

At this point, I am not sure what additional patch to apply to be able to continue to have coreboot 4.8.1/coreboot 4.11 being built alongside of newer versions of coreboot based boards on newer OSes.

The problem is known for a while.

  • debian-10 docker image can build older and newer systems because of the way Heads is built.
    • host build tools build make and gawk, then coreboot crossgcc, then musl-cross-make for all other modules to be built against musl-cross-make buildstack, not against host system build tools.

Replacing debian-10 to newer OSes breaks builds of older boards. Solutions:

But as you all may know, CircleCI is the only way we can tell right away if a board breaks by a new commit (let it be changing a module version making it too big to fit in older boards)

@paulmenzel ? @MrChromebox @osresearch ? @bluecmd ? @Tonux599 ? @Thrilleratplay ?

The best solution would obviously to have proper patches so that coreboot 4.8.1 and 4.11 could still be built on newer OSes as this PR tries to do, but I do not know how to fix further this PR without external advises. This is where you guys can jump in. The community would definitely appreciate.

@tlaurion
Copy link
Collaborator Author

@MrChromebox kgpe-d16 and librem_l1um1828 would be removed from CircleCI because builds of coreboot 4.11 just won't work currently without additional fixes/love.

@pgeorgi
Copy link

pgeorgi commented Oct 13, 2021

The IASL error is created in https://github.com/coreboot/coreboot/blob/4.8.1/toolchain.inc#L190
The relevant test for that can be found at
https://github.com/coreboot/coreboot/blob/4.8.1/toolchain.inc#L186-L188

So: iasl needs to exist, and it needs to have "coreboot toolchain" as part of its version string. All crossgcc-built iasls since coreboot/coreboot@6f65613 (coreboot 4.3 or so) provide that.

@MrChromebox
Copy link
Contributor

@tlaurion at least until Qubes 4.1 is released, or unless a fix is found, the Librem 13/15 boards need to stay on coreboot 4.81 as anything newer fails to boot Qubes 4.0.x. The Librem L1UM is stuck on 4.11 as the platform was dropped in 4.12.

So we really need to get older coreboot (toolchain) versions building under current distros

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 14, 2021

@pgeorgi the patch to build newer version of iasl (for it to be successfully built) is at https://github.com/osresearch/heads/pull/1038/files#diff-9AC962054E169E329F1B549352BD127D

I don't quite understand why the version string is not in. Any advice?

Edit: got it.... Forgot to add patch for bumped acpica-unix similar to but for matching version.... Doh! https://github.com/coreboot/coreboot/blob/master/util/crossgcc/patches/acpica-unix2-20210331_iasl.patch

Will add tomorrow...

@tlaurion
Copy link
Collaborator Author

@MrChromebox coreboot 4.11 cannot be built corrently on ubuntu 21.04. Stopper (as of now, I expect other problems to be found) is shown at https://app.circleci.com/pipelines/github/tlaurion/heads/797/workflows/1348840f-1945-488b-957d-2386498b1e6a/jobs/1828 when trying to build librem_l1um.

General error:

Building IASL v20190703 for host ... failed. Check 'build-IASL/build.log'.
make[3]: *** [Makefile:36: build_iasl] Error 1
make[2]: *** [util/crossgcc/Makefile.inc:54: iasl] Error 2
make[2]: Leaving directory '/root/project/build/coreboot-4.11'
make[1]: *** [modules/coreboot:83: "/root/project/build/coreboot-4.11/util/crossgcc/xgcc/bin/iasl"] Error 2
make[1]: Leaving directory '/root/project'
make: *** [Makefile:668: all] Error 2

CircleCI received exit code 0

Details (exerpts):


-  bison        obj/aslcompiler.y
/root/project/build/coreboot-4.11/util/crossgcc/acpica-unix2-20190703/generate/unix/iasl/obj/aslcompiler.y:103.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
  103 | %expect 124
-  bison        obj/aslcompiler.y
/root/project/build/coreboot-4.11/util/crossgcc/acpica-unix2-20190703/generate/unix/iasl/obj/aslcompiler.y:103.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
  103 | %expect 124

Consequently:

- Link obj/iasl
/usr/bin/ld: obj/aslcompilerparse.o:(.bss+0x8): multiple definition of `AslCompilerlval'; obj/aslcompilerlex.o:(.bss+0x0): first defined here
/usr/bin/ld: obj/prparserlex.o:(.bss+0x0): multiple definition of `LexBuffer'; obj/dtparserlex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [../Makefile.rules:15: obj/iasl] Error 1
make[1]: Leaving directory '/root/project/build/coreboot-4.11/util/crossgcc/acpica-unix2-20190703/generate/unix/iasl'
make: *** [Makefile.common:7: iasl] Error 2
cp: cannot stat 'bin/iasl': No such file or directory
cp: cannot stat 'bin/acpiexec': No such file or directory

@MrChromebox @pgeorgi : insights/fixes to propose for coreboot 4.11? Continuing progress on 4.8.1 on my side, while there won't be any need for community boards once #1015 is merged. But 4.11 would still be needed for both kgpe-d16 and librem_l1um boards compilation.

@MrChromebox : Btw, CircleCI never built anything for Purism 4.8.1 boards here. Qubes 4.1 rc1 being out, you still have the same behavior on coreboot 4.13+? What kind of problems are you facing?

@MrChromebox
Copy link
Contributor

@tlaurion why are we not bumping iasl for coreboot 4.11 the same as we are for 4.81?

On the Librem 13/15 with Heads built using coreboot 4.9+, Qubes 4.0.x freezes right after kexec with no useful output. I'll retest with coreboot 4.14 and Qubes 4.1 RC and report back

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 14, 2021

Coreboot 4.8.1 builds now fails with referred past issue #853 (comment) on Ubuntu 21.04..... Ideas?

@tlaurion
Copy link
Collaborator Author

@tlaurion why are we not bumping iasl for coreboot 4.11 the same as we are for 4.81?

Could definitely give it a try for 4.11.... But for the moment, I have no clue on how to make 4.8.1 support forward. Could swap boards builds on CI so that a 4.11 board is built first bumping IASL. Patches welcome.

@MrChromebox
Copy link
Contributor

@tlaurion so Qubes 4.1 installer boots/runs successfully on Kabylake-based Librem 13v4/15v4 with coreboot 4.14+Heads, but has graphical glitches and/or hangs on the Skylake-based 13v2/15v3. These are literally the exact same boards with a different SoC dropped on. And no issue with coreboot 4.14+SeaBIOS, so this is Heads-specific =/

@tlaurion tlaurion marked this pull request as draft October 15, 2021 15:10
@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 15, 2021

@tlaurion so Qubes 4.1 installer boots/runs successfully on Kabylake-based Librem 13v4/15v4 with coreboot 4.14+Heads, but has graphical glitches and/or hangs on the Skylake-based 13v2/15v3. These are literally the exact same boards with a different SoC dropped on. And no issue with coreboot 4.14+SeaBIOS

@MrChromebox: seabios deals with graphical initialization itself, including inclusion of VBIOS is I recall well.
Coreboot now has VBT support which resolved the issue that was present with i915 and wrong default graphical display being used in my past tests. For sandy/ivy, VBT is now included as part of #1015, while graphic initialization per see was deactivated inside of coreboot and left for the kernel driver to initialize. VBT + linux kernel were then able to deal correctly with graphical initialization and resolved the glitches and video memory corruption/initialization that were present.

so this is Heads-specific =/

Which means coreboot + linux + kexec specific =/

@tlaurion
Copy link
Collaborator Author

@MrChromebox coreboot 4.11 cannot be built corrently on ubuntu 21.04. Stopper (as of now, I expect other problems to be found) is shown at https://app.circleci.com/pipelines/github/tlaurion/heads/797/workflows/1348840f-1945-488b-957d-2386498b1e6a/jobs/1828 when trying to build librem_l1um.

General error:

Building IASL v20190703 for host ... failed. Check 'build-IASL/build.log'.
make[3]: *** [Makefile:36: build_iasl] Error 1
make[2]: *** [util/crossgcc/Makefile.inc:54: iasl] Error 2
make[2]: Leaving directory '/root/project/build/coreboot-4.11'
make[1]: *** [modules/coreboot:83: "/root/project/build/coreboot-4.11/util/crossgcc/xgcc/bin/iasl"] Error 2
make[1]: Leaving directory '/root/project'
make: *** [Makefile:668: all] Error 2

CircleCI received exit code 0

Details (exerpts):


-  bison        obj/aslcompiler.y
/root/project/build/coreboot-4.11/util/crossgcc/acpica-unix2-20190703/generate/unix/iasl/obj/aslcompiler.y:103.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
  103 | %expect 124
-  bison        obj/aslcompiler.y
/root/project/build/coreboot-4.11/util/crossgcc/acpica-unix2-20190703/generate/unix/iasl/obj/aslcompiler.y:103.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
  103 | %expect 124

Consequently:

- Link obj/iasl
/usr/bin/ld: obj/aslcompilerparse.o:(.bss+0x8): multiple definition of `AslCompilerlval'; obj/aslcompilerlex.o:(.bss+0x0): first defined here
/usr/bin/ld: obj/prparserlex.o:(.bss+0x0): multiple definition of `LexBuffer'; obj/dtparserlex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [../Makefile.rules:15: obj/iasl] Error 1
make[1]: Leaving directory '/root/project/build/coreboot-4.11/util/crossgcc/acpica-unix2-20190703/generate/unix/iasl'
make: *** [Makefile.common:7: iasl] Error 2
cp: cannot stat 'bin/iasl': No such file or directory
cp: cannot stat 'bin/acpiexec': No such file or directory

@MrChromebox @pgeorgi : insights/fixes to propose for coreboot 4.11? Continuing progress on 4.8.1 on my side, while there won't be any need for community boards once #1015 is merged. But 4.11 would still be needed for both kgpe-d16 and librem_l1um boards compilation.

@MrChromebox : Btw, CircleCI never built anything for Purism 4.8.1 boards here. Qubes 4.1 rc1 being out, you still have the same behavior on coreboot 4.13+? What kind of problems are you facing?

The same error happens after upgrading IASL here:
POSIX Yacc does not support %expect [-Wyacc]
Which results in

-  Intermediate obj/aslcompilerlex.c
- Link obj/iasl
- Copy obj/iasl to ../bin/iasl
make[1]: Leaving directory '/root/project/build/coreboot-4.11/util/crossgcc/acpica-unix-20210105/generate/unix/iasl'

cp: cannot stat 'bin/acpinames': No such file or directory
cp: cannot stat 'bin/acpisrc': No such file or directory
cp: cannot stat 'bin/acpixtract': No such file or directory

Exited with code exit status 1

CircleCI received exit code 1

As can be seen here

The IASL version was upgraded as part of e6cf1fd, but would have bugged later on on iasl not reporting itself as part of coreboot crossgcc environment.

So at this point:

@MrChromebox
Copy link
Contributor

@MrChromebox: seabios deals with graphical initialization itself, including inclusion of VBIOS is I recall well.

Not on Purism's devices - we use coreboot libgfxinit, and load the VBT into the ACPI opregion for i915. SeaBIOS simply uses the framebuffer coreboot sets up for it (via SeaVGABIOS).

Coreboot now has VBT support which resolved the issue that was present with i915 and wrong default graphical display being used in my past tests. For sandy/ivy, VBT is now included as part of #1015, while graphic initialization per see was deactivated inside of coreboot and left for the kernel driver to initialize. VBT + linux kernel were then able to deal correctly with graphical initialization and resolved the glitches and video memory corruption/initialization that were present.

with Heads, Purism boards use libgfxinit in coreboot and then i915 reinits the panel. I'll retry with coreboot display init disabled (but VBT loaded). Very odd that SKL has an issue and KBL doesn't, given the SoC/CPU/GPU is nearly identical

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 15, 2021

acpinames

Update for coreboot 4.11: acpinames was an unexisting make target, %expect warning really just being a warning which I thought was dealt as an error... Patched buildgcc... Continuing local build.

@MrChromebox
Copy link
Contributor

@tlaurion the IASL bump in coreboot 4.11 causes a build failure for the librem_l1um, for which I have a 1-line patch ready. With the patch, builds properly :)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 16, 2021

Before merge:

  • CI boards that are 4.8.1 needs to be upgraded to 4.13+

  • 4.11 kgpe-16 CiecleCI artifact needs to be tested. @Tonux599 does a6b2795 make sense?

@tlaurion tlaurion force-pushed the CircleCI_Ubuntu_2104 branch 6 times, most recently from 6469374 to a57e41b Compare October 18, 2021 15:44
@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 20, 2021

@Tonux599 confirmed that https://1949-103208611-gh.circle-artifacts.com/0/build/kgpe-d16_workstation/heads-kgpe-d16_workstation-v5.0.1-53-ga57e41b.rom (a57e41b) boots and is fully functional.

@MrChromebox have your confirmed https://1959-103208611-gh.circle-artifacts.com/0/build/librem_l1um/heads-librem_l1um-v5.0.1-53-ga57e41b.rom works as expected too?

Seems like we will have coreboot 4.11 and 4.13+ CI that is similar to what users builds with again.

Question now is if additional patches need to be added to 4.8.1 coreboot attempt here.
Or if I split it. Putting back to draft.

@MrChromebox
Copy link
Contributor

[ ] Put fixes pertaining to 4.8.1 in another PR (@MrChromebox ?)

this isn't ready yet I'm guessing?

@tlaurion
Copy link
Collaborator Author

@MrChromebox 4.8.1 coreboot builds on newer OSes is stuck here with current patchset #1038 (comment)

@tlaurion
Copy link
Collaborator Author

Where subsequent step was outlined #853 (comment)

@tlaurion tlaurion force-pushed the CircleCI_Ubuntu_2104 branch 8 times, most recently from 9c83622 to b62e702 Compare November 3, 2021 17:53
@tlaurion
Copy link
Collaborator Author

tlaurion commented Dec 4, 2021

Next

tlaurion and others added 13 commits December 28, 2021 13:23
coreboot 4.8.1 and 4.11: remove https patch that was made as temporarily fix for bad cert
coreboot 4.8.1 and 4.11 : upgrade crossgcc's iasl to 2021 so that coreboot 4.8.1 can be built on debian 11+ (atop of make patch linuxboot#1035)
…eboot 4.81 and 4.11 and make.

Attempt to test inclusion of linuxboot#1035 with manual fix proposed by @itworksfinebro linuxboot#983 (comment) in form of patch

Should fix :
linuxboot#983
linuxboot#1036

Close linuxboot#1035
…reports itself as being part of coreboot crossgcc toolstack
…R defined under dstd.asl

PCI devices can have either a HID or ADR_ but not both.
Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
- xx30 legacy boards (x230, x230-flash, t430, t430-flash) now rely also on coreboot 4.13
  - DOWNSIDE: x230 and t430 legacy boards now rely on WHIPTAIL (NOT FBWhiptail) to have enough space to fit under 7mb)
- xx20 boards moved to 4.13 (no need of xx20-flash boards here since single SPI boards with 7.5mb useable since blobs scripts are required)
  - DOWNSIDE: all xx20 boards now have dropbear deactivated, while still having ethernet driver in.
- qemu-coreboot and qemu-coreboot-fbwhiptail switched to coreboot 4.13 WITHOUT TPM SUPPORT (with cryptsetup 2.x support)
  - DOWNSIDE:
    - coreboot-qemu board CBFS_SIZE=0x700000 -> 0x750000
    - coreboot-qemu-fbwhiptail CBFS_SIZE=0x750000 -> 0x780000
- CircleCi build recipe removes 4.8.1 boards altogether
  - KGPE-D16 workstation is used as new base build to save workspace layer (we removed one workspace layer)
  - Removing one workspace layer will save approx 2 hours of build time on fresh builds
  - Removing one coreboot version will save us approx 2 hours of build time on fresh builds
  - KGPE-D16 will stay to coreboot 4.11 until forward notice.
  - All other board configs SHOULD be built on latest coreboot versions
…4.0 compatible) board to CircleCI config to test build.
@tlaurion
Copy link
Collaborator Author

tlaurion commented Sep 7, 2022

Was fixed a while ago, circleci being based on debian-11 and the only supported path as of now.

@tlaurion tlaurion closed this Sep 7, 2022
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.

3 participants