mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Rename boot_info
struct boot_info is named that for historical reasons, and isn't particularly meaningful. Essentially it contains all the information - in "live" form from a single dts or dtb file. As we move towards support for dynamic dt overlays, that name will become increasingly bad. So, in preparation, rename it to dt_info. At the same time rename the 'the_boot_info' global to 'parser_output' since that's its actual purpose. Unfortunately we do need the global unless we switch to bison's re-entrant parser extensions, which would introduce its own complications. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
1ef86ad2c2
commit
00fbb8696b
8 changed files with 147 additions and 148 deletions
32
dtc.c
32
dtc.c
|
@ -168,7 +168,7 @@ static const char *guess_input_format(const char *fname, const char *fallback)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct boot_info *bi;
|
||||
struct dt_info *dti;
|
||||
const char *inform = NULL;
|
||||
const char *outform = NULL;
|
||||
const char *outname = "-";
|
||||
|
@ -301,11 +301,11 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
if (streq(inform, "dts"))
|
||||
bi = dt_from_source(arg);
|
||||
dti = dt_from_source(arg);
|
||||
else if (streq(inform, "fs"))
|
||||
bi = dt_from_fs(arg);
|
||||
dti = dt_from_fs(arg);
|
||||
else if(streq(inform, "dtb"))
|
||||
bi = dt_from_blob(arg);
|
||||
dti = dt_from_blob(arg);
|
||||
else
|
||||
die("Unknown input format \"%s\"\n", inform);
|
||||
|
||||
|
@ -315,29 +315,29 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (cmdline_boot_cpuid != -1)
|
||||
bi->boot_cpuid_phys = cmdline_boot_cpuid;
|
||||
dti->boot_cpuid_phys = cmdline_boot_cpuid;
|
||||
|
||||
fill_fullpaths(bi->dt, "");
|
||||
process_checks(force, bi);
|
||||
fill_fullpaths(dti->dt, "");
|
||||
process_checks(force, dti);
|
||||
|
||||
/* on a plugin, generate by default */
|
||||
if (bi->dtsflags & DTSF_PLUGIN) {
|
||||
if (dti->dtsflags & DTSF_PLUGIN) {
|
||||
generate_fixups = 1;
|
||||
}
|
||||
|
||||
if (auto_label_aliases)
|
||||
generate_label_tree(bi, "aliases", false);
|
||||
generate_label_tree(dti, "aliases", false);
|
||||
|
||||
if (generate_symbols)
|
||||
generate_label_tree(bi, "__symbols__", true);
|
||||
generate_label_tree(dti, "__symbols__", true);
|
||||
|
||||
if (generate_fixups) {
|
||||
generate_fixups_tree(bi, "__fixups__");
|
||||
generate_local_fixups_tree(bi, "__local_fixups__");
|
||||
generate_fixups_tree(dti, "__fixups__");
|
||||
generate_local_fixups_tree(dti, "__local_fixups__");
|
||||
}
|
||||
|
||||
if (sort)
|
||||
sort_tree(bi);
|
||||
sort_tree(dti);
|
||||
|
||||
if (streq(outname, "-")) {
|
||||
outf = stdout;
|
||||
|
@ -349,11 +349,11 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (streq(outform, "dts")) {
|
||||
dt_to_source(outf, bi);
|
||||
dt_to_source(outf, dti);
|
||||
} else if (streq(outform, "dtb")) {
|
||||
dt_to_blob(outf, bi, outversion);
|
||||
dt_to_blob(outf, dti, outversion);
|
||||
} else if (streq(outform, "asm")) {
|
||||
dt_to_asm(outf, bi, outversion);
|
||||
dt_to_asm(outf, dti, outversion);
|
||||
} else if (streq(outform, "null")) {
|
||||
/* do nothing */
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue