Skip to content

Commit

Permalink
Merge "Revert "Move fstab files to /vendor/etc/.""
Browse files Browse the repository at this point in the history
  • Loading branch information
Tao Bao authored and Android (Google) Code Review committed Mar 22, 2017
2 parents 598d1ac + d037710 commit 067287c
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 19 deletions.
2 changes: 1 addition & 1 deletion aosp_marlin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PRODUCT_MODEL := AOSP on msm8996
PRODUCT_MANUFACTURER := google
PRODUCT_RESTRICT_VENDOR_FILES := true

PRODUCT_COPY_FILES += device/google/marlin/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.marlin
PRODUCT_COPY_FILES += device/google/marlin/fstab.aosp_common:root/fstab.marlin

$(call inherit-product, device/google/marlin/device-marlin.mk)
$(call inherit-product-if-exists, vendor/google_devices/marlin/device-vendor-marlin.mk)
Expand Down
2 changes: 1 addition & 1 deletion aosp_sailfish.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PRODUCT_MODEL := AOSP on msm8996
PRODUCT_MANUFACTURER := google
PRODUCT_RESTRICT_VENDOR_FILES := true

PRODUCT_COPY_FILES += device/google/marlin/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.sailfish
PRODUCT_COPY_FILES += device/google/marlin/fstab.aosp_common:root/fstab.sailfish

$(call inherit-product, device/google/marlin/device-sailfish.mk)
$(call inherit-product-if-exists, vendor/google_devices/marlin/device-vendor-sailfish.mk)
Expand Down
2 changes: 1 addition & 1 deletion device-marlin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif
PRODUCT_COPY_FILES += \
device/google/marlin/init.common.rc:$(INIT_RC) \
device/google/marlin/init.common.usb.rc:$(INIT_USB_RC) \
device/google/marlin/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.marlin \
device/google/marlin/fstab.common:root/fstab.marlin \
device/google/marlin/ueventd.common.rc:$(INIT_UEVENTD_RC) \
device/google/marlin/init.recovery.common.rc:root/init.recovery.marlin.rc

Expand Down
2 changes: 1 addition & 1 deletion device-sailfish.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif
PRODUCT_COPY_FILES += \
device/google/marlin/init.common.rc:$(INIT_RC) \
device/google/marlin/init.common.usb.rc:$(INIT_USB_RC) \
device/google/marlin/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.sailfish \
device/google/marlin/fstab.common:root/fstab.sailfish \
device/google/marlin/ueventd.common.rc:$(INIT_UEVENTD_RC) \
device/google/marlin/init.recovery.common.rc:root/init.recovery.sailfish.rc

Expand Down
16 changes: 16 additions & 0 deletions fstab.aosp_common
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Android fstab file.
# 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

#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/soc/624000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,verify
# 'vendor' partition is now early-mounted and fstab entry is specified in device tree
# /dev/block/platform/soc/624000.ufshc/by-name/vendor /vendor ext4 ro,barrier=1 wait,slotselect
/dev/block/platform/soc/624000.ufshc/by-name/modem /firmware/radio vfat ro,shortname=lower,uid=1000,gid=0,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
/dev/block/platform/soc/624000.ufshc/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,formattable,fileencryption=ice
/dev/block/zram0 none swap defaults zramsize=536870912
/dev/block/platform/soc/624000.ufshc/by-name/misc /misc emmc defaults defaults
/devices/*/xhci-hcd.0.auto/usb* auto vfat defaults voldmanaged=usb:auto
26 changes: 14 additions & 12 deletions fstab.common
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Android fstab file.
# The filesystem that contains the filesystem e2fsck binary (typically /system) cannot
# specify 'check', and must come before any filesystems that do specify 'check'
# 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

# NOTE: /vendor partition is now early-mounted and the fstab entry is specified in device tree:
# /proc/device-tree/firmware/android/fstab/vendor

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/soc/624000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,verify
/dev/block/platform/soc/624000.ufshc/by-name/modem /firmware/radio vfat ro,shortname=lower,uid=1000,gid=0,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
/dev/block/platform/soc/624000.ufshc/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,formattable,fileencryption=ice,quota
/dev/block/zram0 none swap defaults zramsize=536870912
/dev/block/platform/soc/624000.ufshc/by-name/misc /misc emmc defaults defaults
/devices/*/xhci-hcd.0.auto/usb* auto vfat defaults voldmanaged=usb:auto
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
# NOTE: fstab.aosp_common is used for aosp. Make changes there as well.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/soc/624000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,verify
# 'vendor' partition is now early-mounted and fstab entry is specified in device tree
# /dev/block/platform/soc/624000.ufshc/by-name/vendor /vendor ext4 ro,barrier=1 wait,slotselect,verify
/dev/block/platform/soc/624000.ufshc/by-name/modem /firmware/radio vfat ro,shortname=lower,uid=1000,gid=0,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
/dev/block/platform/soc/624000.ufshc/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,formattable,fileencryption=ice,quota
/dev/block/zram0 none swap defaults zramsize=536870912
/dev/block/platform/soc/624000.ufshc/by-name/misc /misc emmc defaults defaults
/devices/*/xhci-hcd.0.auto/usb* auto vfat defaults voldmanaged=usb:auto
6 changes: 3 additions & 3 deletions init.common.rc
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice

mount_all /vendor/etc/fstab.${ro.hardware} --early
swapon_all /vendor/etc/fstab.${ro.hardware}
mount_all fstab.${ro.hardware} --early
swapon_all fstab.${ro.hardware}

# Keeping following partitions outside fstab file. As user may not have
# these partition flashed on the device. Failure to mount any partition in fstab file
Expand Down Expand Up @@ -126,7 +126,7 @@ on late-fs
start bootanim

# mount RW partitions which need run fsck
mount_all /vendor/etc/fstab.${ro.hardware} --late
mount_all fstab.${ro.hardware} --late

# boot time fs tune
write /sys/block/sda/queue/iostats 0
Expand Down

0 comments on commit 067287c

Please sign in to comment.