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

Add new board: Purism Librem Mini #806

Merged
merged 6 commits into from
Sep 2, 2020

Conversation

MrChromebox
Copy link
Contributor

Add support for the Purism Librem Mini:

  • Add coreboot 4.12 patch to add board support
  • Add coreboot 4.12 patch to show SoC ME status on disabled ME
  • Add board and coreboot configs
  • Add purism-blobs coreboot submodule (vs using get_blobs script)
  • Adjust librem linux config for newer 4.19 kernel
  • Rename all librem boards and configs for consistency

Depends on #805 / will be rebased after merge

@tlaurion
Copy link
Collaborator

@MrChromebox
Copy link
Contributor Author

@tlaurion done

@@ -8,6 +8,7 @@ else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12"
coreboot_version := 4.12
coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2
coreboot-blobs_hash := 4735ee6850d55d1e65dee8b08cc9b28b8af00b42acf31365f5d9545406579104
coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@MrChromebox We can chainload multiple if here for different board configurations?

coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs)
coreboot_depends := $(if $(CONFIG_xx30_BLOBS),xx30-blobs)

etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MrChromebox We can chainload multiple if here for different board configurations?

would need to be a single line I believe:
coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs) $(if $(CONFIG_xx30_BLOBS),xx30-blobs)

@tlaurion
Copy link
Collaborator

tlaurion commented Aug 24, 2020

@MrChromebox : consider adding tlaurion@12711ee and gitlabci to test buildibility and reproducibility and detect problems in host build systems changes ASAP.

Building here, wont be able to test outcome https://circleci.com/gh/tlaurion/heads/377?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

@tlaurion
Copy link
Collaborator

@MrChromebox build fails on docker debian:10 with

Unpacked and patched ... ok
Building packages ...
Building GMP v6.1.2 for host ... ok
Building MPFR v4.0.2 for host ... ok
Building MPC v1.1.0 for host ... ok
Building BINUTILS v2.33.1 for target ... ok
Building GCC v8.3.0 for target ... failed. Check 'build-i386-elf-GCC/build.log'.
make[3]: *** [Makefile:26: build_gcc] Error 1
make[2]: *** [Makefile:51: build-i386] Error 2
make[1]: *** [util/crossgcc/Makefile.inc:35: crossgcc-i386] Error 2
make[1]: Leaving directory '/root/project/build/coreboot-4.12'
make: *** [modules/coreboot:70: "/root/project/build/coreboot-4.12/.xcompile"] Error 2

Src https://app.circleci.com/pipelines/github/tlaurion/heads/349/workflows/7330f8e8-4b0a-4540-862b-da021bc0f8aa/jobs/377

@MrChromebox
Copy link
Contributor Author

@tlaurion issue building older GCC for coreboot toolchain I'm guessing

@tlaurion
Copy link
Collaborator

tlaurion commented Aug 25, 2020

@MrChromebox Well, past CI against bullseye worked before for coreboot 4.12 and coreboot 4.8.1 until a change in host build toolchain broke coreboot 4.8.1 based builds.

CircleCI was then changed to use Debian 10 docker image which works for coreboot 4.8.1 but doesn't for coreboot 4.12 anymore.

A bit confused here. How can we make coreboot depend on musl-cross-make at this point so that it doesn't fail based on host related build toolchain....

@osresearch?

Add patch print ME status regardless of enablement state

Signed-off-by: Matt DeVillier <[email protected]>
Rather than require users to manually run a script to download the required
blobs to build Purism Librem boards, automate it so the correct version
is automatically downloaded/extracted. Restrict to coreboot 4.12 for now
since 4.8.1 still needs FSP blobs, which are not in module.

Signed-off-by: Matt DeVillier <[email protected]>
Fixes compilation issue with newer kernels, ignored by older ones
which don't need it

Signed-off-by: Matt DeVillier <[email protected]>
Add Librem Mini board patch for coreboot 4.12, board config and
coreboot config. Continue reusing existing librem13v2 Linux config,
same as all other Librem boards currently. Use new purism-blobs module.

Signed-off-by: Matt DeVillier <[email protected]>
Use 'librem_<board>' notation for consistency across all models.
Rename linux config file since used by multiple Librem models.

Signed-off-by: Matt DeVillier <[email protected]>
@tlaurion
Copy link
Collaborator

tlaurion commented Aug 25, 2020

