How to update the firmware of a Dynabook (né Toshiba) X30 or X40 from Linux (without installing Windows)!

Firmware download location: https://emea.dynabook.com/support/businesslaptops/ (for models sold within Europe/Middle East/Africa). The model selector doesn't include all models; best to enter the serial number from the bottom of the device, or from /sys/class/dmi/id/product_serial).

The latest 'os-independent' BIOS download is currently version 3.80-WIN. The Zip files for the X30 and X40 have different names (bios-20200303145630.zip and bios-20200304090247.zip respectively), but both have the same content: a single file called P00ADv380_ECCDv290.exe.

The numbers in the filename correspond to the BIOS version (3.80) and the EC firmware version (2.90)

This file is a self-extracting archive, that (thanks to Process Monitor) we can see runs the following command after extracting its contents:

Luckily, my guess that we can run the executable with /extract was right (you do need Windows for this, but perhaps it's possible with Wine), and we get the contents extracted for examination:

First we need to take a closer look at autoExec.vbe. Lucky it can be decoded with decode-vbe.py. We get autoExec.vbs.html, and... yikes! Rather than going through that detail...

Googling for some of the file names takes us to this page regarding updating the firmware of the Toshiba Satellite Z30-B-10W, in particular:

This sound promising. Unfortunately there's no chgbiosf.exe in the file list. Presumably the old DOS-based executable has been replaced by nchgbios2.exe, nchgbios3.exe and nchgbiosESP.exe.

Taking a closer look at autoExec.vbs, it looks liek nchgbiosESP.exe is used on UEFI systems, which the X30/X40 are. Let's try to run it:

My assumption is that nchgbiosESP.exe acts a little bit like https://fwupd.org/: copy a UEFI executable (CHGBIOSA.EFI) to the EFI System Partition, along with the firmware file, and register a new Boot Manager entry that launches it with the appropriate arguments to perform the BIOS update. We can get a sneak preview of how this might work:

Well look at that--it looks like the arguments are backward-compatible all the way back to the original DOS-based chgbiosf.exe command!

Now we need a convenient way to run the command. For that we'll use the UEFI Shell.

  1. Download UEFI Shell

  2. Extract UefiShell/X64/Shell.efi to /boot/efi

  3. Create a boot entry with efibootmgr -c -L Shell -l '\Shell.efi' -d /dev/nvme0n1 -p 1

  4. Copy the extracted firmware update files to /boot/efi

    • CHGBIOSA.EFI

    • BIOxxxxx.COM

    • ECCxxxxx.BIN

  5. Reboot and hold F2 to get into Firmware Setup
  6. Disable Secure Boot
  7. Reboot and hold F12 to get the boot entry menu
  8. Boot into the shell
  9. Switch to the EFI System Partition with the command fs0:

  10. Launch the firmware updater with the command CHGBIOSA BIOxxxx.COM,ECxxxxx.BIN

chgbiosa.png

tron.jpg

update.jpg

Toshiba is dead. Sic transit gloria mundi. Long live Dynabook!

complete.jpg

(At this point the conscientious user will re-enable Secure Boot & remove the Shell boot entry with efibootmgr)

Various ways to check the firmware's version number

Via sysfs, using Linux's support for decoding DMI:

$ head /sys/class/dmi/id/{bios_version,ec_firmware_release}
==> /sys/class/dmi/id/bios_version <==
Version 3.80

==> /sys/class/dmi/id/ec_firmware_release <==
2.90

Via dmidecode -t bios:

Handle 0x0012, DMI type 0, 24 bytes
BIOS Information
        Vendor: TOSHIBA
        Version: Version 3.80  
        Release Date: 01/06/2020
        ROM Size: 8192 kB
        Characteristics:
            [...]
        BIOS Revision: 3.80
        Firmware Revision: 2.90

The firmware's ESRT entry combines both version numbers:

$ cat /sys/firmware/efi/esrt/entries/entry0/vw_version
58720912

$ python -c 'print hex(58720912)'
0x3800290

Which fwupd get-devices can display correctly once it's told how to interpret it:

[...]
├─System Firmware:
│     Device ID:           41c7c0481777610a3aa56cd85affca0935b6207b
│     Current version:     3.80.2.90
│     Vendor:              TOSHIBA (DMI:TOSHIBA)
│     GUID:                28108d08-5027-42c2-a5b8-92d6ede9b97b
│     Device Flags:        • Internal device
│                          • Updatable
│                          • Requires AC power
│                          • Needs a reboot after installation
│                          • Cryptographic hash verification is available
│                          • Device is usable for the duration of the update
[...]


CategoryTechnote

robots.org.uk: ToshibaX30X40FirmwareUpdate (last edited 2022-06-10 09:57:56 by sam)

© Sam Morris <sam@robots.org.uk>.
Content may be distributed and modified providing this notice is preserved.