Unable to build coreboot

I’m following the guide.

I run chmod +x build_coreboot.sh && ./build_coreboot.sh and follow the instructions.

But it ends like this:

Downloading ME 11 Repository from https://mega.nz/#!2ElyFQDT!cC0gTlH8rB9EWD4MGX0mVElT94BauqFn-dBKuoEselc
Please be patient while the download finishes...

Reading link metadata...
$ echo $?
1

So the script seems to have exited with code 1. I had a look at the script, it seems to be failing on this line:

./megadown "$ME_RAR_URL" -o ../$rar_filename 2>/dev/null

I removed the 2>/dev/null and ran the script again, which gave me the error MEGA bad link.

So… now what?

Oh wow, looking at that script it actually downloads and runs unrar-nonfree. That’s not cool. I only run FLOSS software on my laptop. Was not expecting a script from Librem to download and execute non-free software. There should be clear warnings on that!

OK, I think I managed to work around it. I opened that mega.nz-URL in my browser and downloaded the file. As I don’t have unrar-nonfree I uploaded it to https://extract.me/ and downloaded the file I needed (11.0.18.1002_CON_LP_C_NPDM_PRD_RGN.bin in my case). I then manually checked the sha256 of the file. I then looked at what was the goal of the entire function, which was

        bspatch "$ME_FILENAME" "$BLOB_DIR/me.bin" coreboot-files/$ME_PATCH

In my case that translated to running

cd coreboot
bspatch "/path/to/11.0.18.1002_CON_LP_C_NPDM_PRD_RGN.bin" "3rdparty/blobs/mainboard/purism/librem_skl/me.bin" coreboot-files/me11.0.18_config.bspatch
cd ..

Now I ran ./build_coreboot.sh. The script checks the sha256 of me.bin and then skips the rest of the function. The script is now chugging along.

1 Like

yes, the MEGA download and unrar-nofree are problematic. I’m working on a new coreboot updater script which will allow building from source without pulling components from external (non-purism) sources, as well as flash a precompiled image (which is obv much faster)

1 Like

Yeah, that’d be cool. I’ve flashed libreboot a few times, and didn’t have to build anything then. Just make sure to get the right mac-address in the rom, and use cbfs tool to get the boot options right. I guess that’s what the serial extraction in the current script is about? So yeah, base roms that have to be filled in with serial and perhaps other data and then flashed sounds like a great thing for a script to handle.

feel free to test and provide feedback using instructions here: