mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-26 16:51:48 +00:00
* Initial commit BPi R2: Currently working/not working: - u-boot: - builds with minor issues - patching and cleanup happens on 'https://github.com/chwe17/u-boot-mt' - next (https://github.com/frank-w/BPI-R2-4.14) - boots with minor issues - ETH doesn't work with nm - sata works - no wifi (needs driver from: https://github.com/frank-w/BPI-R2-4.4) - USB not working (xhci-mtk 1a1c0000.usb: fail to get vbus) needs investigation - appended device tree is needed due to u-boot doesn't work with fdt (kernelpacking needs adjustemts e.g. cat zImage dtb > zImage-dtb - dev (kernel.org master) - untested, needs adjustments in config (e.g. CONFIG_LOCALVERSION="") - since no defconfig is available config is based on frank-w 4.16 Kernel - Kernel builds without issues - manual packing of kernel and dtb similar to next The board boots, serial console is available but everything else must be expected as not working! - to do: - u-boot needs a cleanup - binary blobs needs investigation - eMMC is **not tested** and needs for sure adjustements! (don't try nand-sata-install!!!) - bootscript isn't tested (only manual boot over u-boot console at the moment) - both kernelconfigs aren't 'armbian standard' modules need to be adjusted Only use it when you know're familiar with u-boot commands! * Small fixes, add bootscript - add bootscript for patched u-boot (needs patching of u-boot, currently under investigation and not working properly) - revert cat zImage dtb > zImage-dtb (cause not working) - first cleanup of dev kernelconfig (remove CONFIG_LOCALVERSION="") * Minor fixup -kernelconfig for next was adjustet so that USB is recognized -firt bootscripts was written to boot with source command (doesn't work 100% reliable) -slightly adjustd boardconfig (e.g. bootscript) must still be considered as early wip! * small update (FDT works now) -working bootscript -adjusted boardconfig -earlyprintk activated in kernelconfig * First attempt to get ETH working -all interfaces are bridged together -performance sucks at the moment (not clear if it's related to insane network configuration or I miss something obvious... :P ) * Major update (see below for changes): - 4.14 kernel was dropped due to https://forum.armbian.com/topic/7296-bananapi-r2-csc-mt7623-as-new-boardfamily/?do=findComment&comment=55194 and following - boot.cmd was adjusted to 'clean' mainline behaviour - next build opition and its defaultconfg was removed (at the moment dev only) - rework of the network default configuration - default configuration will be over network.d **not** NetworkManager - per default all wired interfaces are bridged together to br0 (still wip) - old 'interfaces' configuration was removed - boardconfig is adjusted (no desktop until I've prove that HDMI works) - what works/ not works: - board boots up without manual u-boot hacking - SATA, USB3 (massstorage) is tested and works without issues - due to rework of network configuration this is still wip and must be considered as 'not working' * moved to network.d for configuration of wired network - renamed bsp packages - blacklist wired interfaces for NetworkManager - defined all wired interfaces as br0 in systemd/network - defined networkd als default renderer for bionic (not tested yet!) * The houskeeping commit: - BOARDFAMILY was renamed to mt7623 instead of mt7623n (including patchfolders etc.) - Network.d has no fully control over wired networkes (block NM from controll, start networkd on firstrun etc.) - Further cleanup kernelconfig - CPU temp is visible from userspace - missed switch driver loaded - cryptodrivers are there (not tested) - still a bunch of work * Add DMA mem alloc patch -under testing! * Add next option (4.17.y) stick dev to master (4.18-rc1 untested) * minor fixes: - solve kconfig issues between 4.17 and 4.18 - stick next branch to 4.18 - first attempts to bring up gmac2 (doesn't work currently) * switch to upstream u-boot - fix ext4 dependency in patch series - kernelpacking currently broken * add bootz & cmd_ext4 * resolved merge conflict * apply ugly u-boot patch, fix bootscript * remove unneeded stuff, apply forgotten stuff * update config for dev & clean up boardconf (remove xenial) * - drop dev and next, move into default. There is no intention to provide stock kernel - fixed board description, renamed to WIP, where it can be merged later - packing boot firmware to the u-boot package - docker dependencies (aufs will be added later. not essential) - attached to 4.19.y - loading armbianEnv.txt - UUID support (tested) - enabled ZRAM (tested) - enabled eMMC install (not quite working properly yet) - Bionic has some issues with systemd networking. * gov to ondemand (thermals are conservative anyway), remove unneeded kernelconfigs * Added AUFS, remove debug from kernel boot parameters, add ath10 mPCI support (which works) * add power-off-key and rtc * Added onboard wireless, but it's enabling is disabled by default. Too fragile. * Change to CSC target
75 lines
4 KiB
Diff
75 lines
4 KiB
Diff
From 203a5a7727a80ab519ea00181a909e415c5567ab Mon Sep 17 00:00:00 2001
|
|
From: Frank Wunderlich <frank-w@public-files.de>
|
|
Date: Wed, 29 Aug 2018 19:17:00 +0200
|
|
Subject: [PATCH] [gcc] gcc8-fixes by Dominik Koch + nic_rx-patch from
|
|
https://bugs.linaro.org/show_bug.cgi?id=3823
|
|
|
|
---
|
|
.../misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c | 10 ++++++----
|
|
.../misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c | 2 +-
|
|
.../connectivity/wlan/gen2/os/linux/include/gl_kal.h | 2 +-
|
|
3 files changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c
|
|
index ba4840414da85..65823023cec0e 100644
|
|
--- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c
|
|
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c
|
|
@@ -2061,7 +2061,6 @@ VOID nicRxProcessEventPacket(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb
|
|
case EVENT_ID_BT_OVER_WIFI:
|
|
#if CFG_ENABLE_BT_OVER_WIFI
|
|
{
|
|
- UINT_8 aucTmp[sizeof(AMPC_EVENT) + sizeof(BOW_LINK_DISCONNECTED)];
|
|
P_EVENT_BT_OVER_WIFI prEventBtOverWifi;
|
|
P_AMPC_EVENT prBowEvent;
|
|
P_BOW_LINK_CONNECTED prBowLinkConnected;
|
|
@@ -2069,11 +2068,11 @@ VOID nicRxProcessEventPacket(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb
|
|
|
|
prEventBtOverWifi = (P_EVENT_BT_OVER_WIFI) (prEvent->aucBuffer);
|
|
|
|
- /* construct event header */
|
|
- prBowEvent = (P_AMPC_EVENT) aucTmp;
|
|
-
|
|
if (prEventBtOverWifi->ucLinkStatus == 0) {
|
|
/* Connection */
|
|
+ UINT_8 aucTmp[sizeof(AMPC_EVENT) + sizeof(BOW_LINK_CONNECTED)];
|
|
+ /* construct event header */
|
|
+ prBowEvent = (P_AMPC_EVENT) aucTmp;
|
|
prBowEvent->rHeader.ucEventId = BOW_EVENT_ID_LINK_CONNECTED;
|
|
prBowEvent->rHeader.ucSeqNumber = 0;
|
|
prBowEvent->rHeader.u2PayloadLength = sizeof(BOW_LINK_CONNECTED);
|
|
@@ -2086,6 +2085,9 @@ VOID nicRxProcessEventPacket(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb
|
|
kalIndicateBOWEvent(prAdapter->prGlueInfo, prBowEvent);
|
|
} else {
|
|
/* Disconnection */
|
|
+ UINT_8 aucTmp[sizeof(AMPC_EVENT) + sizeof(BOW_LINK_DISCONNECTED)];
|
|
+ /* construct event header */
|
|
+ prBowEvent = (P_AMPC_EVENT) aucTmp;
|
|
prBowEvent->rHeader.ucEventId = BOW_EVENT_ID_LINK_DISCONNECTED;
|
|
prBowEvent->rHeader.ucSeqNumber = 0;
|
|
prBowEvent->rHeader.u2PayloadLength = sizeof(BOW_LINK_DISCONNECTED);
|
|
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c
|
|
index dd00859d46082..ad7107b1d9a44 100644
|
|
--- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c
|
|
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c
|
|
@@ -5021,7 +5021,7 @@ VOID qmHandleRxArpPackets(P_ADAPTER_T prAdapter, P_SW_RFB_T prSwRfb)
|
|
if (prBssInfo && prBssInfo->prStaRecOfAP && prBssInfo->prStaRecOfAP->aucMacAddr) {
|
|
if (EQUAL_MAC_ADDR(&(pucData[ETH_TYPE_LEN_OFFSET + 10]), /* source hardware address */
|
|
prBssInfo->prStaRecOfAP->aucMacAddr)) {
|
|
- strncpy(apIp, &(pucData[ETH_TYPE_LEN_OFFSET + 16]), sizeof(apIp)); /* src ip address */
|
|
+ memcpy(apIp, &(pucData[ETH_TYPE_LEN_OFFSET + 16]), sizeof(apIp)); /* src ip address */
|
|
DBGLOG(INIT, TRACE, "get arp response from AP %d.%d.%d.%d\n",
|
|
apIp[0], apIp[1], apIp[2], apIp[3]);
|
|
}
|
|
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h
|
|
index 1406905095e64..b1386918c08de 100644
|
|
--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h
|
|
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h
|
|
@@ -852,7 +852,7 @@ struct KAL_HALT_CTRL_T {
|
|
|
|
/* string operation */
|
|
#define kalStrCpy(dest, src) strcpy(dest, src)
|
|
-#define kalStrnCpy(dest, src, n) strncpy(dest, src, n)
|
|
+#define kalStrnCpy(dest, src, n) memcpy(dest, src, n)
|
|
#define kalStrCmp(ct, cs) strcmp(ct, cs)
|
|
#define kalStrnCmp(ct, cs, n) strncmp(ct, cs, n)
|
|
#define kalStrChr(s, c) strchr(s, c)
|