commit 96ec754b84191d0862b8513185bbd73e0de85ea4 Author: Scott Duensing Date: Fri May 2 12:23:51 2025 -0500 Initial commit. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c0434d --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*~ +*.rom +vpd.bin +hwid.txt +cbfstool* +gbb_utility* +sources.sh + diff --git a/flash-uefi.sh b/flash-uefi.sh new file mode 100644 index 0000000..5d0a222 --- /dev/null +++ b/flash-uefi.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# From: https://docs.mrchromebox.tech/docs/support/unbricking/unbrick-ch341a.html + +sudo apt-get -y install flashrom + +wget https://raw.githubusercontent.com/MrChromebox/scripts/refs/heads/main/sources.sh # Look in here for available boards. +source ./sources.sh + +wget "${util_source}cbfstool.tar.gz" && tar -zxf cbfstool.tar.gz && chmod +x cbfstool +wget "${util_source}gbb_utility.tar.gz" && tar -zxf gbb_utility.tar.gz && chmod +x gbb_utility +wget "${fullrom_source}${coreboot_uefi_reks}" # "reks" is the board name for the model Chromebook you have. + +sudo flashrom -p ch341a_spi -r original.rom +./cbfstool original.rom read -r RO_VPD -f vpd.bin +./gbb_utility original.rom --get --hwid | sed 's/^hardware_id: //' > hwid.txt + +./cbfstool "${coreboot_uefi_reks}" write -r RO_VPD -f vpd.bin +./cbfstool "${coreboot_uefi_reks}" add -n hwid -f hwid.txt -t raw + +sudo flashrom -p ch341a_spi -w "${coreboot_uefi_reks}" --ifd -i bios