From ab2a9c3709c64ec59e0a3750b0778652b00ab661 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 21 Jul 2024 07:39:47 +0100 Subject: include/rom.sh: use ccache when building coreboot ccache now required, in build dependencies Signed-off-by: Leah Rowe --- config/dependencies/arch | 2 +- config/dependencies/debian | 2 +- config/dependencies/fedora38 | 2 +- config/dependencies/fedora40 | 2 +- config/dependencies/parabola | 2 +- config/dependencies/trisquel | 2 +- config/dependencies/ubuntu2004 | 2 +- config/dependencies/ubuntu2404 | 2 +- config/dependencies/void | 2 +- include/rom.sh | 9 +++++++++ 10 files changed, 18 insertions(+), 9 deletions(-) diff --git a/config/dependencies/arch b/config/dependencies/arch index cfe69ac7..588f47b3 100644 --- a/config/dependencies/arch +++ b/config/dependencies/arch @@ -4,7 +4,7 @@ acpica arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-newlib \ autogen base-devel bison cmake curl device-mapper doxygen \ dtc e2fsprogs flex freetype2 fuse2 gawk gcc-ada gdb gettext git \ help2man innoextract libftdi libgpiod libjaylink libpciaccess libusb nasm \ -ncurses openssl p7zip \ +ncurses openssl p7zip ccache \ pandoc parted pciutils perl perl-libwww python python-setuptools rsync \ sharutils subversion swig texinfo ttf-dejavu unarchiver unzip wget xz zlib \ " diff --git a/config/dependencies/debian b/config/dependencies/debian index 33902f19..3375064f 100755 --- a/config/dependencies/debian +++ b/config/dependencies/debian @@ -11,5 +11,5 @@ libsdl2-dev libselinux1-dev libssl-dev libtool libusb-1.0 libusb-1.0-0-dev \ libusb-dev lz4 lzma lzma-alone m4 nasm openssl p7zip p7zip-full parted pciutils \ perl pkg-config python3 python3-distutils python3-pkg-resources python3-pycryptodome \ python3-pyelftools python3-setuptools python-is-python3 sharutils swig unar \ -unifont unifont-bin unzip uuid-dev wget xfonts-unifont zlib1g-dev \ +unifont unifont-bin unzip uuid-dev wget xfonts-unifont zlib1g-dev ccache \ " diff --git a/config/dependencies/fedora38 b/config/dependencies/fedora38 index 1b9affe3..5575a5f0 100755 --- a/config/dependencies/fedora38 +++ b/config/dependencies/fedora38 @@ -8,5 +8,5 @@ innoextract intltool libftdi-devel libselinux-devel libusb1 libusb1-devel \ nasm ncurses-devel openssl-devel p7zip p7zip-plugins pandoc parted \ pciutils-devel perl perl-libwww-perl python-unversioned-command python3 \ python3-setuptools rsync sharutils subversion texinfo unar unifont \ -unifont-fonts unifont-ttf-fonts unzip wget xz zlib-devel \ +unifont-fonts unifont-ttf-fonts unzip wget xz zlib-devel ccache \ " diff --git a/config/dependencies/fedora40 b/config/dependencies/fedora40 index aeedd755..f39de483 100755 --- a/config/dependencies/fedora40 +++ b/config/dependencies/fedora40 @@ -9,5 +9,5 @@ libselinux-devel libusb1 libusb1-devel nasm ncurses-devel openssl-devel \ p7zip p7zip-plugins pandoc parted pciutils-devel perl perl-libwww-perl \ python-unversioned-command python3 python3-setuptools rsync sharutils \ subversion systemd-devel texinfo unar unifont unifont-fonts \ -unifont-ttf-fonts unzip wget xz zlib-devel +unifont-ttf-fonts unzip wget xz zlib-devel ccache " diff --git a/config/dependencies/parabola b/config/dependencies/parabola index 27dd59c4..50462afe 100644 --- a/config/dependencies/parabola +++ b/config/dependencies/parabola @@ -7,5 +7,5 @@ help2man innoextract libftdi libgpiod libjaylink libpciaccess libusb nasm \ ncurses openssl p7zip \ pandoc parted pciutils perl perl-libwww python python-setuptools rsync \ sharutils subversion swig texinfo ttf-dejavu unarchiver unifont-utils unzip \ -wget xz zlib \ +wget xz zlib ccache \ " diff --git a/config/dependencies/trisquel b/config/dependencies/trisquel index 1ae9a80b..c8e40b43 100755 --- a/config/dependencies/trisquel +++ b/config/dependencies/trisquel @@ -5,7 +5,7 @@ bison build-essential cmake curl device-tree-compiler doxygen e2fsprogs efitools flex gawk gcc-arm-linux-gnueabi gcc-arm-none-eabi gdb gettext git gnat help2man \ innoextract libdevmapper-dev libfdt-dev libfont-freetype-perl libfreetype6-dev \ libftdi-dev libfuse-dev libgnutls28-dev libgpiod-dev libjaylink-dev liblz4-tool \ -liblzma-dev libncurses5-dev \ +liblzma-dev libncurses5-dev ccache \ libncurses-dev libnewlib-arm-none-eabi libopts25 libopts25-dev libpci-dev \ libpython3-dev libsdl2-dev libselinux1-dev libssl-dev libtool libusb-1.0-0 \ libusb-1.0-0-dev lz4 lzma lzma-alone m4 nasm openssl p7zip p7zip-full parted \ diff --git a/config/dependencies/ubuntu2004 b/config/dependencies/ubuntu2004 index 02661ca5..e4b3ef10 100755 --- a/config/dependencies/ubuntu2004 +++ b/config/dependencies/ubuntu2004 @@ -10,5 +10,5 @@ libpython3-dev libsdl2-dev libselinux1-dev libssl-dev libtool libusb-1.0-0 \ libusb-1.0-0-dev lz4 lzma lzma-alone m4 nasm openssl p7zip p7zip-full parted \ pciutils perl pkg-config python3 python3-distutils python3-pkg-resources \ python3-pycryptodome python3-pyelftools python3-setuptools python-is-python3 \ -sharutils swig ttf-unifont unar unifont unzip uuid-dev wget zlib1g-dev \ +sharutils swig ttf-unifont unar unifont unzip uuid-dev wget zlib1g-dev ccache \ " diff --git a/config/dependencies/ubuntu2404 b/config/dependencies/ubuntu2404 index 7f91ed05..01e15521 100755 --- a/config/dependencies/ubuntu2404 +++ b/config/dependencies/ubuntu2404 @@ -10,5 +10,5 @@ libpython3-dev libsdl2-dev libselinux1-dev libssl-dev libtool libusb-1.0-0 \ libusb-1.0-0-dev lz4 lzma lzma-alone m4 nasm openssl p7zip p7zip-full parted \ pciutils perl pkg-config python3 python3-pkg-resources python3-pycryptodome \ python3-pyelftools python3-setuptools python-is-python3 sharutils swig \ -fonts-unifont unar unifont unzip uuid-dev wget zlib1g-dev \ +fonts-unifont unar unifont unzip uuid-dev wget zlib1g-dev ccache \ " diff --git a/config/dependencies/void b/config/dependencies/void index 0ab258c2..79a12328 100644 --- a/config/dependencies/void +++ b/config/dependencies/void @@ -8,5 +8,5 @@ freetype freetype-devel fuse gawk gcc-ada gdb gettext gettext-devel git \ help2man innoextract libftdi1 libpciaccess libusb nasm ncurses \ ncurses-devel openssl openssl-devel p7zip parted pciutils perl perl-LWP \ python python3 python3-setuptools rsync sharutils subversion texinfo \ -unar unzip wget xz zlib +unar unzip wget xz zlib ccache " diff --git a/include/rom.sh b/include/rom.sh index c0e5f8c5..4907cfab 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -23,11 +23,20 @@ mkpayload_grub() mkvendorfiles() { + [ -z "$mode" ] && $dry cook_coreboot_config check_cbfstool "$tree"; printf "69\n" > "$srcdir/.coreboot-version" \ || $err "!cbver $srcdir"; [ -z "$mode" ] && \ [ "$target" != "$tree" ] && x_ ./vendor download $target; return 0 } +cook_coreboot_config() +{ + [ -f "$srcdir/.config" ] || return 0 + printf "CONFIG_CCACHE=y\n" >> "$srcdir/.config" || \ + $err "$srcdir/.config: Could not enable ccache" + make -C "$srcdir" oldconfig || $err "Could not cook $srcdir/.config"; : +} + check_cbfstool() { [ "$badhash" = "n" ] || rm -f "elf/cbfstool/$1/cbfstool" || \ -- cgit v1.2.1