meta-xilinx icon indicating copy to clipboard operation
meta-xilinx copied to clipboard

u-boot-xlnx: Avoid breaking compatibility with posix sh

Open ngenetzky-at-appareo opened this issue 5 months ago • 2 comments

NOTE: First time contributor to this repo. Please let me know of any guidelines for contributing that I might not be aware of.


BitBake recipes and class files are primarily written to be shell-agnostic, aiming for compatibility with /bin/sh, which may be dash or other minimal shells instead of bash. Thus, it is advisable to avoid bash-specific syntax (bashisms) to ensure portability and prevent unexpected behavior.

To avoid bashisms in BitBake:

Use POSIX-compliant shell syntax: Stick to standard sh syntax, avoiding constructs like local or [[ ]].

By adhering to these guidelines, one can create more robust and portable BitBake recipes and class files, avoiding issues related to bash dependencies.

ngenetzky-at-appareo avatar May 05 '25 19:05 ngenetzky-at-appareo