aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorKagurazaka Kotori <kagurazakakotori@gmail.com>2020-09-08 16:00:02 +0800
committerPaul Spooren <mail@aparcar.org>2021-01-03 13:48:50 -1000
commit927b9df938803d409d6b3a47d6834a6c10f68c3d (patch)
tree96abf45009aed5ebd6f74dfd29e48b4c6a38b591 /package/base-files/files
parent7937c1f7d7f21309f54ba74de744b7b7db5ce9e8 (diff)
downloadupstream-927b9df938803d409d6b3a47d6834a6c10f68c3d.tar.gz
upstream-927b9df938803d409d6b3a47d6834a6c10f68c3d.tar.bz2
upstream-927b9df938803d409d6b3a47d6834a6c10f68c3d.zip
x86/efi: add FAT32 esp mounting support
Adds a new function get_magic_fat32() in base-files to read FAT32 magic. Now FAT32 EFI system partition can be handled in the same way as FAT12/FAT16. Signed-off-by: Kagurazaka Kotori <kagurazakakotori@gmail.com> [replace '-o' with '] || [' to satisfy shellsheck] Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index b44a5998f4..e8a28f4138 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -133,6 +133,10 @@ get_magic_vfat() {
(get_image "$@" | dd bs=1 count=3 skip=54) 2>/dev/null
}
+get_magic_fat32() {
+ (get_image "$@" | dd bs=1 count=5 skip=82) 2>/dev/null
+}
+
part_magic_efi() {
local magic=$(get_magic_gpt "$@")
[ "$magic" = "EFI PART" ]
@@ -140,7 +144,8 @@ part_magic_efi() {
part_magic_fat() {
local magic=$(get_magic_vfat "$@")
- [ "$magic" = "FAT" ]
+ local magic_fat32=$(get_magic_fat32 "$@")
+ [ "$magic" = "FAT" ] || [ "$magic_fat32" = "FAT32" ]
}
export_bootdevice() {