@MrChromebox I see that you now follow your github account your branch from CircleCI, which automatically builds your PR, which from now can be clicked per last commit's yellow light which points here. Awesome and pretty appreciated, thank you.

Unfortunately as per commit e30197e you till haven't cherry-picked tlaurion@12711ee so your new librem_mini board will not be compiled by circleCI as expected in this branch, so the build will probably succeed but won't test what you want to actually test librem_mini board build. This will create both caches (crossgcc and full cache) though for the next build when it succeed. You might want to keep this build running so that cache will be picked up when that build will be successful and then add your board into circleci config.

@MrChromebox
Copy link
Contributor Author

@tlaurion oops, missed that, I will CP and push to re-test once this build is done

@tlaurion
Copy link
Collaborator

@MrChromebox found anything related to the present problem?

status docker debian:bullseye:

  • coreboot 4.12 builds, coreboot 4.8.1 fails

status docker debian:10:

  • coreboot 4.8.1 builds, coreboot 4.12 fails.

@MrChromebox
Copy link
Contributor Author

@tlaurion I'm not even sure how to begin diagnosing the issue. There don't seem to be any logs of the build to show what failed

@tlaurion
Copy link
Collaborator

tlaurion commented Sep 2, 2020

@MrChromebox Will try to bring back what I implemented before to output content of last log files modified.

@tlaurion
Copy link
Collaborator

tlaurion commented Sep 2, 2020

@MrChromebox : might now be enough and we might want to replace tail from a full output of those logs, but you can get the idea here: https://app.circleci.com/pipelines/github/tlaurion/heads/364/workflows/df9bad8d-8ff1-40da-b8d8-1b87a05be509/jobs/392

@tlaurion
Copy link
Collaborator

tlaurion commented Sep 2, 2020

@MrChromebox
Copy link
Contributor Author

@MrChromebox : https://app.circleci.com/pipelines/github/tlaurion/heads/364/workflows/df9bad8d-8ff1-40da-b8d8-1b87a05be509/jobs/392 was successful?!? Does the artifact boot for you?

yes, it boots successfully :)

@tlaurion tlaurion merged commit 268fb90 into linuxboot:master Sep 2, 2020
@tlaurion
Copy link
Collaborator

tlaurion commented Sep 3, 2020

@MrChromebox Will have to revert. Some patches in CircleCI will have to be done to output the logs of binutiles which fails at https://app.circleci.com/pipelines/github/tlaurion/heads/365/workflows/c32c3e29-f383-43b1-9ffe-5b5968c7feaf/jobs/393 :

Building GCC v8.3.0 for target ... failed. Check 'build-i386-elf-GCC/build.log'.
make[3]: *** [Makefile:26: build_gcc] Error 1
make[2]: *** [Makefile:51: build-i386] Error 2
make[1]: *** [util/crossgcc/Makefile.inc:35: crossgcc-i386] Error 2
make[1]: Leaving directory '/root/project/build/coreboot-4.12'
make: *** [modules/coreboot:70: "/root/project/build/coreboot-4.12/.xcompile"] Error 2

So https://github.com/osresearch/heads/blob/master/modules/coreboot#L68-L71 is the culprit, where build-i386-elf-GCC/build.log would be required to debug this further.

tlaurion added a commit that referenced this pull request Sep 3, 2020
tlaurion added a commit to tlaurion/heads that referenced this pull request Sep 3, 2020
Coreboot 4.12, on which the librem_mini depends, doesn't build under debian:10 docker image as of right now.
	It was building over debian:bullseye (where 4.8.1 boards didn't) which constructed a valid cache that
	was reused when building linuxboot#806 (https://app.circleci.com/pipelines/github/tlaurion/heads/364/workflows/df9bad8d-8ff1-40da-b8d8-1b87a05be509/jobs/392)
Consequently, more troubleshooting would need to be done under local debian:10 docker image.
tlaurion added a commit that referenced this pull request Sep 4, 2020
Coreboot 4.12, on which the librem_mini depends, doesn't build under debian:10 docker image as of right now.
	It was building over debian:bullseye (where 4.8.1 boards didn't) which constructed a valid cache that
	was reused when building #806 (https://app.circleci.com/pipelines/github/tlaurion/heads/364/workflows/df9bad8d-8ff1-40da-b8d8-1b87a05be509/jobs/392)
Consequently, more troubleshooting would need to be done under local debian:10 docker image.
@MrChromebox MrChromebox deleted the add_librem_mini branch October 21, 2020 21:18
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