aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2008-06-02dtc: Add a testcase for 'reg' or 'ranges' in /David Gibson2-0/+9
This patch adds an extra testcase to dtc to ensure that the "reg_format" and "ranges_format" checks trigger as they should if a 'reg' or 'ranges' property appears in the root node. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-06-02dtc: Fix some printf() format warnings when compiling 64-bitDavid Gibson2-3/+6
Currently, dtc generates a few gcc build warnings if built for a 64-bit target, due to the altered type of uint64_t and size_t. This patch fixes the warnings (without generating new warnings for 32-bit). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-05-29dtc: Remove some small bashisms from test scriptsDavid Gibson3-3/+3
Some of the helper scripts used to run testcases contain some constructs that are bashisms. Or at least which don't work on dash, the minimal shell used as /bin/sh on recent Ubuntu systems. This patch removes these constructs so that the testsuite will pass "out of the box" on systems where /bin/sh is dash. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-05-19dtc: Add program to convert dts files from v0 to v1David Gibson2-5/+30
This patch adds a new utility program, convert-dtsv0, to the dtc sources. This program will convert dts files from v0 to v1, preserving comments and spacing. It also includes some heuristics to guess an appropriate base to use in the v1 output (so it will use hex for the contents of reg properties and decimal for clock-frequency properties, for example). They're limited and imperfect, but not terrible. The guts of the converter program is a modified version of the lexer from dtc itself. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-05-19dtc: Rework handling of boot_cpuid_physDavid Gibson4-1/+64
Currently, dtc will put the nonsense value 0xfeedbeef into the boot_cpuid_phys field of an output blob, unless explicitly given another value with the -b command line option. As well as being a totally unuseful default value, this also means that dtc won't properly preserve the boot_cpuid_phys field in -I dtb -O dtb mode. This patch reworks things to improve the boot_cpuid handling. The new semantics are that the output's boot_cpuid_phys value is: the value given on the command line if -b is used otherwise the value from the input, if in -I dtb mode otherwise 0 Implementation-wise we do the following: - boot_cpuid_phys is added to struct boot_info, so that structure now contains all of the blob's semantic information. - dt_to_blob() and dt_to_asm() output the cpuid given in boot_info - dt_from_blob() fills in boot_info based on the input blob - The other dt_from_*() functions just record 0, but we can change this easily if e.g. we invent a way of specifying the boot cpu in the source format. - main() overrides the cpuid in the boot_info between input and output if -b is given We add some testcases to check this new behaviour. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-05-19dtc: Clean up included Makefile fragmentsDavid Gibson1-2/+2
Currently the Makefile.dtc and Makefile.libfdt fragments include a number of things that seemed like they might be useful for other projects embedding the pieces, or for a make dist target. Well, we have no make dist target, it's become fairly unclear that these things would actually be useful to embedders (the kernel certainly doesn't use them), and it's a bunch of stuff with no current users. This patch, therefore, removes a bunch of unused definitions from the Makefile fragments. It also removes a dependency declared in Makefile.libfdt (of libfdt.a on the constituent .o files) which was incorrect (wrong path), and if corrected would be redundant with the similar dependency in the top-level makefile. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-03-23dtc: Testcases for input handlingDavid Gibson2-0/+25
This patch adds some testcases checking corner cases of dtc's input file handling. Specifically it checks that dtc works correctly when given input via stdin, and it checks that dtc fails gracefully if given a nonexistent input file (or directory, in the case of -Ifs mode). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-03-23dtc: Assorted improvements to test harnessDavid Gibson5-53/+78
This patch makes several small improvements to the test harness. * An altered way of invoking shell script testcases from run_tests.sh means scripts no longer need to me marked executable in the repository to work properly. * dtc.sh never did anything that was really dtc specific - with the exception of messages, it would work equally well for any binary that returns 0 in the successful case. Therefore, generalise dtc.sh and fold it into run_tests.sh so we don't need a separate script any more. * Tweak various things so that the valgrind options are properly propagated down to invoke dtc under valgrind when called via wrapper scripts. * Tweak the valgrind suppressions to work properly on a wider range of systems (this was necessary on my machine running Ubuntu Hardy). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-03-23dtc: Test and fix conversion to/from old dtb versionsDavid Gibson1-0/+13
This patch adds testcases which test dtc when used to convert between different dtb versions. These tests uncovered a couple of bugs handling old dtb versions, which are also fixed. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-03-23dtc: Implement checks for the format of node and property namesDavid Gibson4-0/+55
This patch adds checks to the checking framework to verify that node and property names contain only legal characters, and in the case of node names there is at most one '@'. At present when coming from dts input, this is mostly already ensured by the grammer, however putting the check later means its easier to generate helpful error messages rather than just "syntax error". For dtb input, these checks replace the older similar check built into flattree.c. Testcases for the checks are also implemented. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-02-18libfdt: More tests of NOP handling behaviourDavid Gibson3-1/+115
In light of the recently discovered bug with NOP handling, this adds some more testcases for NOP handling. Specifically, it adds a helper program which will add a NOP tag after every existing tag in a dtb, and runs the standard battery of tests over trees mangled in this way. For now, this does not add a NOP at the very beginning of the structure block. This causes problems for libfdt at present, because we assume in many places that the root node's BEGIN_NODE tag is at offset 0. I'm still contemplating what to do about this (with one option being simply to declare such dtbs invalid). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-02-15dtc: Fold comment handling test into testsuiteDavid Gibson3-0/+59
For ages dtc has included a sample dts, comment-test.dts, for checking various lexical corner cases in comment processing. In fact, it predates the automated testsuite, and has never been integrated into it. This patch addresses this oversight, folding the comment handling test in with the rest of the testsuite. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-02-14libfdt: Fix NOP handling bug in fdt_add_subnode_namelen()David Gibson3-1/+90
fdt_add_subnode_namelen() has a bug if asked to add a subnode to a node which has NOP tags interspersed with its properties. In this case fdt_add_subnode_namelen() will put the new subnode before the first NOP tag, even if there are properties after it, which will result in an invalid blob. This patch fixes the bug, and adds a testcase for it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-01-11libfdt: Add fdt_set_name() functionDavid Gibson3-1/+93
This patch adds an fdt_set_name() function to libfdt, mirroring fdt_get_name(). This is a r/w function which alters the name of a given device tree node. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-19dtc: Add missing copyright notice for dumptrees.cDavid Gibson1-0/+21
When I released libfdt, I forgot to add a copyright notice to dumptrees.c (probably because the program is so trivial). Apparently the lack causes trouble for Debian, so this patch adds one. I've gone through the git history and double checked that no-one has touched this file except me (and I barely have myself since its initial commit). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-07dtc: Fix silly typo in dtc-checkfails.shDavid Gibson1-1/+1
Too much C coding makes for dumb errors in shell. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-07dtc: Make dtc-checfails.sh script catch deaths-by-signalDavid Gibson1-0/+4
Since commit 5ba0086bfd0fa6ab25f7ce1870417301a26c104f, the dtc-checkfails.sh script does not check the return code from dtc. That's reasonable, since depending on the checks we're testing, dtc could either complete succesfully or return an error. However, it's never right for dtc to SEGV or otherwise be killed by a signal. So the script should catch that, and fail the testcase if it happens. This patch implements this behaviour. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-07dtc: Convert check for obsolete /chosen propertyDavid Gibson2-0/+14
This converts the test for the obsolete "interrupt-controller" property in /chosen to the new framework. That was the only thing left in the old-style check_chosen() function, so that function is removed, too. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-07dtc: Convert #address-cells and #size-cells related checksDavid Gibson4-1/+33
This patch converts checks related to #address-cells and #size-cells to the new framework. Specifically, it reimplements the check that "reg" properties have a valid size based on the relevant #address-cells and #size-cells values. The new implementation uses the correct default value, unlike the old-style check which assumed the values were inherited by default. It also implements a new, similar test for "ranges" properties. Finally, since relying on the default values of these variables is considered not-good-practice these days, it implements a "style" check which will give a warning if the tree ever relies on the default values (that is if any node with either "reg" or "ranges" appears under a parent which has no #address-cells or #size-cells property).
2007-12-06dtc: Migrate "string property" checks to new frameworkDavid Gibson2-0/+9
This patch converts to the new tree checking framework those checks which verify that certain properties (device_type, model) have a string value, when present. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-06dtc: Migrate "one cell" checks to new frameworkDavid Gibson2-0/+9
This patch converts to the new tree checking framework those checks which verify that certain properties (#address-cells and #size-cells) are exactly one cell in size, when present. We also drop the old-style check for "linux,phandle" being one cell, since that is already implied in the the existing new-style checks on the linux,phandle property. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-06dtc: More detailed testing of tree checksDavid Gibson4-21/+38
This patch modifies the dtc-checkfails.sh testcase wrapper so that instead of testing just that dtc fails with a particular error code on the sample input, it scans dtc's stderr output looking for a message that dtc failed a specific check or checks. This has several advantages: - It means we more precisely check dtc's checking behaviour - It means we can check for generation of warnings using the same script - It means we can test cases where dtc should generate multiple errors or warnings from different checks Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-05dtc: Implement path referencesDavid Gibson4-1/+101
This patch extends dtc syntax to allow references (&label, or &{/full/path}) directly within property definitions, rather than inside a cell list. Such references are expanded to the full path of the referenced node, as a string, instead of to a phandle as references within cell lists are evaluated. A testcase is also included. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-05dtc: Generate useful error message for properties after subnodesDavid Gibson1-0/+9
On several occasions, I've accidentally put properties after subnodes in a dts file. I've then spent ages thinking that the resulting syntax error was because of something else. This patch arranges for this specific syntax error to generate a more specific and useful error message. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-12-05dtc: Convert "name" property checking to new infrastructureDavid Gibson2-0/+8
This patch removes the old-style checking code for the "name" property - i.e. verifying that the "name" property, if present, matches the node name. It replaces it with a pair of more-or-less equivalent checks in the new checking framework. This also promotes this check to a "structural" check, or at least an error-rather-than-warning test, since the structural/semantic distinction doesn't really apply in the new framework. A testcase for the check is also added. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-28dtc: Fix some lexical problems with referencesDavid Gibson4-5/+29
The recent change to the lexer to only recognize property and node names in the appropriate context removed a number of lexical warts in our language that would have gotten ugly as we add expression support and so forth. But there's one nasty one remaining: references can contain a full path, including the various problematic node name characters (',', '+' and '-', for example). This would cause trouble with expressions, and it also causes trouble with the patch I'm working on to allow expanding references to paths rather than phandles. This patch therefore reworks the lexer to mitigate these problems. - References to labels cause no problems. These are now recognized separately from references to full paths. No syntax change here. - References to full paths, including problematic characters are allowed by "quoting" the path with braces e.g. &{/pci@10000/somedevice@3,8000}. The braces protect any internal problematic characters from being confused with operators or whatever. - For compatibility with existing dts files, in v0 dts files we allow bare references to paths as before &/foo/bar/whatever - but *only* if the path contains no troublesome characters. Specifically only [a-zA-Z0-9_@/] are allowed. This is an incompatible change to the dts-v1 format, but since AFAIK no-one has yet switched to dts-v1 files, I think we can get away with it. Better to make the transition when people to convert to v1, and get rid of the problematic old syntax. Strictly speaking, it's also an incompatible change to the v0 format, since some path references that were allowed before are no longer allowed. I suspect no-one has been using the no-longer-supported forms (certainly none of the kernel dts files will cause trouble). We might need to think about this harder, though. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-26dtc: Flexible tree checking infrastructure (v2)David Gibson3-0/+18
dtc: Flexible tree checking infrastructure Here, at last, is a substantial start on revising dtc's infrastructure for checking the tree; this is the rework I've been saying was necessary practically since dtc was first release. In the new model, we have a table of "check" structures, each with a name, references to checking functions, and status variables. Each check can (in principle) be individually switched off or on (as either a warning or error). Checks have a list of prerequisites, so if checks need to rely on results from earlier checks to make sense (or even to avoid crashing) they just need to list the relevant other checks there. For now, only the "structural" checks and the fixups for phandle references are converted to the new mechanism. The rather more involved semantic checks (which is where this new mechanism will really be useful) will have to be converted in future patches. At present, there's no user interface for turning on/off the checks - the -f option now forces output even if "error" level checks fail. Again, future patches will be needed to add the fine-grained control, but that should be quite straightforward with the infrastructure implemented here. Also adds a testcase for the handling of bad references, which catches a bug encountered while developing this patch. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-26dtc: Add valgrind support to testsuiteDavid Gibson4-3/+38
This patch adds some options to the run_tests.sh script allowing it to run all the testcases under valgrind to check for pointer corruption bugs and memory leaks. Invoking "make checkm" will run the testsuite with valgrind. It include a mechanism for specifying valgrind errors to be suppressed on a per-testcase basis, and adds a couple of such suppression files for the mangle-layout and open_pack testcases which dump for use by other testcases a buffer which may contain uninitialized sections. We use suppressions rather than initializing the buffer so that valgrind will catch any internal access s to the uninitialized data, which would be a bug. The patch also fixes one genuine bug caught by valgrind - _packblocks() in fdt_rw.c was using memcpy() where it should have been using memmove(). At present the valgrinding won't do anything useful for testcases invoked via a shell script - which includes all the dtc testcases. I plan to fix that later. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-26dtc: Remove some redundant testcasesDavid Gibson1-6/+5
This patch removes a number of testcases from the testsuite that are extremely unlikely to find any bugs that won't be found by the other tests. This speeds up the testsuite. - Both loops across the various tree block layouts run the tree1_tests on the basic mangled tree. This is completely redundant, so remove the second copy. This removes 456 testcases. - We currently run tree1_tests on various trees manipulated by move_and_save. We replace those with just a dtbs_equal_ordered test to check that the manipulated tree is equal to the original. What we're testing here is that fdt_move() operates correctly - it's very unlikely it would succeed well enough for the ordered_equal test to succeed, but the tree1_tests would fail on the result. This removes 162 testcases. - Currently we re-ordered with mangle-layout both the basic test_tree1.dtb and sw_tree1.test.dtb. Since we've already checked that these dtbs are equivalent with dtbs_ordered_equal, it's very unlikely that the tests would fail on one but not the other. Therefore reduce this to only using test_tree1.dtb. This removes 828 testcases. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-20Add a script that compares an "old" and "new" dtc results.Jon Loeliger1-0/+86
Lots of room for improvement here. Command line options, etc. The script iterates over a hard-coded list of kernel DTS files. Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-11-20dtc: Don't use env(1) in testsuiteDavid Gibson1-3/+1
The run_tests.sh script currently invokes the testcase binaries via env(1). This behaviour is inherited from the libhugetlbfs testsuite which uses this approach to easily set various configuration environment variables in testcases. We don't use that for dtc, and are unlikely to ever want to. Therefore this patch removes that technique, which substantially speeds up the testsuite. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-20dtc: Add testcases for tree checksDavid Gibson9-19/+88
This patch adds a group of testcases to check that dtc correctly rejects trees with various structural errors. To make things easier to test, we change dtc so that failing checks (as opposed to other errors) result in exit code 2. This patch also fixes an embarrasing bug uncovered by these new tests: check_phandles() worked out if the tree's phandles were valid, then throws that information away and returns success always. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-20libfdt: Abolish fdt_offset_ptr_typed()David Gibson4-8/+8
The fdt_offset_ptr_typed() macro seemed like a good idea at the time. However, it's not actually used all that often, it can silently throw away const qualifications and it uses a gcc extension (typeof) which I'd prefer to avoid for portability. Therefore, this patch gets rid of it (and the fdt_offset_ptr_typed_w() variant which was never used at all). It also makes a few variables const in testcases, which always should have been const, but weren't caught before because of the aforementioned silent discards. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-20libfdt: Abolish _typed() variants, add _cell() variantsDavid Gibson15-56/+53
In a number of places through libfdt and its tests, we have *_typed() macro variants on functions which use gcc's typeof and statement expression extensions to allow passing literals where the underlying function takes a buffer and size. These seemed like a good idea at the time, but in fact they have some problems. They use typeof and statement expressions, extensions I'd prefer to avoid for portability. Plus, they have potential gotchas - although they'll deal with the size of the thing passed, they won't deal with other representation issues (like endianness) and results could be very strange if the type of the expression passed isn't what you think it is. In fact, the only users of these _typed() macros were when the value passed is a single cell (32-bit integer). Therefore, this patch removes all these _typed() macros and replaces them with explicit _cell() variants which handle a single 32-bit integer, and which also perform endian convesions as appropriate. With this in place, it now becomes easy to use standardized big-endian representation for integer valued properties in the testcases, regardless of the platform we're running on. We therefore do that, which has the additional advantage that all the example trees created during a test run are now byte-for-byte identical regardless of platform. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-13dtc: Add testcase for dtc referencesDavid Gibson3-1/+125
This patch adds a testcase for dtc's reference-to-phandle functionality. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-13libfdt: Add phandle related functionsDavid Gibson10-2/+147
This patch adds fdt_get_phandle() and fdt_node_offset_by_phandle() functions to libfdt. fdt_get_phandle() will retreive the phandle value of a given node, and fdt_node_offset_by_phandle() will locate a node given a phandle. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-13dtc: Add missing dependencies for testsDavid Gibson1-1/+2
At present, the Makefiles will not rebuild trees.o or the dtb files derived from it if testdata.h is updated. This is incorrect, and is because of missing dependency information. This patch fixes the problem by making sure that dependency information is generated from trees.S and dumptrees.c. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-08dtc: Switch dtc to C-style literalsDavid Gibson3-6/+39
dtc: Switch dtc to C-style literals This patch introduces a new version of dts file, distinguished from older files by starting with the special token /dts-v1/. dts files in the new version take C-style literals instead of the old bare hex or OF-style base notation. In addition, the "range" for of memreserve entries (/memreserve/ f0000-fffff) is no longer recognized in the new format. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-11-08dtc: Better exercise dtc base and bytestring featuresDavid Gibson2-8/+8
This patch alters the main testcase, and the dts file corresponding to it so that we at least trivially exercise dtc's bytestring and base conversion features. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-08dtc: Add testcases exercising -Odts modeDavid Gibson2-4/+11
This patch adds a batch of testcases exercising dtc's -Odts mode. Specifically it checks that using dtc to convert dtb->dts->dtb preserves the original dtb for a number of example dtb files. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-08dtc: Make -Idts -Odts preserve property-internal labelsDavid Gibson1-3/+4
This patch changes -Odts mode output so that labels within property values in the input are preserved in the output. Applied on top of the earlier patch to preserve node and property labels in -Odts mode, this means that dtc in -Idts -Odts mode will transfer all labels in the input to the output. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-06libfdt: Fix sw_tree1 testcaseDavid Gibson2-1/+1
There is a bug in the sw_tree1 testcase / utility which puts two "compatible" properties in one node in the output tree. This patch fixes the bug, and also adds a new test checking that the sw_tree1 output is equal to test_tree1.dtb as its supposed to be, which should catch future errors of this type. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-01libfdt: Handle v16 and re-ordered trees for r/wDavid Gibson5-13/+41
Currently all the read/write functions in libfdt require that the given tree be v17, and further, that the tree has the memory reservation block, structure block and strings block stored in that physical order. This patch eases these constraints, by making fdt_open_int() reorder the blocks, and/or convert the tree to v17, so that it will then be ready for the other read-write functions. It also extends fdt_pack() to actually remove any gaps between blocks that might be present. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-30dtc: Remove leftover debugging printf() from mangle-layoutDavid Gibson1-2/+0
The mangle-layout testcase/utility had a leftover debugging printf(). This patch removes it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-25libfdt: Test on trees with different block layoutsDavid Gibson3-1/+178
At present, all the example dtbs we use in the testsuite are version 17 and have reservation map, then structure block then strings block (the natural ordering based on alignment constraints). However, all libfdt's read-only and in-place write functions should also work on v16 trees, and on trees with other layouts. This patch adds a testcase / utility function to rearrange the blocks of a dtb and/or regress a v17 tree to v16, and uses it to run tests on trees with different layouts and versions. Signed-off-by: David Gibson <david@tgibson.dropbear.id.au>
2007-10-24libfdt: Rename and publish _fdt_next_tag()David Gibson4-2/+142
Although it's a low-level function that shouldn't normally be needed, there are circumstances where it's useful for users of libfdt to use the _fdt_next_tag() function. Therefore, this patch renames it to fdt_next_tag() and publishes it in libfdt.h. In addition, this patch adds a new testcase using fdt_next_tag(), dtbs_equal_ordered. This testcase tests for structural equality of two dtbs, including the order of properties and subnodes, but ignoring NOP tags, the order of the dtb sections and the layout of strings in the strings block. This will be useful for testing other dtc functionality in the future. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-23Appease the printf() format $Gods with a correct type.Jon Loeliger1-1/+1
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-10-22dtc: Disable semantic checks by defaultDavid Gibson1-2/+2
At present, dtc makes a lot of semantic checks on the device tree by default, and will refuse to produce output if they fail. This means people tend to need -f to force output despite failing semantic checks rather a lot. This patch splits the device tree checks into structural checks (no bad or duplicate names or phandles) and semantic checks (everything else). By default, only the structural checks are performed, and are fatal. -f will force output even with structural errors (using this in -Idts mode would essentially always be a bad idea, but it might be useful in -Idtb mode for examining a malformed dtb). Semantic checks are only performed if the new -c command line option is supplied, and are always warnings only. Semantic checks will never be performed on a tree with structural errors. This patch is only a stopgap before implementing proper fine-grained error/warning handling, but it should at least get rid of the far-too-frequent need for -f for the time being. This patch removes the -f from the dtc testcases now that it's no longer necessary. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-22dtc: Make helper macros in trees.S more flexibleDavid Gibson1-12/+20
This patch makes the helper macros in trees.S use separate labels for the end of each dt subblock, rather than using only start labels. This means that the macros can now be used to create trees with the subblocks in non-standard orders. In addition, it adds a bunch of extra ; after lines of asm code in macros, making them safe to use in nested macros. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-17dtc: Improve -Odts outputDavid Gibson3-2/+6
This patch makes improvements to the way properties are printed when in dtc is producing dts output. - Characters which need escaping are now properly handled when printing properties as strings - The heuristics for what format to use for a property are improved so that 'compatible' properties will be displayed as expected. - escapes.dts is altered to better demonstrate the changes, and the string_escapes testcase is adjusted accordingly. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>