Commit graph

450 commits

Author SHA1 Message Date
Mathias Kresin
e7ec7a08aa image: use k as unit suffix for blocksize
Use k as unit suffix for kilobyte to have a the same unit regardless of
the used filesystem.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-04 08:56:05 +02:00
Mathias Kresin
85fefcdb61 kernel: mtd: backport Macronix sector size fix
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-03 09:27:09 +02:00
Rafał Miłecki
232767edf0 bcm53xx: enable switch port 5 on Tenda AC9
Now b53 forces port 5 link when needed, we can enable it on Tenda AC9
and start using eth1.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-09-08 23:24:43 +02:00
Rafał Miłecki
dd158ef346 bcm53xx: use upstream queued patches for R8500 and AC9
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-09-08 22:53:37 +02:00
Felix Fietkau
aa53f78038 build: fix subtarget descriptions
Move Target/Description above the target.mk include

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-09-04 13:35:11 +02:00
Rafał Miłecki
1bb914dbed bcm53xx: use the latest 6th version of ILP clock driver patch
It still wasn't accepted, so don't switch to 0xx prefix yet.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-26 17:03:40 +02:00
Rafał Miłecki
fcdba8d590 bcm53xx: backport patch adding ARCH_BCM_53573 symbol
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-23 07:13:07 +02:00
Rafał Miłecki
28d641be43 bcm53xx: update copy of ASM entry flushing whole D-cache
Previous version was based on code from kernel 2.6.22 with Broadcom two
trivial modifications. This updates the copy to the version from current
kernel and refreshes the patch.

