Skip to content
Snippets Groups Projects
Commit 2cb88c77 authored by Andreas Gnau's avatar Andreas Gnau :speech_balloon:
Browse files

DISC: Migrate to overlay 1/2 volume names

In commit 14bd2f93 (brcm63xx: system_layout: WE7202242SA: Adapt to R01 layout,
2021-06-22), we migrated to different overlay volume names. Add a
migration script for old boards.
parent 14bd2f93
Branches
Tags
No related merge requests found
#!/bin/sh
rename_ubi_volume_if_not_done() {
old_name="$1"
new_name="$2"
find /sys/class/ubi/ubi0_*/name \
-exec grep -F "$old_name" '{}' ';' \
-exec echo DISC_FLASH_LAYOUT_FIX: Renaming: ubirename /dev/ubi0 "$old_name" "$new_name" ';' \
-exec ubirename /dev/ubi0 "$old_name" "$new_name" ';'
}
flash_layout_fixup () {
echo "DISC_FLASH_LAYOUT_FIX: Starting (if it does not print anything, then volumes are already renamed to overlay1/2)"
rename_ubi_volume_if_not_done overlayA overlay1
rename_ubi_volume_if_not_done overlayB overlay2
echo "DISC_FLASH_LAYOUT_FIX: Overlay volume names are:"
ubinfo --all | grep overlay
echo "DISC_FLASH_LAYOUT_FIX: Finished"
}
boot_hook_add preinit_main flash_layout_fixup
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment