18 Commits

Author SHA1 Message Date
Andre Przywara
a8013395e6 fex: handle trailing semicolons
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>
2022-02-23 01:08:46 +00:00
RavRabbit
edec4d2f6c fex: add support for '-' and '/' characters
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>
2022-02-18 15:21:46 +00:00
Bernhard Nortmann
610ca15715 common.h: Rename errf() to pr_error(), add pr_fatal()
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-12-07 08:15:03 +01:00
Bernhard Nortmann
2e6697b2bb fexc: Default unquoted values to string type
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>
2016-11-11 12:27:03 +01:00
Bernhard Nortmann
7a0a7012c6 fexc: Ignore lines starting with ':' when compiling .fex
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>
2016-05-26 08:20:19 +02:00
Bernhard Nortmann
0b7bcc4aa2 fexc: Don't fail silently on parse error
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>
2016-05-16 19:49:52 +02:00
Bartosz J
68a4f6f231 fexc: accept negative values in .fex files
closes #16
2013-05-25 19:49:11 +00:00
Alejandro Mery
92f1d0dec1 fexc: add support for pio banks up to N
needed for A31 support. closes issue #9

Signed-off-by: Alejandro Mery <amery@geeks.cl>
2013-01-19 14:05:40 +01:00
Alejandro Mery
5142a242ea fexc: fix fex compiler to accept port:powerN GPIOs 2012-08-08 03:15:37 +02:00
Alejandro Mery
dbc4515eed fexc: add port:power support 2012-07-23 17:07:28 +02:00
Alejandro Mery
4861df39c1 script_fex: properly report unknown value types 2012-07-02 12:54:27 +02:00
Alejandro Mery
79ea14d4e0 Relicensed as GPLv2+ 2012-06-15 22:34:22 +02:00
Alejandro Mery
de158a9273 fexc: fix error returning (closes #2) 2012-06-14 14:11:15 +02:00
Alejandro Mery
8fcf5def3a script_bin: add pr_debug() helper 2012-06-14 14:06:30 +02:00
Alejandro Mery
e4dc28068c script_fex: don't put a tab before the =
it's annoying
2012-06-07 23:29:19 +02:00
Alejandro Mery
0fd1bc1004 bin2fex: split across script_bin and script_fex 2012-05-11 16:13:39 +02:00
Alejandro Mery
73b18fcfc9 fexc: move bin2fex's main() in 2012-05-11 12:02:10 +02:00
Alejandro Mery
650b1dfa79 script_fex: move parser from fex2bin.c and make fexc use it 2012-05-11 10:50:41 +02:00