Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e120b471 authored by Alex Deymo's avatar Alex Deymo
Browse files

Add /postinstall partition when using the A/B updater.

The new top level directory /postinstall is used by the A/B updater to
mount the new partition and run a post-install program before rebooting
into that new system.

init.rc was extended to label this new directory since the initrd has
no extended attributes.

Bug: 27177071
TEST=`ls -laZ /` shows the /postinstall directory on edison-eng

(cherry picked from commit bb968fb0)

Change-Id: Iff993135c7ce3a1a0f6450892ef7382da408fd5e
parent a996c296
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -70,6 +70,11 @@ ifdef BOARD_ROOT_EXTRA_SYMLINKS
    ; mkdir -p $(dir $(TARGET_ROOT_OUT)/$(word 2,$(p))) \
    ; ln -sf $(word 1,$(p)) $(TARGET_ROOT_OUT)/$(word 2,$(p)))
endif
# The A/B updater uses a top-level /postinstall directory to mount the new
# system before reboot.
ifeq ($(AB_OTA_UPDATER),true)
  LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/postinstall
endif

include $(BUILD_SYSTEM)/base_rules.mk

+3 −0
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@ on early-init
    # Shouldn't be necessary, but sdcard won't start without it. http://b/22568628.
    mkdir /mnt 0775 root system

    # Set the security context of /postinstall if present.
    restorecon /postinstall

    start ueventd

on init