From e29e7fbe1843ff87838f2162629479c3d281416c Mon Sep 17 00:00:00 2001 From: Venkata Rao Kakani Date: Fri, 25 Oct 2019 10:54:36 +0530 Subject: [PATCH] init: early_services: Mount modem partition early in kernel Mount modem partition in kernel, so that firmwares can be mounted from services in early services. Change-Id: If36dbefc637b6f91f508e643bb742afb9406adff Signed-off-by: Venkata Rao Kakani --- init/do_mounts.c | 6 +++++- init/main.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/init/do_mounts.c b/init/do_mounts.c index 073a5b259b44..a4393634a3e6 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -48,6 +48,7 @@ static char saved_early_userspace[64] __initdata; static char init_prog[128] = "/early_services/init_early"; static char *init_prog_argv[2] = { init_prog, NULL }; #define EARLY_SERVICES_MOUNT_POINT "/early_services" +#define FIRMWARE_MOUNT_PATH "/early_services/vendor/firmware_mnt" #endif dev_t ROOT_DEV; @@ -617,9 +618,12 @@ void __init launch_early_services(void) { int rc = 0; + devtmpfs_mount("dev"); rc = mount_partition(saved_early_userspace, EARLY_SERVICES_MOUNT_POINT); - place_marker("Early Services Partition ready"); if (!rc) { + place_marker("Early Services Partition ready"); + if (!mount_partition(saved_modem_name, FIRMWARE_MOUNT_PATH)) + place_marker("firmwares Partition ready"); rc = call_usermodehelper(init_prog, init_prog_argv, NULL, 0); if (!rc) pr_info("early_init launched\n"); diff --git a/init/main.c b/init/main.c index 3b4b1c3ea666..a58eb0017296 100644 --- a/init/main.c +++ b/init/main.c @@ -1092,8 +1092,8 @@ static noinline void __init kernel_init_freeable(void) if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { ramdisk_execute_command = NULL; prepare_namespace(); - launch_early_services(); } + launch_early_services(); /* * Ok, we have completed the initial bootup, and