Discussion:
[fedora-arm] How to rebuild a single dtb file
Andrew Gillis
2016-03-15 01:19:19 UTC
Permalink
I want to rebuild a dtb file so I can test it with some hardware changes I
made to an imx6 board.

I could just rebuild the kernel but that takes forever. Is there an easy
procedure for just rebuilding a single dtb files?

I tried using dtc but it doesn't seem to work (I get errors) directly or I
don't have the correct syntax.


-Andrew
Marcin Juszkiewicz
2016-03-15 08:13:54 UTC
Permalink
Post by Andrew Gillis
I want to rebuild a dtb file so I can test it with some hardware changes
I made to an imx6 board.
I could just rebuild the kernel but that takes forever. Is there an easy
procedure for just rebuilding a single dtb files?
I tried using dtc but it doesn't seem to work (I get errors) directly or
I don't have the correct syntax.
$ dtc somefile.dts -O dtb -o somefile.dtb
Andrew Gillis
2016-03-15 16:17:58 UTC
Permalink
Thanks. That's what I tried but I get an error.

dtc imx6dl-wandboard.dts -O dtb -o imx6dl-wandboard.dtb
Error: imx6dl-wandboard.dts:12.1-9 syntax error
FATAL ERROR: Unable to parse input tree

I googled this error and it says there is some new way to build dts files
using make that resolves this error but I can not figure out how to do this.

In this test case I have not modified the imx6dl-wandboard.dts file and if
I rebuild the kernel SRPM it builds fine.

I guess I want to know how the kernel SRPM builds these files.
Post by Marcin Juszkiewicz
Post by Andrew Gillis
I want to rebuild a dtb file so I can test it with some hardware changes
I made to an imx6 board.
I could just rebuild the kernel but that takes forever. Is there an easy
procedure for just rebuilding a single dtb files?
I tried using dtc but it doesn't seem to work (I get errors) directly or
I don't have the correct syntax.
$ dtc somefile.dts -O dtb -o somefile.dtb
_______________________________________________
arm mailing list
--
Andrew Gillis
Lead Developer VortexBox
vortexbox.org
Richard Marko
2016-03-16 13:12:12 UTC
Permalink
Hi,

I was able to rebuild dt for Beaglebone Black from kernel source tree using following mad command:

gcc -x assembler-with-cpp -undef -D__DTS__ -nostdinc -Iinclude -Iarch/arm/boot/dts/ -E - <./arch/arm/boot/dts/am335x-boneblack.dts |dtc -iarch/arm/boot/dts/ -I dts -O dtb >bbb.dtb

You just need to adjust it for your board. It's possible to use dtc directly when you unpack dtb from /boot but in case of kernel tree there's pre-processing done so dtc gets flat file (I guess).

Cheers,
Richard
Jurgen Kramer
2016-03-21 09:26:36 UTC
Permalink
Post by Andrew Gillis
I want to rebuild a dtb file so I can test it with some hardware
changes I made to an imx6 board.
I could just rebuild the kernel but that takes forever. Is there an
easy procedure for just rebuilding a single dtb files? 
I tried using dtc but it doesn't seem to work (I get errors) directly
or I don't have the correct syntax.
You first need to convert the compiled dtb file to dts. Then you can
adjust the dts and compile to dtb.

dtc -I dtb -O dts -o <output dts> <input dtb>

Jurgen
Post by Andrew Gillis
-Andrew
_______________________________________________
arm mailing list
g
Loading...