Some .fex files (for instance those for the H6 in sunxi-boards) contain
a trailing semicolon on some lines, after the end quote of a string
value.
This confuses the parser and messes up our "make check" tests, so remove
the semicolon both in the parser, but also in the unify-fex test
conditioning tool, to make the tests pass.
Signed-off-by: Andre Przywara <osp@andrep.de>
Newer fex files like orangepi_oneplus.fex from the sunxi-boards repo fail
conversion to the binary format:
--------------------------
E: orangepi_oneplus.fex:258: invalid character at 4.
--------------------------
This is because they contain a '-' character in section and key names, and
also '/' characters in some section names, which our compiler denies.
Relax the section and key filter to allow '-' and '/' as well.
Signed-off-by: Andre Przywara <osp@andrep.de>
Vendor-provided .fex files have repeatedly shown key-value pairs
(assignments) where the value is an identifier-style string *not*
surrounded by double quotes. The corresponding .bin files confirm
that such values end up as "string" type entries.
So far, our .fex parser has choked on these values. The commit
changes this behavior and treats them as strings now, to allow
processing 'original' .fex without adjustments.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Such lines do not conform to any known syntax rules.
With this patch, fexc will assume that they represent a special
case (where bin2fex extracted a malformed indentifier from a .bin
file - likely a remnant from a comment typo), issue a warning and
ignore the line.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
A test case for this is "fex2bin a-star_kv49l.fex".
This patch fixes an execution path in script_fex.c that would
allow script_parse_fex() to fail (i.e. return 0) without providing
any feedback to the user.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>