mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-19 21:20:31 +02:00
Compare commits
12 Commits
bb4c038794
...
04c3bc53b6
| Author | SHA1 | Date | |
|---|---|---|---|
| 04c3bc53b6 | |||
| d722a02cda | |||
| 6fe1d47fb3 | |||
| 005f1189c1 | |||
| 86781a5881 | |||
| 61ab5723df | |||
| 6050cdd1db | |||
| 8c927b535d | |||
| 5f0bd5ea10 | |||
| 8822c56815 | |||
| bb0221252c | |||
| 1ceeb0ab55 |
@@ -0,0 +1,19 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
. "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"
|
||||||
|
|
||||||
|
xbcommands=" \
|
||||||
|
version \
|
||||||
|
release \
|
||||||
|
download \
|
||||||
|
inject \
|
||||||
|
prep_mr_import \
|
||||||
|
"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2020-2021,2023-2026 Leah Rowe <leah@libreboot.org>
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
|
|
||||||
url=""
|
url=""
|
||||||
|
|||||||
+18
-4
@@ -2,12 +2,26 @@
|
|||||||
|
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
||||||
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2020-2026 Leah Rowe <leah@libreboot.org>
|
||||||
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||||
|
|
||||||
export LANG=C.UTF-8
|
utf_8="C.UTF-8"
|
||||||
export LC_COLLATE=C.UTF-8
|
|
||||||
export LC_ALL=C.UTF-8
|
export LANG="$utf_8"
|
||||||
|
export LANGUAGE="$utf_8"
|
||||||
|
export LC_CTYPE="$utf_8"
|
||||||
|
export LC_NUMERIC="$utf_8"
|
||||||
|
export LC_TIME="$utf_8"
|
||||||
|
export LC_COLLATE="$utf_8"
|
||||||
|
export LC_MONETARY="$utf_8"
|
||||||
|
export LC_MESSAGES="$utf_8"
|
||||||
|
export LC_PAPER="$utf_8"
|
||||||
|
export LC_NAME="$utf_8"
|
||||||
|
export LC_ADDRESS="$utf_8"
|
||||||
|
export LC_TELEPHONE="$utf_8"
|
||||||
|
export LC_MEASUREMENT="$utf_8"
|
||||||
|
export LC_IDENTIFICATION="$utf_8"
|
||||||
|
export LC_ALL="$utf_8"
|
||||||
|
|
||||||
projectname="libreboot"
|
projectname="libreboot"
|
||||||
projectsite="https://libreboot.org/"
|
projectsite="https://libreboot.org/"
|
||||||
|
|||||||
+3
-2
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
||||||
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2023-2026 Leah Rowe <leah@libreboot.org>
|
||||||
|
|
||||||
cbcfgsdir="config/coreboot"
|
cbcfgsdir="config/coreboot"
|
||||||
tmpromdel="$XBMK_CACHE/DO_NOT_FLASH"
|
tmpromdel="$XBMK_CACHE/DO_NOT_FLASH"
|
||||||
@@ -27,7 +27,8 @@ tmpromdir=""
|
|||||||
tree=""
|
tree=""
|
||||||
xchanged=""
|
xchanged=""
|
||||||
|
|
||||||
eval "`setvars "" $checkvars`"
|
eval "`printf "%s\n" "$checkvars" | \
|
||||||
|
awk '{ for (i=1; i<=NF; i++) $i = $i "=;"; print }'`"
|
||||||
|
|
||||||
inject()
|
inject()
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-18
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
||||||
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2020-2026 Leah Rowe <leah@libreboot.org>
|
||||||
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||||
|
|
||||||
cbfstool="elf/coreboot/default/cbfstool"
|
cbfstool="elf/coreboot/default/cbfstool"
|
||||||
@@ -85,23 +85,6 @@ e()
|
|||||||
printf "%s %s\n" "$1" "$es2" 1>&2
|
printf "%s %s\n" "$1" "$es2" 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
setvars()
|
|
||||||
{
|
|
||||||
_setvars=""
|
|
||||||
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
val="$1"
|
|
||||||
shift 1
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
printf "%s=\"%s\"\n" "$1" "$val"
|
|
||||||
shift 1
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# return 0 if project is single-tree, otherwise 1
|
# return 0 if project is single-tree, otherwise 1
|
||||||
# e.g. coreboot is multi-tree, so 1
|
# e.g. coreboot is multi-tree, so 1
|
||||||
singletree()
|
singletree()
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
||||||
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2023-2026 Leah Rowe <leah@libreboot.org>
|
||||||
|
|
||||||
# These are variables and functions, extending the functionality of
|
# These are variables and functions, extending the functionality of
|
||||||
# inject.sh, to be used with lbmk; they are kept separate here, so that
|
# inject.sh, to be used with lbmk; they are kept separate here, so that
|
||||||
|
|||||||
@@ -1,58 +1,32 @@
|
|||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2020-2026 Leah Rowe <leah@libreboot.org>
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
|
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
xrval=0
|
|
||||||
|
|
||||||
(
|
(
|
||||||
xbarg0="$0"
|
xbarg0="$0"
|
||||||
if [ "${xbarg0##*/}" = "$xbarg0" ]; then
|
[ "${xbarg0##*/}" = "$xbarg0" ] && \
|
||||||
xbarg0="`command -v "$xbarg0"`"
|
xbarg0="`command -v "$xbarg0"`"
|
||||||
|
|
||||||
|
commandv="`readlink -f "$xbarg0" 2>/dev/null`"
|
||||||
|
[ -z "$commandv" ] && \
|
||||||
|
commandv="`realpath "$xbarg0" 2>/dev/null`"
|
||||||
|
|
||||||
|
cd "${commandv%/*}" || exit 1
|
||||||
|
|
||||||
|
. "include/common.sh"
|
||||||
|
|
||||||
|
if xeq main "${1-}" \
|
||||||
|
$xbcommands; then
|
||||||
|
|
||||||
|
"$@" || exit 1
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
xbcddir="`readlink -f "$xbarg0" 2>/dev/null`"
|
|
||||||
if [ -z "$xbcddir" ]; then
|
|
||||||
xbcddir="`realpath "$xbarg0" 2>/dev/null`"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "${xbcddir%/*}" || exit 1
|
|
||||||
|
|
||||||
. "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
|
|
||||||
|
|
||||||
if ! xeq main "$cmd" \
|
|
||||||
version release download inject prep_mr_import; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
$cmd "$@"
|
|
||||||
set -u -e
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@" || exit 0
|
|
||||||
|
|
||||||
. "include/tree.sh"
|
. "include/tree.sh"
|
||||||
|
|
||||||
trees "$@" || exit 0
|
trees "$@" || exit 0
|
||||||
@@ -61,6 +35,4 @@ x_ touch "$mkhelpercfg"
|
|||||||
|
|
||||||
. "$mkhelpercfg"
|
. "$mkhelpercfg"
|
||||||
$cmd
|
$cmd
|
||||||
) || xrval=1
|
) || exit 1; :
|
||||||
|
|
||||||
exit $xrval
|
|
||||||
|
|||||||
Reference in New Issue
Block a user