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, 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 v2

  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 a subdirectory of the ESP
  5. Reboot
  6. Disable Secure Boot in Firmware Setup
  7. Boot into the shell and launch the firmware updater: 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 DMI:

$ cat /sys/class/dmi/id/bios_version 
Version 3.80

Only displays the BIOS version. But dmidecode -t bios shows (amongst other things):

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 cobmines both version numbers:

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

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

Which fwupd can also display correctly once it's told how to interpret it.


CategoryTechnote

robots.org.uk: ToshibaX30X40FirmwareUpdate (last edited 2020-04-20 10:19:11 by sam)

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