<IoT-Maker>
PaulFertser: I loaded the vxworks image into Ghidra for inspection. But because lack of knowledge, i couldn't figure out how to determine in Ghidra if the ELF file is statically or dynamically linked.
<IoT-Maker>
PaulFertser: I found emba which does automatic analysis. It inspected the vxworks [ELF] file and says: /logs/firmware/bin/vxworks: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, with debug_info, not stripped
<IoT-Maker>
PaulFertser: In openocd i set arm core_state arm (I guess that is what you mean "If the instruction you run first is in ARM mode then you need to make sure PSR is in ARM too")
slobodan has joined #openocd
<PaulFertser>
IoT-Maker: this looks like a userspace app so how do you plan to run it without the OS kernel?
<PaulFertser>
Or is it the kernel itself?
<IoT-Maker>
PaulFertser: It's the first time i have to do with vxworks stuff. I tought it's all in the vxworks image and i just have to swap the files or for testing purpose, load the ELF image to ram and run it.
<IoT-Maker>
If loading to ram won'T work, i would replace the vxworks image in NOR-flash and hope u-boot will pick it up and run it.
<PaulFertser>
IoT-Maker: either way for loading ELF you shouldn't just copy it byte-by-byte to a random RAM location.
<PaulFertser>
IoT-Maker: you can load ELF to RAM with "load_image" with OpenOCD but you need to take care yourself to set PC to the entry point and to fulfill all the expectations of the image.
<PaulFertser>
IoT-Maker: so you have u-boot working there?
<PaulFertser>
Then you should be able to see what exactly it loads and how exactly.
<IoT-Maker>
Yes, Marvell style u-boot starts, loads vxworks which is stuck at some point waiting for something from linux i guess which starts to load. I can enter the linux side, but vxworks side doesn't finish boot process, there is no shell at the end.
<IoT-Maker>
To me it looks like the linux side was updated during firmwareupdate but the vxworks side not. It's the old vxworks image that starts i guess.
<IoT-Maker>
Or it'S one more Ethernet port. i don't know.
<PaulFertser>
IoT-Maker: ok then, just loady to $image_loc_Vx and run flashboot_g0
IoT_Maker has joined #openocd
IoT-Maker has quit [Ping timeout: 268 seconds]
<RolfNoot>
I got the problem with the 'stdio' references. Line 29 of configuration.h (FILE *open_file_from_path...) depends on helper/command.h -> helper/jim-nvp.h -> jimtcl/jim.h
<RolfNoot>
The OpenOCD version has #include <stdio.h> on line 74 of jim.h while the official version doesn't have it there
IoT_Maker is now known as IoT-Maker
<PaulFertser>
RolfNoot: OpenOCD doesn't apply any patches to jimtcl
<PaulFertser>
RolfNoot: so newer version of jimtcl lacks it and that breaks OpenOCD?
<PaulFertser>
RolfNoot: in 41f431f30cc6118ef982c6374914810cd07a8106 they removed it
<PaulFertser>
Yes, OpenOCD shouldn't depend on stdio.h getting include via jimtcl and should include it explicitly where needed.
<RolfNoot>
PaulFertser: exactly, that's why I wanted to mention it
<PaulFertser>
RolfNoot: good catch, please feel free to send a patch :)
<RolfNoot>
PaulFertser: thank you, will do :-)
IoT-Maker has quit [Ping timeout: 246 seconds]
nerozero has quit [Ping timeout: 245 seconds]
renrelkha has quit [Quit: bye]
renrelkha has joined #openocd
tchebb has joined #openocd
Hawk777 has joined #openocd
damex has joined #openocd
IoT-Maker has joined #openocd
slobodan has quit [Ping timeout: 240 seconds]
IoT-Maker has quit [Ping timeout: 276 seconds]
RolfNoot has quit [Remote host closed the connection]