summaryrefslogtreecommitdiff
path: root/script/update
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-07 00:57:55 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-07 01:23:11 +0100
commit62cc895c3c293011c256bb8c45cc4c07797cbf36 (patch)
tree59dbe281b5d6b8dd7c7ad848e715836744332989 /script/update
parent3c7e37b15d84cbdac6777c5cdb9f050af1c8b16b (diff)
rename blob/ to vendor/
in the future, we may start downloading files that aren't blobs, such as mxm port configs (on mainboards that use MXM graphics) this directory will contain all of those files generally change the language used, across lbmk, to make use of "vendorfile" instead of "blob" Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update')
-rwxr-xr-xscript/update/project/build2
-rwxr-xr-xscript/update/release/roms8
-rwxr-xr-xscript/update/vendor/download (renamed from script/update/blobs/download)10
-rwxr-xr-xscript/update/vendor/inject (renamed from script/update/blobs/inject)56
4 files changed, 39 insertions, 37 deletions
diff --git a/script/update/project/build b/script/update/project/build
index 69c11105..81343754 100755
--- a/script/update/project/build
+++ b/script/update/project/build
@@ -91,7 +91,7 @@ handle_targets()
printf "Running 'make %s' for project '%s, target '%s''\n" \
"${mode}" "${project}" "${target}"
[ "${project}" != "coreboot" ] || [ ! -z ${mode} ] || \
- x_ ./update blobs download ${target}
+ x_ ./update vendor download ${target}
x_ handle_defconfig
done
diff --git a/script/update/release/roms b/script/update/release/roms
index e4d5db4f..60622315 100755
--- a/script/update/release/roms
+++ b/script/update/release/roms
@@ -120,12 +120,12 @@ strip_archive()
done
fi
- # Hash the rom before removing blobs
- x_ rm -f "${romdir}/blobhashes"
- x_ touch "${romdir}/blobhashes"
+ # Hash the rom before removing vendor files
+ x_ rm -f "${romdir}/vendorhashes"
+ x_ touch "${romdir}/vendorhashes"
(
x_ cd "${romdir}"
- x_ sha512sum *.rom >> blobhashes
+ x_ sha512sum *.rom >> vendorhashes
)
for romfile in "${romdir}"/*.rom; do
[ -f "${romfile}" ] || continue
diff --git a/script/update/blobs/download b/script/update/vendor/download
index a1000423..21b0f7ed 100755
--- a/script/update/blobs/download
+++ b/script/update/vendor/download
@@ -5,7 +5,7 @@
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
. "include/err.sh"
-. "include/blobutil.sh"
+. "include/vendor.sh"
. "include/mrc.sh"
. "include/option.sh"
@@ -20,10 +20,10 @@ main()
check_defconfig "${boarddir}" || exit 0
detect_firmware && exit 0
- scan_config "${_b}" "config/blobs" "err"
+ scan_config "${_b}" "config/vendor" "err"
build_dependencies
- download_blobs
+ download_vendorfiles
}
detect_firmware()
@@ -35,7 +35,7 @@ detect_firmware()
CONFIG_VGA_BIOS_FILE CONFIG_INCLUDE_SMSC_SCH5545_EC_FW; do
eval "[ -z \"\${${c}}\" ] || return 1"
done
- printf "Blobs not needed for: %s\n" "${board}" 1>&2
+ printf "Vendor files not needed for: %s\n" "${board}" 1>&2
}
build_dependencies()
@@ -53,7 +53,7 @@ build_dependencies()
x_ ./build coreboot utils default
}
-download_blobs()
+download_vendorfiles()
{
[ -z "${CONFIG_HAVE_ME_BIN}" ] || \
fetch "intel_me" "${DL_url}" "${DL_url_bkup}" "${DL_hash}" \
diff --git a/script/update/blobs/inject b/script/update/vendor/inject
index d778fe78..eac4da37 100755
--- a/script/update/blobs/inject
+++ b/script/update/vendor/inject
@@ -5,7 +5,7 @@
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
. "include/err.sh"
-. "include/blobutil.sh"
+. "include/vendor.sh"
. "include/option.sh"
release_archive="n"
@@ -30,7 +30,7 @@ main()
check_board
build_dependencies
- inject_blobs
+ inject_vendorfiles
printf "Friendly reminder (this is *not* an error message):\n"
printf "Please always ensure that the files were inserted correctly.\n"
@@ -89,10 +89,10 @@ build_dependencies()
{
[ -d "${cbdir}" ] || x_ ./update project trees coreboot default
x_ ./build coreboot utils default
- x_ ./update blobs download ${board}
+ x_ ./update vendor download ${board}
}
-inject_blobs()
+inject_vendorfiles()
{
release_archive="n"
[ "${release}" != "true" ] && x_ patch_rom "${rom}" && return 0
@@ -124,7 +124,9 @@ patch_release_roms()
x_ cd "${_tmpdir}/bin/"*
# NOTE: For compatibility with older rom releases, defer to sha1
- sha512sum --status -c blobhashes || \
+ sha512sum --status -c vendorhashes || \
+ sha1sum --status -c vendorhashes || \
+ sha512sum --status -c blobhashes || \
sha1sum --status -c blobhashes || \
err "patch_release_roms: ROMs did not match expected hashes"
)
@@ -151,7 +153,7 @@ patch_rom()
# instead re-created at the end, after re-inserting
# on roms with microcode, by copying and then removing,
# so that the hashes will match (otherwise, cbfstool
- # may sometimes insert certain blobs at the wrong offset)
+ # may sometimes insert certain vendor files at the wrong offset)
# (unless nomicrocode is the only config provided)
[ "${rom}" != "${rom%_nomicrocode.rom}.rom" ] && \
[ -f "${rom%_nomicrocode.rom}.rom" ] && \
@@ -163,24 +165,24 @@ patch_rom()
. "${1}" 2>/dev/null
[ "$CONFIG_HAVE_MRC" = "y" ] && \
- inject_blob_intel_mrc "${rom}"
+ inject_vendorfile_intel_mrc "${rom}"
[ "${CONFIG_HAVE_ME_BIN}" = "y" ] && \
- inject_blob_intel_me "${rom}"
+ inject_vendorfile_intel_me "${rom}"
[ "${CONFIG_KBC1126_FIRMWARE}" = "y" ] && \
- inject_blob_hp_kbc1126_ec "${rom}"
+ inject_vendorfile_hp_kbc1126_ec "${rom}"
[ "${CONFIG_VGA_BIOS_FILE}" != "" ] && \
[ "${CONFIG_VGA_BIOS_ID}" != "" ] && \
- inject_blob_dell_e6400_vgarom_nvidia "${rom}"
+ inject_vendorfile_dell_e6400_vgarom_nvidia "${rom}"
[ "${CONFIG_INCLUDE_SMSC_SCH5545_EC_FW}" = "y" ] && \
[ "${CONFIG_SMSC_SCH5545_EC_FW_FILE}" != "" ] && \
- inject_blob_smsc_sch5545_ec "${rom}"
+ inject_vendorfile_smsc_sch5545_ec "${rom}"
[ "${modifygbe}" = "true" ] && ! [ "${release}" = "true" ] && \
modify_gbe "${rom}"
printf "ROM image successfully patched: %s\n" "${rom}"
}
-inject_blob_intel_mrc()
+inject_vendorfile_intel_mrc()
{
rom="${1}"
@@ -207,22 +209,22 @@ inject_blob_intel_mrc()
-t mrc -b 0xfffa0000
}
-inject_blob_intel_me()
+inject_vendorfile_intel_me()
{
printf "adding intel me firmware\n"
rom="${1}"
[ -z ${CONFIG_ME_BIN_PATH} ] && \
- err "inject_blob_intel_me: CONFIG_ME_BIN_PATH not set"
+ err "inject_vendorfile_intel_me: CONFIG_ME_BIN_PATH not set"
_me_location=${CONFIG_ME_BIN_PATH##*../}
[ ! -f "${_me_location}" ] && \
- err "inject_blob_intel_me: per CONFIG_ME_BIN_PATH: file missing"
+ err "inject_vendorfile_intel_me: per CONFIG_ME_BIN_PATH: file missing"
x_ "${ifdtool}" -i me:"${_me_location}" "${rom}" -O "${rom}"
}
-inject_blob_hp_kbc1126_ec()
+inject_vendorfile_hp_kbc1126_ec()
{
rom="${1}"
@@ -234,11 +236,11 @@ inject_blob_hp_kbc1126_ec()
printf "adding hp kbc1126 ec firmware\n"
if [ "${_ec1_offset}" = "" ] || [ "${_ec1_offset}" = "" ]; then
- err "inject_blob_hp_kbc1126_ec: ${board}: offset not declared"
+ err "inject_vendorfile_hp_kbc1126_ec: ${board}: offset not declared"
elif [ "${_ec1_location}" = "" ] || [ "${_ec2_location}" = "" ]; then
- err "inject_blob_hp_kbc1126_ec: ${board}: EC path not declared"
+ err "inject_vendorfile_hp_kbc1126_ec: ${board}: EC path not declared"
elif [ ! -f "${_ec1_location}" ] || [ ! -f "${_ec2_location}" ]; then
- err "inject_blob_hp_kbc1126_ec: ${board}: ecfw not downloaded"
+ err "inject_vendorfile_hp_kbc1126_ec: ${board}: ecfw not downloaded"
fi
x_ "${cbfstool}" "${rom}" add -f "${_ec1_location}" -n ecfw1.bin \
@@ -247,7 +249,7 @@ inject_blob_hp_kbc1126_ec()
-b ${_ec2_offset} -t raw
}
-inject_blob_dell_e6400_vgarom_nvidia()
+inject_vendorfile_dell_e6400_vgarom_nvidia()
{
rom="${1}"
@@ -258,20 +260,20 @@ inject_blob_dell_e6400_vgarom_nvidia()
printf "adding pci option rom\n"
[ "${_vga_dir}" = "${pciromsdir}" ] || \
- err "inject_blob_dell_e6400vga: invalid pcirom dir: ${_vga_dir}"
+ err "inject_vendorfile_dell_e6400vga: invalid pcirom dir: ${_vga_dir}"
[ -f "${_vga_location}" ] || \
- err "inject_blob_dell_e6400vga: ${_vga_location} doesn't exist"
+ err "inject_vendorfile_dell_e6400vga: ${_vga_location} doesn't exist"
x_ "${cbfstool}" "${rom}" add -f "${_vga_location}" \
-n "pci${CONFIG_VGA_BIOS_ID}.rom" -t optionrom
}
-inject_blob_smsc_sch5545_ec()
+inject_vendorfile_smsc_sch5545_ec()
{
rom="${1}"
_sch5545ec_location="${CONFIG_SMSC_SCH5545_EC_FW_FILE##*../}"
[ -f "${_sch5545ec_location}" ] || \
- err "inject_blob_smsc_sch5545_ec: SCH5545 fw missing"
+ err "inject_vendorfile_smsc_sch5545_ec: SCH5545 fw missing"
x_ "${cbfstool}" "${rom}" add -f "${_sch5545ec_location}" \
-n sch5545_ecfw.bin -t raw
@@ -301,13 +303,13 @@ modify_gbe()
usage()
{
cat <<- EOF
- USAGE: ./update blobs inject -r [rom path] -b [boardname] -m [macaddress]
- Example: ./update blobs inject -r x230_12mb.rom -b x230_12mb
+ USAGE: ./update vendor inject -r [rom path] -b [boardname] -m [macaddress]
+ Example: ./update vendor inject -r x230_12mb.rom -b x230_12mb
Adding a macadress to the gbe is optional.
If the [-m] parameter is left blank, the gbe will not be touched.
- Type './update blobs inject listboards' to get a list of valid boards
+ Type './update vendor inject listboards' to get a list of valid boards
EOF
}