# DVD reader/writer firmware flashing from linux (64)

> Flashing a region-free patched firmware to an LG GGW-H20L Blu-ray/DVD drive from 64-bit Linux, using MediaCodeSpeedEdit — with the pre-patched YL07 file.

- URL: https://guillaumeplayground.net/dvd-firmware-flash-linux/
- Author: Guillaume (https://guillaumeplayground.net/about/)
- Published: 2016-01-09
- Updated: 2020-05-22
- Section: Computing & hacking
- Source: Guillaume playground

I needed to complete my audio stack with a dvd/blu-ray reader/writer.  
The hardware:  
– 6 years old LG GGW-H20L  
– Sun 411 cd/tape enclosure 😉 no screw, a really well designed and old enclosure for 5.25″  
– Ugreen adaptor USB 3.0 to SATA  
– 12v psu (plugged directly in the ugreen adaptor, a linear psu for me).

The LG is a great device but hopelessly needing a firmware refresh, region free.

Update: go to the page bottom to get the FW zip file YL07 pre-patched

First step, get the firmware (LG website or other) and [patch](http://ala42.cdfreaks.com/MCSE/) it

```
-- Go to http://ala42.cdfreaks.com/MCSE/ and get the latest version of MediaCodeSpeedEdit
# wget -nd http://ala42.cdfreaks.com/MCSE/MediaCodeSpeedEdit.zip
# unzip MediaCodeSpeedEdit.zip
# cd MediaCodeSpeedEdit

-- .exe => wine32
# dpkg --add-architecture i386 && apt-get update && apt-get install wine32
# wine MediaCodeSpeedEdit.exe

-- Load the firmware (.exe|.bin latest official firmware) 
-- Check "RPC2 Auto Reset"
-- Save ... and your done with the firmware!
```

Second step, get “[flasher](https://github.com/devilsclaw/)” running..

```
# cd /usr/src/
# git clone https://github.com/devilsclaw/flasher.git
# cd flasher

# cmake .
# make
-- binary is in ... /usr/src/build/bin/flasher/flasher    (strange)
```

Third and last step, flash !

```
-- backup previous (drive could be something in /dev/ - use dmesg if you're not sure)
# mkdir bk; cd bk
# /usr/src/build/bin/flasher/flasher -d /dev/sr0 -m main.bin
# /usr/src/build/bin/flasher/flasher -d /dev/sr0 -c core.bin

-- Backups ok? we will proceed
-- Split the .exe if needed (your filename patched - here i use mine)
# cd <where_the_firmware_is>
# /usr/src/build/bin/flasher/flasher -r GWH20L_YL07_speedpatched.exe

-- CORE_GGWH20L_YL07_speedpatched.exe.bin generated
-- MAIN_GGWH20L_YL07_speedpatched.exe.bin generated - this is the one
-- HERE WE GO !
# /usr/src/build/bin/flasher/flasher -d /dev/sr0 -f MAIN_GGWH20L_YL07_speedpatched.exe.bin
-- WAIT

-- Now, you will need to unpower completely the drive. In my case, unplug usb and external 12v power.
-- Plug it back and it happened! Magic
# dmesg -t | grep GGW-H20L
--- before
scsi 6:0:0:0: CD-ROM            HL-DT-ST BD-RE  GGW-H20L  YL05 PQ: 0 ANSI: 0
--- after
scsi 9:0:0:0: CD-ROM            HL-DT-ST BD-RE  GGW-H20L  YL07 PQ: 0 ANSI: 0
```

Bye!

📎 [GGWH20L_YL07_speedpatched](https://guillaumeplayground.net/wp-content/uploads/2020/05/GGWH20L_YL07_speedpatched-1.zip)

📎 [GGW-H20L_YL07EW](https://guillaumeplayground.net/wp-content/uploads/2020/05/GGW-H20L_YL07EW.zip)
