bundle_firmware: Drop the postload implementation

This feature is not used anymore and can be dropped. Drop the implementation
code.

BUG=chromium:595715
BRANCH=none
TEST=emerge-kevin chromeos-bootimage; see that it still completes

Change-Id: Iaf84f870f71b22aa2ca1e01da904aade1fc280d0
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/344801
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index 89d30e3..10820a0 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -648,29 +648,17 @@
       fdt_text_base = text_base
     return fdt_text_base
 
-  def _CreateBootStub(self, uboot, base_fdt, postload):
+  def _CreateBootStub(self, uboot, base_fdt):
     """Create a boot stub and a signed boot stub.
 
-    For postload:
-    We add a /config/postload-text-offset entry to the signed bootstub's
-    fdt so that U-Boot can find the postload code.
-
-    The raw (unsigned) bootstub will have a value of -1 for this since we will
-    simply append the postload code to the bootstub and it can find it there.
-    This will be used for RW A/B firmware.
-
-    For the signed case this value will specify where in the flash to find
-    the postload code. This will be used for RO firmware.
-
     Args:
-      uboot: Path to u-boot.bin (may be chroot-relative)
+      uboot: Path to u-boot.bin (may be chroot-relative).
       base_fdt: Fdt object containing the flat device tree.
-      postload: Path to u-boot-post.bin, or None if none.
 
     Returns:
       Tuple containing:
-        Full path to bootstub (uboot + fdt(-1) + postload).
-        Full path to signed (uboot + fdt(flash pos) + bct) + postload.
+        Full path to bootstub (uboot + fdt(-1)).
+        Full path to signed (uboot + fdt(flash pos) + bct).
 
     Raises:
       CmdError if a command fails.
@@ -681,7 +669,6 @@
 
     # Make a copy of the fdt for the bootstub
     fdt = base_fdt.Copy(os.path.join(self._tools.outdir, 'bootstub.dtb'))
-    fdt.PutInteger('/config', 'postload-text-offset', 0xffffffff)
     fdt_data = self._tools.ReadFile(fdt.fname)
 
     self._tools.WriteFile(bootstub, uboot_data + fdt_data)
@@ -694,38 +681,9 @@
     signed = self._SignBootstub(self._tools.Filename(self.bct_fname),
         bootstub, text_base)
 
-    signed_postload = os.path.join(self._tools.outdir, 'signed-postload.bin')
-    data = self._tools.ReadFile(signed)
+    self._tools.OutputSize('Final bootstub', signed)
 
-    if postload:
-      # We must add postload to the bootstub since A and B will need to
-      # be able to find it without the /config/postload-text-offset mechanism.
-      bs_data = self._tools.ReadFile(bootstub)
-      bs_data += self._tools.ReadFile(postload)
-      bootstub = os.path.join(self._tools.outdir, 'u-boot-fdt-postload.bin')
-      self._tools.WriteFile(bootstub, bs_data)
-      self._tools.OutputSize('Combined binary with postload', bootstub)
-
-      # Now that we know the file size, adjust the fdt and re-sign
-      postload_bootstub = os.path.join(self._tools.outdir, 'postload.bin')
-      fdt.PutInteger('/config', 'postload-text-offset', len(data))
-      fdt_data = self._tools.ReadFile(fdt.fname)
-      self._tools.WriteFile(postload_bootstub, uboot_data + fdt_data)
-      signed = self._SignBootstub(self._tools.Filename(self.bct_fname),
-          postload_bootstub, text_base)
-      if len(data) != os.path.getsize(signed):
-        raise CmdError('Signed file size changed from %d to %d after updating '
-            'fdt' % (len(data), os.path.getsize(signed)))
-
-      # Re-read the signed image, and add the post-load binary.
-      data = self._tools.ReadFile(signed)
-      data += self._tools.ReadFile(postload)
-      self._tools.OutputSize('Post-load binary', postload)
-
-    self._tools.WriteFile(signed_postload, data)
-    self._tools.OutputSize('Final bootstub with postload', signed_postload)
-
-    return bootstub, signed_postload
+    return bootstub, signed
 
   def _AddCbfsFiles(self, bootstub, cbfs_files):
     for dir, subs, files in os.walk(cbfs_files):