| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This moves the ledbar driver to generic, to be also used by the ramips target.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit 53fc987b25524c28525313347f0e2e5653dce43c)
|
|
|
|
|
|
|
| |
Use 'const char *' where necessary to make gcc get quiet.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit d3a4607fc61f890d5d4bedef6e542046038294d9)
|
|
|
|
|
|
|
|
|
|
| |
* only map filesystems configured in 'loadables'
* allow mapping more than one filesystem (e.g. customization/branding
or localization in addition to rootfs)
* small cleaning here and there
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit ab143647efef2a13bcce2f28a2797899fbc83946)
|
|
|
|
|
|
|
|
|
|
| |
If the selected boot configuration is stored by U-Boot in '/chosen'
node as 'bootconf' attribute, use that configuration to resolve the
block device used as rootfs. Fall back to use the default configuration
in case 'bootconf' is not present.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 503f3b9f0e9693bb983a0f259aa4ba106a690140)
|
|
|
|
|
|
|
|
|
| |
This does not have spare blocks for remapping, and it is also not suitable
for random write access. It only skips over bad blocks on linear writes of an
image to a partition. As such, it is really only suitable for the kernel
partition, or other partitions with mostly static data
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
Preparation for supporting remapping on MT7621
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
This ensures that blocks are remapped before data becomes corrupt
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
| |
This can be used to support ubi on top of mtk_bmt without reflashing the
boot loader. The boot loader + factory + kernel area is covered, while the
rest is passed through as-is
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
| |
Add support for showing remapped blocks and garbage collecting old
remapped blocks triggered by using the mark_good/mark_bad files
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
Copy from the previous block in order to preserve existing data
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
| |
Preparation for supporting BMT on MT7621. Move source files to the files/
subdirectory in order to simplify maintenance
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the SPI probe is sufficiently delayed, the routerboot driver may fail
to init as the routerboot partitions are not yet available.
Register an MTD user notifier instead of doing straight init so that the
init subroutines are only executed when the target MTD partitions are
present.
Because the init/exit routines can now be called outside of the kernel
normal init/exit calls, they cannot be jettisoned and must always be
available: the __init and __exit qualifiers are thus removed.
Reported-by: Denis Kalashnikov <denis281089@gmail.com>
Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
[bump hardconfig/softconfig versions]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
|
|
|
|
|
|
|
|
| |
Make soft_config writable in all cases. Performing soft_config commit
will fail if mtd partition is not writable.
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
[bump rb_softconfig version number]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
|
|
|
|
|
|
| |
Set policy bit to force read-only mode on uImage.FIT filesystem
sub-images mapped as block partitions by the FIT partition parser.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ath25 requires a 88E6060 driver to support boards such as Fonera 2.0g
(FON2202). The swconfig based mvswitch driver has not yet been ported to
the 5.10 kernel as the only user is the ath25 target while all other
targets have been switched to the upstream DSA implementation.
Switching ath25 to the DSA implementation is a complex task, since we
need either per-board platform data or DTS support. ath25 lacks both of
them and builds only a single generic image. So we need to keep the
swconfig driver implementation to easly and quickly port ath25 to the
5.10 kernel.
Since porting the mvswitch driver to 5.10 as a generic driver is not an
option, and since the ath25 is its only user, make mvswitch a target
specific driver to be able to port it to the 5.10 kernel as part of the
kernel version update of the target. This will allow us quickly migrate
to the next kernel version and not delay the next firmware release.
Suggested-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes:
ERROR: "switch_generic_set_link" [drivers/net/phy/b53/b53_common.ko] undefined!
At some point all packages for swconfig drivers were dropped and targets
were meant to have them built into kernels. It seems b53 (re-)gained its
kmod-switch-bcm53xx however and b53 needs to be built as module.
Fixes: b2cfed48f626 ("Revert "swconfig: fix Broadcom b53 support"")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8f9cd1af0f9c325a902dbd0e79e12015372e6bb0.
That commit was meant to add a single EXPORT_SYMBOL_GPL() but it
actually also added few .of_match_table-s. One commit should handle one
thing and should not introduce unrelated changes.
Regarding actual changes:
1. EXPORT_SYMBOL_GPL is not required as we don't build swconfig drivers
as modules.
2. PHY drivers must not have .of_match_table. That is allowed for MDIO
drivers. This could work for some time (although is didn't for me on
bcm53xx) but does not with kernel 5.10. It causes a soft lockup and
upstream developers confirmed it's an unsupported design.
Link: https://lore.kernel.org/netdev/2b1dc053-8c9a-e3e4-b450-eecdfca3fe16@gmail.com/t/#mf80e472f35ee23f7a75cbf5b1e101a17ab3a64a3
Cc: Tobias Schramm <tobleminer@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
| |
The uImage.FIT partition uses page mapping without properly handling
paging errors. This can lead to Kernel Oops in case of read errors
while trying to parse uImage.FIT partitions.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
| |
Introduce new partition type 0x2e representing uImage.FIT and trigger
FIT partition parser on partitions having that type.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
|
|
| |
ar8xxx_soft_reset is effectively a NOP function. In the PHY state
machine, the availability and result of a soft_reset function
makes no difference for the code flow.
Thus, we can safely remove this method.
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modifying PHY capabilities in the probe function broke with upstream
commit 92ed2eb7f4b7 ("net: phy: probe the PHY before determining the
supported features").
AR8316 switches only support 10/100 Mbit/s link modes because of this
change.
Provide a get_features method for the PHY driver, so Gigabit link mode
will be advertised to link partners again.
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code uses get_mtd_device_nm() which must be followed by a call to
put_mtd_device() once the handle is no longer used.
This fixes spurious shutdown console messages such as:
[ 2256.334562] Removing MTD device #7 (soft_config) with use count 1
Reported-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following changes are made to the Lantiq kernel patches:
0001-MIPS-lantiq-add-pcie-driver.patch
The pci header isn't included by the of_pci header any longer
0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
Due to the merge of grx390 and ar10 clocks, extend support to grx390
0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
The do_carrier arguments was dropped from phy_link_change. The
phylib has always sets the third parameter to true so the flag is
always changed anyway.
of_get_phy_mode() returns an error, or 0 on success, and pass a
pointer, of type phy_interface_t, where the phy mode should be
stored now. So far an error wasn't considered. Print at least an
error message if something unexpected happens.
The stuck queue is now passed to xrx200_tx_timeout (the timeout
handler) but not used so far.
0028-NET-lantiq-various-etop-fixes.patch
ioremap has provided non-cached semantics by default since the Linux
2.6 days and was removed with kernel version 5.6.
of_get_phy_mode() returns an error, or 0 on success, and pass a
pointer, of type phy_interface_t, where the phy mode should be
stored now. So far an error wasn't considered. Print at least an
error message if something unexpected happens.
0042-arch-mips-increase-io_space_limit.patch
Move IO space extension to laniq specific file
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow using the FIT block-device partition partition parser to work on
top of mtdblock devices.
This is more tricky than it sounds as it requires to reorganize the
procedure of registering mtdblock devices in order to avoid locking
troubles caused by the block partition parsers then trying to open
the mtdblock device for reading while locks are still being held.
Fix that by moving the adding of the disks after the entire device
has been probed when locks no longer need to be held.
Also address issue with mtdsuper surfaced when using sub-partitions
which prevented mounting JFFS2 using the /dev/mtdblock* device.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
U-Boot has recently added support for having data blobs in uImage.FIT
images stored at offsets after the FDT structure rather than embedding
the data into the FDT structure itself. This is useful as it allows
parts of the image to be mapped by the FIT partition parser, and it
allows the FIT structure itself to be parsed more easily as it usually
fits into single page.
mtdsplit_fit assumed that the total length of an image is identical
to the length of the FDT structure. For uImage.FIT with external data
this assumption no longer holds true.
Add support for uImage.FIT with external data to mtdsplit_fit and in
in that case only split-off rootfs_data -- selecting and mapping rootfs
partition is left to the block partition parser just like on UBI and
block/GPT based platforms.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
| |
It's helpful for accessing booting data (DTS, kernel, etc.). It has to
be used carefully as CFE's JFFS2 support is quite dumb. It doesn't
recognize deleted files and has problems handling 0 inode.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
| |
The BCM5365 UID was updated in the driver, but we should also update it in the
fixup.
Fixes: cbcac4fde8ba ("kernel: b53: update the BCM5365 UID")
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(Ammend commit description, add Fixes tag)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This is useful for dual-boot setups where the loader sets variables depending
on the flash boot partition.
For example the Linksys E8450 sets mtdparts=master for the first partition
and mtdparts=slave for the second one.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
|
|
| |
Introduce a magic GUID_PARTITION_LINUX_FIT_GUID to designate a GPT
partition to be interpreted by the FIT partition parser.
In that way, sub-partitions for (external-data) uImage.FIT stored
directly in a partition can be split, similar like we do for devices
with raw flash storage.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BCM63XX internal PHYs and BCM5365 SoC internal switch are both using the
same phy_driver->phy_id, causing conflicts and unnecessary probes. E.g
the BCM63XX phy internal IRQ is lost on the first probe.
The full BCM5365 UID is 0x00406370.
Use an additional byte to mask the BCM5365 UID to avoid duplicate driver
phy_id's. This will fix the IRQ issue in internal BCM63XX PHYs and avoid
more conflicts in the future.
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow for single (external-data) FIT image to hold kernel, dtb and
squashfs. In that way, the bootloader verifies the system integrity
including the rootfs, because what's the point of checking that the
hash of the kernel is correct if it won't boot in case of squashfs
being corrupted? Better allow bootloader to check everything needed
to make it at least up to failsafe mode. As a positive side effect
this change also makes the sysupgrade process on nand potentially
much easier as it is now.
In short: mkimage has a parameter '-E' which allows generating FIT
images with 'external' data rather than embedding the data into the
device-tree blob itself. In this way, the FIT structure itself remains
small and can be parsed easily (rather than having to page around
megabytes of image content). This patch makes use of that and adds
support for adding sub-images of type 'filesystem' which are used to
store the squashfs. Now U-Boot can verify the whole OS and the new
partition parsers added in the Linux kernel can detect the filesystem
sub-images, create partitions for them, and select the active rootfs
volume based on the configuration in FIT (passing configuration via
device tree could be implemented easily at a later stage).
This new FIT partition parser works for NOR flash (on top of mtdblock),
NAND flash (on top of ubiblock) as well as classic block devices
(ie. eMMC, SDcard, SATA, NVME, ...).
It could even be used to mount such FIT images via `losetup -P` on a
user PC if this patch gets included in Linux upstream one day ;)
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
| |
Broadcom CFE bootloader relies on a tag for identifying the current firmware,
such as version, image start address, kernel address and size, rootfs size,
board id, signatures, etc.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel has changed the of_get_phy_mode API in commit 0c65b2b90d13
("net: of_get_phy_mode: Change API to solve int/unit warnings").
This is already included in kernel 5.5, so fix the version switch
(though this will not actually matter for the versions we support).
Similar driver adjustments to account for the API change will
probably be necessary to various other local drivers.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
|
|
|
| |
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
| |
Enable support for the Ubiquiti UniFi Outdoor+ RF filter via
device-tree. The old way of using platform data is not required anymore,
as it was only used on the now removed ar71xx target.
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
| |
The "edimax,uimage"" parser can be replaced by the generic
parser using device specific openwrt,partition-magic and
openwrt,offset properties.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
|
| |
Some devices prepend a standard U-Boot Image with a vendor specific
header, having its own magic. Adding two new properties will support
validation of such images, including the additional magic.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "netgear,uimage" parser can be replaced by the generic
parser using device specific openwrt,ih-magic and
openwrt,ih-type properties.
Device tree properties for the following devices have not
been set, as they have been dropped from OpenWrt with the
removal of the ar71xx target:
FW_MAGIC_WNR2000V1 0x32303031
FW_MAGIC_WNR2000V4 0x32303034
FW_MAGIC_WNR1000V2_VC 0x31303030
FW_MAGIC_WPN824N 0x31313030
Tested-by: Sander Vanheule <sander@svanheule.net> # WNDR3700v2
Tested-by: Stijn Segers <foss@volatilesystems.org> # WNDR3700v1
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
| |
Some devices use uimage headers with a non-default ih_type. Add
support for overriding this in device tree.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
| |
Convert users to the generic "openwrt,uimage" using device specific
"openwrt,ih-magic" properties, and remove "allnet,uimage".
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
|
|
| |
The only difference between the "openwrt,okli" and the generic
parser is the magic. Set this in device tree for all affected
devices and remove the "openwrt,okli" parser.
Tested-by: Michael Pratt <mcpratt@protonmail.com> # EAP300 v2, ENS202EXT and ENH202
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
| |
Many devices use uimages with non-standard magic values. Let
device tree override the default magic.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
|
| |
Convert users of the "fonfxc" and "sge" parsers to the generic
"openwrt,uimage", using device specific "openwrt,padding" properties.
Tested-by: Stijn Segers <foss@volatilesystems.org> [DIR-878 A1]
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
| |
An "openwrt,padding" property in device tree can replace two device
specific parsers.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
| |
Add devicetree bindings for vendor specific variants of U-Boot
Images, as defined by OpenWrt.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's required for BCM4908. It cannot use "bcm-wfi-fw" parser because
that one requires *two* JFFS2 partitions which is untested / unsupported
on the BCM4908 architecture. With a single JFFS2 partition "bcm-wfi-fw"
parser will:
1. Fail to find "vmlinux.lz" as it doesn't follow "1-openwrt" file
2. Create partitions that don't precisely match bootfs layout
The new parser is described in details in the MTD_SPLIT_CFE_BOOTFS
symbol help message.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
Also remove the leftover kernel hack that adds support for it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
The ID is used be a Realtek based switch made by Netgear.
Signed-off-by: John Crispin <john@phrozen.org>
|