From f791fb4af45032a653ba7c850f4564923871cb16 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 27 Jan 2017 14:32:10 +0100 Subject: kernel: add linux 4.9 support Signed-off-by: Felix Fietkau Signed-off-by: Tim Harvey [fixes] --- .../480-mtd-set-rootfs-to-be-root-dev.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 target/linux/generic/patches-4.9/480-mtd-set-rootfs-to-be-root-dev.patch (limited to 'target/linux/generic/patches-4.9/480-mtd-set-rootfs-to-be-root-dev.patch') diff --git a/target/linux/generic/patches-4.9/480-mtd-set-rootfs-to-be-root-dev.patch b/target/linux/generic/patches-4.9/480-mtd-set-rootfs-to-be-root-dev.patch new file mode 100644 index 0000000..27875d2 --- /dev/null +++ b/target/linux/generic/patches-4.9/480-mtd-set-rootfs-to-be-root-dev.patch @@ -0,0 +1,26 @@ +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -570,6 +571,15 @@ int add_mtd_device(struct mtd_info *mtd) + of this try_ nonsense, and no bitching about it + either. :) */ + __module_get(THIS_MODULE); ++ ++ if (!strcmp(mtd->name, "rootfs") && ++ IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) && ++ ROOT_DEV == 0) { ++ pr_notice("mtd: device %d (%s) set to be root filesystem\n", ++ mtd->index, mtd->name); ++ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); ++ } ++ + return 0; + + fail_added: -- cgit v1.1