hexdump0815 / linux-mainline-on-arm-chromebooks

running linux mainline on arm chromebooks - for example: samsung xe303c12 and xe503c12 (snow and peach), acer c100, c101 and c201 (veyron speedy, minnie etc. and gru bob and kevin), medion s2013 and s2015 (veyron jaq, mighty etc.), acer cb5 311 (nyan big), lenovo n23, acer r13 (oak elm and hana), lenovo duet (kukui krane) and most probably many many more over time ...
144 stars 10 forks source link

chromebook_veyron: problem: Jerry unable to set gbb flags #19

Open unixabg opened 9 months ago

unixabg commented 9 months ago

Greetings,

I am starting work on upcycling some eduGear K4 (RK11K416) units . I am editing the original post in an effort to offer more complete notes.

Put unit in developer mode

Next remove write protect screw

Boot unit

On first boot

Let's Go, connect to wifi Accept and continue on Terms of Service Unit checks for updaates Select Browse as Guest Upon login it notifies me that Final software update

Attempt to disable write protect at desktop

ctrl+alt+t shell sudo -i

localhost ~ # flashrom --wp-status
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
mtd_wp_status: ioctl: Operation not supported

localhost ~ # flashrom -p ec --wp-status
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
WP: status: 0x80
WP: status.srp0: 1
WP: write protect is enabled.
WP: write protect range: start=0x00000000, len=0x00000000

localhost ~ # flashrom -p ec --wp-disable
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
SUCCESS
localhost ~ # ectool flashprotect
Flash protect flags: 0x00000000
Valid flags:         0x0000007f wp_gpio_asserted ro_at_boot all_at_boot ro_now all_now STUCK INCONSISTENT
Writable flags:      0x00000001 ro_at_boot

Looks good so far

Double check status

localhost ~ # flashrom -p ec --wp-status
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
WP: status: 0x00
WP: status.srp0: 0
WP: write protect is disabled.
WP: write protect range: start=0x00000000, len=0x00000000

Make backup

localhost ~ # cd /tmp
localhost /tmp # flashrom -r bios.bin
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
Reading flash... SUCCESS

Get gbb flags

localhost /tmp # /usr/share/vboot/bin/get_gbb_flags.sh 
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
read_from_file failed to read 1048576 bytes
No fmap entries found in /tmp/tmp.jByqB6qMqt
Reading flash... SUCCESS
Chrome OS GBB set flags: 0x00000000

Get hwid

localhost /tmp # gbb_utility --get --hwid bios.bin
hardware_id: JERRY E25-W32-B84-D4A-A6R

Set gbb flags (failing)

localhost /tmp # /usr/share/vboot/bin/set_gbb_flags.sh 0x19
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
read_from_file failed to read 1048576 bytes
No fmap entries found in /tmp/tmp.Pl3aLJThto
Reading flash... SUCCESS
Setting GBB flags from flags: 0x00000000 to 0x19..successfully saved new image to: /tmp/tmp.Pl3aLJThto
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
flashrom v0.9.9  : 04ac730c : May 15 2020 00:53:51 UTC on Linux 4.19.122-09121-gd58e3f311e19 (armv7l)
No fmap entries found in /tmp/tmp.Pl3aLJThto
Erasing and writing flash chip... ERASE FAILED at 0x00101000! Expected=0xff, Read=0x24, failed byte count from 0x00101000-0x00101fff: 0x100
 ERASE_FAILED
FAILED!
Uh oh. Erase/write failed. Checking if anything changed.
Your flash chip is in an unknown state.
Get help on IRC at irc.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org with FAILED: your board name in the subject line!
-------------------------------------------------------------------------------
DO NOT REBOOT OR POWEROFF!
FAILED

@hexdump0815 - Any ideas? And thank you for the great project!!

hexdump0815 commented 9 months ago

sorry - i was sick - no real idea - maybe those were enrolled chromebooks? they are kind of limited in what you can do with them, maybe even in this area - no real idea ...

unixabg commented 9 months ago

@hexdump0815 - they were enrolled but have been un-enrolled/deprovisioned. Do you think I should try the:

mail flashrom@flashrom.org with FAILED: your board name in the subject line!" since such an old unit?

As for now I have other things to work on. So I just sit aside for now and see if someone else replies.