Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[manually-flashing] merge with mrchromebox site #214

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions src/docs/firmware/manually-flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,32 @@ Flashing your own firmware has the potential to brick your device. Do not do thi
:::

1. Have your firmware rom. We will assume you already have the file you want to flash for this guide.
2. Download flashrom, then give it execute permission.
2. Download flashrom, cbfstool, and futility, decompress, and ensure they are executable:
- For most distributions: `cd; curl -LO https://files.tree123.org/utils/x86_64/gnu/flashrom; chmod +x flashrom`
- `curl -LO https://files.tree123.org/utils/x86_64/gnu/cbfstool; chmod +x cbfstool`
- `curl -LO https://files.tree123.org/utils/x86_64/gnu/futility; chmod +x futility`
- For musl (Alpine Linux): `cd; curl -LO https://files.tree123.org/utils/x86_64/musl/flashrom; chmod +x flashrom`
- `curl -LO https://files.tree123.org/utils/x86_64/musl/cbfstool; chmod +x cbfstool`
- `curl -LO https://files.tree123.org/utils/x86_64/musl/futility; chmod +x futility`

3. Flash your custom ROM
- Backup your current rom, just in case things go wrong: `./flashrom -p internal -r current.rom`
- Note: Intel Chromebooks should be flashed with `--ifd -i bios` ex: `sudo ./flashrom -p internal --ifd -i bios -w coreboot.rom`
- Flash your custom firmware: `sudo ./flashrom -p internal -w firmware.rom`
- Backup your current firmware (just in case things go wrong):
`sudo ./flashrom -p internal -r backup.rom`
- Extract your VPD from your backup:
`./cbfstool backup.rom read -r RO_VPD -f vpd.bin`
- Inject the VPD into your custom ROM:
`./cbfstool coreboot.rom write -r RO_VPD -f vpd.bin`
- Extract your HWID and inject it into the custom ROM (if it exists)
- if your current firmware came from the firmware utility script run
- `./cbfstool backup.rom extract -n hwid -f hwid.txt`
- if it is stock firmware then run
- `./futility gbbutility backup.rom --get --hwid > hwid.txt`
- `./cbfstool coreboot.rom add -n hwid -f hwid.txt`
- Flash your custom firmware:
- AMD devices: `sudo ./flashrom -p internal -w coreboot.rom`
- Intel devices: `sudo ./flashrom -p internal --ifd -i bios -w coreboot.rom`
4. Reboot
- Assuming it said `success` on all checks, reboot.
- Assuming flashrom shows `success` at the end of the process, reboot.

::: danger
Do not reboot if any of the checks failed.
Expand Down
Loading