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

Commit 29e5348f authored by Tom Cherry's avatar Tom Cherry
Browse files

init: separate init packaging for mainline

With system-as-root, both first and second stage init belong to
system, but without system-as-root, first stage belongs to vendor and
second stage belongs to system.  This change creates two phony
packages to achieve this correctly in the build system.

Bug: 117606184
Test: mainline builds work properly
Change-Id: I19263e76c217c2e70bc06c180be3a460e9144f18
parent 83093e7e
Loading
Loading
Loading
Loading
+29 −4
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ LOCAL_SRC_FILES := \
    uevent_listener.cpp \
    util.cpp \

LOCAL_MODULE := init
LOCAL_MODULE := init_first_stage
LOCAL_MODULE_STEM := init

LOCAL_FORCE_STATIC_EXECUTABLE := true

@@ -87,8 +88,32 @@ LOCAL_STATIC_LIBRARIES := \
    libselinux \
    libcap \

LOCAL_SANITIZE := signed-integer-overflow
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)

LOCAL_MODULE := init_system
ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
LOCAL_REQUIRED_MODULES := \
   init_first_stage \
   init_second_stage \

LOCAL_SANITIZE := signed-integer-overflow
include $(BUILD_EXECUTABLE)
else
LOCAL_REQUIRED_MODULES := \
   init_second_stage \

endif
include $(BUILD_PHONY_PACKAGE)

include $(CLEAR_VARS)

LOCAL_MODULE := init_vendor
ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
LOCAL_REQUIRED_MODULES := \
   init_first_stage \

endif
include $(BUILD_PHONY_PACKAGE)