Commit 72a7240b authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Everything should be mounted with discard option to take advantage of block...

Everything should be mounted with discard option to take advantage of block devices which support discard/trim
parent ca74033a
......@@ -50,13 +50,13 @@ $(PACKAGES):
mount -t sysfs /sysfs mnt/sys
mount -t tmpfs /tmp mnt/tmp
if [ -d mnt/data ] ; then \
mount /dev/$(DISK)4 mnt/data ; \
mount -o discard /dev/$(DISK)4 mnt/data ; \
mount --bind mnt/data/home mnt/home ; \
mount --bind mnt/data/root mnt/root ; \
mount --bind mnt/data/var mnt/var ; \
fi
mount -t tmpfs /tmp mnt/var/tmp
mount /dev/$(SECONDARY)1 mnt/build
mount -o discard /dev/$(SECONDARY)1 mnt/build
chroot mnt $(MAKE) -C $(current_dir)$(firstword $(subst ., ,$@)) $(word 2, $(subst ., ,$@))
umount -l mnt/var/tmp
if [ -d mnt/data ] && [[ $$(findmnt -M mnt/data) ]] ; then \
......
......@@ -433,10 +433,10 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
SECONDARY="${SECONDARY}"
export LC_ALL PATH SECONDARY HOSTTYPE
mount -o remount,rw /
mount -o remount,rw,discard /
mkdir /build
mount /dev/${SECONDARY}1 /build
mount -o discard /dev/${SECONDARY}1 /build
make -C /build/packages/linux boot-${BOARD}
if [ $? -eq 0 ]; then
umount /dev/${SECONDARY}1
......@@ -535,7 +535,7 @@ WantedBy=rescue.target
rm /mnt/usr/lib/locale/locale-archive
chroot mnt localedef -i en_GB -f UTF-8 en_GB.UTF-8
/bin/umount /dev/${SECONDARY}2
/bin/mount -o remount,rw /
/bin/mount -o remount,rw,discard /
/usr/bin/touch /.success
/bin/rm -rf /etc/systemd/system/rescue.target.wants
/bin/rm /lib/systemd/system/mount-fstab.service
......@@ -641,10 +641,10 @@ SHUTDOWN_WATCHDOG="${SHUTDOWN_WATCHDOG}"
RUNTIME_WATCHDOG="${RUNTIME_WATCHDOG}"
export LC_ALL PATH PROJECT_NAME ID PRETTY_NAME HOSTNAME VERSION BUILD_ID ARTIFACT_NAME DEVICE_TYPE BOARD GCC_CONFIG CONSOLE ROOT_DEVICE DISK SECONDARY SHUTDOWN_WATCHDOG RUNTIME_WATCHDOG HOSTTYPE
mount -o remount,rw /
mount -o remount,rw,discard /
mkdir /build
mount /dev/${SECONDARY}1 /build
mount -o discard /dev/${SECONDARY}1 /build
make -C /build/packages
if [ $? -eq 0 ]; then
umount /dev/${SECONDARY}1
......@@ -760,10 +760,10 @@ SHUTDOWN_WATCHDOG="${SHUTDOWN_WATCHDOG}"
RUNTIME_WATCHDOG="${RUNTIME_WATCHDOG}"
export LC_ALL PATH PROJECT_NAME ID PRETTY_NAME HOSTNAME COPYRIGHT LICENSE TRANSLATOR VERSION BUILD_ID ARTIFACT_NAME DEVICE_TYPE BOARD GCC_CONFIG CONSOLE ROOT_DEVICE DISK SECONDARY SHUTDOWN_WATCHDOG RUNTIME_WATCHDOG HOSTTYPE
mount -o remount,rw /
mount -o remount,rw,discard /
mkdir /build
mount /dev/${SECONDARY}1 /build
mount -o discard /dev/${SECONDARY}1 /build
make -C /build/packages
if [ $? -eq 0 ]; then
umount /dev/${SECONDARY}1
......@@ -879,7 +879,7 @@ WantedBy=rescue.target
/bin/mv -f /tmp/data.xz /mnt/usr/share/factorydefault/data.xz
/sbin/fstrim -v /mnt
/bin/umount /dev/${SECONDARY}2
/bin/mount -o remount,rw /
/bin/mount -o remount,rw,discard /
/usr/bin/touch /.success
/bin/rm -rf /etc/systemd/system/rescue.target.wants
/bin/rm /lib/systemd/system/mount-fstab.service
......
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