Files
lbmk/mk
Leah Rowe d7869a56f5 WIP: chromebook integration script
I intend to merge every Chromebook that Mrchromebox supports,
into Libreboot, ready for the Libreboot 25.12 release. Work
is still ongoing, and several changes need to happen in lbmk.

I started working on it a few weeks ago (today is
14 November 2025 as I push this).

Still TODO:

* Automatically create lbmk coreboot targets, based
  on the configs present in MrChromebox git
* Re-work git repository management in lbmk, such that
  a list of upstreams is used, instead of a hardcoded
  list per configuration; this will allow us to use
  different remotes across the same project, even where
  they diverge. This would then allow us to use the
  MrChromebook repository directly, instead of cherry-picking
  patches into upstream coreboot
* The note above about remotes would also mean that we can
  use MrChromebox's own edk2 repository directly. All of this
  would reduce the burden on lbmk.git
* Support building edk2 payloads, exactly mirroring the
  setups used on MrChromebox builds

There are some things that need to be checked first, for
boards that use MMC-based or eMMC-based storage, for the
GRUB and SeaBIOS payloads, also U-Boot, because I will
also be using these.

As such, this current script shall sit in lbmk master, but
it is not yet finished.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-11-14 18:22:51 +00:00

73 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env sh
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
set -u -e
ispwd="true"
if [ "$0" != "./mk" ]; then
ispwd="false"
fi
if [ "$ispwd" = "true" ] && [ -L "mk" ]; then
ispwd="false"
fi
if [ "$ispwd" = "false" ]; then
printf "You must run this in the proper work directory.\n" 1>&2
exit 1
fi
. "include/lib.sh"
. "include/init.sh"
. "include/vendor.sh"
. "include/mrc.sh"
. "include/inject.sh"
. "include/rom.sh"
. "include/release.sh"
. "include/get.sh"
. "include/chromebook.sh"
main()
{
cmd=""
if [ $# -gt 0 ]; then
cmd="$1"
shift 1
fi
case "$cmd" in
version)
printf "%s\nWebsite: %s\n" "$relname" "$projectsite"
;;
release|download|inject|prep_mr_import)
$cmd "$@"
;;
-*)
return 0
;;
*)
err "bad command" main "$@"
;;
esac
# some commands disable them. turn them back on!
set -u -e
return 1
}
main "$@" || exit 0
. "include/tree.sh"
trees "$@" || exit 0
x_ touch "$mkhelpercfg"
. "$mkhelpercfg"
$cmd