Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion packages/bsp/common/usr/bin/armbian-install
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ mkopts[f2fs]='-f'

# @TODO source these options from one source, this is mostly defined in partioning.sh
mountopts[ext4]='defaults,noatime,commit=120,errors=remount-ro,x-gvfs-hide 0 1'
mountopts[btrfs]='defaults,noatime,commit=120,compress=lzo,x-gvfs-hide 0 2'
mountopts[btrfs]="defaults,commit=120,compress=lzo,x-gvfs-hide,subvol=@ 0 2"
mountopts[f2fs]='defaults,noatime,x-gvfs-hide 0 2'

# Create boot and root file system #
Expand All @@ -120,6 +120,16 @@ create_armbian()
[[ -n $2 ]] && ( mount -o compress-force=zlib "$2" "${TempDir}"/rootfs 2> /dev/null || mount "$2" "${TempDir}"/rootfs )
[[ -n $1 && $1 != "mtd" ]] && mount "$1" "${TempDir}"/bootfs
fi

# make separate subvolume for rootfs on btrfs
if [[ $eMMCFilesystemChoosen =~ ^(btrfs)$ ]]; then
btrfs subvolume create "${TempDir}"/rootfs/@
sync
btrfs subvolume list ${TempDir}/rootfs/ | grep 'path @$' | cut -d' ' -f2 \
| xargs -I{} btrfs subvolume set-default {} ${TempDir}/rootfs/
umount "${TempDir}"/rootfs
mount -o compress-force=zlib,subvol=@ "$2" "${TempDir}"/rootfs 2> /dev/null
fi
rm -rf "${TempDir}"/bootfs/* "${TempDir}"/rootfs/*

# sata root part
Expand Down