summaryrefslogtreecommitdiff
path: root/scripts/d2c.sh
AgeCommit message (Collapse)AuthorFilesLines
2020-10-18Makefile: Allow padding zeros when converting DTB to C sourceHeinrich Schuchardt1-1/+8
We extend d2c.sh to allow padding zeros in output C source when converting DTB to C source. Using this feature, platforms can create extra room for in-place FDT fixups on built-in DTBs. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-06-05Makefile: Add mechanism for platforms to have multiple builtin DTBsAnup Patel1-0/+67
Currently, we can only include one DTB as builtin for a platform using FDT_PAYLOAD_DTB make variable in platform config.mk. This patch adds new mechanism using which we can convert any DTS file to C source and futher compile-n-link it with libplatsbi.a. The generated C source will have the DTB contents as an array "const char <varprefix>_start[]" where <varprefix> is specified in platform objects.mk makefile. Example1 -------- If we have built-in k210.dts and desired <varprefix> is "dt_k210" then specify following in platform objects.mk: platform-objs-y += k210.o platform-varprefix-k210.o = dt_k210 Example2 -------- If we have built-in abc/k210.dts and desired <varprefix> is "dt_abc_k210" then specify following in platform objects.mk: platform-objs-y += abc/k210.o platform-varprefix-abc-k210.o = dt_abc_k210 Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>