Fallback mechanism/fallback.sh

From coreboot
Jump to navigation Jump to search

The wiki is being retired!

Documentation is now handled by the same processes we use for code: Add something to the Documentation/ directory in the coreboot repo, and it will be rendered to https://doc.coreboot.org/. Contributions welcome!

# In the cases where this work is copyrightable, it falls under the GPLv2
# or later license that is available here:
# https://www.gnu.org/licenses/gpl-2.0.txt

if [ $# -ne 0 ] ; then
	echo "Usage $0"
	exit 1

  echo "$1 Failed"
  exit 1

  grep "^CONFIG_CBFS_PREFIX=\"fallback\"$" .config > /dev/null || die "Not using normal cbfs prefix"
  grep "^CONFIG_UPDATE_IMAGE=y$" .config > /dev/null && die "You should not be using CONFIG_UPDATE_IMAGE"
  grep "^CONFIG_SKIP_MAX_REBOOT_CNT_CLEAR=y" .config > /dev/null || die "Not using CONFIG_SKIP_MAX_REBOOT_CNT_CLEAR"

rm -rf build
make oldconfig || die "make oldconfig"
make || die "make"

# Uncomment if you use GRUB and you need to add a grub.cfg
# ./util/cbfstool/cbfstool ./build/coreboot.rom add -f grub.cfg -n etc/grub.cfg -t raw
./util/cbfstool/cbfstool ./build/coreboot.rom print