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

Commit e15eebac authored by dhacker29's avatar dhacker29 Committed by Gerrit Code Review
Browse files

Init: Allow building of init that is compatible with second init boot



When using second init init has already set up /dev /proc, etc
this will prevent duplicate mount points for those
Define BOARD_USE_NO_DEVFS_SETUP := true to use

Change-Id: I5620664b32e08f39da7ef7c7f9c3824d01f930d6
Signed-off-by: default avatardhacker29 <davidhackerdvm@gmail.com>
parent 53666572
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ ifeq ($(BOARD_WANTS_EMMC_BOOT),true)
LOCAL_CFLAGS += -DWANTS_EMMC_BOOT
endif

ifeq ($(BOARD_USE_NO_DEVFS_SETUP),true)
LOCAL_CFLAGS += -DNO_DEVFS_SETUP
endif

SYSTEM_CORE_INIT_DEFINES := BOARD_CHARGING_MODE_BOOTING_LPM

$(foreach system_core_init_define,$(SYSTEM_CORE_INIT_DEFINES), \
+6 −0
Original line number Diff line number Diff line
@@ -897,6 +897,11 @@ int main(int argc, char **argv)
         * together in the initramdisk on / and then we'll
         * let the rc file figure out the rest.
         */
    /* Don't repeat the setup of these filesystems,
     * it creates double mount points with an unknown effect
     * on the system.  This init file is for 2nd-init anyway.
     */
#ifndef NO_DEVFS_SETUP
    mkdir("/dev", 0755);
    mkdir("/proc", 0755);
    mkdir("/sys", 0755);
@@ -919,6 +924,7 @@ int main(int argc, char **argv)
         */
    open_devnull_stdio();
    klog_init();
#endif
    property_init();

    get_hardware_name(hardware, &revision);