mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-16 13:16:47 +02:00
update/blobs/*: unify checking of defconfig files
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright (c) 2023 Leah Rowe <leah@libreboot.org>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
check_defconfig()
|
||||||
|
{
|
||||||
|
no_config="printf \"No target defconfig in %s\\n\" ${1} 1>&2; return 1"
|
||||||
|
for x in "${1}"/config/*; do
|
||||||
|
[ -f "${x}" ] && no_config=""
|
||||||
|
done
|
||||||
|
eval "${no_config}"
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-only
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
. "include/err.sh"
|
. "include/err.sh"
|
||||||
|
. "include/defconfig.sh"
|
||||||
|
|
||||||
agent="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
|
agent="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
|
||||||
|
|
||||||
@@ -56,12 +57,7 @@ main()
|
|||||||
board="${1}"
|
board="${1}"
|
||||||
boarddir="${cbcfgsdir}/${board}"
|
boarddir="${cbcfgsdir}/${board}"
|
||||||
|
|
||||||
no_config="printf \"No config for target, %s\\n\" ${board} 1>&2; exit 0"
|
check_defconfig "${boarddir}" || exit 0
|
||||||
for x in "${boarddir}"/config/*; do
|
|
||||||
[ -f "${x}" ] && no_config=""
|
|
||||||
done
|
|
||||||
eval "${no_config}"
|
|
||||||
|
|
||||||
detect_firmware || exit 0
|
detect_firmware || exit 0
|
||||||
scan_sources_config
|
scan_sources_config
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-only
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
. "include/err.sh"
|
. "include/err.sh"
|
||||||
|
. "include/defconfig.sh"
|
||||||
|
|
||||||
sname=""
|
sname=""
|
||||||
board=""
|
board=""
|
||||||
@@ -61,11 +62,7 @@ extract_blobs()
|
|||||||
{
|
{
|
||||||
printf "extracting blobs for %s from %s\n" ${board} ${vendor_rom}
|
printf "extracting blobs for %s from %s\n" ${board} ${vendor_rom}
|
||||||
|
|
||||||
no_config="printf \"No configs on target, %s\\n\" ${board} 1>&2; exit 1"
|
check_defconfig "${boarddir}" || exit 1
|
||||||
for x in "${boarddir}"/config/*; do
|
|
||||||
[ -f "${x}" ] && no_config=""
|
|
||||||
done
|
|
||||||
eval "${no_config}"
|
|
||||||
set -- "${boarddir}/config/"*
|
set -- "${boarddir}/config/"*
|
||||||
. "${1}" 2>/dev/null
|
. "${1}" 2>/dev/null
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-only
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
. "include/err.sh"
|
. "include/err.sh"
|
||||||
|
. "include/defconfig.sh"
|
||||||
|
|
||||||
sname=""
|
sname=""
|
||||||
archive=""
|
archive=""
|
||||||
@@ -179,12 +180,7 @@ patch_rom()
|
|||||||
{
|
{
|
||||||
rom="${1}"
|
rom="${1}"
|
||||||
|
|
||||||
no_config="printf \"No configs on target, %s\\n\" ${board} 1>&2; exit 1"
|
check_defconfig "${boarddir}" || exit 1
|
||||||
for x in "${boarddir}"/config/*; do
|
|
||||||
[ -f "${x}" ] && no_config=""
|
|
||||||
done
|
|
||||||
eval "${no_config}"
|
|
||||||
|
|
||||||
set -- "${boarddir}/config/"*
|
set -- "${boarddir}/config/"*
|
||||||
. "${1}" 2>/dev/null
|
. "${1}" 2>/dev/null
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user