Last active
August 28, 2025 19:58
-
-
Save timmypidashev/c07681c4354236d60d30854ac07793fa to your computer and use it in GitHub Desktop.
Flashes a custom rom image for chromebox firmware on chrome devices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# Colors | |
C='\033[0;36m' # Cyan | |
Y='\033[1;33m' # Yellow | |
R='\033[0;31m' # Red | |
NC='\033[0m' # No Color | |
# Downloading flashrom | |
echo "${C}Downloading flashrom...${NC}" | |
wget -O flashrom.tar.gz https://mrchromebox.tech/files/util/flashrom_ups_libpci37_20240418.tar.gz && tar -zxf flashrom.tar.gz && chmod +x flashrom | |
# Downloading cbfstool | |
echo "${C}Downloading cbfstool...${NC}" | |
wget https://mrchromebox.tech/files/util/cbfstool.tar.gz && tar -zxf cbfstool.tar.gz && chmod +x cbfstool | |
# Downloading gbb utility | |
echo "${C}Downloading gbb utility...${NC}" | |
wget https://mrchromebox.tech/files/util/gbb_utility.tar.gz && tar -zxf gbb_utility.tar.gz && chmod +x gbb_utility | |
# Backing up current firmware | |
echo "${Y}Backing up current firmware...${NC}" | |
sudo ./flashrom -p internal -r backup.rom | |
# Extracting VPD from backup | |
echo "${Y}Extracting VPD from backup...${NC}" | |
./cbfstool backup.rom read -r RO_VPD -f vpd.bin | |
# Injecting VPD into coreboot | |
echo "${Y}Injecting VPD into coreboot.rom...${NC}" | |
./cbfstool coreboot.rom write -r RO_VPD -f vpd.bin | |
# Extracting and injecting HWID | |
echo "${Y}Extracting HWID...${NC}" | |
./gbb_utility backup.rom --get --hwid > hwid.txt | |
./cbfstool coreboot.rom add -n hwid -f hwid.txt -t raw | |
# Flashing firmware | |
echo "${R}Flashing firmware - DO NOT POWER OFF!${NC}" | |
sudo ./flashrom -p internal --ifd -i bios -w coreboot.rom -N |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment