| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7e88753ace0022bd56f77a7a647894f2936cf17b.
Using subpartitions (hierarchical layout) resulted in calling MTD ops of
parent partition instead of master device ops. That was expected and
should work but testing revealed some bugs.
Apparently the way MTD_ERASE_PARTIAL is implemented in the OpenWrt
breaks something and using parent partition ops triggers using that
code.
On SmartRG SR400ac it was resulting in:
[ 225.487519] jffs2: Erase at 0x01ac0000 failed immediately: errno -22
on the second boot (for some reason erasing was starting over) and it
was breaking flash access in a long term.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helper uses hierarchical partitions layout following the way
upstream parsers work. It's closer to what we should use when mainlining
our solutions. It also doesn't require hacky casting of struct
mtd_partition to the const.
THIS WILL AFFECT KERNEL PRINTING PARTITIONS IN THE LOG
Something like:
[ 3.930158] 0x0000004e0000-0x000001fb0000 : "rootfs_data"
will get replaced by:
[ 3.907338] Creating 1 MTD partitions on "rootfs":
[ 3.912142] 0x00000031d400-0x000001ded400 : "rootfs_data"
It's important to understand that "rootfs_data" in above example is a
*subpartition* of the "rootfs" now. To get absolute addresses (e.g. for
some debugging purposes) one has to add them to the "rootfs", e.g.
[ 3.912548] 0x0000001c2c00-0x000001fb0000 : "rootfs"
(0x1c2c00 + 0x31d400 = 0x4e0000)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
This improves handling of subpartitions.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
| |
No single target/arch uses it and most likely there is no need to make
such a potential code target/arch specific.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
| |
If "compatible" is being used that should trigger a proper parser
directly. It's more reliable thanks to not trying parsers one by one. In
such case partition shouldn't be split automatically to avoid parsing it
twice.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
That function isn't used anywhere out of the mtdpart.c & can be static.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
| |
It has been last used in kernel 3.18 for uimage and squashfs splitters
embedded in the mtdpart.c.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
| |
It has been rejected upstream and instead a nice/more generic solution
has been implemented. It's possible now to describe partitions format
using "compatible" DT string.
No OpenWrt target uses "linux,part-probe" anymore, leave it only in case
some forks need it. It will be dropped with support for new kernels.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a new & warm feature that allows nesting partiitons in DT and
mixing their types (e.g. static vs. dynamic). It's very useful for
boards that have most partitions static but some of them require extra
parsing (e.g. a "firmware" partition).
It's required to successfully backport support for new devices using
that new syntax in their DT files.
Since brcm63xx has a custom alternative patch the upstream one is being
reverted for it. The plan is to make brcm63xx use the upstream
implementation.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
| |
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the commit bde5e7a632ef0 ("kernel: backport mtd implementation for
"compatible" in "partitions" subnode") patches that got accepted into
l2-mtd.git were backported to the kernels 4.9 and 4.14. Unfortunately
there was a regression report, patches were dropped and never reached
4.16.
This commit replaces these pseudo-backports with the latest version
that includes regression fix and futher changes that were requested.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
| |
This backports upstream support for "compatible" DT property set for the
"partitions" subnode of flash node. It allows specifying how partitions
should be created/parsed. Right now only "fixed-partitions" is
supported.
It should eventually replace our downstream "linux,part-probe" solution.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
This adds initial support for kernel 4.14 based on the patches for
kernel 4.9.
In the configuration I deactivated some of the new possible security
features like:
CONFIG_REFCOUNT_FULL
CONFIG_SLAB_FREELIST_HARDENED
CONFIG_SOFTLOCKUP_DETECTOR
CONFIG_WARN_ALL_UNSEEDED_RANDOM
And these overlay FS options are also deactivated:
CONFIG_OVERLAY_FS_INDEX
CONFIG_OVERLAY_FS_REDIRECT_DIR
I activated this:
CONFIG_FORTIFY_SOURCE
CONFIG_POSIX_TIMERS
CONFIG_SLAB_MERGE_DEFAULT
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED
I am not sure if I did the porting correct for the following patches:
target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch
target/linux/generic/hack-4.14/220-gc_sections.patch
target/linux/generic/hack-4.14/321-powerpc_crtsavres_prereq.patch
target/linux/generic/pending-4.14/305-mips_module_reloc.patch
target/linux/generic/pending-4.14/611-netfilter_match_bypass_default_table.patch
target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|