heads/.gitlab-ci.yml.deprecated
tlaurion 36c04f19e4
Add xx30-maximized and xx30-hotp-maximized boards (11.5mb flashable BIOS regions, reproducible me.bin and generated gbe.bin and totally externally and internally flashable roms) (#703)
* xx30-*-maximized: update flashrom options removing --ifd bios option, keeping whole flash of rom internally. WARNING: ifd needs to be initially unlocked through ifdtool -u on 8mb bottom SPI backup. YOU CANNOT COME FROM 1VYRAIN. IF COMING FROM SKULLS, YOU MUST HAVE RAN OPTIONAL -u OPTION FROM SKULLS. PLEASE UPGRADE ONLY AFTER HAVING A PHYSICAL BACKUP OF BOTH SPI FLASH CHIPS. MORE INFORMATION UNDER https://github.com/osresearch/heads/pull/703. This will guarantee that future flash of produced rom will reflash the ROM totally, where heads make sure of adding users customizations (public key, /etc/config.user) when internally flashed. Unfortunately, if you flash externally, you will have to reinject your public key and readd /etc/config customizations.

* Adding generated bincfg coreboot 4.8.1 patch (merged under coreboot 4.13 and backported here to 4.8.1), resulting in gbe.bin under blobs/xx30/gbe.bin and instructions to replicate in README prior of automation (under repo). Note that MAC under gbe.bin is fixed to DE:AD:C0:FF:EE unless extract.sh script is ran on external backup to keep current user's MAC (Thanks to @Thrilleratplay's contribution!)

* xx30 blobs: add two blobs management scripts for xx30: extract from local backup/download+neuter ME
extract.sh: extract from external backup: gbe.bin, neuter under me.bin and maximize BIOS+reduce ME regions under unlocked ifd.bin. 
download_clean_me.sh: download and verify Lenovo latest ME version from website, and drop me.bin in place.
Note: me.bin is 98kb, containing only BUP and ROMP partitions which cannot be modified nor deleted else computer won't boot. As a result, BIOS region is maximized in ifd.bin to 11.5mb and coreboot config takes advantage of that freed space.

* CircleCI: xx30-*-maximized additional step to call download_clean_me.sh prior of building boards so that me.bin is dopped in place. This should be done by users prior of building xx30-*-maximized boards locally, which is imitated in CircleCI builds (look at .circleci/config.yaml for innoextract host added dependency and board buildings. Results on github for each commit).
2020-12-02 17:01:44 -05:00

104 lines
3.8 KiB
Plaintext

image: fedora:30
variables:
DOCKER_DRIVER: overlay2
stages:
- build
build:
stage: build
retry: 1
cache:
paths:
- packages
- crossgcc
- build
key: "heads-$GITLAB_USER_LOGIN-2"
script:
- dnf install -y @development-tools gcc-c++ gcc-gnat zlib-devel perl-Digest-MD5 perl-Digest-SHA uuid-devel pcsc-tools ncurses-devel lbzip2 libuuid-devel lzma elfutils-libelf-devel bc bzip2 bison flex git gnupg iasl m4 nasm patch python wget libusb-devel cmake automake pv bsdiff autoconf libtool cpio texinfo
- git fetch origin
- git reset --hard origin/$CI_COMMIT_REF_NAME
- echo "Removing old x230-flash artifacts..."
- rm -rf ./build/x230-flash/*
- rm -rf ./build/log/*
- echo "Building BOARD=x230-flash board..."
- make BOARD=x230-flash || (find ./build/log/ -cmin 1|xargs tail; exit 1)
- echo "x230-flash hashes:"
- cat ./build/x230-flash/hashes.txt
- echo "Archiving x230-flash logs..."
- tar zcvf ./build/x230-flash/logs.tar.gz ./build/log/*
- echo "Removing old t430-flash artifacts..."
- rm -rf ./build/t430-flash/*
- rm -rf ./build/log/*
- echo "Building BOARD=t430-flash board..."
- make BOARD=t430-flash || (find ./build/log/ -cmin 1|xargs tail; exit 1)
- echo "t430-flash hashes:"
- cat ./build/t430-flash/hashes.txt
- echo "Archiving t430-flash logs..."
- tar zcvf ./build/t430-flash/logs.tar.gz ./build/log/*
- echo "Removing old x230-external-flash artifacts..."
- rm -rf ./build/x230-external-flash/*
- rm -rf ./build/log/*
- echo "Building BOARD=x230-external-flash board..."
- make BOARD=x230-external-flash || (find ./build/log/ -cmin 1|xargs tail; exit 1)
- echo "x230-external-flash hashes:"
- cat ./build/x230-external-flash/hashes.txt
- echo "Archiving x230-external-flash logs..."
- tar zcvf ./build/x230-external-flash/logs.tar.gz ./build/log/*
- echo "Removing old x230-hotp-verification artifacts..."
- rm -rf ./build/x230-hotp-verification/*
- rm -rf ./build/log/*
- echo "Building BOARD=x230-hotp-verification board..."
- make BOARD=x230-hotp-verification || (find ./build/log/ -cmin 1|xargs tail; exit 1)
- echo "x230-hotp-verification hashes:"
- cat ./build/x230-hotp-verification/hashes.txt
- echo "Archiving x230-hotp-verification logs..."
- tar zcvf ./build/x230-hotp-verification/logs.tar.gz ./build/log/*
- echo "Removing old x230 artifacts..."
- rm -rf ./build/x230/*
- rm -rf ./build/log/*
- echo "Building BOARD=x230 board..."
- make BOARD=x230 || (find ./build/log/ -cmin 1|xargs tail; exit 1)
- echo "x230 hashes:"
- cat ./build/x230/hashes.txt
- echo "Archiving x230 logs..."
- tar zcvf ./build/x230/logs.tar.gz ./build/log/*
- echo "Removing old t430 artifacts..."
- rm -rf ./build/t430/*
- rm -rf ./build/log/*
- echo "Building BOARD=t430 board..."
- make BOARD=t430 || (find ./build/log/ -cmin 1|xargs tail; exit 1)
- echo "t430 hashes:"
- cat ./build/t430/hashes.txt
- echo "Archiving t430 logs..."
- tar zcvf ./build/t430/logs.tar.gz ./build/log/*
- echo "Removing old qemu-coreboot artifacts..."
- rm -rf ./build/qemu-coreboot/*
- rm -rf ./build/log/*
- echo "Building BOARD=qemu-coreboot board..."
- make BOARD=qemu-coreboot || (find ./build/log/ -cmin 1|xargs tail; exit 1)
- echo "qemu-coreboot hashes:"
- cat ./build/qemu-coreboot/hashes.txt
- echo "Archiving qemu-coreboot logs..."
- tar zcvf ./build/qemu-coreboot/logs.tar.gz ./build/log/*
- echo "Calculate used space for cache"
- du -shc packages crossgcc build
artifacts:
paths:
- ./build/qemu-coreboot
- ./build/x230-flash
- ./build/t430-flash
- ./build/x230-hotp-verification
- ./build/x230-external-flash
- ./build/x230
- ./build/t430