mirror of
https://github.com/linuxboot/heads.git
synced 2025-03-03 12:24:13 +00:00
- Add kgpe-d16 patch to remove HID for PCI devices (successful build on top of #1101 and #1012 per https://app.circleci.com/pipelines/github/tlaurion/heads/937/workflows/de49bea0-3f58-4a91-8891-87622f5a0eed) - CircleCI modified to build for coreboot 4.11 kgpe-d16_workstation on top of 4.15 passed workspace - CircleCI modified so that we still archive all the logs in artifacts for the current build even if failing. We now exit 1 after having archived all the log files under build/ - Add xx30 vbios extract scripts to test. Expecting musl-cross target to fail since make and gawk aren't built - CircleCI: gawk was not installed in apt statements under Debian. Installing - Makefile: seperate and fix local make and gawk building pror of using. Otherwise, impossible to build musl-cross target seperatly. - Also give some debugging info at start of Heads builds to tell which local gawk and make are used, also telling which make call will be propagated in the rest of the builds - Fix gawk version checking, reporting bad version even if 4.2.1 as expected on debian-10 (debian-10 OS deploys gawk and make in version 4.2.1) - CircleCI: Changing musl-cross taget to bootstrap (gawk+make) and musl-cross-make (bootstrap_musl-cross-make) for clarity
75 lines
3.2 KiB
Bash
Executable File
75 lines
3.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
BLOBDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
ROMPARSER="94a615302f89b94e70446270197e0f5138d678f3"
|
|
UEFIEXTRACT="UEFIExtract_NE_A58_linux_x86_64.zip"
|
|
VBIOSFINDER="c2d764975115de466fdb4963d7773b5bc8468a06"
|
|
BIOSUPDATE="g4uj41us.exe"
|
|
ROM_PARSER_SHA256SUM="f3db9e9b32c82fea00b839120e4f1c30b40902856ddc61a84bd3743996bed894 94a615302f89b94e70446270197e0f5138d678f3.zip"
|
|
UEFI_EXTRACT_SHA256SUM="c9cf4066327bdf6976b0bd71f03c9e049ae39ed19ea3b3592bae3da8615d26d7 UEFIExtract_NE_A58_linux_x86_64.zip"
|
|
VBIOS_FINDER_SHA256SUM="bd07f47fb53a844a69c609ff268249ffe7bf086519f3d20474087224a23d70c5 c2d764975115de466fdb4963d7773b5bc8468a06.zip"
|
|
BIOS_UPDATE_SHA256SUM="6fc652b5fa10e5ea1ddc0e8477a2f1cfe56e00df76a94629f9b736faaee6199c g4uj41us.exe"
|
|
DGPU_ROM_SHA256SUM="3efe4886530086c0b612d1e669fbb4459ec93ec949b25a909e7ad273f4f01015 vbios_10de_0def_1.rom"
|
|
IGPU_ROM_SHA256SUM="10b292c19322e7bb7db53350d2775d37b72a784292ea5686cd0f92af929f4916 vbios_8086_0106_1.rom"
|
|
|
|
echo "### Creating temp dir"
|
|
extractdir=$(mktemp -d)
|
|
cd "$extractdir"
|
|
|
|
echo "### Installing basic dependencies"
|
|
sudo apt update && sudo apt install -y wget ruby ruby-dev bundler ruby-bundler p7zip-full upx-ucl
|
|
sudo gem install bundler:1.17.3
|
|
|
|
echo "### Downloading rom-parser dependency"
|
|
wget https://github.com/awilliam/rom-parser/archive/"$ROMPARSER".zip
|
|
|
|
echo "### Verifying expected hash of rom-parser"
|
|
echo "$ROM_PARSER_SHA256SUM" | sha256sum --check || { echo "Failed sha256sum verification..." && exit 1; }
|
|
|
|
echo "### Installing rom-parser dependency"
|
|
unzip "$ROMPARSER".zip
|
|
cd rom-parser-"$ROMPARSER" && make
|
|
sudo cp rom-parser /usr/sbin/
|
|
|
|
echo "### Downloading UEFIExtract dependency"
|
|
wget https://github.com/LongSoft/UEFITool/releases/download/A58/"$UEFIEXTRACT"
|
|
|
|
echo "### Verifying expected hash of UEFIExtract"
|
|
echo "$UEFI_EXTRACT_SHA256SUM" | sha256sum --check || { echo "Failed sha256sum verification..." && exit 1; }
|
|
|
|
echo "### Installing UEFIExtract"
|
|
unzip "$UEFIEXTRACT"
|
|
sudo mv UEFIExtract /usr/sbin/
|
|
|
|
echo "### Downloading VBiosFinder"
|
|
wget https://github.com/coderobe/VBiosFinder/archive/"$VBIOSFINDER".zip
|
|
|
|
echo "### Verifying expected hash of VBiosFinder"
|
|
echo "$VBIOS_FINDER_SHA256SUM" | sha256sum --check || { echo "Failed sha256sum verification..." && exit 1; }
|
|
|
|
echo "### Installing VBiosFinder"
|
|
unzip "$VBIOSFINDER".zip
|
|
cd VBiosFinder-"$VBIOSFINDER" && bundle install --path=vendor/bundle
|
|
|
|
echo "### Downloading latest Lenovo bios update for t530"
|
|
wget https://download.lenovo.com/pccbbs/mobiles/"$BIOSUPDATE"
|
|
|
|
echo "### Verifying expected hash of bios update"
|
|
echo "$BIOS_UPDATE_SHA256SUM" | sha256sum --check || { echo "Failed sha256sum verification..." && exit 1; }
|
|
|
|
echo "### Finding, extracting and saving vbios"
|
|
./vbiosfinder extract "$extractdir"/rom-parser-"$ROMPARSER"/VBiosFinder-"$VBIOSFINDER"/"$BIOSUPDATE"
|
|
|
|
echo "Verifying expected hash of extracted roms"
|
|
cd output
|
|
echo "$DGPU_ROM_SHA256SUM" | sha256sum --check || { echo "dGPU rom failed sha256sum verification..." && exit 1; }
|
|
echo "$IGPU_ROM_SHA256SUM" | sha256sum --check || { echo "iGPU rom Failed sha256sum verification..." && exit 1; }
|
|
|
|
echo "### Moving extracted roms to blobs directory"
|
|
mv vbios_10de_0def_1.rom $BLOBDIR/10de,0def.rom
|
|
mv vbios_8086_0106_1.rom $BLOBDIR/8086,0106.rom
|
|
|
|
echo "### Cleaning Up"
|
|
cd "$BLOBDIR"
|
|
rm -rf "$extractdir"
|