Merge branch 'CR_4754_swapon_optimize_mason.huo' into 'jh7110-devel'
CR_4754 package: starfive: Optimize the swapon partition See merge request sdk/buildroot!96
This commit is contained in:
@@ -8,7 +8,12 @@ case "$1" in
|
|||||||
# Set the hibernation image_size as large as the ram size.
|
# Set the hibernation image_size as large as the ram size.
|
||||||
total_mem=$(cat /proc/meminfo | sed -n '1p')
|
total_mem=$(cat /proc/meminfo | sed -n '1p')
|
||||||
echo $((${total_mem: 10: 15}*1024)) > /sys/power/image_size
|
echo $((${total_mem: 10: 15}*1024)) > /sys/power/image_size
|
||||||
swapon PARTLABEL="hibernation"
|
FILE=/dev/disk/by-partlabel/hibernation
|
||||||
|
if [ -b "$FILE" ];then
|
||||||
|
swapon PARTLABEL="hibernation"
|
||||||
|
else
|
||||||
|
echo "No PARTLABEL=hibernation!"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
swapoff PARTLABEL="hibernation"
|
swapoff PARTLABEL="hibernation"
|
||||||
@@ -7,7 +7,7 @@ PM_LICENSE = GPL-2.0+
|
|||||||
|
|
||||||
define PM_INSTALL_TARGET_CMDS
|
define PM_INSTALL_TARGET_CMDS
|
||||||
install -m 0755 -D package/starfive/pm/S90cpufreq $(TARGET_DIR)/etc/init.d/
|
install -m 0755 -D package/starfive/pm/S90cpufreq $(TARGET_DIR)/etc/init.d/
|
||||||
install -m 0755 -D package/starfive/pm/S00hibernation $(TARGET_DIR)/etc/init.d/
|
install -m 0755 -D package/starfive/pm/S99hibernation $(TARGET_DIR)/etc/init.d/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(generic-package))
|
$(eval $(generic-package))
|
||||||
|
|||||||
Reference in New Issue
Block a user