mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 21:58:04 +00:00
kernel: ubifs: automount ubifs root only when CONFIG_UBIFS_ROOT is set
Kernel patches in generic/hack for 5.5, 6.1, and 6.6 that add `CONFIG_UBIFS_ROOT` option to automount rootfs as ubifs rather than using `CONFIG_MTD_ROOTFS_ROOT_DEV` which should only select the appropriate MTD partition and not force any filesystem type or mounting. Add `CONFIG_UBIFS_ROOT=y` to platforms where `FEATURES` included `ubifs` and `MKUBIFS_OPTS` was set (at91, imx, layerscape) Signed-off-by: Tony Butler <spudz76@gmail.com>
This commit is contained in:
parent
c98fd53f83
commit
56d9056999
@ -310,6 +310,7 @@ CONFIG_TIMER_PROBE=y
|
|||||||
CONFIG_TINY_SRCU=y
|
CONFIG_TINY_SRCU=y
|
||||||
CONFIG_UBIFS_FS=y
|
CONFIG_UBIFS_FS=y
|
||||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||||
|
CONFIG_UBIFS_ROOT=y
|
||||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||||
CONFIG_UNWINDER_ARM=y
|
CONFIG_UNWINDER_ARM=y
|
||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
|
@ -476,6 +476,7 @@ CONFIG_TINY_SRCU=y
|
|||||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||||
CONFIG_UACCESS_WITH_MEMCPY=y
|
CONFIG_UACCESS_WITH_MEMCPY=y
|
||||||
CONFIG_UBIFS_FS=y
|
CONFIG_UBIFS_FS=y
|
||||||
|
CONFIG_UBIFS_ROOT=y
|
||||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||||
CONFIG_UNWINDER_ARM=y
|
CONFIG_UNWINDER_ARM=y
|
||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
|
@ -409,6 +409,7 @@ CONFIG_TICK_CPU_ACCOUNTING=y
|
|||||||
CONFIG_TIMER_OF=y
|
CONFIG_TIMER_OF=y
|
||||||
CONFIG_TIMER_PROBE=y
|
CONFIG_TIMER_PROBE=y
|
||||||
CONFIG_TINY_SRCU=y
|
CONFIG_TINY_SRCU=y
|
||||||
|
CONFIG_UBIFS_ROOT=y
|
||||||
CONFIG_UACCESS_WITH_MEMCPY=y
|
CONFIG_UACCESS_WITH_MEMCPY=y
|
||||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||||
CONFIG_UNWINDER_ARM=y
|
CONFIG_UNWINDER_ARM=y
|
||||||
|
@ -6717,6 +6717,7 @@ CONFIG_UBIFS_FS_LZO=y
|
|||||||
CONFIG_UBIFS_FS_XATTR=y
|
CONFIG_UBIFS_FS_XATTR=y
|
||||||
CONFIG_UBIFS_FS_ZLIB=y
|
CONFIG_UBIFS_FS_ZLIB=y
|
||||||
CONFIG_UBIFS_FS_ZSTD=y
|
CONFIG_UBIFS_FS_ZSTD=y
|
||||||
|
# CONFIG_UBIFS_ROOT is not set
|
||||||
# CONFIG_UBSAN is not set
|
# CONFIG_UBSAN is not set
|
||||||
CONFIG_UBSAN_ALIGNMENT=y
|
CONFIG_UBSAN_ALIGNMENT=y
|
||||||
CONFIG_UBSAN_BOOL=y
|
CONFIG_UBSAN_BOOL=y
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
From: Tony Butler <spudz76@gmail.com>
|
||||||
|
Date: Mon, 22 Apr 2024 03:56:21 -0700
|
||||||
|
Subject: kernel: ubifs: automount ubifs root only when CONFIG_UBIFS_ROOT is set
|
||||||
|
|
||||||
|
Kernel patches in generic/hack for 5.5, 6.1, and 6.6 that add
|
||||||
|
`CONFIG_UBIFS_ROOT` option to automount rootfs as ubifs rather than
|
||||||
|
using `CONFIG_MTD_ROOTFS_ROOT_DEV` which should only select the
|
||||||
|
appropriate MTD partition and not force any filesystem type or mounting.
|
||||||
|
|
||||||
|
Signed-off-by: Tony Butler <spudz76@gmail.com>
|
||||||
|
---
|
||||||
|
fs/ubifs/Kconfig | 8 ++++++++
|
||||||
|
init/do_mounts.c | 4 ++--
|
||||||
|
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/fs/ubifs/Kconfig
|
||||||
|
+++ b/fs/ubifs/Kconfig
|
||||||
|
@@ -98,4 +98,12 @@ config UBIFS_FS_AUTHENTICATION
|
||||||
|
sha256, these are not selected automatically since there are many
|
||||||
|
different options.
|
||||||
|
|
||||||
|
+config UBIFS_ROOT
|
||||||
|
+ bool "UBIFS root file system"
|
||||||
|
+ depends on UBIFS_FS=y
|
||||||
|
+ help
|
||||||
|
+ Enables root file system support using UBIFS.
|
||||||
|
+
|
||||||
|
+ Most people say N here.
|
||||||
|
+
|
||||||
|
endif # UBIFS_FS
|
||||||
|
--- a/init/do_mounts.c
|
||||||
|
+++ b/init/do_mounts.c
|
||||||
|
@@ -448,7 +448,7 @@ out:
|
||||||
|
put_page(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
|
||||||
|
+#ifdef CONFIG_UBIFS_ROOT
|
||||||
|
static int __init mount_ubi_rootfs(void)
|
||||||
|
{
|
||||||
|
int flags = MS_SILENT;
|
||||||
|
@@ -603,7 +603,7 @@ void __init mount_root(void)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
-#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
|
||||||
|
+#ifdef CONFIG_UBIFS_ROOT
|
||||||
|
if (!mount_ubi_rootfs())
|
||||||
|
return;
|
||||||
|
#endif
|
@ -0,0 +1,50 @@
|
|||||||
|
From: Tony Butler <spudz76@gmail.com>
|
||||||
|
Date: Mon, 22 Apr 2024 03:56:21 -0700
|
||||||
|
Subject: kernel: ubifs: automount ubifs root only when CONFIG_UBIFS_ROOT is set
|
||||||
|
|
||||||
|
Kernel patches in generic/hack for 5.5, 6.1, and 6.6 that add
|
||||||
|
`CONFIG_UBIFS_ROOT` option to automount rootfs as ubifs rather than
|
||||||
|
using `CONFIG_MTD_ROOTFS_ROOT_DEV` which should only select the
|
||||||
|
appropriate MTD partition and not force any filesystem type or mounting.
|
||||||
|
|
||||||
|
Signed-off-by: Tony Butler <spudz76@gmail.com>
|
||||||
|
---
|
||||||
|
fs/ubifs/Kconfig | 8 ++++++++
|
||||||
|
init/do_mounts.c | 4 ++--
|
||||||
|
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/fs/ubifs/Kconfig
|
||||||
|
+++ b/fs/ubifs/Kconfig
|
||||||
|
@@ -98,4 +98,12 @@ config UBIFS_FS_AUTHENTICATION
|
||||||
|
sha256, these are not selected automatically since there are many
|
||||||
|
different options.
|
||||||
|
|
||||||
|
+config UBIFS_ROOT
|
||||||
|
+ bool "UBIFS root file system"
|
||||||
|
+ depends on UBIFS_FS=y
|
||||||
|
+ help
|
||||||
|
+ Enables root file system support using UBIFS.
|
||||||
|
+
|
||||||
|
+ Most people say N here.
|
||||||
|
+
|
||||||
|
endif # UBIFS_FS
|
||||||
|
--- a/init/do_mounts.c
|
||||||
|
+++ b/init/do_mounts.c
|
||||||
|
@@ -447,7 +447,7 @@ out:
|
||||||
|
put_page(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
|
||||||
|
+#ifdef CONFIG_UBIFS_ROOT
|
||||||
|
static int __init mount_ubi_rootfs(void)
|
||||||
|
{
|
||||||
|
int flags = MS_SILENT;
|
||||||
|
@@ -602,7 +602,7 @@ void __init mount_root(void)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
-#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
|
||||||
|
+#ifdef CONFIG_UBIFS_ROOT
|
||||||
|
if (!mount_ubi_rootfs())
|
||||||
|
return;
|
||||||
|
#endif
|
@ -0,0 +1,50 @@
|
|||||||
|
From: Tony Butler <spudz76@gmail.com>
|
||||||
|
Date: Mon, 22 Apr 2024 03:56:21 -0700
|
||||||
|
Subject: kernel: ubifs: automount ubifs root only when CONFIG_UBIFS_ROOT is set
|
||||||
|
|
||||||
|
Kernel patches in generic/hack for 5.5, 6.1, and 6.6 that add
|
||||||
|
`CONFIG_UBIFS_ROOT` option to automount rootfs as ubifs rather than
|
||||||
|
using `CONFIG_MTD_ROOTFS_ROOT_DEV` which should only select the
|
||||||
|
appropriate MTD partition and not force any filesystem type or mounting.
|
||||||
|
|
||||||
|
Signed-off-by: Tony Butler <spudz76@gmail.com>
|
||||||
|
---
|
||||||
|
fs/ubifs/Kconfig | 8 ++++++++
|
||||||
|
init/do_mounts.c | 4 ++--
|
||||||
|
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/fs/ubifs/Kconfig
|
||||||
|
+++ b/fs/ubifs/Kconfig
|
||||||
|
@@ -98,4 +98,12 @@ config UBIFS_FS_AUTHENTICATION
|
||||||
|
sha256, these are not selected automatically since there are many
|
||||||
|
different options.
|
||||||
|
|
||||||
|
+config UBIFS_ROOT
|
||||||
|
+ bool "UBIFS root file system"
|
||||||
|
+ depends on UBIFS_FS=y
|
||||||
|
+ help
|
||||||
|
+ Enables root file system support using UBIFS.
|
||||||
|
+
|
||||||
|
+ Most people say N here.
|
||||||
|
+
|
||||||
|
endif # UBIFS_FS
|
||||||
|
--- a/init/do_mounts.c
|
||||||
|
+++ b/init/do_mounts.c
|
||||||
|
@@ -249,7 +249,7 @@ out:
|
||||||
|
put_page(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
|
||||||
|
+#ifdef CONFIG_UBIFS_ROOT
|
||||||
|
static int __init mount_ubi_rootfs(void)
|
||||||
|
{
|
||||||
|
int flags = MS_SILENT;
|
||||||
|
@@ -408,7 +408,7 @@ static inline void mount_block_root(char
|
||||||
|
|
||||||
|
void __init mount_root(char *root_device_name)
|
||||||
|
{
|
||||||
|
-#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
|
||||||
|
+#ifdef CONFIG_UBIFS_ROOT
|
||||||
|
if (!mount_ubi_rootfs())
|
||||||
|
return;
|
||||||
|
#endif
|
@ -51,3 +51,4 @@ CONFIG_SOC_IMX6=y
|
|||||||
CONFIG_SOC_IMX6Q=y
|
CONFIG_SOC_IMX6Q=y
|
||||||
CONFIG_SOC_IMX6SL=y
|
CONFIG_SOC_IMX6SL=y
|
||||||
CONFIG_SOC_IMX6SX=y
|
CONFIG_SOC_IMX6SX=y
|
||||||
|
CONFIG_UBIFS_ROOT=y
|
||||||
|
@ -801,6 +801,7 @@ CONFIG_TRANS_TABLE=y
|
|||||||
CONFIG_TREE_RCU=y
|
CONFIG_TREE_RCU=y
|
||||||
CONFIG_TREE_SRCU=y
|
CONFIG_TREE_SRCU=y
|
||||||
CONFIG_UBIFS_FS=y
|
CONFIG_UBIFS_FS=y
|
||||||
|
CONFIG_UBIFS_ROOT=y
|
||||||
# CONFIG_UCLAMP_TASK is not set
|
# CONFIG_UCLAMP_TASK is not set
|
||||||
CONFIG_UIO=y
|
CONFIG_UIO=y
|
||||||
CONFIG_UIO_AEC=y
|
CONFIG_UIO_AEC=y
|
||||||
|
Loading…
Reference in New Issue
Block a user