--- /dev/null
+#!/usr/bin/env bash
+
+export LC_ALL=C
+
+mkdir -p "$HOME/.ccache"
+
+grep -sq max_size "$HOME/.ccache/ccache.conf" || \
+ echo "max_size = 10.0G" >> "$HOME/.ccache/ccache.conf"
+
+grep -sq compiler_check "$HOME/.ccache/ccache.conf" || \
+ echo "compiler_check = %compiler% -dumpmachine; %compiler% -dumpversion" >> "$HOME/.ccache/ccache.conf"
+
+for dir in $(make --no-print-directory val.TOOLCHAIN_DIR val.STAGING_DIR val.STAGING_DIR_HOST V=s | grep staging_dir/); do
+ mkdir -p "$dir"
+ test -L "$dir/ccache" || rm -rf "$dir/ccache"
+ ln -s "$HOME/.ccache" "$dir/ccache"
+done
+
+./staging_dir/host/bin/ccache -s 2>/dev/null
+
+exit 0
command=["./scripts/feeds", "install", "-a"],
env = MakeEnv()))
+ # ccache helper
+ factory.addStep(FileDownload(
+ mastersrc = "ccache.sh",
+ slavedest = "ccache.sh",
+ mode = 0755
+ ))
+
+ # ccache prepare
+ factory.addStep(ShellCommand(
+ name = "prepccache",
+ description = "Preparing ccache",
+ command = ["./ccache.sh"]
+ ))
+
# seed config
factory.addStep(FileDownload(
mastersrc = "config.seed",
workdir = "build/sdk",
command = ["sh", "-c", "rm -f .config && make defconfig"]))
+ factory.addStep(FileDownload(
+ mastersrc = home_dir+'/ccache.sh',
+ slavedest = 'sdk/ccache.sh',
+ mode = 0755))
+
+ factory.addStep(ShellCommand(
+ name = "prepccache",
+ description = "Preparing ccache",
+ workdir = "build/sdk",
+ command = ["./ccache.sh"]))
+
factory.addStep(ShellCommand(
name = "updatefeeds",
description = "Updating feeds",