Skip to content

Commit a435bd0

Browse files
committed
[multiboot] small update for dm520
1 parent ce4bd83 commit a435bd0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

lib/python/Screens/Information.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,8 @@ def displayInformation(self):
642642
device = _("eMMC slot %s%s") % (slotCode, f" - {device}" if device else "")
643643
elif "mtd" in device:
644644
device = _("MTD slot %s%s") % (slotCode, f" - {device}" if device else "")
645+
elif "ubi" in device:
646+
device = _("UBI slot %s%s") % (slotCode, f" - {device}" if device else "")
645647
else:
646648
device = _("USB slot %s%s") % (slotCode, f" - {device}" if device else "")
647649
info.append(formatLine("P1", _("Hardware MultiBoot device"), device))

lib/python/Screens/MultiBootManager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,10 @@ def closeStartUpCallback(answer):
875875
uuidRootFS = fileReadLine(f"/dev/uuid/{device}2", default=None, source=MODULE_NAME)
876876
diskSize = self.partitionSizeGB(f"/dev/{device}")
877877

878-
startupContent = f"kernel=/dev/{mtdKernel} ubi.mtd=rootfs root=ubi0:rootfs flash=1 rootfstype=ubifs\n"
878+
machinebuild = BoxInfo.getItem("machinebuild")
879+
rootfsName = "dreambox-rootfs" if machinebuild == "dm520" else "rootfs"
880+
startupContent = f"kernel=/dev/{mtdKernel} ubi.mtd=rootfs root=ubi0:{rootfsName} flash=1 rootfstype=ubifs\n"
881+
879882
with open(f"{MOUNTPOINT}/STARTUP", "w") as fd:
880883
fd.write(startupContent)
881884
with open(f"{MOUNTPOINT}/STARTUP_FLASH", "w") as fd:

lib/python/Tools/MultiBoot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def saveKernel(bootSlots, slotCode, kernel):
176176
# print(f"[MultiBoot] loadBootSlots DEBUG: 'UUID=' found for device '{uuidDevice}'.")
177177
if uuidDevice:
178178
device = uuidDevice
179-
if exists(device) or device in ("ubi0:ubifs", "ubi0:rootfs"):
179+
if exists(device) or device in ("ubi0:ubifs", "ubi0:rootfs", "ubi0:dreambox-rootfs"):
180180
if slotCode not in bootSlots:
181181
bootSlots[slotCode] = {}
182182
# print(f"[MultiBoot] Root dictionary entry in slot '{slotCode}' created.")

0 commit comments

Comments
 (0)