scripts: sd_fusing: Remove code for handling hardcoded bootcode
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 6 Aug 2024 12:13:25 +0000 (14:13 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 28 Oct 2024 11:28:46 +0000 (20:28 +0900)
Remove the code for handling hardcoded bootcode as it is no longer used.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If399c8ae19789acf98b014fcac6307fadc564f5d

scripts/tizen/sd_fusing.py

index a0c6bef867677810102aac869b1a9e706c3e3f19..30abf4c46d57e3bbbef97f466642be7b527cd1b8 100755 (executable)
@@ -135,8 +135,6 @@ class SdFusingTarget:
             self.part_table[self.user_partition]["size"] = self.user_size
 
         self.label = Label(self.part_table, ltype)
-        if not hasattr(self, 'bootcode'):
-            self.bootcode = None
         self.binaries = self._get_binaries('binaries')
 
     def apply_partition_sizes(self, partition_sizes):
@@ -625,9 +623,6 @@ class LicheePi4A(InitParams, SdFusingTargetAB):
          "binaries":   "bootcode.bin", },
     ]
 
-    # bootcode written to the protective MBR, aka RV64 'J 0x4400' (sector 34)
-    bootcode = b'\x6f\x40\x00\x40'
-
     def __init__(self, device, args):
         self.user_partition = 4
         self.reserved_space = 5
@@ -677,9 +672,6 @@ class LicheePi4ASuper(InitParams, SdFusingTargetAB):
          "binaries":   "bootcode.bin", },
     ]
 
-    # bootcode written to the protective MBR, aka RV64 'J 0x4400' (sector 34)
-    bootcode = b'\x6f\x40\x00\x40'
-
     def __init__(self, device, args):
         self.reserved_space = 8
         self.user_partition = 4
@@ -902,12 +894,6 @@ def mkpart(args, target):
         logging.error(f"New partition table:\n" + str(target.label))
         sys.exit(1)
 
-    if target.bootcode:
-        logging.debug("Writing bootcode\n")
-        with open(Device, "wb") as f:
-            f.write(target.bootcode)
-            f.close
-
     # Run `udevadm settle` to ensure that partition change made by `sfdisk` is completely reflected in userspace.
     logging.info("Waiting for the udev event queue to empty...")
     argv = ['udevadm', 'settle']