Building Heads for Librem v4: Downloaded FSP-M has the wrong SHA256 hash

I’m trying to build Heads for my Librem v4 and following the docs it fails with:

librem_kbl git:(purism_beta) ✗ ./get_blobs.sh

Checking descriptor.bin
Checking me.bin
Checking fspm.bin
Extracting fspm.bin

Downloaded FSP-M has the wrong SHA256 hash

@MrChromebox :point_up:

1 Like

Maybe try running the script one more time? Hashes can get messed up if something happens with the download.

Tried it once again now in another directory, same result.

Only other thing I could think of was to see if you had an old script, might have the wrong hash.

I cloned the beta repo, so can’t imagine I got anything else than the newest stuff.

While on this topic I hope that when I’m finished building it supports flashrom 0.9.9-2 on my Qubes system, as stated in the docs.
As opposed to using the automated download tool, which required flashrom >1.0.

which branch are you building from? the purism_beta branch should be correct, the latest commit to it (from 1 mo ago) fixes the FSP hashes

$ git clone --branch purism_beta https://source.puri.sm/coreboot/purism-heads.git

It works for the Librem 13v3 and 15v3, but is incorrect still with 13v4 and 15v4 (librem_kbl).

looking at it quickly, it makes no sense given the same FSP blobs are used to build both. I’ll take a closer look later today and sort it out

KBL FSP-M hash updated, should be good to go now

2 Likes

I’m stuck after trying to build Heads here:

   $ make -j 16 BOARD=librem13v4
    2020-01-22 15:54:45+01:00 MAKE musl-cross
    2020-01-22 15:54:45+01:00 CONFIG libremkey-hotp-verification
    2020-01-22 15:54:45+01:00 CPIO      build/librem13v4/heads.cpio
    2020-01-22 15:54:45+01:00 INSTALL boards/librem13v4/librem13v4.config
    2020-01-22 15:54:45+01:00 HASH 2aaf31dc61b28aa7282965d421c2d9e53b44f42f clean librem13v4
    2020-01-22 15:54:45+01:00 UNCHANGED build/librem13v4/heads.cpio
    9fad53a6200ca8bcb70a0d5c0af9c8bf97c997674b1eaa82d68279e92b064238  /home/user/purism-heads/build/librem13v4/heads.cpio
    2020-01-22 15:54:45+01:00 HASHES    build/librem13v4/heads.cpio
    make: *** [Makefile:379: /home/user/purism-heads/build/libremkey-hotp-verification/.configured] Error 1
    make: *** Waiting for unfinished jobs....
    tail /home/user/purism-heads/build/log/musl-cross.log
    -----
                                                                                                                                                                 ^~~~
    ../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
    ../../gcc/recog.h:316:166: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f15’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
       rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14) const { return ((f15)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
                                                                                                                                                                          ^~~~
    ../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
    ../../gcc/recog.h:317:175: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f16’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
       rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14, rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
                                                                                                                                                                                   ^~~~
    make[4]: Leaving directory '/home/user/purism-heads/build/musl-cross/gcc-5.3.0/build1/gcc'
    make[3]: *** [Makefile:4102: all-gcc] Error 2
    make[3]: Leaving directory '/home/user/purism-heads/build/musl-cross/gcc-5.3.0/build1'
    make[2]: *** [Makefile:857: all] Error 2
    make[2]: Leaving directory '/home/user/purism-heads/build/musl-cross/gcc-5.3.0/build1'
    + die Failed to build gcc-5.3.0
    + echo Failed to build gcc-5.3.0
    Failed to build gcc-5.3.0
    + exit 1
    make[1]: *** [Makefile:2: ../../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-gcc] Error 1
    make[1]: Leaving directory '/home/user/purism-heads/build/musl-cross'
    make: *** [Makefile:379: /home/user/purism-heads/build/musl-cross/.build] Error 1

(upstream) Heads recently made some updates/changes to the toolchain to fix cross-compilation which have not yet been ported back to the purism_heads branch. I’m working on that now and hope to have a solution pushed in the next few days. You’ll need to do a clean checkout, or at least clear the install, build, and crossgcc folders.

remove install, build and crossgcc dirs, and then wait a few days? Or can I run $ make instantly again now.
Presuming wait.

wait until the purism_beta branch is updated (likely, beta-12 release), sync, clean, build.

for now, I’d recommend using the precompiled PureBoot images unless there’s a change you’re making which necessitates building from source

I’m using Qubes with flashrom 0.9.9 which won’t flash the prebuilt images

A workaround could be using a live ISO with PureOS

1 Like

If I don’t have a spare USB stick, could I just build flashrom and transfer the binaries to dom0?