From 1c2de7f962115a96668aa1f66b1cc1fee3be6922 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 6 Oct 2023 01:34:14 +0100 Subject: [PATCH] unify build/grub/* to build/coreboot/grub Signed-off-by: Leah Rowe --- handle | 1 - lbmk | 4 +-- script/build/boot/roms | 2 +- script/build/{grub/payload => coreboot/grub} | 14 +++++++++- script/build/grub/utils | 29 -------------------- 5 files changed, 16 insertions(+), 34 deletions(-) delete mode 120000 handle rename script/build/{grub/payload => coreboot/grub} (88%) delete mode 100755 script/build/grub/utils diff --git a/handle b/handle deleted file mode 120000 index 012b4ec0..00000000 --- a/handle +++ /dev/null @@ -1 +0,0 @@ -lbmk \ No newline at end of file diff --git a/lbmk b/lbmk index b2e97b00..2fe1bbd2 100755 --- a/lbmk +++ b/lbmk @@ -96,8 +96,8 @@ usage() For each of the above modes, you may also do: ${progname} list - Example: ./build grub list, which would yield: - $(./build grub list) + Example: ./build coreboot list, which would yield: + $(./build coreboot list) Refer to ${project} documentation for more info. EOF diff --git a/script/build/boot/roms b/script/build/boot/roms index 9736ee7f..e111fdb0 100755 --- a/script/build/boot/roms +++ b/script/build/boot/roms @@ -166,7 +166,7 @@ build_dependency_grub() rebuild_grub="y" && break done [ "${rebuild_grub}" = "y" ] || return 0 - x_ ./build grub payload + x_ ./build coreboot grub } build_dependency_uboot() diff --git a/script/build/grub/payload b/script/build/coreboot/grub similarity index 88% rename from script/build/grub/payload rename to script/build/coreboot/grub index 03549ef6..7f448e24 100755 --- a/script/build/grub/payload +++ b/script/build/coreboot/grub @@ -22,11 +22,23 @@ main() handle_dependencies() { [ -d "grub/" ] || x_ ./update project repo grub - [ -f "grub/grub-mkstandalone" ] || x_ ./build grub utils + [ -f "grub/grub-mkstandalone" ] || build_grub_utils [ -d "${elfdir}" ] || x_ mkdir -p "${elfdir}" x_ rm -f "${elfdir}/"* } +build_grub_utils() +{ + ( + 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="" + ) +} + build_keymap_configs() { for keylayoutfile in "${grubcfgsdir}/keymap/"*.gkb; do diff --git a/script/build/grub/utils b/script/build/grub/utils deleted file mode 100755 index edb78bb1..00000000 --- a/script/build/grub/utils +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env sh -# SPDX-License-Identifier: GPL-3.0-or-later -# SPDX-FileCopyrightText: 2014, 2015, 2020, 2023 Leah Rowe -# SPDX-FileCopyrightText: 2015, 2016 Klemens Nanni - -[ "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 $@