ZRAM

时间:2025-01-26 08:36:45

1、 enable +CONFIG_ZRAM=y +CONFIG_ZSMALLOC=y in/arch/arm/configs/msm8xxx-perf_defconfigand/arch/arm/configs/msm8226_defconfig

2、 ---a/rootdir/etc/init.qcom.early_boot.sh +++b/rootdir/etc/init.qcom.early_boot.sh @@-6+10@@case"$1"in         case"$soc_hwplatform"in             *)                 setpropro.sf.lcd_density320 +  chmod755/data/busybox/busybox +               echo$((256*1024*>/sys/block/zram0/disksize +               /data/busybox/busyboxmkswap/dev/block/zram0 +               /data/busybox/busyboxswapon/dev/block/zram0                 ;;         esac

3、thencheck/proc/meminfo    ifSwapTotal:       262140kB,zramworkwell.

4、 把busyboxbuild到userdataimage里面,并且指定目录:/data/busybox busybox在附件中

5、thencheck/proc/meminfo    ifSwapTotal:       262140kB,zramworkwell.          solutionII: enable +CONFIG_ZRAM=y +CONFIG_ZSMALLOC=y in/arch/arm/configs/msm8xxx-perf_defconfigand/arch/arm/configs/msm8226_defconfig

6、pushbusyboxto /datafolder adbshell   cddata   chmod755/data/busybox   echo$((256*1024*>/sys/block/zram0/disksize   ./busyboxmkswap/dev/block/zram0   ./busyboxswapon/dev/block/zram0