summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/build/fw/coreboot8
-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
5 files changed, 43 insertions, 41 deletions
diff --git a/script/build/fw/coreboot b/script/build/fw/coreboot
index d7f67ad5..1f5bd7f1 100755
--- a/script/build/fw/coreboot
+++ b/script/build/fw/coreboot
@@ -25,7 +25,7 @@ kmapdir="config/grub/keymap"
pv="payload_grub payload_grub_withseabios payload_seabios payload_memtest"
pv="${pv} payload_seabios_withgrub payload_uboot memtest_bin"
v="romdir cbdir cbfstool cbrom initmode displaymode cbcfg targetdir tree arch"
-v="${v} grub_timeout ubdir blobs_required board grub_scan_disk uboot_config"
+v="${v} grub_timeout ubdir vendorfiles board grub_scan_disk uboot_config"
eval "$(setvars "n" ${pv})"
eval "$(setvars "" ${v})"
eval "$(setvars "" boards _displaymode _payload _keyboard all targets)"
@@ -108,8 +108,8 @@ check_target()
payload_uboot="n"
[ "${payload_uboot}" = "y" ] && [ -z ${uboot_config} ] && \
uboot_config="default"
- [ "${blobs_required}" != "n" ] && [ "${blobs_required}" != "y" ] && \
- blobs_required="y"
+ [ "${vendorfiles}" != "n" ] && [ "${vendorfiles}" != "y" ] && \
+ vendorfiles="y"
# Override all payload directives with cmdline args
[ -z ${_payload} ] && return 0
@@ -384,7 +384,7 @@ moverom() {
printf "Creating target image: %s\n" "${newrom}"
[ -d "${newrom%/*}" ] || x_ mkdir -p "${newrom%/*}/"
- [ "${blobs_required}" = "n" ] && newrom="${newrom%.rom}_noblobs.rom"
+ [ "${vendorfiles}" = "n" ] && newrom="${newrom%.rom}_noblobs.rom"
x_ cp "${rompath}" "${newrom}"
}
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
}