raspi-keygen icon indicating copy to clipboard operation
raspi-keygen copied to clipboard

How to patch the latest version of start.elf?

Open iosoft opened this issue 4 years ago • 13 comments

Hello,

How to patch the latest version of start.elf?

Pls help us out. Thanks.

iosoft avatar Mar 02 '20 12:03 iosoft

in /boot/start.elf and /boot/start_x.elf search for 47E933363248 after this hex string: if you have 3C18 replace 18 with 1F if you have 1D18 replace 18 with 1F

rapi3 avatar Mar 19 '20 08:03 rapi3

YOU are the man!

I tried and diff'ed for several hours. This just works fine. (OpenELEC). Please commit this to the README otherwise other people will waste time as well.

alexschultze avatar Apr 05 '21 20:04 alexschultze

Thanks. Forked and added info at top of page.

rapi3 avatar Apr 06 '21 09:04 rapi3

@rapi3 Could you open a pull request? Edit: Ideally one that just updates the old patch instead of adding a new section for the "latest version"

Ristovski avatar Apr 06 '21 11:04 Ristovski

Has anyone tried this on Pi4/CM4?

jamesy0ung avatar Apr 14 '21 22:04 jamesy0ung

To quote their page:

On the Raspberry Pi 4, the hardware codecs for MPEG2 or VC1 are permanently disabled and cannot be enabled even with a licence key; on the Pi 4, thanks to its increased processing power compared to earlier models, MPEG2 and VC1 can be decoded in software via applications such as VLC. Therefore, a hardware codec licence key is not needed if you're using a Pi 4.

mbirth avatar Apr 14 '21 23:04 mbirth

in /boot/start.elf and /boot/start_x.elf search for 47E933363248 after this hex string: if you have 3C18 replace 18 with 1F if you have 1D18 replace 18 with 1F

what tool to use?

iosoft avatar Apr 24 '21 16:04 iosoft

patch dont work on 19.06,2021

kiam001 avatar Jun 19 '21 14:06 kiam001

Last version this works on is Apr-15-2020: https://github.com/raspberrypi/firmware/tree/9e3c23ce779e8cf44c33d6a25bba249319207f68/boot

The latest files all show the following after the 47E933363248 string:

start.elf: 0918 start_x.elf: has two locations, 0090 and 1D18

Hopefully someone smarter than me will be able to make it work.

infojoe avatar Oct 01 '21 21:10 infojoe

I wanted to try patching the latest binaries but sadly the IDA Pro plugin for VideoCore III/IV is outdated and only works on the quite old IDA 6 which I currently do not have.

Even more unfortunately, neither Ghidra nor radare2/rizin seem to have a VideoCore plugin either, so I am unable to look into this.

Might look into hunting down an old IDA version some time next week just to take a look, but no promises.

Ristovski avatar Oct 03 '21 17:10 Ristovski

Last version this works on is Apr-15-2020: https://github.com/raspberrypi/firmware/tree/9e3c23ce779e8cf44c33d6a25bba249319207f68/boot

The latest files all show the following after the 47E933363248 string:

start.elf: 0918 start_x.elf: has two locations, 0090 and 1D18

Hopefully someone smarter than me will be able to make it work.

I'm trying to check this method with my rpi2 / rpi3 with Libreelec, still works. However OSMC is not working.

z4tracer avatar Oct 20 '21 02:10 z4tracer

check my fork I updated patch for latest version 2022: LibreELEC (community): nightly-20220212-d9a07e9 (RPi2.arm) LE-rpi33:~ # vcgencmd codec_enabled MPG2 MPG2=enabled LE-rpi33:~ # vcgencmd codec_enabled WVC1 WVC1=enabled

https://github.com/rapi3/raspi-keygen

rapi3 avatar Feb 13 '22 13:02 rapi3

You can use bbe to patch binary files: https://linux.die.net/man/1/bbe

csgabe avatar Apr 10 '22 08:04 csgabe