LKV373 Project Update - Building IT9919 Software with GCC
Summary
Nov 7, 2019In this video we look at some of the latest of discoveries, and demonstrate how we can now compile code for the device using GCC.
Links
-
- or1k GCC Demo Software: or1k-hello-world
- or1k GCC Tool-chain build script: make-tool-chain.sh
- IRC Channel: #lkv373a on FreeNode
Known SDK Repositories
Newlib
Finding ''__sfv_write_r''
I used my call-graph script from the previous video to dump out the call-graph of the whole of the Lenkeng upgrader software. I then used the networkx
graph library in python to isolate the sub-graph of functions called by puts()
which I knew the address of from previous experiments, which gave this diagram:
From various other hints in the strings, I suspected the software contained a build of newlib of whatever vintage.
I then used the or1k disassembler to try and piece together a plausible theory for the number and type arguments to the various functions called by puts
.
Still quite uncertain, I decided to take a punt on 0xa512c
being the correct address, and voila - it worked!
In future jobs like this will be a bit easier, because v3l0c1r4pt0r has written a patch for radare2 that adds support for or1k.