startup_init/services/init/standard/main_early.c
handyohos 6d07b27609 Feat: /system/bin/init support first stage init
1. 把first stage init阶段完成的内容拆分到init_firststage.c中
2. ramdisk和system中的init都链接init_firststage.c,使得没有ramdisk的产品也可以分阶段启动。

Signed-off-by: handyohos <zhangxiaotian@huawei.com>
Change-Id: Ib45286e1e8f451d5aa30091d052ada6e6ce72cdf

#I8AX9X
2023-10-25 22:44:54 +08:00

25 lines
833 B
C
Executable File

/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "init.h"
#include "init_utils.h"
int main(int argc, char * const argv[])
{
long long upTimeInMicroSecs = GetUptimeInMicroSeconds(NULL);
SystemPrepare(upTimeInMicroSecs);
return 0;
}