mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-08 12:45:29 -05:00
dtc: Add support for binary includes.
On Wed, Jun 04, 2008 at 09:26:23AM -0500, Jon Loeliger wrote:
> David Gibson wrote:
>
>> But as I said that can be dealt with in the future without breaking
>> compatibility. Objection withdrawn.
>>
>
> And on that note, I officially implore Scott to
> re-submit his binary include patch!
Scott's original patch does still have some implementation details I
didn't like. So in the interests of saving time, I've addressed some
of those, added a testcase, and and now resubmitting my revised
version of Scott's patch.
dtc: Add support for binary includes.
A property's data can be populated with a file's contents
as follows:
node {
prop = /incbin/("path/to/data");
};
A subset of a file can be included by passing start and size parameters.
For example, to include bytes 8 through 23:
node {
prop = /incbin/("path/to/data", 8, 16);
};
As with /include/, non-absolute paths are looked for in the directory
of the source file that includes them.
Implementation revised, and a testcase added by David Gibson
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
050e6f0cff
commit
e37ec7d588
8 changed files with 145 additions and 6 deletions
|
|
@ -206,6 +206,10 @@ dtc_tests () {
|
|||
run_dtc_test -I dts -O dtb -o dtc_comments-cmp.test.dtb comments-cmp.dts
|
||||
run_test dtbs_equal_ordered dtc_comments.test.dtb dtc_comments-cmp.test.dtb
|
||||
|
||||
# Check /incbin/ directive
|
||||
run_dtc_test -I dts -O dtb -o incbin.test.dtb incbin.dts
|
||||
run_test incbin incbin.test.dtb
|
||||
|
||||
# Check boot_cpuid_phys handling
|
||||
run_dtc_test -I dts -O dtb -b 17 -o boot_cpuid.test.dtb empty.dts
|
||||
run_test boot-cpuid boot_cpuid.test.dtb 17
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue