Always create ramdisk/first_stage_ramdisk.

Always create ramdisk/first_stage_ramdisk directory at build time.
Generic boot image always need this directory to work on devices
w/ and w/o a dedicated recovery partition. By default, the ramdisk is
mounted as readonly, unless on x86 platforms. If the ramdisk is mounted as
readonly, the directory cannot be created at runtime.

Note that devices with a dedicated recovery partition will never
switch root into the first_stage_ramdisk directory in first stage init.

Bug: 156098440
Test: manual by disabling init to mkdir first_stage_ramdisk

Change-Id: Ie272f4eedccc0b008fb538c1e0f3985ff70696cf
This commit is contained in:
Yifan Hong 2020-10-20 13:39:01 -07:00
parent 909219ccc2
commit 42c55f5ce9
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ LOCAL_REQUIRED_MODULES := \
LOCAL_POST_INSTALL_CMD := mkdir -p \
$(TARGET_RAMDISK_OUT)/debug_ramdisk \
$(TARGET_RAMDISK_OUT)/dev \
$(TARGET_RAMDISK_OUT)/first_stage_ramdisk \
$(TARGET_RAMDISK_OUT)/mnt \
$(TARGET_RAMDISK_OUT)/proc \
$(TARGET_RAMDISK_OUT)/sys \