Librem coreboot Utility Script: usage, discussion, and help


#21

Sounds like a quite strange versioning scheme to me… :wink:

According to the script it’s spidey sense told it that my Librem was a 13v3 - I confirmed that by picking the default option. When I used the script the second time it’s spidey sense told it that my Librem was a 13v2, this time I didn’t confirm that, I picked option 4 (Librem 13 v3).

I don’t know the background of that versioning decision but since the product name is used for example in udev rules it may be a good idea to be consistent with that, even if there’s no real difference.


Where was Purism moving?
#22

Just finished flashing the bios using the script on Fedora 28, without a problem.

Thanks.


#23

Worked beautifully on Ubuntu 18.04.3 LTS. Thanks!


#24

I notice that links is hardcoded in official script. It means that i need to redownload script to get new updates. How to check coreboot updates more easily that redownloading script?


#25

I don’t have a good solution for that currently, it’s on the to-do list


#26

I looked for some explanation why this is important, what it is good for, general background information for this operation, but didn’t find it.

Can someone point me in the right direction?


#27

Maybe it would help you to generate an account on https://source.puri.sm/ . When you’re succefully logged in to your account you can go to the repository of coreboot and select the little bell at the top of the projects detail page to watch the project.

Maybe you also need to change Global notification level in your settings settings to Watch. (I’m not that much of a Gitlab geek to know for sure…)

You’ll get notfiied to the email address you registered with if anything on this project changes.


#28

it simply provides a digital record of the device serial, in case it’s needed for support purposes, and in case the sticker on the bottom of the unit is removed/worn. There are additional stickers inside the unit, but this allows for retrieval (via dmidecode) without having to open the unit.


#29

Successfully ran the script and flashed coreboot on my Librem 13 v4 running NixOS 19.03, by applying some minor expected tweaks. I used the command below:

sudo nix-shell -p dmidecode wget gzip coreutils flashrom --run 'bash coreboot_util.sh'

The first call will fail since the script pulls a binary build of cbfstool from Purism, however, we can patch it in the standard NixOS way 1 (I am pretty sure we could use the cbfstool Nix package, but I am not taking any chances when flashing hardware).

sudo nix-shell -p patchelf --run 'patchelf --set-interpreter "$(cat ${NIX_CC}/nix-support/dynamic-linker)" tools/cbfstool'

This of course will change the hash of the binary, so then remove the cbfstool hash check from coreboot_util.sh. Now run the first command again and it will succeed. Note that this will only work if you are flashing with the binaries provided by Purism, some more hacking is needed to build from source. It would be tempting to package this properly at some point, but for now I am content not to have to boot a more standard Linux distribution from USB to update the BIOS.


#30

I could add a check in the script to use the host cbfstool, like I do with flashrom – it just didn’t occur to me at the time.

hash check is for the compressed download, not the binary therein, so this isn’t needed


#31

I could add a check in the script to use the host cbfstool, like I do with flashrom – it just didn’t occur to me at the time.

A fair suggestion, but given how clean the code was, I really should not complain. I actually assumed that the reason you did not use the same strategy for cbfstool as for flashrom was that the former did not give a clear version when called with -h.

hash check is for the compressed download, not the binary therein, so this isn’t needed

Admittedly, it is the middle of the night, but I think this line 1 does check the hash of the tool/cbfstool binary itself. Mind you, the archive is checked as well 2, just like you said.


#32

well thanks, I’m glad it was reasonably clear. And that’s probably why :slight_smile:

you’re correct, I should have looked at the code rather than going off my obviously faulty memory =P