Skip to content

Commit 0dc7aae

Browse files
committed
lk2nd: dev_tree: Do not update Android fstab by default
For Linux OS, this has no use. For custom Android OS, the developers are used to make changes on the source files directly, rather than relying on this logic. Additionally, the changes that it make are most likely deprecated on newer Android versions or newer kernel versions. Stock Android OS may rely on it though, but the purpose of lk2nd is likely never used to be booting stock Android OS...
1 parent 13fb5d1 commit 0dc7aae

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ ifeq ($(DYNAMIC_PARTITION_SUPPORT),1)
134134
DEFINES += DYNAMIC_PARTITION_SUPPORT=1
135135
endif
136136

137+
ifeq ($(UPDATE_ANDROID_FSTAB),1)
138+
DEFINES += UPDATE_ANDROID_FSTAB=1
139+
endif
140+
137141
ifeq ($(TARGET_DTBO_NOT_SUPPORTED),1)
138142
DEFINES += TARGET_DTBO_NOT_SUPPORTED=1
139143
endif

platform/msm_shared/dev_tree.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct dt_entry_v1
7575
uint32_t size;
7676
};
7777

78-
#if ENABLE_BOOTDEVICE_MOUNT || DYNAMIC_PARTITION_SUPPORT
78+
#if UPDATE_ANDROID_FSTAB && (ENABLE_BOOTDEVICE_MOUNT || DYNAMIC_PARTITION_SUPPORT)
7979
/* Look up table for fstab node */
8080
struct fstab_node
8181
{
@@ -2334,7 +2334,7 @@ int update_device_tree(void *fdt, const char *cmdline, enum boot_type boot_type,
23342334
}
23352335
}
23362336

2337-
#if ENABLE_BOOTDEVICE_MOUNT || DYNAMIC_PARTITION_SUPPORT
2337+
#if UPDATE_ANDROID_FSTAB && (ENABLE_BOOTDEVICE_MOUNT || DYNAMIC_PARTITION_SUPPORT)
23382338
/* Update fstab node */
23392339
dprintf(SPEW, "Start of fstab node update:%zu ms\n", platform_get_sclk_count());
23402340
if (update_fstab_node(fdt) != 0) {
@@ -2357,7 +2357,7 @@ int update_device_tree(void *fdt, const char *cmdline, enum boot_type boot_type,
23572357
return ret;
23582358
}
23592359

2360-
#if ENABLE_BOOTDEVICE_MOUNT || DYNAMIC_PARTITION_SUPPORT
2360+
#if UPDATE_ANDROID_FSTAB && (ENABLE_BOOTDEVICE_MOUNT || DYNAMIC_PARTITION_SUPPORT)
23612361
/*Update device tree for fstab node */
23622362
static int update_fstab_node(void *fdt)
23632363
{

0 commit comments

Comments
 (0)