-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlegacy-hook.patch
More file actions
155 lines (144 loc) · 4.4 KB
/
legacy-hook.patch
File metadata and controls
155 lines (144 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
diff --git a/arch/arm64/boot/dts/xiaomi/violet/violet-sm6150.dtsi b/arch/arm64/boot/dts/xiaomi/violet/violet-sm6150.dtsi
index 21aec506d284..ec52a385d9e9 100644
--- a/arch/arm64/boot/dts/xiaomi/violet/violet-sm6150.dtsi
+++ b/arch/arm64/boot/dts/xiaomi/violet/violet-sm6150.dtsi
@@ -22,13 +22,12 @@
&firmware {
android {
- boot_devices = "soc/7c4000.sdhci";
vbmeta {
parts = "vbmeta,boot,recovery,system,vendor,dtbo";
};
fstab {
vendor {
- status = "disabled";
+ fsmgr_flags = "wait,avb";
};
};
};
diff --git a/arch/arm64/configs/vendor/violet-perf_defconfig b/arch/arm64/configs/vendor/violet-perf_defconfig
index 7b197e9926c6..8d894d91669c 100644
--- a/arch/arm64/configs/vendor/violet-perf_defconfig
+++ b/arch/arm64/configs/vendor/violet-perf_defconfig
@@ -175,7 +175,6 @@ CONFIG_DEFAULT_USE_ENERGY_AWARE=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_INITRAMFS_FORCE is not set
-CONFIG_INITRAMFS_IGNORE_SKIP_FLAG=y
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
@@ -5408,7 +5407,7 @@ CONFIG_MISC_FILESYSTEMS=y
# CONFIG_AFFS_FS is not set
CONFIG_ECRYPT_FS=y
CONFIG_ECRYPT_FS_MESSAGING=y
-# CONFIG_SDCARD_FS is not set
+CONFIG_SDCARD_FS=y
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
index 4a24f4975793..403cbb12a6e9 100644
--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -3,37 +3,10 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
-#ifdef CONFIG_INITRAMFS_IGNORE_SKIP_FLAG
-#include <asm/setup.h>
-#endif
-
-#ifdef CONFIG_INITRAMFS_IGNORE_SKIP_FLAG
-#define INITRAMFS_STR_FIND "skip_initramf"
-#define INITRAMFS_STR_REPLACE "want_initramf"
-#define INITRAMFS_STR_LEN (sizeof(INITRAMFS_STR_FIND) - 1)
-
-static char proc_command_line[COMMAND_LINE_SIZE];
-
-static void proc_command_line_init(void) {
- char *offset_addr;
-
- strcpy(proc_command_line, saved_command_line);
-
- offset_addr = strstr(proc_command_line, INITRAMFS_STR_FIND);
- if (!offset_addr)
- return;
-
- memcpy(offset_addr, INITRAMFS_STR_REPLACE, INITRAMFS_STR_LEN);
-}
-#endif
static int cmdline_proc_show(struct seq_file *m, void *v)
{
-#ifdef CONFIG_INITRAMFS_IGNORE_SKIP_FLAG
- seq_printf(m, "%s\n", proc_command_line);
-#else
seq_printf(m, "%s\n", saved_command_line);
-#endif
return 0;
}
@@ -51,10 +24,6 @@ static const struct file_operations cmdline_proc_fops = {
static int __init proc_cmdline_init(void)
{
-#ifdef CONFIG_INITRAMFS_IGNORE_SKIP_FLAG
- proc_command_line_init();
-#endif
-
proc_create("cmdline", 0, NULL, &cmdline_proc_fops);
return 0;
}
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 8228dd945a0f..f1645f4ece5e 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -298,7 +298,6 @@ dev_t name_to_dev_t(const char *name)
}
EXPORT_SYMBOL_GPL(name_to_dev_t);
-#if 0
static int __init root_dev_setup(char *line)
{
strlcpy(saved_root_name, line, sizeof(saved_root_name));
@@ -332,7 +331,6 @@ static int __init rootwait_setup(char *str)
}
__setup("rootwait", rootwait_setup);
-#endif
static char * __initdata root_mount_data;
static int __init root_data_setup(char *str)
diff --git a/init/initramfs.c b/init/initramfs.c
index d9f09c81b740..5ea7f1b5ec44 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -610,16 +610,14 @@ static void __init clean_rootfs(void)
static int __initdata do_skip_initramfs;
-#if 0
static int __init skip_initramfs_param(char *str)
{
if (*str)
return 0;
- do_skip_initramfs = !IS_ENABLED(CONFIG_INITRAMFS_IGNORE_SKIP_FLAG);
+ do_skip_initramfs = 1;
return 1;
}
__setup("skip_initramfs", skip_initramfs_param);
-#endif
static int __init populate_rootfs(void)
{
diff --git a/usr/Kconfig b/usr/Kconfig
index e57ebaace3c9..8b4826de1189 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -32,15 +32,6 @@ config INITRAMFS_FORCE
and is useful if you cannot or don't want to change the image
your bootloader passes to the kernel.
-config INITRAMFS_IGNORE_SKIP_FLAG
- bool "Force initramfs even when skip_initramfs is set"
- default n
- help
- Ignore skip_initramfs cmdline flag.
- This should only be used if you have no control over cmdline
- passed by your bootloader yet you can't use CMDLINE_FORCE.
- If unsure say N.
-
config INITRAMFS_ROOT_UID
int "User ID to map to 0 (user root)"
depends on INITRAMFS_SOURCE!=""