apertus-open-source-cinema / axiom-firmware

AXIOM firmware (linux image, gateware and software tools)
GNU General Public License v3.0
173 stars 54 forks source link

Missing gateware hangs Beta on axiom_start.sh #165

Open herbertp opened 4 years ago

herbertp commented 4 years ago

In case the gateware for the Main SoC is missing (e.g. a broken symlink) or in the wrong format (.bit or .bin with wrong byteorder), FPGA manager cannot load the gateware sucessfully.

Unfortunately this is only commented by an output from 'echo' like this ...

/usr/axiom/script/axiom_start.sh: line 9: echo: write error: No such file or directory /usr/axiom/script/axiom_start.sh: line 9: echo: write error: Invalid argument

... which then leads to a complete lockup once the memory mapped gateware registers are being accessed.

rroohhh commented 4 years ago

We should definitely check the return code of the echo that load the bitstream and abort the axiom_start.sh script when that fails.

Do you think that would be enough, or do you think translating the error message from echo into something clearer would also be needed?

herbertp commented 4 years ago

I think aborting is probably enough (prevents the lockup :) but of course it would be nice to explain the possible reasons based on the error code.