Commit 1fcd9baa authored by Anton Midyukov's avatar Anton Midyukov

tar2fs: Add offset 16 MiB for singleboard PC support

This space can be used by single board for u-boot.
parent 2c90b073
...@@ -57,19 +57,24 @@ ppc*) ...@@ -57,19 +57,24 @@ ppc*)
BOOTLOADERPARTSIZEM="8" BOOTLOADERPARTSIZEM="8"
ROOTPART="2" ROOTPART="2"
;; ;;
arm*|aarch64)
ROOTPART="1"
BLOCKDEV="/dev/sda"
CUR_BOUNDARY=15 # offset 16 MiB for singleboard's
;;
*) *)
if [ "$BOOTLOADER" == grub-efi -o "$BOOTTYPE" == EFI ]; then ROOTPART="1"
EFIPART="1"
EFIPARTSIZEM="256"
EFIPARTFSTYPE="fat"
ROOTPART="2"
else
ROOTPART="1"
fi
BLOCKDEV="/dev/sda" BLOCKDEV="/dev/sda"
;; ;;
esac esac
if [ "$BOOTLOADER" == grub-efi -o "$BOOTTYPE" == EFI ]; then
EFIPART="1"
EFIPARTSIZEM="256"
EFIPARTFSTYPE="fat"
ROOTPART="2"
fi
PARTTABLE="$7" PARTTABLE="$7"
if [ -z "$PARTTABLE" ]; then if [ -z "$PARTTABLE" ]; then
if [ "$BOOTLOADER" == grub-efi ]; then if [ "$BOOTLOADER" == grub-efi ]; then
...@@ -201,7 +206,7 @@ parting mklabel "$PARTTABLE" ...@@ -201,7 +206,7 @@ parting mklabel "$PARTTABLE"
if [ -n "$BOOTLOADERPART" ] && [ -n "$BOOTLOADERPARTSIZEM" ]; then if [ -n "$BOOTLOADERPART" ] && [ -n "$BOOTLOADERPARTSIZEM" ]; then
case "$ARCH" in case "$ARCH" in
ppc*) ppc*)
parting mkpart primary ext2 2048s $((BOOTLOADERPARTSIZEM + 1))MiB parting mkpart primary ext2 $((CUR_BOUNDARY+1))MiB $((BOOTLOADERPARTSIZEM + 1))MiB
CUR_BOUNDARY="$BOOTLOADERPARTSIZEM" CUR_BOUNDARY="$BOOTLOADERPARTSIZEM"
parting set 1 prep on parting set 1 prep on
parting set 1 boot on parting set 1 boot on
...@@ -212,9 +217,9 @@ fi ...@@ -212,9 +217,9 @@ fi
if [ -n "$EFIPART" ]; then if [ -n "$EFIPART" ]; then
EFIDEV="$EFIDEV$EFIPART" EFIDEV="$EFIDEV$EFIPART"
if [ "$PARTTABLE" == gpt ]; then if [ "$PARTTABLE" == gpt ]; then
parting mkpart fat32 2048s $(($EFIPARTSIZEM + 1))MiB parting mkpart fat32 $((CUR_BOUNDARY+1))MiB $(($EFIPARTSIZEM + 1))MiB
else else
parting mkpart primary fat32 2048s $(($EFIPARTSIZEM + 1))MiB parting mkpart primary fat32 $((CUR_BOUNDARY+1))MiB $(($EFIPARTSIZEM + 1))MiB
fi fi
CUR_BOUNDARY="$EFIPARTSIZEM" CUR_BOUNDARY="$EFIPARTSIZEM"
parting set 1 boot on parting set 1 boot on
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment