u-boot-brain/tools/binman/etype/u_boot_expanded.py
Simon Glass 0668492728 binman: Automatically expand phase binaries into sections
When creating an entry, check for an expanded version of that entry, then
use it instead. This allows, for example use of:

   u-boot {
   };

instead of having to write out in full:

   u-boot {
      type = "section";

      u-boot-nodtb {
      };

      u-boot-dtb {
      };
   };

Add an implementaion of this and associated documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26 17:03:09 +13:00

25 lines
808 B
Python

# SPDX-License-Identifier: GPL-2.0+
# Copyright 2021 Google LLC
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for U-Boot binary
#
from binman.etype.blob_phase import Entry_blob_phase
class Entry_u_boot_expanded(Entry_blob_phase):
"""U-Boot flat binary broken out into its component parts
This is a section containing the U-Boot binary and a devicetree. Using this
entry type automatically creates this section, with the following entries
in it:
u-boot-nodtb
u-boot-dtb
Having the devicetree separate allows binman to update it in the final
image, so that the entries positions are provided to the running U-Boot.
"""
def __init__(self, section, etype, node):
super().__init__(section, etype, node, 'u-boot', 'u-boot-dtb', False)