From d9cbf08931ede7b718364d6642eec88d83cca910 Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Mon, 29 Jun 2020 15:55:34 -0700 Subject: [PATCH] add coreboot-heads build support --- Makefile | 4 +++- config/config.env | 2 +- config/container/packages.list | 39 ++++++++++++++++++++++++++++++++++ scripts/build | 9 +++++--- scripts/environment | 1 + scripts/fetch | 6 ++++++ scripts/shell | 1 + 7 files changed, 57 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ca909d4..d3149c3 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,9 @@ image: .PHONY: build build: $(contain) build - cp -R build/buildroot/output/images/bzImage release/ + mkdir -p release/$(TARGET)/fw release/$(TARGET)/os + cp -R build/buildroot/output/images/bzImage release/$(TARGET)/os/ + cp -R build/heads/build/$(TARGET)-coreboot/* release/$(TARGET)/fw/ .PHONY: fetch fetch: diff --git a/config/config.env b/config/config.env index fdcee6c..bf6a573 100644 --- a/config/config.env +++ b/config/config.env @@ -1,2 +1,2 @@ BUILDROOT_REF=95fdb33f71f8a2d6a6e86fa3c6eb2968b6440b88 - +HEADS_REF=fab603153bd744ba3d1b4617a10c405c88f854bf diff --git a/config/container/packages.list b/config/container/packages.list index 92dcdbe..bf46859 100644 --- a/config/container/packages.list +++ b/config/container/packages.list @@ -1,6 +1,7 @@ aapt=1:8.1.0+r23-3 abootimg=0.6-1+b2 acl=2.2.53-4 +acpica-tools=20181213-1 adduser=3.118 adwaita-icon-theme=3.30.1-1 android-framework-res=1:8.1.0+r23-3 @@ -31,6 +32,7 @@ binutils=2.31.1-16 binutils-common:amd64=2.31.1-16 binutils-multiarch=2.31.1-16 binutils-x86-64-linux-gnu=2.31.1-16 +bison=2:3.3.2.dfsg-1 blt=2.5.3+dfsg-4 bsdmainutils=11.1.2+b1 bsdutils=1:2.33.1-0.1 @@ -44,7 +46,10 @@ ca-certificates=20200601~deb10u1 ca-certificates-java=20190405 ca-certificates-mono=5.18.0.240+dfsg-3 caca-utils=0.99.beta19-2.1 +ccache=3.6-1 cli-common=0.10 +cmake=3.13.4-1 +cmake-data=3.13.4-1 colord=1.4.3-4 colord-data=1.4.3-4 coreutils=8.30-3 @@ -99,6 +104,7 @@ ffmpeg=7:4.1.4-1~deb10u1 file=1:5.35-4+deb10u1 findutils=4.6.0+git+20190209-2 firmware-linux-free=3.4 +flex=2.6.4-6.2 fontconfig=2.13.1-2 fontconfig-config=2.13.1-2 fontforge-extras=0.3-4 @@ -135,6 +141,8 @@ git-man=1:2.20.1-2+deb10u3 glib-networking:amd64=2.58.0-2 glib-networking-common=2.58.0-2 glib-networking-services=2.58.0-2 +gnat=8.0.1 +gnat-8=8.3.0-6 gnome-desktop3-data=3.30.2.1-2 gnumeric=1.12.44-1 gnumeric-common=1.12.44-1 @@ -246,6 +254,7 @@ libavresample4:amd64=7:4.1.4-1~deb10u1 libavutil56:amd64=7:4.1.4-1~deb10u1 libbdplus0:amd64=0.1.2-3 libbinutils:amd64=2.31.1-16 +libbison-dev:amd64=2:3.3.2.dfsg-1 libblas-dev:amd64=3.8.0-2 libblas3:amd64=3.8.0-2 libblkid1:amd64=2.33.1-0.1 @@ -304,6 +313,7 @@ libde265-0:amd64=1.0.3-1+b1 libdebconfclient0:amd64=0.249 libdevmapper-event1.02.1:amd64=2:1.02.155-3 libdevmapper1.02.1:amd64=2:1.02.155-3 +libdigest-sha-perl=6.02-1+b1 libdjvulibre-text=3.5.27.1-10 libdjvulibre21:amd64=3.5.27.1-10 libdns-export1104=1:9.11.5.P4+dfsg-5.1+deb10u1 @@ -323,6 +333,7 @@ libefiboot1:amd64=37-2 libefivar1:amd64=37-2 libegl-mesa0:amd64=18.3.6-2+deb10u1 libegl1:amd64=1.1.0-1 +libelf-dev:amd64=0.176-1.1 libelf1:amd64=0.176-1.1 libenchant1c2a:amd64=1.6.0-11.1+b1 libencode-locale-perl=1.05-1 @@ -346,6 +357,8 @@ libfile-desktopentry-perl=0.22-1 libfile-fcntllock-perl=0.22-3+b5 libfile-listing-perl=6.04-1 libfile-mimeinfo-perl=0.29-1 +libfl-dev:amd64=2.6.4-6.2 +libfl2:amd64=2.6.4-6.2 libflac8:amd64=1.3.2-3 libflite1:amd64=2.1-release-3 libfont-afm-perl=1.20-2 @@ -381,6 +394,8 @@ libgme0:amd64=0.6.2-1 libgmp-dev:amd64=2:6.1.2+dfsg-4 libgmp10:amd64=2:6.1.2+dfsg-4 libgmpxx4ldbl:amd64=2:6.1.2+dfsg-4 +libgnat-8:amd64=8.3.0-6 +libgnatvsn8:amd64=8.3.0-6 libgnome-desktop-3-17:amd64=3.30.2.1-2 libgnutls-dane0:amd64=3.6.7-4+deb10u4 libgnutls30:amd64=3.6.7-4+deb10u4 @@ -477,6 +492,7 @@ libjs-jquery-ui=1.12.1+dfsg-5 libjson-c3:amd64=0.12.1+ds-2 libjson-glib-1.0-0:amd64=1.4.4-2 libjson-glib-1.0-common=1.4.4-2 +libjsoncpp1:amd64=1.7.4-3 libjsr305-java=0.1~+svn49-11 libjxr-tools=1.1-6+b1 libjxr0:amd64=1.1-6+b1 @@ -615,6 +631,8 @@ libprotobuf-lite17:amd64=3.6.1.3-2 libproxy1v5:amd64=0.4.15-5 libpsl5:amd64=0.20.2-2 libpulse0:amd64=12.2-4+deb10u1 +libpython-stdlib:amd64=2.7.16-1 +libpython2-stdlib:amd64=2.7.16-1 libpython2.7:amd64=2.7.16-2+deb10u1 libpython2.7-minimal:amd64=2.7.16-2+deb10u1 libpython2.7-stdlib:amd64=2.7.16-2+deb10u1 @@ -645,6 +663,7 @@ libreadline-dev:amd64=7.0-5 libreadline5:amd64=5.2+dfsg-3+b13 libreadline7:amd64=7.0-5 librest-0.7-0:amd64=0.8.1-1 +librhash0:amd64=1.3.8-1 librpm8=4.14.2.1+dfsg1-1 librpmio8=4.14.2.1+dfsg1-1 librsvg2-2:amd64=2.44.10-2.1 @@ -709,6 +728,7 @@ libtag1v5-vanilla:amd64=1.11.1+dfsg.1-0.3+deb10u1 libtasn1-6:amd64=4.13-3 libtcl8.6:amd64=8.6.9+dfsg-2 libtext-iconv-perl=1.7-5+b7 +libtext-unidecode-perl=1.30-1 libthai-data=0.1.28-2 libthai0:amd64=0.1.28-2 libtheora0:amd64=1.1.1+dfsg.1-15 @@ -728,8 +748,11 @@ libunbound8:amd64=1.9.0-2+deb10u2 libunistring2:amd64=0.9.10-1 liburi-perl=1.76-1 libusb-1.0-0:amd64=2:1.0.22-2 +libusb-1.0-0-dev:amd64=2:1.0.22-2 +libusb-1.0-doc=2:1.0.22-2 libusbredirparser1:amd64=0.8.0-1 libuuid1:amd64=2.33.1-0.1 +libuv1:amd64=1.24.1-1 libv4l-0:amd64=1.16.3-3 libv4lconvert0:amd64=1.16.3-3 libva-drm2:amd64=2.4.0-1 @@ -802,7 +825,12 @@ libxinerama1:amd64=2:1.1.4-2 libxkbcommon0:amd64=0.8.2-1 libxml-commons-external-java=1.4.01-3 libxml-commons-resolver1.1-java=1.2-9 +libxml-libxml-perl=2.0134+dfsg-1 +libxml-namespacesupport-perl=1.12-1 libxml-parser-perl=2.44-4 +libxml-sax-base-perl=1.09-1 +libxml-sax-expat-perl=0.51-1 +libxml-sax-perl=1.00+dfsg-1 libxml-twig-perl=1:3.50-1.1 libxml-xpathengine-perl=0.14-1 libxml2:amd64=2.9.4+dfsg1-7+b3 @@ -851,6 +879,7 @@ lsscsi=0.30-0.1 lvm2=2.03.02-3 lz4=1.8.3-1 lzop=1.03-4+b1 +m4=1.4.18-2 mailutils=1:3.5-3 mailutils-common=1:3.5-3 make=4.2.1-1.2 @@ -873,6 +902,7 @@ mount=2.33.1-0.1 mtd-utils=1:2.0.1-1 mtools=4.0.23-1 mysql-common=5.8+1.0.5 +nasm=2.14-1 ncompress=4.2.4.5-3 ncurses-base=6.1+20181013-2+deb10u2 ncurses-bin=6.1+20181013-2+deb10u2 @@ -914,8 +944,14 @@ procyon-decompiler=0.5.32-5 psmisc=23.2-1 publicsuffix=20190415.1030-1 pxlib1=0.6.7-1 +python=2.7.16-1 python-apt-common=1.8.4.1 python-matplotlib-data=3.0.2-2 +python-minimal=2.7.16-1 +python2=2.7.16-1 +python2-minimal=2.7.16-1 +python2.7=2.7.16-2+deb10u1 +python2.7-minimal=2.7.16-2+deb10u1 python3=3.7.3-1 python3-apt=1.8.4.1 python3-argcomplete=1.8.1-1 @@ -1009,6 +1045,8 @@ systemd-sysv=241-7~deb10u4 sysvinit-utils=2.93-8 tar=1.30+dfsg-6 tcpdump=4.9.3-1~deb10u1 +tex-common=6.11 +texinfo=6.5.0.dfsg.1-4+b1 thin-provisioning-tools=0.7.6-2.1 tk8.6-blt2.5=2.5.3+dfsg-4 toilet=0.3-1.2 @@ -1020,6 +1058,7 @@ udev=241-7~deb10u4 unzip=6.0-23+deb10u1 update-inetd=4.49 util-linux=2.33.1-0.1 +uuid-dev:amd64=2.33.1-0.1 va-driver-all:amd64=2.4.0-1 vdpau-driver-all:amd64=1.1.1-10 wget=1.20.1-1.1 diff --git a/scripts/build b/scripts/build index 958c307..e32d1ef 100755 --- a/scripts/build +++ b/scripts/build @@ -3,7 +3,10 @@ set -e; source environment target=${TARGET?} +build_dir="${BUILD_DIR?}" +buildroot_dir="${build_dir}/buildroot" +heads_dir="${build_dir}/heads" -cd /home/build/build/buildroot -make "airgap_${TARGET}_defconfig" -make +(cd "${heads_dir}"; make ) + +(cd "${buildroot_dir}"; make ) diff --git a/scripts/environment b/scripts/environment index a86e4cd..71f5a77 100755 --- a/scripts/environment +++ b/scripts/environment @@ -9,3 +9,4 @@ export BUILD_DIR="${HOME}/build" export BR2_EXTERNAL="${HOME}/config/buildroot" export RELEASE_DIR="${HOME}/release" export BUILDROOT_REPO=git://git.busybox.net/buildroot +export HEADS_REPO=https://github.com/osresearch/heads diff --git a/scripts/fetch b/scripts/fetch index e8c48a9..fa0c157 100755 --- a/scripts/fetch +++ b/scripts/fetch @@ -6,6 +6,9 @@ build_dir="${BUILD_DIR?}" buildroot_dir="${build_dir}/buildroot" buildroot_repo="${BUILDROOT_REPO?}" buildroot_ref=${BUILDROOT_REF?} +heads_dir="${build_dir}/heads" +heads_repo="${HEADS_REPO?}" +heads_ref=${HEADS_REF?} [[ -f ~/.gitconfig ]] || \ printf "[color]\nui=auto\n[user]\nemail=build@local\nname=Build User" \ @@ -20,3 +23,6 @@ git -C "$buildroot_dir" checkout "$buildroot_ref" cd "$buildroot_dir" make "airgap_${TARGET}_defconfig" make source + +git clone "$heads_repo" "$heads_dir" +git -C "$heads_dir" checkout "$heads_ref" diff --git a/scripts/shell b/scripts/shell index 7864bca..c79e31c 100755 --- a/scripts/shell +++ b/scripts/shell @@ -1,3 +1,4 @@ #!/bin/bash --init-file [ -f /.dockerenv ] || { echo "please run in supplied container"; exit 1; } source environment +clear