DVD reader/writer firmware flashing from linux (64)

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.

First step, get the firmware (LG website or other) and patch 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” running.
It is a nice piece of software but a bit twisted with old 32bit coding habits … sizeof(char*) == sizeof(int) … 32b ~ok~, 64b wrong.
The easiest way to deal with this is to compile it as it was designed, in 32bit.

# apt-get install gcc-multilib libc6-dev-i386

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

-- COOL! CMAKE. i love it.
# echo 'add_definitions(-m32)' >> CMakeLists.txt
# echo 'set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -m32" )' >> CMakeLists.txt
# echo 'set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32" )' >> CMakeLists.txt
# echo 'set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -m32" )' >> CMakeLists.txt

# 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 GGWH20L_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!

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *

*