Skip to content

Instantly share code, notes, and snippets.

@paulburton
Created November 21, 2018 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulburton/36e9858a90a6391b50c782ada9ebe741 to your computer and use it in GitHub Desktop.
Save paulburton/36e9858a90a6391b50c782ada9ebe741 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu +o pipefail
tmp="$(mktemp)"
cp .config "${tmp}"
cleanup() {
trap - EXIT
cp "${tmp}" .config
rm "${tmp}"
}
trap cleanup EXIT
for cfg in arch/mips/configs/*_defconfig; do
target="$(basename ${cfg})"
echo "${target}"
git checkout "${cfg}"
if [ "${target}" == "generic_defconfig" ]; then
git checkout arch/mips/configs/generic
make ARCH=mips CROSS_COMPILE=mips-linux- BOARDS= 32r1el_defconfig
else
make ARCH=mips CROSS_COMPILE=mips-linux- "${target}"
fi
cp .config .config-pre
make ARCH=mips CROSS_COMPILE=mips-linux- savedefconfig
mv defconfig "${cfg}"
if [ "${target}" == "generic_defconfig" ]; then
make ARCH=mips CROSS_COMPILE=mips-linux- BOARDS= 32r1el_defconfig
else
make ARCH=mips CROSS_COMPILE=mips-linux- "${target}"
fi
cmp .config-pre .config
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment