Building coreboot from source (official script)

Indeed the build error

is because of a new gcc version. It builds fine with gcc 7.3.1 20180406, but fails with the same error message with gcc 8.1.1 20180531. I’m also on Arch Linux.

Downgrading gcc and gcc-libs to 7.3.1+20180406-1 solves the problem for me.

Note: Build script has been updated and newest coreboot update to 4.8.1-Purism-2 has just been released. (4.8.1-Purism-1 was skipped, yes)

2 Likes

Ironically it appears that 4.8.1-Purism-2 resolves the issue as well :wink:

EDIT: Spoke too soon. Oh well lets try the downgrade now.

@jaylittle what issue would that be ?

The issue was that gcc 6.x fails to build when you are using gcc 8.x to do it.

Downgrading gcc, gcc-libs and gcc-ada to 7.3.1+20180406-1 definitely resolved the issue for me. I was able to build and flash 4.8.1-Purism-2 without issue.

Need help with coreboot. I bought my laptop back in May and everything worked fine until a recent update. I did the test to check whether or not Intel ME is neutralized on my machine I and got a list of errors with it. Hopefully someone can point me to what to do.

Here is the log:

ME: Host Firmware Status Register 1 : 0xFFFFFFFF
ME: Host Firmware Status Register 2 : 0xFFFFFFFF
ME: Host Firmware Status Register 3 : 0xFFFFFFFF
ME: Host Firmware Status Register 4 : 0xFFFFFFFF
ME: Host Firmware Status Register 5 : 0xFFFFFFFF
ME: Host Firmware Status Register 6 : 0xFFFFFFFF
ME: FW Partition Table : BAD
ME: Bringup Loader Failure : YES
ME: Firmware Init Complete : YES
ME: Manufacturing Mode : YES
ME: Boot Options Present : YES
ME: Update In Progress : YES
ME: D3 Support : YES
ME: D0i3 Support : YES
ME: Low Power State Enabled : YES
ME: CPU Replaced : YES
ME: CPU Replacement Valid : YES
ME: Current Working State : Unknown (15)
ME: Current Operation State : M0 without UMA but with error
ME: Current Operation Mode : M0 without UMA
ME: Error Code : Preboot
ME: Progress Phase :
ME: Power Management Event : CM0PG->CM0
ME: Progress Phase State : Unknown phase: 0x0f state: 0xff
ME: Power Down Mitigation : YES
ME: PD Mitigation State : Issue Detected but not Recovered
ME: Encryption Key Override : Workaround Applied
ME: Encryption Key Check : FAIL
ME: PCH Configuration Info : Changed
ME: Firmware SKU : Unknown (0x7)
ME: FPF status : fused

When confirming the presence of the correct coreboot image, it says I have a Librem 13 V 2 when I have a V3:

coreboot-4.7-18-g7ac4919b8a-4.7-Purism-4 Tue Mar 20 22:39:32 UTC 2018 bootblock starting…
coreboot-4.7-18-g7ac4919b8a-4.7-Purism-4 Tue Mar 20 22:39:32 UTC 2018 romstage starting…
coreboot-4.7-18-g7ac4919b8a-4.7-Purism-4 Tue Mar 20 22:39:32 UTC 2018 postcar starting…
coreboot-4.7-18-g7ac4919b8a-4.7-Purism-4 Tue Mar 20 22:39:32 UTC 2018 ramstage starting…
Root Device (Purism Librem 13 v2)
Found mainboard Purism Librem 13 v2

Another strange issue, although not coreboot related: when I log on the cryptsetup login screen, when I turn on the laptop, if I enter the right password I get a warning message on top saying “too many failed attempts” although the password works fine and I’m able to enter the user login screen for PureOS.

@jaylittle ah ok. I hadn’t tried that, and it’s compiling gcc itself, not coreboot so it makes sense. I think it complains if you try to compile gcc with a different version of gcc itself.

