Commit a7ed8d1865337846241d2f7be4a7e6b87cf44681

Authored by Tim Gover
1 parent fc4035ec

rpi-eeprom-config: Pull in --edit fixes from rpi-eeprom repo

Showing 1 changed file with 6 additions and 2 deletions
tools/rpi-eeprom-config
... ... @@ -140,9 +140,13 @@ def apply_update(config, eeprom=None, config_src=None):
140 140 else:
141 141 eeprom_image = get_latest_eeprom()
142 142 create_tempdir()
  143 +
  144 + # Replace the contents of bootconf.txt with the contents of the config file
143 145 tmp_update = os.path.join(TEMP_DIR, 'pieeprom.upd')
144 146 image = BootloaderImage(eeprom_image, tmp_update)
145   - image.write(config)
  147 + image.update_file(config, BOOTCONF_TXT)
  148 + image.write()
  149 +
146 150 config_str = open(config).read()
147 151 if config_src is None:
148 152 config_src = ''
... ... @@ -176,7 +180,7 @@ def edit_config(eeprom=None):
176 180 if os.path.exists(pending):
177 181 config_src = pending
178 182 image = BootloaderImage(pending)
179   - current_config = image.get_config().decode('utf-8')
  183 + current_config = image.get_file(BOOTCONF_TXT).decode('utf-8')
180 184 else:
181 185 current_config, config_src = read_current_config()
182 186  
... ...