Building coreboot from source (official script)

@thegoat In addition to what @kakaroto said, you may need to reboot into that SeaBIOS TPM menu and initialize the TPM from there first, before you will be able to use it within Linux.

1 Like

When running the script it ends with a message telling that it “Couldn’t automatically determine the direct link URL to download the ME from.” Then it advises to manually download https://mega.nz/#!fA03xADA!5uqZiKwNZIP1J27xHzIKVQPQaNfqxdtzKjPRxxwZMc8. Mega.nz reports this file as missing, so I am pretty stuck. Are there alternative download links for this file?

A few hours ago, I ran into the same issue @moli explaines in the post above, executing @kakaroto’s script as described in this blog post.

Can anyone point at a working download link or an alternative way to upgrade to the latest coreboot version available?

Setup: I am using a Librem13v3 (with German keyboard layout) and Cubes OS R4.0. Originally I have tried the coreboot upgrade from inside a native PureOS installation.

Background: I am trying to upgrade coreboot from version 4.7-Purism-1 to 4.7-Purism-4, hoping that this would improve some issues (e.g. electric clicking/chirping sound independent of power adapter or touchpad use, recurring loud fan noise through high rotation speeds).

I tried also to run the script however it stops because of unequal hashes of the rom file.
This is the link to my rom file: https://drive.google.com/file/d/1APJJdhMtW8Gw66ooqMjrQZu25sQsZXVK/view?usp=sharing

My System: Livrem13v3 also German keyboard layout running on Ubuntu

My problems: randomly switching off the computer, electric clicking sounds, loud fan.

Yep, the ME repository was updated, that’s why. Thanks for letting me know.
I’ve updated the build script, you can find it here : https://source.puri.sm/youness.alaoui/coreboot-files/raw/master/build_coreboot.sh
Unfortunately, I can’t push the changes to code.puri.sm because we’ve moving away from the old Gogs website into our new gitlab website, so use the above link instead.
This is the diff between the two versions of the script.

2 Likes

@mschneider: You’re having the same “old git” issue as was reported here a few months ago.
Please see the related discussion here, here and here

Yes thank you very much - it was the old git version!

Thanks a bunch, @kakaroto, flashing the BIOS of a Librem13v3 from Coreboot version 4.7-Purism-1 to 4.7-Purism-4 worked perfectly with the new link.

After flashing the bios, dmidecode says I have bios version4.7-Purism-4 installed. The fan noise is now running smoothly however I still have the problem that computer suddenly switches off.

Script still tells me to go to the Mega.co.nz link, but the file is missing; please update the link in the script, or point to a new one.

@mschneider: Please verify your CPU temperature (use the ‘sensors’ command over SSH) to see if it shows down due to a temperature issue or if it’s something else. Also, it might be better to contact support than to discuss this issue on this thread.

@ezs777: Please see the updated build script link at the top of this thread, I just checked, and the URL is still valid.

I have a workaround for the libusb_set_debug issue:

First run ./build_coreboot.sh as normal. Once you get the error, run
make -C coreboot/flashrom WARNERROR=no
After that you can run ./build_coreboot.sh again and the libusb error will not appear.

Now I’m just stuck on the mega.nz problem

Hi,

with a librem 13v3:

$ ./build_coreboot.sh 
Clonage dans 'coreboot'...
warning: redirection vers https://review.coreboot.org/coreboot/
remote: Counting objects: 10, done
error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.
fatal: The remote end hung up unexpectedly
fatal: fin de fichier prématurée
fatal: Ă©chec de index-pack

@rintucbai: The libusb_set_debug issue was fixed 20 days ago so please make sure you’re always up to date with the latest script.
Same with the mega.nz ‘problem’, make sure you use the latest link and make sure you use the script from the new URL.

@pillule: that looks like you had lost internet for a second or something, “The remote hung up unexpectedly”. I suggest you delete the coreboot directory and simply rerun the script.

I’ve got a librem 13v3 that I ended up having to wipe and reinstall on. I’m trying to run your script, but it throws the following error and exits after I select where it should look for binary blobs:
cp: cannot stat ‘coreboot-files/configs/config.librem13v3’: No such file or directory

Where can I find this config file?

I also had to add a ‘bootsplash.jpg’ file to coreboot/coreboot-files; any chance I can snag a stock pureOS jpg as well?

Thanks!

bootsplash.jpg was also missing for me. After the script failure, I removed the coreboot-files directory and cloned https://source.puri.sm/coreboot/coreboot-files instead.

cd coreboot
rm -rf coreboot-files/
git clone https://source.puri.sm/coreboot/coreboot-files.git

It gets all the expected files (including the purism logo for the bootsplash). However, the build fails at the LIBELF step, here’s what I believe to be the relevant section of coreboot/util/crossgcc/build-LIBELF/build.log.

In file included from ../../elfutils-0.170/backends/m68k_corenote.c:72:
../../elfutils-0.170/backends/linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus' is less than 4 [-Werror=packed-not-aligned]
 ;
 ^
../../elfutils-0.170/backends/linux-core-note.c:110:5: error: '({anonymous})' offset 70 in 'struct m68k_prstatus' isn't aligned to 4 [-Werror=packed-not-aligned]
     ;
     ^
cc1: all warnings being treated as errors

Full trace on 0-bin: https://0bin.net/paste/jJeONvLKYkJD-2B-#2bMUQ1IjG7mNQYTc4NiWrvjS4NF0uJFTYqf1nytKBjc

Same issue (on a 15v3). Searching for it at https://groups.google.com/forum/#!forum/qubes-users, seems to support the theory it’s a Qubes specific issue.

@rjrjr: I had removed all files from the old coreboot-files repository and made a README file to tell users to use the new repository. But I forgot to update the link in the actual script. I’ve fixed it now if you update the script again.

@freitafr @kV1x_2xx as for the elfutil issue , I haven’t seen that before, if it’s indeed qubes specific, then I’m not sure how i can help with that.

It’s not Qubes specific. I’m getting the same error on Arch Linux now. I’m guessing the system compiler was updated and introduced some sort of incompatibility.

Thanks, I followed @freitafr 's instructions and it built successfully. All updated and ready to go!