Command line return value handling
Good afternoon, dear ptitSeb! I'm using your software to use bunch of programs that flashing custom boards. There are lots of proprietal binaries that need x86, but my flasher is arm64 based. So I used box86 to try to use this binaries and it worked! But flashing crashes, when my flash script try to receive return values from the bin, that was run from box86. How can I obtain return values from bins that was run under box86?
Example:
DEV_ID = /some_x86_bin
After this DEV_ID == "" - empty string(
you should be able to it the same way as if it were native binary. Like
DEV_ID = `/some_x86_bin`
box86 should detect that it's output is redirected and will not print anything box86 related.
I discovered the problem by using log - it is segfault. This program working on my notebook so then likely it is boxes problem ); Attaching the log: log.txt
Also I tried it under root but the same issue
Yep, it's a crash:
21798|SIGSEGV @0xf67b063c (???(0xf67b063c)) (x86pc=0x8058ff4//home/flasher/rvp/nvidia/Linux_for_Tegra/bootloader/tegrarcm:"/home/flasher/rvp/nvidia/Linux_for_Tegra/bootloader/tegrarcm/__ctype_b_loc", esp=0xf5f1a558, stack=0xf571c000:0xf5f1c000 own=(nil) fp=0xf5f1a55c), for accessing (nil) (code=1/prot=0), db=0xf6837ad0(0xf67b0584:0xf67b06b0/0x8058fd0:0x8059002//home/flasher/rvp/nvidia/Linux_for_Tegra/bootloader/tegrarcm/__ctype_b_loc:clean, hash:ed85fd09/ed85fd09)
With a NULL access. Will need to debug that.
Please, can you explain me why am I exported every variable that needed to show me log now and those logs are not happened? Part of my printenv:
BOX86_DYNAREC_LOG=3
BOX86_TRACE_FILE=1
BOX86_ROLLING_LOG=2
BOX86_DUMP=1
BOX86_SHOWSEGV=1
BOX86_DYNAREC=1
BOX86_LOG=3
And it nothing shows me with the start of application. I sent you log but now I cannot recreate it with the final qemu in my system...
BOX86_DYNAREC_LOG=1
BOX86_TRACE_FILE=trace.txt
BOX86_ROLLING_LOG=1
BOX86_DUMP=1
BOX86_SHOWSEGV=1
BOX86_DYNAREC=1
BOX86_LOG=2
use those, it's better. But that will generate a large log, in trace.txt, but if it's a windows stuff, butter use BOX86_TRACE_FILE=/PATH/TO/trace-%pid.txt to direct to some fixed folder with 1 file per process.
Oh, thank you, I found the source of the problem - it was old version of QEMU. The final official version of OS for jetson nano is ubuntu 18.04 and it had very old version of qemu in repo. I forcefully update it to 23.04 and it worked!
Script is not working yet but there is no segfault here now)