From ed6d0d2d6545f6c448acac5cd4ccba88d7287506 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Fri, 18 Aug 2017 16:59:06 +0300 Subject: [PATCH] Small enhancements --- lib/debootstrap-ng.sh | 5 +++-- lib/makeboarddeb.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/debootstrap-ng.sh b/lib/debootstrap-ng.sh index 33f9626463..b14af3db4d 100644 --- a/lib/debootstrap-ng.sh +++ b/lib/debootstrap-ng.sh @@ -36,14 +36,15 @@ debootstrap_ng() # stage: verify tmpfs configuration and mount # default maximum size for tmpfs mount is 1/2 of available RAM - # CLI needs ~1.2GiB+ (Xenial CLI), Desktop - ~2.2GiB+ (Xenial Desktop w/o HW acceleration) + # CLI needs ~1.2GiB+ (Xenial CLI), Desktop - ~2.8GiB+ (Xenial Desktop w/o HW acceleration) # calculate and set tmpfs mount to use 2/3 of available RAM local phymem=$(( $(awk '/MemTotal/ {print $2}' /proc/meminfo) / 1024 * 2 / 3 )) # MiB - if [[ $BUILD_DESKTOP == yes ]]; then local tmpfs_max_size=3200; else local tmpfs_max_size=1500; fi # MiB + if [[ $BUILD_DESKTOP == yes ]]; then local tmpfs_max_size=3500; else local tmpfs_max_size=1500; fi # MiB if [[ $FORCE_USE_RAMDISK == no ]]; then local use_tmpfs=no elif [[ $FORCE_USE_RAMDISK == yes || $phymem -gt $tmpfs_max_size ]]; then local use_tmpfs=yes fi + [[ -n $FORCE_TMPFS_SIZE ]] && phymem=$FORCE_TMPFS_SIZE [[ $use_tmpfs == yes ]] && mount -t tmpfs -o size=${phymem}M tmpfs $SDCARD diff --git a/lib/makeboarddeb.sh b/lib/makeboarddeb.sh index 0897310dbe..9fcfee780a 100644 --- a/lib/makeboarddeb.sh +++ b/lib/makeboarddeb.sh @@ -127,6 +127,7 @@ create_board_package() IMAGE_TYPE=$IMAGE_TYPE BOARD_TYPE=$BOARD_TYPE INITRD_ARCH=$INITRD_ARCH + KERNEL_IMAGE_TYPE=$KERNEL_IMAGE_TYPE EOF # this is required for NFS boot to prevent deconfiguring the network on shutdown