summaryrefslogtreecommitdiff
path: root/script/build/grub/utils
blob: edb78bb1553fb46c301e7d6d13deb318365db209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env sh
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2014, 2015, 2020, 2023 Leah Rowe <leah@libreboot.org>
# SPDX-FileCopyrightText: 2015, 2016 Klemens Nanni <contact@autoboot.org>

[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e

. "include/err.sh"

main()
{
	[ -d "grub/" ] || x_ ./update project repo grub
	build_grub
}

build_grub()
{
	(
	x_ cd grub/
	[ ! -d Makefile ] || x_ make distclean
	x_ ./bootstrap --gnulib-srcdir=gnulib/ --no-git
	x_ ./autogen.sh
	x_ ./configure --with-platform=coreboot
	x_ make -j$(nproc) FS_PAYLOAD_MODULES=""
	)
}

main $@