mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
partitioning: Set correct partition type UUID for root filesystem
Previously, only the type "Generic Linux filesystem" was used. Use the correct type "Linux root ($ARCHITECTURE)" for the root filesystem.
This commit is contained in:
@@ -12,6 +12,11 @@ declare -g ARCH='amd64' # Debian name $(dpkg-architecture -q
|
||||
declare -g ARCHITECTURE='x86_64' # "kernel" arch
|
||||
declare -g KERNEL_SRC_ARCH='x86' # kernel SRC_ARCH; there's two for x86_64
|
||||
declare -g QEMU_BINARY='qemu-x86_64-static' # Hopefully you have this installed.
|
||||
|
||||
# Linux root has a different Type-UUID for every architecture
|
||||
# See https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
|
||||
declare -g PARTITION_TYPE_UUID_ROOT="4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709" # "Linux root (x86-64)"
|
||||
|
||||
declare -g MAIN_CMDLINE='' # we set it in common, it was not set before
|
||||
declare -g KERNEL_COMPILER=' ' # hack: use single space for host gcc. won't work on arm64 hosts
|
||||
declare -g KERNEL_USE_GCC=' ' # more hacks.
|
||||
|
||||
@@ -13,6 +13,10 @@ declare -g ARCHITECTURE='arm64'
|
||||
declare -g KERNEL_SRC_ARCH='arm64'
|
||||
declare -g QEMU_BINARY='qemu-aarch64-static'
|
||||
|
||||
# Linux root has a different Type-UUID for every architecture
|
||||
# See https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
|
||||
declare -g PARTITION_TYPE_UUID_ROOT="B921B045-1DF0-41C3-AF44-4C6F280D3FAE" # "Linux root (ARM-64)"
|
||||
|
||||
# Defaults, if not set by board or family.
|
||||
declare -g KERNEL_IMAGE_TYPE="${KERNEL_IMAGE_TYPE:-"Image"}"
|
||||
declare -g KERNEL_INSTALL_TYPE="${KERNEL_INSTALL_TYPE:-"install"}"
|
||||
|
||||
@@ -14,6 +14,10 @@ declare -g KERNEL_SRC_ARCH='arm'
|
||||
declare -g QEMU_BINARY='qemu-arm-static'
|
||||
declare -g INITRD_ARCH='arm'
|
||||
|
||||
# Linux root has a different Type-UUID for every architecture
|
||||
# See https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
|
||||
declare -g PARTITION_TYPE_UUID_ROOT="69DAD710-2CE4-4E3C-B16C-21A1D49ABED3" # "Linux root (ARM)"
|
||||
|
||||
# Defaults, if not set by board or family.
|
||||
declare -g KERNEL_IMAGE_TYPE="${KERNEL_IMAGE_TYPE:-"zImage"}"
|
||||
declare -g KERNEL_INSTALL_TYPE="${KERNEL_INSTALL_TYPE:-"zinstall"}"
|
||||
|
||||
@@ -15,6 +15,10 @@ declare -g QEMU_BINARY='qemu-riscv64-static'
|
||||
declare -g IMAGE_PARTITION_TABLE='gpt'
|
||||
declare -g SKIP_EXTERNAL_TOOLCHAINS='yes'
|
||||
|
||||
# Linux root has a different Type-UUID for every architecture
|
||||
# See https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
|
||||
declare -g PARTITION_TYPE_UUID_ROOT="72EC70A6-CF74-40E6-BD49-4BDA08E8F224" # "Linux root (RISC-V-64)"
|
||||
|
||||
# Defaults, if not set by board or family.
|
||||
declare -g KERNEL_IMAGE_TYPE="${KERNEL_IMAGE_TYPE:-"Image"}"
|
||||
declare -g KERNEL_INSTALL_TYPE="${KERNEL_INSTALL_TYPE:-"install"}"
|
||||
|
||||
@@ -214,7 +214,7 @@ function prepare_partitions() {
|
||||
echo "$bootpart : name=\"bootfs\", start=${next}MiB, size=${BOOTSIZE}MiB, type=${type}"
|
||||
local next=$(($next + $BOOTSIZE))
|
||||
else
|
||||
# no `size` argument mean "as much as possible"
|
||||
# No 'size' argument means "expand as much as possible"
|
||||
echo "$bootpart : name=\"bootfs\", start=${next}MiB, type=${type}"
|
||||
fi
|
||||
fi
|
||||
@@ -222,9 +222,20 @@ function prepare_partitions() {
|
||||
# Root filesystem partition
|
||||
if [[ -n "$rootpart" ]]; then
|
||||
# dos: Linux
|
||||
# gpt: Linux filesystem
|
||||
[[ "$IMAGE_PARTITION_TABLE" != "gpt" ]] && local type="83" || local type="0FC63DAF-8483-4772-8E79-3D69D8477DE4"
|
||||
# no `size` argument mean "as much as possible"
|
||||
# gpt: Linux root
|
||||
if [[ "$IMAGE_PARTITION_TABLE" != "gpt" ]]; then
|
||||
local type="83"
|
||||
else
|
||||
# Linux root has a different Type-UUID for every architecture
|
||||
# See https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
|
||||
# The ${PARTITION_TYPE_UUID_ROOT} variable is defined in each architecture file (e.g. config/sources/arm64.conf)
|
||||
if [[ -n "${PARTITION_TYPE_UUID_ROOT}" ]]; then
|
||||
local type="${PARTITION_TYPE_UUID_ROOT}"
|
||||
else
|
||||
exit_with_error "Missing 'PARTITION_TYPE_UUID_ROOT' variable while partitioning the root filesystem!"
|
||||
fi
|
||||
fi
|
||||
# No 'size' argument means "expand as much as possible"
|
||||
echo "$rootpart : name=\"rootfs\", start=${next}MiB, type=${type}"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user