kernel: add support for kernel 5.4
[oweals/openwrt.git] / target / linux / generic / pending-5.4 / 430-mtd-add-myloader-partition-parser.patch
1 From: Florian Fainelli <f.fainelli@gmail.com>
2 Subject: Add myloader partition table parser
3
4 [john@phozen.org: shoud be upstreamable]
5
6 lede-commit: d8bf22859b51faa09d22c056fe221a45d2f7a3b8
7 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 ---
9  drivers/mtd/Kconfig  | 16 ++++++++++++++++
10  drivers/mtd/Makefile |  1 +
11  2 files changed, 17 insertions(+)
12
13 --- a/drivers/mtd/Kconfig
14 +++ b/drivers/mtd/Kconfig
15 @@ -46,6 +46,22 @@ menu "Partition parsers"
16  source "drivers/mtd/parsers/Kconfig"
17  endmenu
18  
19 +config MTD_MYLOADER_PARTS
20 +       tristate "MyLoader partition parsing"
21 +       depends on ADM5120 || ATH25 || ATH79
22 +       ---help---
23 +         MyLoader is a bootloader which allows the user to define partitions
24 +         in flash devices, by putting a table in the second erase block
25 +         on the device, similar to a partition table. This table gives the 
26 +         offsets and lengths of the user defined partitions.
27 +
28 +         If you need code which can detect and parse these tables, and
29 +         register MTD 'partitions' corresponding to each image detected,
30 +         enable this option.
31 +
32 +         You will still need the parsing functions to be called by the driver
33 +         for your particular device. It won't happen automatically.
34 +
35  comment "User Modules And Translation Layers"
36  
37  #
38 --- a/drivers/mtd/parsers/Makefile
39 +++ b/drivers/mtd/parsers/Makefile
40 @@ -9,3 +9,4 @@ obj-$(CONFIG_MTD_AFS_PARTS)             += afs.o
41  obj-$(CONFIG_MTD_PARSER_TRX)           += parser_trx.o
42  obj-$(CONFIG_MTD_SHARPSL_PARTS)                += sharpslpart.o
43  obj-$(CONFIG_MTD_REDBOOT_PARTS)                += redboot.o
44 +obj-$(CONFIG_MTD_MYLOADER_PARTS)       += myloader.o