mirror of
https://gitee.com/openharmony/startup_init
synced 2025-03-03 18:17:51 +00:00
Merge branch 'master' of gitee.com:openharmony/startup_init_lite into initmusl1
Signed-off-by: Mupceet <laiguizhong@huawei.com>
This commit is contained in:
commit
49b9de3034
@ -17,6 +17,7 @@ declare_args() {
|
||||
param_test = true
|
||||
control_test = false
|
||||
param_base_log = false
|
||||
enable_ohos_startup_init_feature_ab_partition = false
|
||||
|
||||
# init begetctl support liteos
|
||||
enable_ohos_startup_init_feature_begetctl_liteos = false
|
||||
|
@ -105,6 +105,7 @@ if (defined(ohos_lite)) {
|
||||
include_dirs = include_common
|
||||
deps = [
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static",
|
||||
"//base/startup/init/services/modules/init_hook:inithook",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
|
||||
|
@ -72,7 +72,8 @@ typedef struct SlotInfo {
|
||||
} SlotInfo;
|
||||
|
||||
Fstab* LoadFstabFromCommandLine(void);
|
||||
int GetSlotInfo(void);
|
||||
int GetBootSlots(void);
|
||||
int GetCurrentSlot(void);
|
||||
void ReleaseFstab(Fstab *fstab);
|
||||
Fstab *ReadFstabFromFile(const char *file, bool procMounts);
|
||||
FstabItem *FindFstabItemForPath(Fstab fstab, const char *path);
|
||||
|
@ -121,7 +121,7 @@ if (defined(ohos_lite)) {
|
||||
"dump_service",
|
||||
]
|
||||
|
||||
if (product_name == "rk3568") {
|
||||
if (enable_ohos_startup_init_feature_ab_partition) {
|
||||
sources += [ "partitionslot.cpp" ]
|
||||
external_deps +=
|
||||
[ "drivers_peripheral_partitionslot:libpartition_slot_manager" ]
|
||||
|
@ -30,7 +30,7 @@ const.build.product=default
|
||||
const.product.hardwareversion=default
|
||||
const.product.bootloader.version=bootloader
|
||||
const.product.cpu.abilist=default
|
||||
const.product.software.version=OpenHarmony 3.2.6.2
|
||||
const.product.software.version=OpenHarmony 3.2.6.3
|
||||
const.product.incremental.version=default
|
||||
const.product.firstapiversion=1
|
||||
const.product.build.type=default
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
#include "init_hook.h"
|
||||
#include "init_service.h"
|
||||
#include "init_utils.h"
|
||||
#include "plugin_adapter.h"
|
||||
#include "securec.h"
|
||||
|
@ -117,4 +117,23 @@ HWTEST_F(InnerkitsUnitTest, GetMountFlags_unitest, TestSize.Level1)
|
||||
ReleaseFstab(fstab);
|
||||
fstab = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(InnerkitsUnitTest, GetSlotInfo_unittest, TestSize.Level1)
|
||||
{
|
||||
EXPECT_NE(GetBootSlots(), -1);
|
||||
EXPECT_NE(GetCurrentSlot(), -1);
|
||||
}
|
||||
|
||||
HWTEST_F(InnerkitsUnitTest, LoadFstabFromCommandLine_unittest, TestSize.Level1)
|
||||
{
|
||||
EXPECT_NE(LoadFstabFromCommandLine(), (Fstab *)NULL);
|
||||
}
|
||||
|
||||
HWTEST_F(InnerkitsUnitTest, GetBlockDevicePath_unittest, TestSize.Level1)
|
||||
{
|
||||
char devicePath[MAX_BUFFER_LEN] = {0};
|
||||
EXPECT_EQ(GetBlockDevicePath("/vendor", devicePath, MAX_BUFFER_LEN), 0);
|
||||
EXPECT_EQ(GetBlockDevicePath("/misc", devicePath, MAX_BUFFER_LEN), 0);
|
||||
EXPECT_EQ(GetBlockDevicePath("/invalid", devicePath, MAX_BUFFER_LEN), -1);
|
||||
}
|
||||
} // namespace init_ut
|
||||
|
@ -342,14 +342,18 @@ void PrepareCmdLineHasSn()
|
||||
// for cmdline
|
||||
const char *cmdLineHasSnroot = "bootgroup=device.charge.group earlycon=uart8250,mmio32,0xfe660000 "
|
||||
"root=PARTUUID=614e0000-0000 rw rootwait rootfstype=ext4 console=ttyFIQ0 hardware=rk3568"
|
||||
" BOOT_IMAGE=/kernel ohos.boot.sn=/test init=/init ohos.required_mount.system="
|
||||
"/dev/block/platform/soc/10100000.himci.eMMC/by-name/misc@none@none@none@wait,required";
|
||||
" BOOT_IMAGE=/kernel ohos.boot.sn=/test init=/init";
|
||||
CreateTestFile(BOOT_CMD_LINE, cmdLineHasSnroot);
|
||||
LoadParamFromCmdLine();
|
||||
const char *cmdLineHasntSn = "bootgroup=device.charge.group earlycon=uart8250,mmio32,0xfe660000 "
|
||||
"root=PARTUUID=614e0000-0000 rw rootwait rootfstype=ext4 console=ttyFIQ0 hardware=rk3568"
|
||||
" BOOT_IMAGE=/kernel init=/init ohos.required_mount.system="
|
||||
"/dev/block/platform/soc/10100000.himci.eMMC/by-name/misc@none@none@none@wait,required";
|
||||
"root=PARTUUID=614e0000-0000 rw rootwait rootfstype=ext4 console=ttyFIQ0 hardware=rk3568 "
|
||||
"BOOT_IMAGE=/kernel init=/init default_boot_device=fe310000.sdhci bootslots=2 "
|
||||
"ohos.required_mount.system="
|
||||
"/dev/block/platform/fe310000.sdhci/by-name/system@/usr@ext4@ro,barrier=1@wait,required "
|
||||
"ohos.required_mount.vendor="
|
||||
"/dev/block/platform/fe310000.sdhci/by-name/vendor@/vendor@ext4@ro,barrier=1@wait,required "
|
||||
"ohos.required_mount.misc="
|
||||
"/dev/block/platform/fe310000.sdhci/by-name/misc@none@none@none@wait,required";
|
||||
CreateTestFile(BOOT_CMD_LINE, cmdLineHasntSn);
|
||||
}
|
||||
|
||||
|
@ -17,10 +17,9 @@
|
||||
/dev/binder 0666 0 0
|
||||
/dev/hwbinder 0666 0 0
|
||||
/dev/vndbinder 0666 0 0
|
||||
/dev/input/event0 0660 0 0
|
||||
/dev/input/event1 0660 0 1004
|
||||
/dev/input/mice 0660 0 1004
|
||||
/dev/input/mouse0 0660 0 0
|
||||
/dev/input/event* 0660 0 input
|
||||
/dev/input/mice 0660 0 input
|
||||
/dev/input/mouse0 0660 0 input
|
||||
/dev/snd/timer 0660 1000 1005
|
||||
/dev/zero 0666 0 0
|
||||
/dev/full 0666 0 0
|
||||
@ -72,3 +71,4 @@
|
||||
/dev/access_token_id 0666 3020 3020
|
||||
/dev/block/sdd19 0660 6666 6666
|
||||
/dev/watchdog 0660 watchdog watchdog
|
||||
/dev/hdf_input_event* 0660 3029 3029
|
||||
|
Loading…
x
Reference in New Issue
Block a user