Created
November 21, 2018 00:41
-
-
Save paulburton/36e9858a90a6391b50c782ada9ebe741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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