Commit Graph

76 Commits

Author SHA1 Message Date
Myles Watson 70679a095a Simplify last_dev_p so that it matches comments.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5763 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-09-01 21:03:03 +00:00
Stefan Reinauer 7c1f6b8489 sconfig parser:
- print erroneous string in error message
 - print line numbers starting from 1 instead of 0
 - exit with return code 1 on errors
 - check return values of fopen operations
 - only create output file if input file was parsed without errors

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5701 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-08-16 18:21:56 +00:00
Stefan Reinauer 9bf7810dac make sconfig parser regeneration menu selectable
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5688 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-08-09 13:28:18 +00:00
Patrick Georgi 35d346fe2d Fix build error introduced in r5868.
aliased_name was a compatibility hack to match the output of the C rewrite
with the python version's results. It seems that we carried these
useless symbols with us for years, just without any impact good or bad.

By declaring devices static and tightening the screws (-Werror), the
compiler now knows that these declarations are useless - and stops.


Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stefan.reinauer@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5687 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-08-09 12:58:16 +00:00
Stefan Reinauer df61dd28f6 non-root devices are not supposed to be accessed outside of static.c except by
walking the tree.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5686 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-08-09 12:02:00 +00:00
Patrick Georgi 7fc9e291d7 Trivial: Improve error reporting of sconfig slightly by reporting the line number.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5665 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-07-15 15:59:07 +00:00
Myles Watson 1965a23712 Check for NULL before calling device_match()
It matters for multifunction devices who don't have siblings.

The error in the rumba device tree created that situation.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5628 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-06-10 04:06:52 +00:00
Myles Watson 894a34715f Same conversion as with resources from static arrays to lists, except
there is no free list.

Converting resource arrays to lists reduced the size of each device
struct from 1092 to 228 bytes.

Converting link arrays to lists reduced the size of each device struct
from 228 to 68 bytes.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5626 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-06-09 22:41:35 +00:00
Myles Watson c25cc11ae3 Use lists instead of arrays for resources in devices to reduce memory usage.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5576 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-05-21 14:33:48 +00:00
Patrick Georgi 8f625f6e93 Improve the sconfig parser:
- The device tree must start with a chip (not a device)
- It's more clearly visible at which places chip, device, register and resource can be used.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5526 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-05-05 13:13:47 +00:00
Patrick Georgi 8d313685b0 Rename "apic" and "apic_cluster" to "lapic" and "lapic_cluster"
in device trees. Adapt sconfig as necessary.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5525 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-05-05 13:12:42 +00:00
Patrick Georgi 68befd5d34 sconfig: Make cur_bus and cur_parent local to the parser.
Instead of accessing them globally, pass them as arguments where necessary.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5524 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-05-05 12:05:25 +00:00
Patrick Georgi 114e7b2990 Split C code in sconfig's parser into a separate file.
Update generated parser files.
Add proper include path for utils.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5523 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-05-05 11:19:50 +00:00
Stefan Reinauer 14e2277962 Since some people disapprove of white space cleanups mixed in regular commits
while others dislike them being extra commits, let's clean them up once and
for all for the existing code. If it's ugly, let it only be ugly once :-)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5507 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-27 06:56:47 +00:00
Patrick Georgi a2acbc70a3 Build utils into their source directory equivalent in
the build tree.
Allow separate build tree for utils
Use separate build tree for utils in abuild

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5453 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-16 22:48:57 +00:00
Patrick Georgi 71ed353ae2 sconfig should return success when it's successful
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5428 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-14 14:41:30 +00:00
Stefan Reinauer e705f9cee2 output cosmetics
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5378 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-08 13:16:32 +00:00
Patrick Georgi 05245ec05b Remove #line statements in processed parser source,
to avoid clutter in revision history.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5377 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-08 12:59:41 +00:00
Patrick Georgi 2bbd0c2926 sconfig: Mangle - to _ for struct names, too.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5375 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-08 12:46:18 +00:00
Patrick Georgi 109a1de1ef Remove duplicate registers in digitallogic/adl855pc's device tree
Create directories before trying to copy files into them

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5374 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-08 12:00:35 +00:00
Patrick Georgi 7e8c9aa271 Replace sconfig with a C implementation.
(smaller, faster, standard parser generator, no more python)

Provide precompiled parser, so bison and flex are optional dependencies.

Adapt Makefile and abuild (which uses some sconfig file as a
magic path) to match.

Drop python as dependency from README, and add bison and flex
as optional dependencies

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5373 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-08 11:37:43 +00:00
Patrick Georgi 026476e4e3 Make sconfig only complain about real conflicts.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5301 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-03-26 10:33:36 +00:00
Uwe Hermann 6c73b4416c Remove all build/ prefixes in the build output.
Also, remove one missing hardcoded "build" dir in the distclean target,
and clean up files generated by sconfig in 'make clean'.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Myles Watson <mylesgw@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4880 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-10-28 17:10:51 +00:00
Uwe Hermann 7782319c21 Prefix all build output file names of files which end up in the build
directory with "build/" for consistency (trivial, sort of).

Also, drop printing of "config.g" input file, we usually only print
generated/output files in the build output.

Finally, rename non-existing COMPRESSFLAG variable to
CBFS_PAYLOAD_COMPRESS_FLAG in a printf line. The build output now says

    PAYLOAD    payload.elf l

for payloads (the "l" specifies LZMA compression).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4875 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-10-27 23:14:54 +00:00
Uwe Hermann 312673ca72 Improve coreboot build output and eliminate some warnings:
- Add static and const where possible.

 - Turn some #warning entries into TODO comments.

 - Add missing prototypes.

 - Remove unused variables.

 - Fix printf arguments or cast them as needed.

 - Make sconfig output look better. Drop useless "PARSED THE TREE" output.

 - Print "(this may take a while)" while building romcc. Add missing "\n".

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Myles Watosn <mylesgw@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4874 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-10-27 21:49:33 +00:00
Patrick Georgi 0588d19abe Kconfig!
Works on Kontron, qemu, and serengeti. 

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>

tested on abuild only. 

Acked-by: Ronald G. Minnich <rminnich@gmail.com>




git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4534 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-08-12 15:00:51 +00:00