This was tested for regressions on Netgear R6250 (BCM4708A0), D-Link
DIR-885L (BCM4709C0) and Tenda AC9 (BCM47189B0).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-19 12:47:58 +02:00
Rafał Miłecki
1bef5050ef bcm53xx: build Tenda AC9 image
We finally got kernel booting on this device and LAN ports are working,
so it won't "brick" the device. One more big missing thing is WAN port
support. It requires fix for BCM53125 to get switch port 5 working.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-19 11:38:44 +02:00
Rafał Miłecki
5e885c09c6 bcm53xx: switch back to standalone ASM entry flushing cache
Over a year ago in a commit ac96a1665a ("bcm53xx: update Disable MMU
and Dcache during decompression") we switched to Florian's patch for
workarounding CFE bug. The main difference was using a part of existing
__armv7_mmu_cache_flush instead of implementing flushing separately.

This worked well for Northstar devices but doesn't work for BCM53573 as
these devices simply don't start booting with Florian's patch. It's
because of the ldmfd ASM instruction in the __armv7_mmu_cache_flush.

So this commit switches back to using standalone implementation. This
time instead of copying Broadcom's copy of cache-v7.S, we just make a
copy of the original file on our own. Unfortunately we can't cross-dir
compile cache-v7.S from ../../mm/ as that one also adds __INITDATA with
define_cache_functions v7 which would just trigger
> Error: unrecognized/unsupported machine ID (r1 = 0x0000007f).

The only real change Broadcom did in copied .S file was modifying mcr
instruction to use c6 instead of c14. It isn't clear to me if we really
need it, but let's use it for now.

By the way we also update commit message of the
[PATCH] ARM: BCM5301X: Disable MMU and Dcache during decompression

This makes kernel booting on BCM53573 successfully.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-19 11:38:44 +02:00
Rafał Miłecki
d22ae5e888 bcm53xx: package drivers for Northstar USB PHYs
We don't use them yet as we still init PHY in controller driver but they
will be needed soon.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-19 11:38:44 +02:00
Rafał Miłecki
31fada8bec bcm53xx: generate proper network config for Tenda AC9
It's a more complex device with 2 interfaces on the SoC, one we can use
for LAN and another for WAN.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-18 10:40:49 +02:00
Rafał Miłecki
93f2aa44f7 kernel: bgmac: backport patch adding platform support
It also reworks bcma support by moving specific code to separated file.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-17 12:41:20 +02:00
Rafał Miłecki
5846620890 bcm53xx: fix warning caused by m25p80 patch
It was adding unused variable:
drivers/mtd/devices/m25p80.c: In function 'm25p80_write':
drivers/mtd/devices/m25p80.c:85:6: warning: unused variable 'i' [-Wunused-variable]
  int i;
      ^

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-16 17:14:14 +02:00
Rafał Miłecki
27b078e83a bcm53xx: add quick fixes for BCM53573
It adds and uses ILP clock that requires some other work (in progress)
for upstreaming it. Other than that it adds a quick fix for bcma to add
serial flash before trying to read SPROM.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-15 12:49:16 +02:00
Rafał Miłecki
38750ce739 bcm53xx: add temporary BCM53573 ILP clock driver
It wasn't accepted upstream as there was a discusson on Northstar vs.
BCM53573. Once we get a new ARM arch Kconfig entry it should be
possible to upstream it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-15 10:20:43 +02:00
Rafał Miłecki
dd7eddcb08 bcm53xx: prepare for building Tenda AC9 TRX image
It'll be enabled when we complete basic support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-15 09:33:04 +02:00
Rafał Miłecki
857f00a9f7 bcm53xx: drop target's preinit network support script
We don't need it anymore since the rework of generic preinit script.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-14 23:14:15 +02:00
Rafał Miłecki
5b1c00e4fa bcm53xx: support USB 2.0 controller on BCM53573
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-14 13:05:23 +02:00
Rafał Miłecki
62c5f68095 bcm53xx: backport USB 3.0 controller init patch
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-14 12:41:32 +02:00
Rafał Miłecki
e674c1aab3 bcm53xx: backport USB 3.0 Northstar PHY driver
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-14 11:31:17 +02:00
Rafał Miłecki
b9d8c81018 bcm53xx: rename PHY patches to use 07* prefix
This is not a strict rule but it matches better this one:
7xx - network / phy driver patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-14 11:22:58 +02:00
Rafał Miłecki
fa350d5aba bcm53xx: add profiles for Buffalo devices
This generates proper images when using CONFIG_TARGET_MULTI_PROFILE and
CONFIG_TARGET_PER_DEVICE_ROOTFS.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-11 12:17:06 +02:00
Rafał Miłecki
b835d7e811 bcm53xx: include USB modules in images for devices with USB ports
This allows using USB out of the box.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-11 11:59:28 +02:00
Rafał Miłecki
0b9de8daa7 bcm53xx: add profiles for all other (SoftMAC) devices
Thanks to this images for SoftMAC devices don't get brcmfmac anymore and
b43 is added for devices with (quite poor) support only.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-11 11:31:46 +02:00
Rafał Miłecki
d378a7c4f7 bcm53xx: convert (disabled) Netgear R8500 image to own profile
It should be the last device with FullMAC chipset to convert.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-11 08:28:41 +02:00
Rafał Miłecki
931d309203 bcm53xx: add profile with brcmfmac for Netgear R7900
It's one more device with FullMAC that got forgotten in the previous
commit.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-08-11 07:46:17 +02:00
Rafał Miłecki
c769c1b584 bcm53xx: add profiles for devices with FullMAC chipsets
This allows building images for selected devices with brcmfmac only
(without b43 which is for SoftMAC devices).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
2016-08-10 20:41:53 +02:00
Felix Fietkau
63b525dd6b image: add a helper variable for getting kernel/rootfs from within image Build/* templates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-31 12:25:25 +02:00
Rafał Miłecki
f6a86ba066 bcm53xx: enable kernel symbols/drivers needed for BCM53573
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-28 14:05:41 +02:00
Rafał Miłecki
2552e9319e bcm53xx: backport DTS patches for USB 2.0 and Tenda AC9
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-28 12:59:23 +02:00
Rafał Miłecki
a3be48593b bcm53xx: refresh kernel patches
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-28 12:45:02 +02:00
Rafał Miłecki
60d2620253 kernel: update bcma backporting changes up to 4.8
This allows building bcm47xxsflash on ARM.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-20 13:42:42 +02:00
Felix Fietkau
8e2764ce9b image.mk: clean up redundant code related to DEVICE_DTS
It is used by a core build template, so the variable should be
initialized and added to DEVICE_VARS in the core.
Same for DEVICE_DTS_DIR

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-15 14:14:11 +02:00
Rafał Miłecki
c940ccedd8 bcm53xx: image: don't suppress "mv" command echoing
We call all commands normally, with standard echoing. It's useful for
debugging with V=s. Don't make lzma compression an exception, it's a bit
confusing this way.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-14 11:31:26 +02:00
Felix Fietkau
b3b797076e bcm53xx: simplify image building code
Use append-ubi template for ubinize, remove mkfs override

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-14 10:27:45 +02:00
Felix Fietkau
dbc416b6ec bcm53xx: remove duplicate template data from the image makefile
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-14 10:27:30 +02:00
Hauke Mehrtens
efa1960abb kernel: update kernel 4.4 to version 4.4.15
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-07-13 15:39:15 +02:00
Felix Fietkau
fac693441f bcm53xx: fix kernel config after USB2 PHY driver backport
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-08 13:45:36 +02:00
Rafał Miłecki
1692c71564 bcm53xx: use upstream fix simplifying USB power GPIO usage
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-07 15:07:02 +02:00
Rafał Miłecki
c74c227e5b bcm53xx: backport driver for Northstar's USB 2.0 PHY
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-07 14:50:17 +02:00
Rafał Miłecki
e71fffed64 bcm53xx: backport BCM5301x patches from 2016-07-06
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-07 13:54:55 +02:00
Rafał Miłecki
eaf0d22421 bcm53xx: calculate Seama MD5 using content of kernel partition
We don't want checksum to cover any part of UBI as even its part with
SquashFS may be changed due to e.g. flash wearing.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-04 12:32:12 +02:00
Rafał Miłecki
3c014dc306 Revert "bcm53xx: use uncompressed zImages"
This reverts commit b3be33f135.

CFE is known to fail in some non-standard cases, e.g. when using kernel
or format different that what was tested by Broadcom. This kernel change
triggered some problem with booting OpenWrt kernel stored in Seama.

As long as Seama checksum was covering enough data, it was working fine.
We need to change it however, because calculating MD5 over part of UBI
containing SquashFS is unsafe. UBI may move PEBs depending on flash
wearing level which would break CFE booting the image.

For some reason this kernel change was breaking CFE. Calculating MD5
over 0x47ffc0 B data or less (there is 0x40 B long header) was stopping
booting process at:
Starting program at 0x00008000

As our kernel is usually 0x3fffc0 B it was affected by this problem.

Reverting this change fixes sysupgrade (which already uses kernel size
for MD5 calculation) and will allow us to adjust "fixseama" command call
on the first boot.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-04 12:32:12 +02:00
Ben Whitten
b7baaaf782 kernel: Move append-dtb to common image-commands
This build step is used by various targets, move it to a common section.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
2016-06-22 19:32:06 +02:00
Rafał Miłecki
a180f90518 bcm53xx: backport BCM5301X patches for SRAB
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-06-20 23:07:31 +02:00
Rafał Miłecki
776b24d9aa bcm53xx: properly support sysupgrade using Seama on NAND devices
It updates kernel and then formats UBI without loosing erase counters.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-06-20 08:02:32 +02:00
Rafał Miłecki
cf6d9d97fb kernel: rename B53 symbols to avoid upstream kernel conflict
In kernel 4.7 there is upstreamed b53 driver using (mostly?) the same
symbols as our b53 does. Change our symbols so both drivers can coexist
in kernel tree.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Jonas Gorski <jonas.gorski@gmail.com>
2016-06-20 08:00:14 +02:00
Felix Fietkau
b3be33f135 bcm53xx: use uncompressed zImages
The boot loader expects LZMA compressed kernel images

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-15 14:36:47 +02:00
Felix Fietkau
f27c70ff8c bcm53xx: refresh kernel config
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-15 14:36:47 +02:00