mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-11 16:37:42 -04:00
Set DTSF_PLUGIN if needed when compiling from dtb
The need for the plugin flag is determined by the existence of __fixups__ or __local_fixups__. This is a bit simplifying because if __fixups__ or __local_fixups__ exist but don't have properties, the plugin flag isn't needed. But in practise the test should be good enough such that this corner case doesn't matter. Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Message-ID: <20250919092912.663304-10-u.kleine-koenig@baylibre.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
ef3b1baf63
commit
cbb48690c6
1 changed files with 5 additions and 1 deletions
|
|
@ -807,6 +807,7 @@ struct dt_info *dt_from_blob(const char *fname)
|
||||||
struct node *tree;
|
struct node *tree;
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
unsigned int dtsflags = DTSF_V1;
|
||||||
|
|
||||||
f = srcfile_relative_open(fname, NULL);
|
f = srcfile_relative_open(fname, NULL);
|
||||||
|
|
||||||
|
|
@ -919,5 +920,8 @@ struct dt_info *dt_from_blob(const char *fname)
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
return build_dt_info(DTSF_V1, reservelist, tree, boot_cpuid_phys);
|
if (get_subnode(tree, "__fixups__") || get_subnode(tree, "__local_fixups__"))
|
||||||
|
dtsflags |= DTSF_PLUGIN;
|
||||||
|
|
||||||
|
return build_dt_info(dtsflags, reservelist, tree, boot_cpuid_phys);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue