NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
crabbedhaloablut has quit []
vampirefrog has quit [Quit: Leaving]
gzlb has quit [Ping timeout: 246 seconds]
jn has quit [Ping timeout: 240 seconds]
gzlb has joined #openocd
jn has joined #openocd
jn has joined #openocd
jn has quit [Changing host]
tsal has joined #openocd
tsal_ has quit [Ping timeout: 245 seconds]
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
noarb has quit [Remote host closed the connection]
noarb has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
Foxyloxy_ has joined #openocd
Foxyloxy has quit [Ping timeout: 256 seconds]
noarb has joined #openocd
noarb has quit [Remote host closed the connection]
noarb has joined #openocd
nerozero has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
IoT-Maker has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
Hawk777 has joined #openocd
crabbedhaloablut has joined #openocd
Hawk777 has quit [Quit: Leaving.]
damex has joined #openocd
<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> PaulFertser: This is u-boot's printenv output https://bpa.st/WY7Q this is vxworks bootlog https://bpa.st/GWEQ and this is the linux bootlog https://bpa.st/EXWQ
<IoT-Maker> PaulFertser: this are the files i can see in u-boot https://bpa.st/KWIA i added some comments
damex has quit [Ping timeout: 276 seconds]
Foxyloxy_ has quit [Ping timeout: 260 seconds]
<IoT-Maker> There is no network and only few commands available in Marvel u-boot: https://bpa.st/N7RA
<PaulFertser> IoT-Maker: does u-boot have "loady" probably?
<PaulFertser> IoT-Maker: or you can just upload something to RAM location and then ask U-boot to run it.
<PaulFertser> ("just upload" I mean via JTAG)
<PaulFertser> IoT-Maker: my idea is to load the tweaked code by any means and then continue with u-boot.
<IoT-Maker> PaulFertser: loady command is present
<PaulFertser> IoT-Maker: so you can just Y-modem load anything to RAM by just serial alone.
<PaulFertser> Also it looks like this device can just boot from USB mass storage.
<PaulFertser> By running flashboot_g0
tchebb has quit [Ping timeout: 264 seconds]
RolfNoot has quit [Remote host closed the connection]
RolfNoot has joined #openocd
<IoT-Maker> I guess that is the 8bay hdd storage. There is no USB port exposed
<IoT-Maker> There are some pin holes that could fit to a USB Port https://postimg.cc/1863T79m/a6d81787
<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]
RolfNoot has joined #openocd