diff options
-rw-r--r-- | device_base.mk | 4 | ||||
-rw-r--r-- | fstab.aries | 3 | ||||
-rw-r--r-- | init.aries.rc | 7 | ||||
-rw-r--r-- | recovery.fstab | 4 | ||||
-rw-r--r-- | recovery.rc | 2 | ||||
-rwxr-xr-x | updater.sh | 33 |
6 files changed, 26 insertions, 27 deletions
diff --git a/device_base.mk b/device_base.mk index bb26c0d..bb3ba45 100644 --- a/device_base.mk +++ b/device_base.mk @@ -170,6 +170,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ ro.vold.umsdirtyratio=20 +# We have sacrificed /cache for a larger /system, so it's not large enough for dalvik cache +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.dexopt-data-only=1 + # Set default USB interface and default to internal SD as /sdcard PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage \ diff --git a/fstab.aries b/fstab.aries index 359d54f..cba1ea7 100644 --- a/fstab.aries +++ b/fstab.aries @@ -3,5 +3,6 @@ # The filesystem that contains the filesystem checker binary (typically /system) cannot # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK -/dev/block/mmcblk0p2 /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,encryptable=/efs/userdata_footer +# System as RW because we want to put dalvik-cache there +/dev/block/mmcblk0p2 /system ext4 noatime,nodev,nomblk_io_submit,errors=panic wait diff --git a/init.aries.rc b/init.aries.rc index 7eeff73..546324d 100644 --- a/init.aries.rc +++ b/init.aries.rc @@ -86,6 +86,13 @@ on post-fs-data mkdir /data/misc/wifi/sockets 0770 wifi wifi mkdir /data/misc/dhcp 0770 dhcp dhcp + # Dalvik cache on /system to save space + mkdir /system/dalvik-cache 0771 system system + chown system system /system/dalvik-cache + chmod 0771 /system/dalvik-cache + exec /system/bin/rm -r /data/dalvik-cache + symlink /system/dalvik-cache /data/dalvik-cache + # download cache mkdir /data/download 0770 system cache diff --git a/recovery.fstab b/recovery.fstab index 5ad2e72..a98139e 100644 --- a/recovery.fstab +++ b/recovery.fstab @@ -4,10 +4,10 @@ /boot mtd boot /radio mtd radio -/system yaffs2 system +/data yaffs2 userdata /cache yaffs2 cache /sdcard vfat /dev/block/mmcblk0p1 -/data ext4 /dev/block/mmcblk0p2 +/system ext4 /dev/block/mmcblk0p2 /emmc vfat /dev/block/mmcblk1p1 diff --git a/recovery.rc b/recovery.rc index 881eeb7..d498203 100644 --- a/recovery.rc +++ b/recovery.rc @@ -100,7 +100,7 @@ loglevel 9 on fs # mount mtd partitions # Mount /system rw first to give the filesystem a chance to save a checkpoint - mount yaffs2 mtd@system /system + #mount yaffs2 mtd@system /system #mount yaffs2 mtd@cache /cache #mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev noatime nodiratime noauto_da_alloc #mount yaffs2 mtd@datadata /datadata @@ -30,11 +30,13 @@ if /tmp/busybox test "$1" = cdma ; then IS_GSM='/tmp/busybox false' SD_PART='/dev/block/mmcblk1p1' DATA_PART='/dev/block/mmcblk0p1' + DATA_SIZE='490733568' else # GSM mode IS_GSM='/tmp/busybox true' SD_PART='/dev/block/mmcblk0p1' DATA_PART='/dev/block/mmcblk0p2' + DATA_SIZE='442499072' fi # check if we're running on a bml, mtd (old) or mtd (current) device @@ -80,7 +82,7 @@ if /tmp/busybox test -e /dev/block/bml7 ; then /sbin/reboot now exit 0 -elif /tmp/busybox test `/tmp/busybox cat /sys/class/mtd/mtd2/size` != 367001600 ; then +elif /tmp/busybox test `/tmp/busybox cat /sys/class/mtd/mtd2/size` != "$DATA_SIZE" ; then # we're running on a mtd (old) device # make sure sdcard is mounted @@ -97,21 +99,6 @@ elif /tmp/busybox test `/tmp/busybox cat /sys/class/mtd/mtd2/size` != 367001600 # inform the script that this is an old mtd upgrade /tmp/busybox echo 1 > /sdcard/cyanogenmod.mtdupd - # we also removed /datadata, so migrate data - /tmp/busybox mount /data - - if /tmp/busybox test -h /data/data ; then - /tmp/busybox mkdir /datadata - /tmp/busybox mount /datadata - /tmp/busybox rm /data/data - /tmp/busybox mkdir /data/data - /tmp/busybox chown system.system /data/data - /tmp/busybox chmod 0771 /data/data - /tmp/busybox cp -a /datadata/* /data/data/ - /tmp/busybox rm -r /data/data/lost+found - fi - /tmp/busybox umount /data - # clear datadata /tmp/busybox umount -l /datadata /tmp/erase_image datadata @@ -192,24 +179,24 @@ elif /tmp/busybox test -e /dev/block/mtdblock0 ; then # unmount and format system (recovery seems to expect system to be unmounted) /tmp/busybox umount -l /system - /tmp/erase_image system + /tmp/make_ext4fs -b 4096 -g 32768 -i 8192 -I 256 -a /system $DATA_PART + + # unmount and format data + /tmp/busybox umount -l /data + /tmp/erase_image userdata # restart into recovery so the user can install further packages before booting /tmp/busybox touch /cache/.startrecovery if /tmp/busybox test -e /sdcard/cyanogenmod.mtdupd ; then - # this is an upgrade with changed MTD mapping for /system, /cache - # so return to updater-script after formatting these two + # this is an upgrade with changed MTD mapping for /data, /cache, /system + # so return to updater-script after formatting them /tmp/busybox rm -f /sdcard/cyanogenmod.mtdupd exit 0 fi - # unmount and format data - /tmp/busybox umount /data - /tmp/make_ext4fs -b 4096 -g 32768 -i 8192 -I 256 -a /data $DATA_PART - if $IS_GSM ; then # restore efs backup if /tmp/busybox test -e /sdcard/backup/efs/nv_data.bin || \ |