@user92992 : when you say “everything worked fine until a recent update”, what stopped working in recent updates? Also, an update to what? to coreboot or to your OS ?
Those “lists of errors” or what says that the ME is indeed neutralized and disabled.
The fact that it says that you have a Librem 13 v2 instead of Librem 13 v3 is ok, both images are the same basically (the only difference is the model name), and for a while the l13v2 image was being used on the l13v3 hardware until I made one specific for it. If you rebuild coreboot, just select librem 13 v3 next time.
I have no idea about the login screen issue, I’d suggest you ask in a separate thread.

Seems to be a problem with the encryption key for the ME file at MEGA again. Current script can’t fetch it, manual check of https://mega.nz/#!TZUGyKBI!5rITrOXUUBXaThpWfwxc_Hks-UI64eKi70_336Vn4og in browser says key is invalid.

@avog: The URL is good : https://mega.nz/#!TZUGyKBI!5rITrOXUUBXaThpWfwxc_Hks-UI64eKi7O_336Vn4og
I checked the one you linked to, and you put a 0 (zero) instead of an O (uppercase o) before the last underscore. I suggest you copy/paste the link from the script instead :slight_smile:

1 Like

Dammit. Had to use Tilix and couldn’t figure out copypaste there. Didn’t occur to me to just take it from the script instead of typing it all in again. Thanks for checking, my mistake.

I just updated my Librem 15 v3 to core boot 4.8.1.
Everything works fine.

Thanks kakaroto for the script.

Same here: 15 v3 updated to 4.8.1. All good. Thank you, @kakaroto and Purism.

Hey kakaroto and all,

The link provided works however after clicking download, I get a ‘termporary error, retrying’ message.

https://mega.nz/#!TZUGyKBI!5rITrOXUUBXaThpWfwxc_Hks-UI64eKi7O_336Vn4og

Not sure if I’m clicking wrong… once downloaded everything should run smoothly as no other errors in the script. Thanks for the work here, kakaroto.

EDIT: My fault; I was running a few addons in purebrowser that were really screwing with purebrowser performance. there is no issue with the mega link. lol fake news :confused:

Looks like I’m having trouble with get_and_patch_me_11 () at line 226 on a 13v2. (“Couldn’t automatically determine the direct link URL to download ME from.”) It suggests downloading the files from the mega.nz repository manually. Having done that, the path is:

~/building-coreboot/coreboot/me_11_repository.rar/Intel CSME 11.0 Firmware Repository Pack r51/11.0.18.1002_CON_LP_C0_NPDM_PRD_RGN.bin

Yet the line 226 error still triggers. Any ideas as to what I’m missing?

As background, I’m using the script at: https://source.puri.sm/coreboot/coreboot-files/raw/master/build_coreboot.sh, although I’ve also tried https://source.puri.sm/coreboot/coreboot-files.git as well as downloading direct from a link mladen sent via email. Same error regardless of the source.

@worker: You’re saying “the path is” and you give me a path to an me bin file, maybe that’s the misundestanding, the script expects the rar file to be me_11_repository.rar not for the rar file to be extracted in a directory named me_11_repository.rar

1 Like

the file needs to be renamed to ‘me_11_repository.rar’ and left in the ‘coreboot’ folder.

I mistakenly threw the downloaded rar file into coreboot without renaming it and I ended up with an error at 226 as well.

1 Like

This link appears to be dead. Mega reports that “the link is invalid, the file has been deleted, or removed for violation”.

@okennedy Believe that the ME 11.0 repository pack is now on release 52 (as of 8/8). It’s available at:

https://mega.nz/#!DNdDVQ7I!hronBMVN8m82JciiT6UQwtwh-LVlHXIo-NzTB0324rk

The forum that @kakaroto was using for the ME repository packs should be here, which should allow you to verify the release number.

That said, I’m not sure whether the build script needs an update to support r52.

This was definitely the problem. Thanks @kakaroto and @vficarrotta.

@worker: thanks! I’ve updated the ME URL in the script now.