Skip to content

Commit

Permalink
base-files: remove fitblk_get_bootdev() from /lib/upgrade/common.sh
Browse files Browse the repository at this point in the history
The function was moved to /lib/upgrade/fit.sh which is part of the fitblk
package. Remove it from /lib/upgrade/common.sh to safe space on boards
not using unified uImage.FIT images.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed Jul 18, 2024
1 parent 386855d commit de2df0f
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions package/base-files/files/lib/upgrade/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,6 @@ part_magic_fat() {
[ "$magic" = "FAT" ] || [ "$magic_fat32" = "FAT32" ]
}

fitblk_get_bootdev() {
[ -e /sys/firmware/devicetree/base/chosen/rootdisk ] || return

local rootdisk="$(cat /sys/firmware/devicetree/base/chosen/rootdisk)"
local handle bootdev
for handle in /sys/class/block/*/of_node/phandle /sys/class/block/*/device/of_node/phandle; do
[ ! -e "$handle" ] && continue
if [ "$rootdisk" = "$(cat $handle)" ]; then
bootdev="${handle%/of_node/phandle}"
bootdev="${bootdev%/device}"
bootdev="${bootdev#/sys/class/block/}"
echo "$bootdev"
break
fi
done
}

export_bootdevice() {
local cmdline uuid blockdev uevent line class
local MAJOR MINOR DEVNAME DEVTYPE
Expand Down

0 comments on commit de2df0f

Please sign in to comment.