Compare commits

...

329 Commits

Author SHA1 Message Date
jaspreetsachdev
4c21f5c4b6 Merge pull request #462 from Telecominfraproject/main
Fixes for WIFI-9962 and others
2022-07-01 00:58:45 -04:00
jaspreetsachdev
cf657dbd94 Merge pull request #461 from Telecominfraproject/next
Next
2022-06-30 17:34:02 -04:00
jaspreetsachdev
33c9876760 Merge pull request #460 from Telecominfraproject/release/v2.6.0
Release/v2.6.0
2022-06-30 17:30:42 -04:00
John Crispin
4d6d7405d6 ucentral-schema: update to latest HEAD
9691cc6 improve custom config handling
b4a3a56 add support for OWE encryption

Fixes: WIFI-9811
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
John Crispin
e249701c34 profile: add bind-dig to default package selection
This makes openroaming NAPTR work

Fixes: WIFI-9962
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
John Crispin
0d50975152 hostapd: backport OWE patches
Fixes: WIFI-9811
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
John Crispin
6d87847d15 radius-gw-proxy: update to latest HEAD
Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
jaspreetsachdev
eebe021780 Merge pull request #459 from Telecominfraproject/main
ucentral-client: update to latest HEAD
2022-06-23 15:02:37 -04:00
John Crispin
c6e0384f21 ucentral-client: update to latest HEAD
68fe6c2 fix the ping command

Signed-off-by: John Crispin <john@phrozen.org>
2022-06-23 14:06:26 +02:00
jaspreetsachdev
23ae850f72 Merge pull request #458 from Telecominfraproject/main
Fixes for WIFI-7687, WIFI-9620
2022-06-22 08:59:02 -04:00
John Crispin
708cf2dec6 ucentral-schema: update to latest HEAD
fc8fdcf point radsec proxy at the correct radius accounting server
886a650 Add missing paramters to uC state schema
c8b15b7 chain the radius vendor attributes inside a single AVP

Fixes: WIFI-7687
Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-22 11:06:35 +02:00
John Crispin
a95745d95b ucentral-client: update to latest HEAD
62efd45 add radius-proxy RX path

Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-22 11:06:21 +02:00
John Crispin
83ccea0abf radius-gw-proxy: add RX path support
Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-22 11:02:16 +02:00
John Crispin
bfeaf89238 ucentral-schema: update to latest HEAD
548ce37 point radsec proxy at the correct radius accounting server
c49ce29 Add missing paramters to uC state schema
1c55872 chain the radius vendor attributes inside a single AVP

Signed-off-by: John Crispin <john@phrozen.org>
2022-06-20 19:24:29 +02:00
jaspreetsachdev
7439217b3c Merge pull request #456 from Telecominfraproject/main
Merging Fixes for WIFI-9630 and others
2022-06-17 09:32:12 -04:00
John Crispin
ae2377f4d2 ucentral-schema: update to latest HEAD
4df0373 renderer: quote wireless encryption key

Fixes: WIFI-9630
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-16 16:37:37 +02:00
John Crispin
b81d0aaf0e ipq40xx: add dual boot support for ecw5211
Fixes: WIFI-7712
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-16 12:47:13 +02:00
John Crispin
1546bef93f ucentral-schema: update to latest HEAD
1d7e565 optimize the bridge/uci config for gre tunnels

Signed-off-by: John Crispin <john@phrozen.org>
2022-06-16 12:44:53 +02:00
Stijn Tintel
32b1aade42 ipq807x: force ext4 creation in emmc_do_upgrade
Running mkfs.ext4 on a partition that already contains an ext4
filesystem asks for input:

  mke2fs 1.45.6 (20-Mar-2020)
  /dev/mmcblk0p9 contains a ext4 file system
          created on Sat Jun 11 12:23:42 2022
  Proceed anyway? (y,N) y

This breaks the ability to run sysupgrade non-interactively. Add the -F
switch to force ext4 creation to fix this.

Fixes: WIFI-9419
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-15 12:42:34 +02:00
Stijn Tintel
2a92b75fe1 ipq807x: silence dd errors in do_flash_emmc
Running dd if=/dev/zero to a partition will always throw an ENOSPC error
when reaching the end of the partition. Silence those errors to avoid
confusion.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-15 12:42:34 +02:00
John Crispin
cb30d9e20a ipq807x: add motorola q14 support
Fixes: WIFI-8040
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-15 12:42:34 +02:00
John Crispin
588206b93b ucentral-schema: update to latest HEAD
417fcc4 fix selection of radius proxy ip

Fixes: WIFI-9461
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:48 +02:00
John Crispin
6399649038 ipq807x: improve dual boot on eap101/2
inverse the logic that figures out if we want to set upgrade_available.

Fixes: WIFI-7712
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:48 +02:00
John Crispin
aa3cb95233 wireguard-tools: do not select the kernel module
unetd will select the correct kernel module.

Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:48 +02:00
John Crispin
3ea06dac40 dhcpsnoop: update code
* Update to latest version of dhcpsnoop
* always snoop all upstream interfaces
* add snooped leases to state

Fixes: WIFI-7838
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:21 +02:00
jaspreetsachdev
a70dda4a8e Merge pull request #453 from Telecominfraproject/main
Merge Main to release/v2.6.0
2022-06-09 15:43:49 -04:00
John Crispin
a01f1add81 ipq807x: disable Q14 image generation
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:06:39 +02:00
Felix Fietkau
57849591d7 ipq807x: backport act_mirred changes
Fixes: WIFI-7838
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-06-09 14:06:25 +02:00
John Crispin
b4a09e7167 ucentral-schema: update to latest HEAD
96324e2 fix a typo inside the state handler

Fixes: WIFI-7838
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:05:34 +02:00
John Crispin
96bb8b1372 ucentral-schema: update to latest HEAD
6974baa add data model support for wireguard overlay networks

Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:05:24 +02:00
John Crispin
99ea9da785 ipq807x: add kmod-wireguard backport package
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:05:00 +02:00
John Crispin
bfe7fadfc5 ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:04:04 +02:00
John Crispin
ad1dcc4f45 radius-gw-proxy: fix compile error on gcc5
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:03:53 +02:00
John Crispin
f371c789d0 ipq807x: revert all 11.5 changes
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:03:42 +02:00
John Crispin
386eca1f65 wifi-ax: revert all ath11.5 changes
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:03:05 +02:00
John Crispin
8b9047952d ipq807x: make USB work on wallys-dr6018 and disable sdhci
Fixes: WIFI-9306
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:01:49 +02:00
John Crispin
5a105ef06e hostapd: make psk2-radius work on wifi-5 devices
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 13:59:43 +02:00
John Crispin
c60dc1e045 wifi-ax: disable encap offloading in WDS / STA mode
Fixes: WIFI-9305
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 13:58:06 +02:00
John Crispin
1e1bd19429 ucentral-schema: update to latest HEAD
bfa2647 make sure that vxlan tunnels endup inside a bridge

Fixes: WIFI-9121
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-30 08:26:51 +02:00
John Crispin
cfe07f6e15 ipq807x: backport the skb->cb fix from upstream
This was causing sporadic proxy_arp failures.

Fixes: WIFI-7154
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-30 06:03:02 +02:00
John Crispin
a64039db20 mac80211-qca: properly rebase a patch
The patch had a line skew due to a bad rebase.

Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 18:11:58 +02:00
John Crispin
7f81ddb8cc ucentral-schema: update to latest HEAD
27f451b add script command handler

Fixes: WIFI-9120
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 18:11:58 +02:00
John Crispin
3c0d495334 ucode: package the uloop library
Fixes: WIFI-9120
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 17:33:14 +02:00
John Crispin
38a7c54cce ucentral-client: update to latest HEAD
a4671bb fix an error reported by CI
a82c3f0 add handling for the "script" command

Fixes: WIFI-9120
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 17:31:00 +02:00
Jianhui Zhao
1aead07444 ath11k-wifi: update GL-AXT1800 BDF
Fixes: WIFI-8042
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-05-29 10:31:54 +02:00
John Crispin
d2f44cbb12 ucentral-schema: update to latest HEAD
d1c7ab8 add ip-collide handler

Fixes: WIFI-7830
Fixes: WIFI-7989
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 10:30:45 +02:00
John Crispin
43d7ca31d6 wifi-ax/mac80211: make the 11.4 ath11k work inside the v5.4 kernel
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-27 10:05:52 +02:00
John Crispin
0985c573b0 ipq807x: fix MAC assign on cig-wf19* units
The mtd offset changed in the v5.4 kernel causing MAC lookup to fail.

Fixes: WIFI-7997
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-27 07:34:07 +02:00
John Crispin
d9ed861c1d ipq807x: add support for wallytech dr6018(-v4)
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 16:20:34 +02:00
John Crispin
8ef9989147 ipq807x: fix a null pointer crash in ip_tunnel
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:51:07 +02:00
John Crispin
7d5eab4bf3 libnl-tine: update to latest HEAD
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:50:34 +02:00
John Crispin
5e03e04bbd unetd: add wireshark overlay service
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:30:11 +02:00
John Crispin
6fabaeca53 kernel-headers: make sure that the QSDK v5.4 kernel has access to the wireshark headers
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:28:59 +02:00
John Crispin
be4ca445f5 netifd: update to latest HEAD
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:28:36 +02:00
John Crispin
e99c8b27e1 libubox: update to latest HEAD
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:28:11 +02:00
John Crispin
e9055b4f08 ucentral-schema: update to latest HEAD
6d83248 add missing radsec features

Fixes: WIFI-7077
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:13:23 +02:00
John Crispin
cfcafb676b ipq807x: backport the wireguard patches from the generic folder
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 17:28:11 +02:00
GL.iNet-Xinfa.Deng
899b4d6bfd ipq807x: fix gl-ax1800 switch button high active level
The active status of the switch button in the DTS configuration
is the opposite of that marked on the product housing.

The switch button should be activated at high GPIO level.

Fixes: WIFI-8042
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
2022-05-24 15:07:19 +02:00
John Crispin
2003632ddb ucentral-schema: update to latest HEAD
db15ed7 third-party services were not getting shut down properly

Fixes: WIFI-6907
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 14:05:14 +02:00
John Crispin
d4a14106b7 radius_gw_proxy: add support for a radius/gateway proxy
This will allow the AP to send radius requests via the websocket
to the gateway for routing to the correct AAA.

Fixes: WIFI-7328
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 14:05:14 +02:00
John Crispin
85af9d7e0b ipq807x: add motorola q14 support
Fixes: WIFI-8040
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 14:05:06 +02:00
John Crispin
d4442efbfe ipq807x: disable bluetooth on eap102
this causes units to take several minutes if the nrf8 chip has not been flashed yet

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 15:37:10 +02:00
John Crispin
3a26ae2695 ipq807x: re-add patches that got lost during the v5.4 update
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 15:36:42 +02:00
John Crispin
09af596e85 ipq807x: fix the lan port on EAP102
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 15:36:20 +02:00
John Crispin
5985187316 .github: remove wallys cypress from CI until bootloop on v5.4 is resolved
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 12:12:22 +02:00
John Crispin
33ac83a309 wifi-ax: enable fils_discovery and multiple_ssid by default on 6g band
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 11:29:36 +02:00
John Crispin
921c1b553d ipq807x: enable ethernet LEDs on wf196
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 11:29:11 +02:00
Jianhui Zhao
d160507230 ipq807x: fix dts for gl-ax1800
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-05-19 13:16:26 +02:00
Jianhui Zhao
7368620fd2 ipq807x: bump glinet ax1800/axt1800 to ath11.5/v5.4
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-05-19 11:21:21 +02:00
John Crispin
a910e297a3 ucentral-schema: update to latest HEAD
7ead16a add device serial as an additional TLV inside radius requests

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-18 13:02:32 +02:00
John Crispin
f819bb8753 wifi-ax: update hostapd to latest 11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-18 10:59:06 +02:00
John Crispin
cc0d4bded2 ipq807x: bump wf194c4 to ath11.5/v5.4
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:33 +02:00
Felix Fietkau
e3b2b7f232 ipq807x: enable threaded napi on ethernet
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-17 07:45:32 +02:00
Felix Fietkau
c8dde50eba ath11k: enable threaded napi support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-17 07:45:32 +02:00
Felix Fietkau
3c355f96eb ipq807x: backport threaded NAPI support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-17 07:45:32 +02:00
John Crispin
93dd24ef6e qca-nss-fw: update maple firmware
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
107bc8ef65 ucentral-schema: update to latest HEAD
a18efc1 add psk2-radius support

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
9a8278afcc hostapd: add psk2-radius support
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
1c48765913 ipq807x: add the diagchar module
This is required for FTM to correctly work

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
c6a45184fd ipq807x: fix buildsystem for ath11.5-csu
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
18d5b8cba7 batman-adv: drop v4.4 backport
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
65c08ade18 ath11k-wifi: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
3f6fee91e9 ath11k-firmware: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
d29c4e49b3 mac80211-qsdk: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
f162000749 qca-thermald-10.4: drop legacy package
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
c804333bc0 kmod-sched-cake: drop legacy v4.4 backport
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
449795db97 ipq807x: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:31 +02:00
John Crispin
af92a2c7aa qca-nss-clients: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:31:52 +02:00
John Crispin
b68affdf6a qca-nss-dp: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:31:33 +02:00
John Crispin
7a95f9ac2d qca-nss-drv: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:31:16 +02:00
John Crispin
8b5d9d84de qca-ssdk-shell: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:30:59 +02:00
John Crispin
93d93c7708 qsdk-ssdk: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:30:21 +02:00
John Crispin
b35232ab4a wifi-ax: enable fils_discovery and multiple_ssid by default on 6g band
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:51:06 +02:00
John Crispin
770a2bdd36 wifi-ax: add ftm package as default selection
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:46:21 +02:00
John Crispin
9650f8eaa8 iwinfo: fix 6e channel calculation
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:45:30 +02:00
John Crispin
63ab76bb30 ucentral-schema: add various 6e fixes
ba2bc69 fix wifi 6e channel calculation

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:39:58 +02:00
John Crispin
fcb21ca0b6 ucentral-schema: add a sample wifi 6e config file
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-06 12:44:35 +02:00
John Crispin
d6d5422152 ipq40xx: add indio UM510/550AC support
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-06 09:08:59 +02:00
John Crispin
5b970a3f12 .github: add Indio UM-305ax to the CI job
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-05 10:38:59 +02:00
Matthew Hagan
a4a7c1f9f3 usteer: uchannel.uc: check host_info exists
If another host has not set a status, for example when autochannel is
disabled, it will not show host_info when remote_hosts is called. This
fix adds a check for this condition.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2022-05-05 09:50:35 +02:00
John Crispin
5cbac23e3f ramips: disable switch/bridge offload
This is breaking win10 laptops when vlan_filtering is enabled

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-04 17:09:53 +02:00
John Crispin
172c0d3690 bpf.mk: backport a fix that unbreaks bpf compile on armv7
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-03 07:44:34 +02:00
John Crispin
535f41d58b hostapd: fix phy level max-assoc settings
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-02 08:47:12 +02:00
John Crispin
2be18091a4 proxy_arp: backport skb->cb fix from upstream kernel
this caused proxy_arp to misbehave

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 12:24:51 +02:00
John Crispin
73f42e3c6f ipq807x: enable dual boot on HFCL ION4X*
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 07:59:41 +02:00
John Crispin
cff778d8ca treewide: update ucode to work with latest interpreter
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 07:59:41 +02:00
John Crispin
94d4498a2d ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 07:59:41 +02:00
John Crispin
eb0ab17f58 ipq807x: enable dual boot on EdgeCore devices
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
John Crispin
1ab99d50b2 certificates: add support for finding certificates on dual boot devices
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
Johann Hoffmann
dfeddc0d89 x86: add CI workflows
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-04-21 11:18:58 +02:00
Johann Hoffmann
efde86be9d x86: add vm images
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-04-21 11:18:58 +02:00
John Crispin
739e8c12fb ramips: fix actiontect web7200 wifi macs
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
John Crispin
3fdbbff9f7 ucentral-schema: update to latest HEAD
4829132 properly honour mac addresses that are inside board.json
ba9a2ee various 6G improvements
0a05052 interface: fix wan side STA-only interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
Sohail Ahmad
0a56755bef ramips: Support for Indio UM-305AX AP
Signed-off-by: Sohail Ahmad <sohail@indionetworks.com>
2022-04-21 11:18:58 +02:00
John Crispin
c35290772d ipq40xx: add certificate partition to cig-wf610
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-19 10:28:15 +02:00
John Crispin
cedcbcbc2b ratelimit: fix ratelimit for multiple bss
The function looking up the rate was leaking a local variable into the global space

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-19 07:40:58 +02:00
Stijn Tintel
9de96deca8 usteer: rename uptime to executed in uchannel.uc state
The uptime value in the uchannel state contains the uptime at the time
the script was last executed. This is a rather confusing name, and
possibly this is what lead to WIFI-7613. Rename it to executed to avoid
confusion in the future.

Keep the original name in the usteerd node status, as it is unclear what
impact this has, and could lead to breakage elsewhere.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-04-19 06:35:42 +02:00
Stijn Tintel
19dbb1d5e3 usteer: fix uchannel.uc script
Once the uchannel.uc script sets its status to waiting, it becomes
defunct. The next invocation of the script will compare uptime to
state.uptime, and if the difference is less than 12h, it will change
state.uptime to the current uptime and return. As the script runs every
5 minutes, the difference will always be less than 12h.

Fix this by comparing uptime against state.changed rather than
state.uptime.

Fixes: WIFI-7613
Fixes: 670bc9d2e2 ("ucentral: development update")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-04-19 06:35:42 +02:00
Stijn Tintel
83b6ccf562 usteer: fix init script
The uchannel instance of the usteer init script contains a typo, causing
the following error when autochannel is enabled:

/etc/rc.common: line 147: procd_close_instancea: not found

Fixes: WIFI-7577
Fixes: c467a62af3 ("usteer: update to latest HEAD")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-04-19 06:35:12 +02:00
Owen Anderson
ea86593835 profiles: Fixed typo in cig_wf610d profile name
Signed-off-by: Owen Anderson <owen.anderson@netexperience.com>
2022-04-19 06:33:24 +02:00
John Crispin
36b5478005 ipq807x: fix dwc3 module dependency
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-06 08:54:20 +02:00
John Crispin
1ad19297c1 ipq807x: factory images for wf196 were generated with a bad page size
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-06 08:53:20 +02:00
John Crispin
f5357f7854 ath11k: add ath11k-fwtest support
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-05 17:21:55 +02:00
Johann Hoffmann
8a3140b89b Add dummy workflow to test workflow modifications in PR branch
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-04-05 15:13:54 +02:00
John Crispin
16e0724ace ramips: fix actiontec web7200 dual boot
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-04 16:09:55 +02:00
wenij
17ff9eecf5 ipq807x: cybertan eww622 usb xchi driver not work
Signed-off-by: wenij <wenij.chang@cybertan.com.tw>
2022-04-04 10:54:46 +02:00
wenij
4b870f978c ipq807x: Cybertan EWW622-A1 get mac address from nand devinfo partition.
Signed-off-by: wenij <wenij.chang@cybertan.com.tw>
2022-04-04 10:53:10 +02:00
John Crispin
8b83365961 ucentral-schema: update to latest HEAD
7015feb improve wifi reload

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-04 06:54:06 +02:00
John Crispin
c6ebb5537a ucentral-schema: update to latest HEAD
e12bc03 revert hostapd restart hack as the root cause of the channel issue was found

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-01 14:15:50 +02:00
John Crispin
6ebe189d71 ramips: fix uboot-env-tools mtd offset
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-31 13:41:16 +02:00
John Crispin
98b56551d5 mac80211: automatically restart wifi if bringup failed
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-31 10:58:50 +02:00
John Crispin
606e27e256 wifi: fix channel select when using ACS
there were several small issues that caused ACS to leave the radio in a bad state
during sanity runs.

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-31 10:58:45 +02:00
John Crispin
94fe14b9f9 ucentral-schema: update to latest HEAD
4cff999 add a 5s delay on config re-apply to give wifi time to restart

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-30 16:46:43 +02:00
John Crispin
58388f84b6 ipq40xx: add status led support on udaya board
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-29 13:44:54 +02:00
John Crispin
79ea04af49 ipq807x: re-add accidentially deleted config-default
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-29 13:22:38 +02:00
John Crispin
396e2bd06c ucentral-client: cleanup health parameter
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-29 07:29:12 +02:00
John Crispin
1a484c7f39 protobuf: drop legacy out of tree package
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-28 15:12:04 +02:00
John Crispin
e6b1030991 ucentral-schema: update to latest HEAD
9ac9f7e health: add a 75s delay when applying a new config

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-25 16:08:34 +01:00
John Crispin
6e32e68302 ucentral-client: update to latest HEAD
6cb4485 drop healthcheck from the client and move it to its own service

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-25 16:08:34 +01:00
John Crispin
0f13f7f5cd ipq40xx: add support for udaya a5 id2
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-25 16:08:34 +01:00
John Crispin
2ac4f9ef1d ucentral-schema: update to latest HEAD
fb6db0f force hapd restart upon cfg apply
ee0a8a4 broadband username was not getting applied correctly

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-24 15:59:34 +01:00
wenij
f1a75c25f9 ipq807x: Cybertan EWW622-A1 LED fixes
Signed-off-by: wenij <wenij.chang@cybertan.com.tw>
2022-03-24 15:59:34 +01:00
John Crispin
ff8d70753d ucentral-event: update to latest HEAD
24b7fb3 use async invoke when sending events

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-23 12:09:25 +01:00
John Crispin
caea6baecd certificates: create ubivolume with LEBs instead of MiB
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-23 11:51:32 +01:00
John Crispin
2e914c9b35 ipq807x: use CIG mac address hack on wf196
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-23 11:50:34 +01:00
Jianhui Zhao
da65d7e06f ipq807x: add initial support for GL.iNet AXT1800
Hardware:
* SoC: Qcom IPQ6000
* RAM: DDR3L 512MB
* Flash: 128MB Nand
* Ethernet: 3x GbE
* WLAN: 2x2 2.4GHz 600Mbps + 2x2 5GHz 1200Mbps (builtin + builtin)
* LEDS: 1x white, 1x blue
* Buttons: 1x switch, 1x reset
* USB: 1x 3.0(Type-A)
* SD: 1x microSD
* PWM Fan
* Power: 12VDC, 2A
* UART (4-pin, 2.54 mm pitch) pad on PCB
* JTAG (8-pin, 2.54 mm pitch) pad on PCB

Installation: upgrade "openwrt-ipq807x-glinet_ax1800-squashfs-sysupgrade.tar" directly.

Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-03-22 08:19:50 +01:00
Sohail Ahmad
d18eef480c ipq40xx: add Support for Indio's UM-325AC AP
Changes made in OpenWrt supported targets to Include Indio's UM-325AC AP which is an indoor WiFi5 AP based on ipq4019 chipset.

Signed-off-by: Sohail Ahmad <sohail@indionetworks.com>
2022-03-22 08:04:40 +01:00
John Crispin
f3532c66e5 ucentral-client: update to latest HEAD
63eddd2 send the original size when using compress_64

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-21 09:44:32 +01:00
Felix Fietkau
9678b1d6a5 ipq807x: backport clsact support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-21 09:00:35 +01:00
John Crispin
379a4e2382 ucentral-schema: update to latest HEAD
fb537b9 enhance healthcheck to provide verbose error messages
2b65900 sysinfo: add helper tool to monitor memory consumption per service/instance

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-21 08:44:43 +01:00
John Crispin
edb33cd560 ucentral-schema: update to latest HEAD
5865d5a fix detection of pci radios

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-17 16:11:55 +01:00
John Crispin
2ff425ddeb ucentral-schema: update to latest HEAD
6dbd602 fix gre bridges
611af3d fix vxlan bridges

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-17 10:22:28 +01:00
John Crispin
7d016ac27f ucentral-schema: update to latest HEAD
d97a35c do not allow roaming for none, psk and wpa

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 18:49:51 +01:00
John Crispin
9790377dec ath11k-wifi: update cig wf196 BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 17:25:25 +01:00
John Crispin
597c547101 ipq807x: fix vmalloc on wf196
the built in wifi failed to start

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 16:24:33 +01:00
John Crispin
73b2645027 ucentral-schema: update to latest HEAD
9dfff17 fix include paths of the new wifi module

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 10:37:02 +01:00
John Crispin
8d58387d15 ucentral-schema: update to latest HEAD
ef7649f fix channel 140
302c5bf drop dependency on ucentral-wifi

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-14 17:19:07 +01:00
John Crispin
54dac4d348 ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-14 17:17:59 +01:00
John Crispin
a0880ed0f1 edgecore: disable dual boot on eap10x/ecw5211
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-11 16:28:41 +01:00
John Crispin
ed6d683980 ramips: add bmtv2 and nbnm support
this fixes the nand issue on the actiontec web7200

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-11 14:57:54 +01:00
John Crispin
4c72c6a35a ucentral-wifi: update to latest HEAD
aa9c3ee set the AP bssid inside the assoc list

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-11 07:59:34 +01:00
Sven Eckelmann
125d56866e batman-adv: Merge bugfixes from 2022.0
* allow netlink usage in unprivileged containers
* mcast: don't send link-local multicast to mcast routers

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=9e2383e9b42087d5a3892366bed8b6bb4f868fe3
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Hendrik Borghorst
a70a767ec0 batman-adv: Prevent use from libc headers to not build with BIG_ENDIAN
Commit 97d35a552ec5b6ddf7923dd2f9a8eb973526acea of musl introduced the
macros __LITTLE_ENDIAN and __BIG_ENDIAN in alltypes.h. These are pulled
into the compilation of batman-adv. This has the side effect that the
function is_multicast_ether_addr of etherdevice.h in Linux kernel is
compiled as the big endian version and so fails to work properly on
little endian devices.

This commits prevents pulling in header files of musl libc similar to
OpenWRT commit 9ac47ee46918c45b91f4e4d1fa76b1e26b9d57fe

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=47436b04fd32cf3b6e6b46c25cb9c1fff3a995fd
Signed-off-by: Hendrik Borghorst <hendrikborghorst@gmail.com>
(cherry picked from commit 523821c1959cb288b55b7fcc8761c83f6ff48c4d)
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Sven Eckelmann
b8a6764207 batman-adv: Merge bugfixes from 2021.4
* fix error handling during interface initialization

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=6d10a01dfa68eb5e25b84b33e33aefd312f46f4d
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Sven Eckelmann
98c9fcfd5d batman-adv: Refresh patches with quilt
The test builds are now requiring quilt refreshed patches instead of git
patches. Otherwise the build check will not even try to build something.

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=e294a224640e03791a101a9302dbf72b06efab80
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Sven Eckelmann
eac5504fec batman-adv: Merge bugfixes from 2021.2
* Avoid WARN_ON timing related checks

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=519ef4ad29a8e53c1763df1553d386e3abf6206d
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Piotr Dymacz
c2c75b67eb ipq807x: add initial support for YunCore AX840
This adds initial support for the YunCore AX840, an IPQ6010 based
802.11ax ceiling AP.

Specifications:

- Qualcomm IPQ6010
- 1 GB of RAM (DDR3)
- 8 MB of serial flash (SPI NOR)
- 256 MB of parallel flash (NAND)
- 2x2 2.4 GHz WiFi (IPQ6010)
- 2x2 5 GHz WiFi (IPQ6010)
- 2x IPEX/U.FL antenna connectors
- 4x 3 dBi dual-band antennas
- 2x 1 Gbps Ethernet (QCA8075) with 802.3at PoE input support
- 1x RGB LED
- 1x push-button (reset)
- DC jack for main power input (12 V)
- UART (4-pin, 2.54 mm pitch) header on PCB

Flash instruction under stock QSDK image:

  sysupgrade -n openwrt-ipq807x-yuncore_ax840-squashfs-nand-factory.bin

Flash instruction under U-Boot:

  tftpb 0x44000000 openwrt-ipq807x-yuncore_ax840-squashfs-nand-factory.ubi
  flash rootfs
  reset

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-03-10 14:50:37 +01:00
John Crispin
ef3eacefa7 ath11k-wifi: update WF188n BDF
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 08:21:58 +01:00
John Crispin
ef7481596a qosify: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 08:18:47 +01:00
Paul Spooren
6f4e00aa46 README: fix linksys_ea8300 example
The profile is no longer called just `ea8300`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-03-10 07:59:59 +01:00
Jianhui Zhao
be65578a7f profile: add gl-ax1800 support
Because we have an another similar device named gl-axt1800,
so we put the common functions in a dtsi file. And we'll
submit a PR for gl-axt1800 soon.

Hardware:
* SoC: Qcom IPQ6000
* RAM: DDR3L 512MB
* Flash: 128MB Nand
* Ethernet: 5x GbE
* WLAN: 2x2 2.4GHz 600Mbps + 2x2 5GHz 1200Mbps (builtin + builtin)
* LEDS: 1x white, 1x blue
* Buttons: 1x switch, 1x reset
* USB: 1x 3.0(Type-A)
* Power: 12VDC, 1.5A

Installation:
* from qsdk to openwifi:
upgrade "openwrt-ipq807x-glinet_ax1800-squashfs-nand-factory.bin" via web ui
without keep config.
* upgrade "openwrt-ipq807x-glinet_ax1800-squashfs-sysupgrade.tar" if you are already in openwifi.

Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-03-10 07:59:21 +01:00
John Crispin
20d4bd0c7d ucentral-schema: fix online-check
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 07:52:13 +01:00
John Crispin
531f4eb811 ucentral-schema: update to latest HEAD
4532c47 fix downstream bridges with no eth ports
04edaef ntp: open firewall port if ntpd is enabled
bf11105 fix led-active restart
c95667a a failed apply should return the error code 2
72e225e capabilities: add label_macaddr to capabilities

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 07:52:13 +01:00
John Crispin
3b0dae7189 ucentral-schema: update to latest HEAD
72e225e capabilities: add label_macaddr to capabilities
f09f2b2 state: improve link metric, add ssid location
5586b93 unit: improve password generation
959a40d system: add sysinfo / resource consumption reporting
cdfb209 state: fix link state reporting

Fixes: WIFI-7210
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-03 17:12:31 +01:00
John Crispin
79395593ba ipq807x: add support for label_macaddr
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-03 17:09:21 +01:00
John Crispin
61248b98e0 ucentral-schema: set executable bit for wifi_max_user.uc
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 16:02:18 +01:00
Felix Fietkau
72b5abb72a ath10k: enable threaded napi support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
673a029a02 ipq807x: enable threaded napi on ethernet
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
7efb85180f ipq807x: backport threaded napi support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
f95eadaa8f ipq807x: backport kbuild fix to avoid spurious rebuilds
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
6f6b40a94f toolchain/gcc: fix building gcc 5.5 on newer systems
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
John Crispin
d84982f161 ath11k: fix WDS when encap offload is enabled
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 15:45:08 +01:00
John Crispin
4b07afe59f ucentral-schema: update to latest HEAD
19fcc8d update schemareader
bef2a8f state: add the upstream dhcp servers ip to the state message

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 15:12:50 +01:00
John Crispin
5d53d138b0 maverick: add the last 3 bytes of the serial to the Maverick ssid
Fixes: WIFI-7202
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 15:12:21 +01:00
John Crispin
e40631b8cd ucentral-schema: update to latest HEAD
ba41897 radio: enable 'allow-dfs' by default

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-01 17:36:54 +01:00
John Crispin
22135129bd treewide: fix pkg hashes
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-01 17:36:52 +01:00
John Crispin
de4b3c4edc ucentral-wifi: update to latest HEAD
40d0eb9 use the real usec value for tx/rx duration

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-01 17:36:48 +01:00
John Crispin
e3b1fe36e5 hostapd: enable CONFIG_ERP
This caused local EAP to not work on wifi-qsdk targets.

Fixes: WIFI-7203
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 11:16:02 +01:00
John Crispin
5af7e1e7d8 ucode: add tool to read out the max clients an AP can handle per phy
Fixes: WIFI-7197
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 10:52:40 +01:00
John Crispin
057ebb8660 ucentral-schema: update to latest HEAD
1c46544 5G was not allowing specific 20MHz channels and would fall back to ACS

Fixes: WIFI-7179
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 10:08:43 +01:00
John Crispin
17fe72c6e9 wifi: revert some tweaks that are causing stability issues
this will come back in 2.6 once stability is restored

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-25 17:34:27 +01:00
John Crispin
834ff2fe4f certificates: improve the code loading sqsh certificates
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-23 07:54:22 +01:00
John Crispin
ce3849e131 ipq40xx: revert an upstream patch causing problem with ea8300 eth ports
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-23 07:54:00 +01:00
John Crispin
66640cdd1a ipq807x: add cig wf196 to the CI builds
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 16:33:52 +01:00
John Crispin
300924a4be hostapd: fix syntax error inside hostapd.sh
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 15:13:28 +01:00
John Crispin
8fb088bcc8 ucentral-schema: update to latest HEAD
b3ce69e wifiscan: allow bandwith override
6d59acc trace: improve tracing code

Fixes: WIFI-7167
Fixes: WIFI-7168
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 08:59:48 +01:00
John Crispin
b08455228f ipq807x: point edgecore eap104 profile at the correct image
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-18 15:09:18 +01:00
John Crispin
09563eadaf ipq807x: do not enable bridge-vlan in maverick mode
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-18 10:29:25 +01:00
John Crispin
2df46a2c77 ipq807x: fix LEDs on wf196
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-18 10:29:25 +01:00
John Crispin
e4fa57b4d0 proxy_arp: backport skb->cb fix from upstream kernel
this caused proxy_arp to misbehave

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-17 08:28:21 +01:00
John Crispin
48677a6943 ipq807x: add edgecore eap104 support
Fixes: WIFI-7117
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-16 15:44:24 +01:00
John Crispin
e79970ce04 ath11k: disable napi threading
The code causes 15% softirq in idle causing issue, drop until resolved.

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 20:46:06 +01:00
John Crispin
b4d1d58fc9 hostapd: improve acs_exclude_dfs support
Fixes: WIFI-6933
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 17:06:22 +01:00
John Crispin
d33447709e ipq807x: fix sysupgrade on WF196
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 15:54:47 +01:00
John Crispin
dd995426a5 hostapd: always install the cli
Fixes: WIFI-6834
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 12:50:31 +01:00
John Crispin
4dcd0ad1da uvol: update to latest version
Fixes: WIFI-368
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 07:54:43 +01:00
John Crispin
9285fd2670 ucentral-switch: add hostapd to the build
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 07:54:43 +01:00
John Crispin
187326b7ce hostapd: add acs_exclude support
Fixes: WIFI-6933
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-14 14:09:49 +01:00
John Crispin
f8a2de68aa hostapd: backport rrm/wnm features
Fixes: WIFI-7049
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-14 13:57:38 +01:00
John Crispin
41dd91559a hostapd: update to latest stable upstream release
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-13 11:34:40 +01:00
John Crispin
fc3eec9075 ucentral-schema: update to latest HEAD
07cb6e9 fix time_advertise

Fixes: WIFI-7058
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-13 09:24:44 +01:00
John Crispin
e7a6f497a3 ucentral-schema: add support for valid-channel and allow-dfs
Fixes: WIFI-6933
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
011340ed6e ipq40xx: fix wallytech ubi size
Fixes: WIFI-7048
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
Max
52ea8459e0 add release tag to S3 objects (#426)
Signed-off-by: Max Brenner <xamrennerb@gmail.com>
2022-02-12 17:52:30 +01:00
John Crispin
116b1982ab .github: add hfcl_ion4x* to CI runs
Fixes: WIFI-6842
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
c467a62af3 usteer: update to latest HEAD
Fixes: WIFI-7049
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
88d783c8ad hostapd: improve switch_chan support
Make the code retain current op_class if no new one was provided
via ubus.

Fixes: WIFI-7050
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
b04759322c hostapd: add the ability to use radius based mac-ACL
Fixes: WIFI-5425
Fixes: WIFI-6007
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
b0af666cb4 opennds: fix a segfault caused that can be triggered via a bad url parameter
Fixes: WIFI-6724
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
27947a07f7 ubox: add priority filtering to logread
Fixes: WIFI-6388
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
c1903ae2f9 ucode: enable rtnl plugin
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
d5fed93ec0 ucode: update to latest git HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
dc35dd1ce5 procd: add service measurement support
Fixes: WIFI-7051
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
c59c646a5c certificates: fix a syntax error inside the init.d script
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
8419c94742 ucentral-wifi: add msdu retransmission stats
Fixes: WIFI-6330
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
8eb24a36f3 ucentral-schema: update to latest HEAD
5f769a0 wifisca: add CSA support
9eb55fd state: fix carier state wehn the device is not up
cf8f383 add radios DAE support
ad6ac65 move radius auth mac acl property into the authentication node
7bc2f00 improve wifi scanning
f8f458a always use the systems hostname when streaming the syslog
b2dc0b7 add radius based mac-filters
34671ba ass priority to syslog data model
d7d73d8 fix carrier state reporting NaN
0a49566 add new wifi-scanning code
8f5beb1 add versioning to the state messages
8968d62 counters were not correctly added inside state messages
77b57b8 generate-reader.uc: fix validation of hostname labels with two characters
311bf98 fix radius proxy server settings
fa9ad34 add unit.hostname support
c101acd state: properly split telemetry and state messages
8da20fd renderer.uc: make code scanning radio aware
404a9a3 renderer: restructure and extend documentation
8ecb351 jsdoc: add proper ucode->JS transpiler
ca4ef47 templates: broadband.uc: fix deprecated syntax

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
22b0f780b0 udevmand: update to latest HEAD
065f75c make delta counters an opt-in property

Fixes: WIFI-7052
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
3093fda383 ucentral-client: update to latest HEAD and silence warning
e3b71c6 fix a memory leak

* Silence the warning by adding the -p switch to mkdir.

Fixes: WIFI-6190
Fixes: WIFI-6761
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
198aaefbdb ath79: make the indio profile use the ath10k feed
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
5dd85e4bb5 profiles: add actiontec web7200
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
ff118acdea ramips: add actiontec web7200 support
Fixes: WIFI-7057
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
83cdabf037 qca-nss-clients: fix ipq50xx support
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
40c0875adf ath11k: fix ipq50xx support
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
d3cf1f6b70 ipq807x: fix wifi mac on hfcl,ion4x*
Fixes: WIFI-6843
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
9a01085401 ipq807x: fix mac assignment on eap101
Fixes: WIFI-6193
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
1833a9a3fb ipq807x: variuos performance tweaks
2x2 wifi is now just below 1.1gbit and 4x4 just below 2gbit

Fixes: WIFI-6174
Fixes: WIFI-7053
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
827edf3c1d ipq807x: add latest AQ FW
Fixes: WIFI-6763
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
eb9bdfaed9 ipq807x: add certification support
Fixes: WIFI-7055
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
c6f7b415d0 ipq807x: fix arp in hairpin mode
Fixes: WIFI-7056
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:38 +01:00
John Crispin
4da61c2cab ipq807x: make sure the macs are assigned correctly on eap101/102
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:59 +01:00
John Crispin
ab6e7576db ipq807x: make sure that uboot assigns the correct mac to eap101 lan2
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:59 +01:00
John Crispin
c140e29589 ipq807x: enable uboot-envtools by default
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:59 +01:00
John Crispin
2972abf7e3 ipq807x: add cybertan eww622-a1
Fixes: WIFI-7054
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:16 +01:00
John Crispin
42cc2f0e78 ucentral: drop legacy packages
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
19128346ae openwrt-21.02: update to latest upstream commit
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
75ed221675 mediatek: add SDK target
This adds support for panther and merlin.

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
34138032a7 rtkmipsel: add target support
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
65e1a72b57 bluetooth: add support for various chips
This makes BT/LE work on eap101/2/6

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
6448427eec mt7621: add support for CIG WF808
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
bb2b6db088 patches: restructure patches and backports
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
48a091a3a2 ipq807x: merge target patches and convert to a feed
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
6d9d4ab47a ipq807x: add latest AQ FW
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-01 18:19:58 +01:00
John Crispin
0406b7cb95 .github: add hfcl_ion4x* to CI runs
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:38:52 +01:00
John Crispin
211e9c39e9 ucentral-client: update to latest HEAD
b4e8fc8 add connection watchdog
48e89d8 send a success message if the config had already been applied.
9bb8cfe properly decrement the event counter when deleting entries
2e53c8f add event_dump_all support to uboot
7ebeaca add ping command handler

Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:38:52 +01:00
John Crispin
64009d7d2a ipq807x: fix mac assingment on eap101
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:38:52 +01:00
John Crispin
70e922f609 udnssnoop: update to latest HEAD
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:02:37 +01:00
John Crispin
b41b53b9d8 Docker: do not install llvm
Let the buildsystem build the toolchain.

Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:01:31 +01:00
John Crispin
92d03f5283 ipq807x: update WF188n BDF file
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 06:58:56 +01:00
John Crispin
8529d7471a ipq40xx: fix wifi mac assignment on on hfcl-ion4
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-05 12:41:12 +01:00
John Crispin
02c0af4bb4 ath10k: use a custom backports package for ath10k based units
Fixes: WIFI-6161
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-15 09:47:40 +01:00
John Crispin
8c987c4949 ipq807x: fix LAN2 on the new EAP101 PCB
The second LAN port is not setup correctly due to the new PHY.

Fixes: WIFI-6152
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-12 08:03:33 +01:00
John Crispin
a686beebbb base-files: add ability to mark scanning radios inside board.json
Fixes: WIFI-6056
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-06 13:26:55 +01:00
John Crispin
ec8d056cc8 ipq807x: improve EAP106 support
The AQ PHY FW was not getting uplaoded properly.

Fixes: WIFI-6055
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-06 13:26:55 +01:00
John Crispin
1d4b8ab7ff ipq40xx: fic HFCL Ion 4 buttons and LEDs
Fixes: WIFI-6021
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-06 13:26:55 +01:00
John Crispin
f87960eadc ipq807x: add wf196c support
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-03 08:00:19 +01:00
John Crispin
769e8c5c0b ath11k: enforce 512mb profile
This almost doubles the number of possible assocs.

Fixes: WIFI-6013
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-03 07:47:53 +01:00
John Crispin
04c3325710 ipq807x: bssid was not stable on wf-194c4/8
The ART does not have valid macs in it, use the
ath11k-macs fixup to work around this.

Fixes: WIFI-6012
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-02 15:05:41 +01:00
John Crispin
7c1fd79ceb ucentral-schema: update to latest HEAD
6d321d6 make sure, that on 40/80 mhz only available channel may be selected

Fixes: WIFI-5998
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-01 09:28:59 +01:00
John Crispin
1e950be127 ipq807x: Make it possible to flash r2.4 on eap102 with older bootloaders
Fixes: WIFI-5997
Signed-off-by: John Crispin <john@phrozen.org>
2021-12-01 07:32:05 +01:00
John Crispin
5fc7ac166a ipq807x: explicitly set the lable_mac_addr on WF194c
Some older units did not have a stable serial number when connecting
to the GW. Fix this by explicitly setting the label_mac, this allows
the uci-defaults script to correctly pick up the right MAC.

Fixes: WIFI-5834
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-30 07:57:19 +01:00
John Crispin
87be030169 ipq807x: add support for wallytech DR6018-v4
Fixes: WIFI-5846
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-29 15:32:30 +01:00
John Crispin
b0688f097b ucentral-schema: remove bogus roaming settings inside the captive portal example
Fixes: WIFI-5835
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-29 08:04:07 +01:00
John Crispin
ae77be4e5c profiles: add x86_64 profile
Fixes: WIFI-5841
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-25 17:47:24 +01:00
John Crispin
efac512c90 ucentral-wifi: update to latest HEAD
f8e62bd fix 40/80mhz scan support on 5G

Fixes: WIFI-5625
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-25 17:47:24 +01:00
John Crispin
bcde3ee6d7 ucentral-schema: update to latest HEAD
73889be open-flow: fix controller property description
72ba0b4 renderer: enable drop_unknown_ports in Open vSwitch
252b628 renderer: fix OpenFlow bridge mode

Fixes: WIFI-5766
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-25 17:47:24 +01:00
John Crispin
7b0ef7f265 hostapd: backport ujail/hostapd fix
This is currently breaking interactive cli support.

Fixes: WIFI-5814
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-24 11:49:39 +01:00
John Crispin
670f9fee14 mac80211: fix mu-mimo vht capabilities
Fixes: WIFI-5823
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-22 14:54:20 +01:00
John Crispin
4c7ee4bf6d ipq807x: fix compile error due to badly rebased patch
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 18:50:54 +01:00
John Crispin
90868338c7 ipq807x: add hfcl ion4x support
Fixes: WIFI-5797
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 18:15:12 +01:00
John Crispin
7a20f558e1 .github/workflows: fix hfcl_ion4 file name
Fixes: WIFI-5794
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:52:50 +01:00
John Crispin
9b8c1f8449 ucentral-schema: update to latest HEAD
c3efa25 set a default channel_list for 5G radios

Fixes: WIFI-5782
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:52:50 +01:00
John Crispin
002880c3fa ratelimit: increase the wait timeout
The timeout of 75s was a little to shart and would sometimes cause
5G interfaces to not enable ratelimit correctly. Increasing the
timeout to 120s makes the flow more reliable.

Fixes: WIFI-5701
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:52:50 +01:00
John Crispin
3de5c91e6c maverick/ucentral-schema: add WDS broadband profile
Fixes: WIFI-5778
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:52:50 +01:00
John Crispin
679e20af39 profiles: fix memory profile on ex227/447
Fixes: WIFI-5785
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:52:50 +01:00
John Crispin
191081e46f mac80211-ax: update regdb patches
Fixes: WIFI-5795
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:52:45 +01:00
John Crispin
8f7a66f1ac ath11k-wifi: update BDF files
Use latest regdb from upstream.

Fixes: WIFI-5795
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:52:39 +01:00
Sharadanand Karanjkar
c93b14ca7a hostapd: Added control for multiple_bssid and ema
Re-enabling "multiple_bssid" and "ema".

Fixes: WIFI-5732
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
2021-11-18 14:28:24 +01:00
John Crispin
16176a1cc3 ucentral-wifi: update to latest HEAD
3d9216a Add dfs channel list to capabilities

Fixes: WIFI-5723
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-18 14:28:22 +01:00
John Crispin
a4806f740d hostapd: track ratelimit config and reload wifi when state changes
Fixes: WIFI-5701
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-11 13:41:11 +01:00
John Crispin
35740f321d ucentral-schema: fix wifi reload when using rate-limit
a78cad2 track if a ssid has rate-limiting enabled

Fixes: WIFI-5701
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-11 13:40:43 +01:00
John Crispin
74c148e905 ucentral-schema: update to latest HEAD
5c3c572 airtime-fairness: add ATF to the data model

Fixes: WIFI-5703
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-11 13:37:29 +01:00
John Crispin
a77d881147 atfpolicy: add package
Add a Airtime Scheduler that adjusts an UEs ATF weight based on its
WMM/TID usage.

Fixes: WIFI-5703
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-11 02:22:02 +01:00
John Crispin
065539bbb3 ucentral-schema: update to latest HEAD
dd9708d openflow: add port property

Fixes: WIFI-5700
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-10 17:06:35 +01:00
John Crispin
e2d90a7b06 procd: update to latest HEAD
fixes build on wifi-5 due to missing dependencies in last update

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-10 10:42:17 +01:00
John Crispin
8bb9816e2b ipq807x: fix setting mac on cig wf-194c/4
Fixes: WIFI-3967
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 17:34:16 +01:00
John Crispin
9673329c07 ucentral-schema: update to latest HEAD
c4e889c filter out _none, _4, _6 interfaces from state

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 17:24:21 +01:00
John Crispin
2571ae5210 rpcd: add backport
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 17:24:21 +01:00
John Crispin
8caffe46b4 procd: update to latest HEAD
Fixes: WIFI-5443
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 15:39:10 +01:00
John Crispin
25641d5199 libubox: update to latest HEAD
Fixes: WIFI-5443
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 15:39:10 +01:00
John Crispin
2b3cc2a5cf ucentral: add a dual-stack example config
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 15:36:11 +01:00
John Crispin
12cc29265c ucentral-schema: update to latest HEAD
5a4cacb ipv6: default ipv6_prefix to 64 on downstream interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 15:35:51 +01:00
Sharadanand Karanjkar
34a6f06bd9 hostapd: Added control for co-location enable and disable in config.
Re-enabling support for enabling configuring rnr_beacon and he_co_locate flag in hostapd config files.

Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
2021-11-09 15:35:51 +01:00
John Crispin
c343d5e629 docker: install clang-12 to speedup the build jobs
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 13:10:09 +01:00
John Crispin
501907eeda ucentral-schema: update to latest HEAD
4caf81b renderer: setting the dns server was broken on static upstream interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 12:54:39 +01:00
John Crispin
ba406fe01b hostapd: add radius based wispr/bandwidth control
Fixes: WIFI-4888
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-09 12:50:31 +01:00
John Crispin
d61d5cd35e ucentral-client: update to latest HEAD
This adds a connection watchdog.

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-08 09:15:42 +01:00
Paul Spooren
68d544c9af scripts: gen_config allow explicit warning message
Instead of generically mentioning a missing dependency the host
dependency can also be explained by defining a `warning`.

Warning messages are collected and printed at the end.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-08 09:15:42 +01:00
Paul Spooren
5d86871253 profiles: qosify add explicit host dependency warning
If the host dependency is missing be explicit about the increasd build
time of more than an hour.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-08 09:15:42 +01:00
John Crispin
460785cbe3 maverick: keep firstcontact and ucentral-client running while in maverick
Fixes: WIFI-5439
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-05 14:46:32 +01:00
Paul Spooren
1cace058c5 profiles: swich ucentral ap's to qosify profile
Instead of installing the package directly use the qosify profile which
automatically handles the host dependency clang/llvm.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-05 14:46:32 +01:00
Paul Spooren
5aaf734732 profiles: add qosify profile to use host toolchain
In case clang/llvm is available as a host dependency, modify the
configuration to use it. In case it is not available build clang/llvm
(takes ~30min).

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-05 14:46:32 +01:00
Paul Spooren
9d3768a68d scripts: gen_config add host_dependencies option
In case a package/image requres specific host dependencies it is
possible to define entries in the `host_dependencies` array. Each entry
is an object containing at least `name` and `which`. The `which` array
contains tools to be checked in the current `PATH`.

Optionally the two options `success_diffconfig` and
`fallback_diffconfig` can be set. The former is optionally added in case
the tool is found. The latter is added if the dependency is not
available.

If the dependecy is not available and no `fallback_diffconfig` is set,
the config generation is considered impossible and stopped.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-05 10:47:41 +01:00
John Crispin
975aae507b llvm/clang: add support to build llvm/clang
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-05 10:47:41 +01:00
John Crispin
cc0576886a ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-04 16:33:04 +01:00
John Crispin
9c36b155f6 ucentral-schema: update to latest HEAD
dbb2aaf fix dns only classifiers and add missing class-selectors
4d2c297 qos: split class selector into its own yml
728c6f4 qos: add bulk detection support to data-model/renderer
f5a4651 wmm: fix qos_map_set generation
b958719 update qos/fqdn matching

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-04 15:19:56 +01:00
John Crispin
28ac14ccc4 udnssnoop: add dns reply snooping package
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-04 15:18:59 +01:00
John Crispin
e18e7fc8f6 hostapd: update qos_map_set code inside the script-foo
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-04 15:18:59 +01:00
John Crispin
04d78d3334 qosify: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-04 15:18:59 +01:00
John Crispin
a9fd11ed8a ucentral-schema: update to latest HEAD
75c0a39 renderer: add wired interfaces to OVS bridge
5e42737 generate-reader.uc: rename ip to uc-ip

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-02 17:39:49 +01:00
Stijn Tintel
839f43c010 openflow: sync pending change from openwrt-packages
c0daf3aaf openvswitch: bring up member ports

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-11-02 17:35:28 +01:00
John Crispin
f599a42618 ucentral-client: update to latest HEAD
eabfeaa dynamically start event daemon when we need it

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-02 17:30:46 +01:00
John Crispin
8bc7bee3bc ucentral-schema: update to latest HEAD
434f749 renderer: filter out HE160 and HE80+80

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 16:04:35 +01:00
John Crispin
53004cc39c ubus: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 12:07:27 +01:00
John Crispin
9a1c8cff9f ucentral-schema: update to latest HEAD
9f8f80e renderer: fix wifi uci config in dual stack mode

Fixes: WIFI-5400
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 11:49:50 +01:00
John Crispin
2d0e2bccbf netifd: remove NE dhcp hack
Fixes: WIFI-4949
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 11:33:09 +01:00
John Crispin
70c2c36e0f qosify: update to latest version
This improves bulk traffic detection.

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 11:32:13 +01:00
John Crispin
11ed0b089c ipq807x: update BPF backport
The patch broke kernel build with lockdep enabled

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 11:30:55 +01:00
John Crispin
29058df59b luci-mod-ucentral: the continue button was grey when trying to flash an image
Fixes: WIFI-5072
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 07:58:30 +01:00
John Crispin
e840bab8cc ucentral-schema: update to latest HEAD
17fefd3 pass-point: domain_name should be a ',' and not ':' seperated list

Fixes: WIFI-4869
Signed-off-by: John Crispin <john@phrozen.org>
2021-11-01 07:11:26 +01:00
1550 changed files with 417366 additions and 74178 deletions

View File

@@ -0,0 +1,39 @@
name: Create AMI from firmware image in S3 bucket
inputs:
firmware_image_name:
description: Name of the firmware image
required: true
firmware_image_s3_bucket:
description: Name of the S3 bucket where the image resides
required: true
runs:
using: "composite"
steps:
- name: Import snapshot based on firmware image
id: import_snapshot
shell: bash
run: |
echo ::set-output name=import_task_id::$(aws ec2 import-snapshot --description '${{ inputs.firmware_image_name }}' --disk-container 'Format=raw,UserBucket={S3Bucket=${{ inputs.firmware_image_s3_bucket }},S3Key=${{ inputs.firmware_image_name }}}' | jq -r '.ImportTaskId')
- name: Wait for import task to complete and get snapshot ID
id: get_snapshot_id
shell: bash
run: |
IMPORT_TASK_STATUS=""
while [[ $IMPORT_TASK_STATUS != 'completed' ]]; do
IMPORT_TASK_STATUS=$(aws ec2 describe-import-snapshot-tasks --import-task-ids ${{ steps.import_snapshot.outputs.import_task_id }} | jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail.Status')
echo "Import task status is $IMPORT_TASK_STATUS, waiting for completion."
done
echo ::set-output name=id::$(aws ec2 describe-import-snapshot-tasks --import-task-ids ${{ steps.import_snapshot.outputs.import_task_id }} | jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail.SnapshotId')
- name: Tag snapshot with image name
shell: bash
run: |
aws ec2 create-tags --resources ${{ steps.get_snapshot_id.outputs.id }} --tags 'Key=Name,Value=${{ inputs.firmware_image_name }}'
- name: Register AMI based on snapshot
shell: bash
run: |
aws ec2 register-image --name '${{ inputs.firmware_image_name }}' --root-device-name /dev/xvda --block-device-mappings 'DeviceName=/dev/xvda,Ebs={SnapshotId=${{ steps.get_snapshot_id.outputs.id }}}'

View File

@@ -1,5 +1,13 @@
name: Build OpenWrt/uCentral images
env:
AWS_DEFAULT_OUTPUT: json
AWS_DEFAULT_REGION: us-east-1
AWS_S3_BUCKET_NAME: ucentral-ap-firmware
AWS_ACCOUNT_ID: ${{ secrets.UCENTRAL_S3_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_SECRET }}
on:
push:
branches: [ main, next, staging-* ]
@@ -8,10 +16,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
outputs:
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }}
strategy:
fail-fast: false
matrix:
target: ['cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf160d', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4.yml', 'indio_um-305ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9' ]
target: ['actiontec_web7200', 'cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf196', 'cig_wf610d', 'cig_wf808', 'cybertan_eww622-a1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'udaya_a5-id2', 'wallys_dr40x9', 'x64_vm' ]
steps:
- uses: actions/checkout@v2
@@ -24,17 +34,12 @@ jobs:
make -j TARGET=${{ matrix.target }}
- name: Package and upload image for ${{ matrix.target }}
id: package_and_upload_image
env:
GH_BUILD_USERNAME: ${{ secrets.GH_BUILD_USERNAME }}
GH_BUILD_PASSWORD: ${{ secrets.GH_BUILD_PASSWORD }}
ARTIFACTORY_USERNAME: cicd-indoor-main
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
AWS_S3_BUCKET_NAME: ucentral-ap-firmware
AWS_DEFAULT_OUTPUT: json
AWS_DEFAULT_REGION: us-east-1
AWS_ACCOUNT_ID: ${{ secrets.UCENTRAL_S3_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_SECRET }}
run: |
LOWERCASE_TARGET=`echo ${{ matrix.target }} | tr '[:upper:]' '[:lower:]'`
HASH=$(git rev-parse --short HEAD)
@@ -42,8 +47,10 @@ jobs:
if [[ ${GITHUB_REF} == "refs/heads/"* ]]
then
REF=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')
IS_RELEASE="false"
else
REF=$(echo ${GITHUB_REF#refs/tags/} | tr '/' '-')
IS_RELEASE="true"
fi
BASENAME="$(date +%Y%m%d)-$LOWERCASE_TARGET-$REF-$HASH"
@@ -60,7 +67,13 @@ jobs:
[ -f openwrt/tmp/image-file ] && curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "latest-upgrade.json" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/latest-upgrade.json"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/octet-stream" "openwrt/$(cat openwrt/tmp/image-file)" "s3://$AWS_S3_BUCKET_NAME/$IMG_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$IMG_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/json" "latest-upgrade.json" "s3://$AWS_S3_BUCKET_NAME/$JSON_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$JSON_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
if [ ${{ matrix.target }} == 'x64_vm' ]; then
echo ::set-output name=x64_vm_image_name::"$(echo $IMG_NAME)"
fi
trigger-testing:
runs-on: ubuntu-latest
@@ -74,3 +87,16 @@ jobs:
repository: Telecominfraproject/wlan-testing
event-type: new-ap-release
client-payload: '{"ref": "${GITHUB_REF#refs/tags/}", "sha": "${{ github.sha }}"}'
create-x64_vm-ami:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- name: Use create-ami-from-image composite action
uses: ./.github/actions/create-ami-from-image
with:
firmware_image_name: ${{ needs.build.outputs.x64_vm_image_name }}
firmware_image_s3_bucket: ${{ env.AWS_S3_BUCKET_NAME }}

88
.github/workflows/x64_vm-build-test.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
name: Test x64_vm build and AMI creation
env:
AWS_DEFAULT_OUTPUT: json
AWS_DEFAULT_REGION: us-east-1
AWS_S3_BUCKET_NAME: ucentral-ap-firmware
AWS_ACCOUNT_ID: ${{ secrets.UCENTRAL_S3_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_SECRET }}
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
outputs:
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }}
strategy:
fail-fast: false
matrix:
target: ['x64_vm']
steps:
- uses: actions/checkout@v2
- name: Build image for ${{ matrix.target }}
id: build
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
make -j TARGET=${{ matrix.target }}
- name: Package and upload image for ${{ matrix.target }}
id: package_and_upload_image
env:
GH_BUILD_USERNAME: ${{ secrets.GH_BUILD_USERNAME }}
GH_BUILD_PASSWORD: ${{ secrets.GH_BUILD_PASSWORD }}
ARTIFACTORY_USERNAME: cicd-indoor-main
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
LOWERCASE_TARGET=`echo ${{ matrix.target }} | tr '[:upper:]' '[:lower:]'`
HASH=$(git rev-parse --short HEAD)
if [[ ${GITHUB_REF} == "refs/heads/"* ]]
then
REF=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')
IS_RELEASE="false"
else
REF=$(echo ${GITHUB_REF#refs/tags/} | tr '/' '-')
IS_RELEASE="true"
fi
BASENAME="$(date +%Y%m%d)-$LOWERCASE_TARGET-$REF-$HASH"
TAR_NAME="$BASENAME.tar.gz"
IMG_NAME="$BASENAME-upgrade.bin";
JSON_NAME="$BASENAME.json";
tar cfz "$TAR_NAME" -C openwrt/bin/targets/ .
curl -s -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "$TAR_NAME" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$TAR_NAME""
IMG_NAME="$BASENAME-upgrade.bin";
TIP_VERSION="$(grep DISTRIB_TIP= openwrt/tmp/openwrt_release | cut -d\' -f2)"
echo -e "{\n\t\"image\":\""${IMG_NAME}"\",\n\t\"revision\": \""${TIP_VERSION}"\",\n\t\"timestamp\":\""$(date +%s)"\",\n\t\"compatible\": \""${LOWERCASE_TARGET}"\"\n}" > latest-upgrade.json
[ -f openwrt/tmp/image-file ] && curl -s -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "openwrt/$(cat openwrt/tmp/image-file)" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$IMG_NAME""
[ -f openwrt/tmp/image-file ] && curl -s -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "latest-upgrade.json" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/latest-upgrade.json"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/octet-stream" "openwrt/$(cat openwrt/tmp/image-file)" "s3://$AWS_S3_BUCKET_NAME/$IMG_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$IMG_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/json" "latest-upgrade.json" "s3://$AWS_S3_BUCKET_NAME/$JSON_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$JSON_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
if [[ ${{ matrix.target }} == 'x64_vm' ]]; then
echo ::set-output name=x64_vm_image_name::"$(echo $IMG_NAME)"
fi
create-x64_vm-ami:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
with:
ref: WIFI-7206-add-workflow-to-build-virtual-ap-image
- name: Use create-ami-from-image composite action
uses: ./.github/actions/create-ami-from-image
with:
firmware_image_name: ${{ needs.build.outputs.x64_vm_image_name }}
firmware_image_s3_bucket: ${{ env.AWS_S3_BUCKET_NAME }}

View File

@@ -12,7 +12,7 @@ First we need to clone and setup our tree. This will result in an openwrt/.
Next we need to select the profile and base package selection. This setup will install the feeds, packages and generate the .config file.
```
cd openwrt
./scripts/gen_config.py ea8300
./scripts/gen_config.py linksys_ea8300
```
Finally we can build the tree.
```

View File

@@ -1,136 +0,0 @@
From c9e9ca475bc2eb90beb23a2c67c39389f8cb2527 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 27 May 2021 13:24:47 +0200
Subject: [PATCH 01/58] netifd: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/config/netifd/Makefile | 8 ++--
.../netifd/patches/002-fix-dhcp-issue.patch | 17 +++++++++
.../config/netifd/patches/100-script.patch | 21 +++++++++++
.../config/netifd/patches/hairpin.patch | 37 +++++++++++++++++++
4 files changed, 78 insertions(+), 5 deletions(-)
create mode 100644 package/network/config/netifd/patches/002-fix-dhcp-issue.patch
create mode 100644 package/network/config/netifd/patches/100-script.patch
create mode 100644 package/network/config/netifd/patches/hairpin.patch
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 4b5f110da2..d41bddfd56 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,16 +5,14 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-26
-PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023
-PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9
+PKG_SOURCE_DATE:=2021-10-20
+PKG_SOURCE_VERSION:=c61a1d432b34babe230e49a82712608b07410fc3
+PKG_MIRROR_HASH:=2b040d039c560cbc04dfe1e496aa81f714a032db88986803728dd6b724c11cd2
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
-PKG_BUILD_PARALLEL:=1
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
diff --git a/package/network/config/netifd/patches/002-fix-dhcp-issue.patch b/package/network/config/netifd/patches/002-fix-dhcp-issue.patch
new file mode 100644
index 0000000000..6f1d2e708e
--- /dev/null
+++ b/package/network/config/netifd/patches/002-fix-dhcp-issue.patch
@@ -0,0 +1,17 @@
+Index: netifd-2019-08-05-5e02f944/interface.c
+===================================================================
+--- netifd-2019-08-05-5e02f944.orig/interface.c
++++ netifd-2019-08-05-5e02f944/interface.c
+@@ -424,7 +424,11 @@ interface_main_dev_cb(struct device_user
+ interface_set_link_state(iface, false);
+ break;
+ case DEV_EVENT_TOPO_CHANGE:
+- interface_proto_event(iface->proto, PROTO_CMD_RENEW, false);
++ /* This renews the dhcp lease when the bridge adds/deletes a
++ * new interface. It causes some dhcp servers to fail in
++ * case where there are many interfaces being added to the
++ * bridge frequently. Disabling this for now. */
++ /* interface_proto_event(iface->proto, PROTO_CMD_RENEW, false); */
+ return;
+ default:
+ break;
diff --git a/package/network/config/netifd/patches/100-script.patch b/package/network/config/netifd/patches/100-script.patch
new file mode 100644
index 0000000000..e7ba83f4bb
--- /dev/null
+++ b/package/network/config/netifd/patches/100-script.patch
@@ -0,0 +1,21 @@
+Index: a/scripts/netifd-wireless.sh
+===================================================================
+--- a/scripts/netifd-wireless.sh
++++ b/scripts/netifd-wireless.sh
+@@ -252,11 +252,14 @@ wireless_vif_parse_encryption() {
+ auth_type=owe
+ ;;
+ wpa3-mixed*)
+- auth_type=eap-eap192
++ auth_type=eap-eap256
+ ;;
+- wpa3*)
++ wpa3-192*)
+ auth_type=eap192
+ ;;
++ wpa3*)
++ auth_type=eap256
++ ;;
+ psk3-mixed*|sae-mixed*)
+ auth_type=psk-sae
+ ;;
diff --git a/package/network/config/netifd/patches/hairpin.patch b/package/network/config/netifd/patches/hairpin.patch
new file mode 100644
index 0000000000..25515d75d4
--- /dev/null
+++ b/package/network/config/netifd/patches/hairpin.patch
@@ -0,0 +1,37 @@
+diff --git a/wireless.c b/wireless.c
+index b26c4e8c8f0b..bd847e72ab40 100644
+--- a/wireless.c
++++ b/wireless.c
+@@ -804,20 +804,13 @@ wireless_interface_init_config(struct wireless_interface *vif)
+ vif->network = cur;
+
+ cur = tb[VIF_ATTR_MODE];
+- if (cur)
+- vif->ap_mode = !strcmp(blobmsg_get_string(cur), "ap");
+-
+- if (!vif->ap_mode)
+- return;
++ vif->ap_mode = cur && !strcmp(blobmsg_get_string(cur), "ap");
+
+ cur = tb[VIF_ATTR_ISOLATE];
+- if (cur)
+- vif->isolate = blobmsg_get_bool(cur);
++ vif->isolate = vif->ap_mode && cur && blobmsg_get_bool(cur);
+
+ cur = tb[VIF_ATTR_PROXYARP];
+- if (cur)
+- vif->proxyarp = blobmsg_get_bool(cur);
+-
++ vif->proxyarp = vif->ap_mode && cur && blobmsg_get_bool(cur);
+ }
+
+ /* vlist update call for wireless interface list */
+@@ -846,8 +839,6 @@ vif_update(struct vlist_tree *tree, struct vlist_node *node_new,
+ wireless_interface_handle_link(vif_old, NULL, false);
+ free(vif_old->config);
+ vif_old->config = blob_memdup(vif_new->config);
+- vif_old->isolate = vif_new->isolate;
+- vif_old->ap_mode = vif_new->ap_mode;
+ wireless_interface_init_config(vif_old);
+ free(vif_new);
+ } else if (vif_new) {
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,247 +0,0 @@
From 99b9f524e94b98ce8fd3e141bf7e07bfa96bbea0 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 14 Sep 2021 09:19:08 +0200
Subject: [PATCH] mt76: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/kernel/mt76/Makefile | 7 +-
...the-dst-buffer-to-of_get_mac_address.patch | 206 ++++++++++++++++++
2 files changed, 210 insertions(+), 3 deletions(-)
create mode 100644 package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index e4051d8347..431c57a240 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,11 +8,12 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-06-06
-PKG_SOURCE_VERSION:=22b690334c0f49b11534cc2e331c9d5e17c4a0bc
-PKG_MIRROR_HASH:=ff5e563935919d2e40c1e7254ef3bc06f7ecc5e69f8ddd12903e8f5de942d630
+PKG_SOURCE_DATE:=2021-07-15
+PKG_SOURCE_VERSION:=bbebea7d6dc64313132226adc3f7369d36e9359d
+PKG_MIRROR_HASH:=17cd74e72c1f6c8742b698bf6772afacc6fba71b233af8c4d59530600cf44d5b
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
+PKG_USE_NINJA:=0
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS += \
diff --git a/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
new file mode 100644
index 0000000000..66075f2771
--- /dev/null
+++ b/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
@@ -0,0 +1,206 @@
+From 83216e3988cd196183542937c9bd58b279f946af Mon Sep 17 00:00:00 2001
+From: Michael Walle <michael@walle.cc>
+Date: Mon, 12 Apr 2021 19:47:17 +0200
+Subject: of: net: pass the dst buffer to of_get_mac_address()
+
+of_get_mac_address() returns a "const void*" pointer to a MAC address.
+Lately, support to fetch the MAC address by an NVMEM provider was added.
+But this will only work with platform devices. It will not work with
+PCI devices (e.g. of an integrated root complex) and esp. not with DSA
+ports.
+
+There is an of_* variant of the nvmem binding which works without
+devices. The returned data of a nvmem_cell_read() has to be freed after
+use. On the other hand the return of_get_mac_address() points to some
+static data without a lifetime. The trick for now, was to allocate a
+device resource managed buffer which is then returned. This will only
+work if we have an actual device.
+
+Change it, so that the caller of of_get_mac_address() has to supply a
+buffer where the MAC address is written to. Unfortunately, this will
+touch all drivers which use the of_get_mac_address().
+
+Usually the code looks like:
+
+ const char *addr;
+ addr = of_get_mac_address(np);
+ if (!IS_ERR(addr))
+ ether_addr_copy(ndev->dev_addr, addr);
+
+This can then be simply rewritten as:
+
+ of_get_mac_address(np, ndev->dev_addr);
+
+Sometimes is_valid_ether_addr() is used to test the MAC address.
+of_get_mac_address() already makes sure, it just returns a valid MAC
+address. Thus we can just test its return code. But we have to be
+careful if there are still other sources for the MAC address before the
+of_get_mac_address(). In this case we have to keep the
+is_valid_ether_addr() call.
+
+The following coccinelle patch was used to convert common cases to the
+new style. Afterwards, I've manually gone over the drivers and fixed the
+return code variable: either used a new one or if one was already
+available use that. Mansour Moufid, thanks for that coccinelle patch!
+
+<spml>
+@a@
+identifier x;
+expression y, z;
+@@
+- x = of_get_mac_address(y);
++ x = of_get_mac_address(y, z);
+ <...
+- ether_addr_copy(z, x);
+ ...>
+
+@@
+identifier a.x;
+@@
+- if (<+... x ...+>) {}
+
+@@
+identifier a.x;
+@@
+ if (<+... x ...+>) {
+ ...
+ }
+- else {}
+
+@@
+identifier a.x;
+expression e;
+@@
+- if (<+... x ...+>@e)
+- {}
+- else
++ if (!(e))
+ {...}
+
+@@
+expression x, y, z;
+@@
+- x = of_get_mac_address(y, z);
++ of_get_mac_address(y, z);
+ ... when != x
+</spml>
+
+All drivers, except drivers/net/ethernet/aeroflex/greth.c, were
+compile-time tested.
+
+Suggested-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Michael Walle <michael@walle.cc>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ arch/arm/mach-mvebu/kirkwood.c | 3 +-
+ arch/powerpc/sysdev/tsi108_dev.c | 5 +-
+ drivers/net/ethernet/aeroflex/greth.c | 6 +--
+ drivers/net/ethernet/allwinner/sun4i-emac.c | 10 ++--
+ drivers/net/ethernet/altera/altera_tse_main.c | 7 +--
+ drivers/net/ethernet/arc/emac_main.c | 8 +--
+ drivers/net/ethernet/atheros/ag71xx.c | 7 +--
+ drivers/net/ethernet/broadcom/bcm4908_enet.c | 7 +--
+ drivers/net/ethernet/broadcom/bcmsysport.c | 7 +--
+ drivers/net/ethernet/broadcom/bgmac-bcma.c | 10 ++--
+ drivers/net/ethernet/broadcom/bgmac-platform.c | 11 ++--
+ drivers/net/ethernet/cadence/macb_main.c | 11 ++--
+ drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 8 +--
+ drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 5 +-
+ drivers/net/ethernet/davicom/dm9000.c | 10 ++--
+ drivers/net/ethernet/ethoc.c | 6 +--
+ drivers/net/ethernet/ezchip/nps_enet.c | 7 +--
+ drivers/net/ethernet/freescale/fec_main.c | 7 +--
+ drivers/net/ethernet/freescale/fec_mpc52xx.c | 7 +--
+ drivers/net/ethernet/freescale/fman/mac.c | 9 ++--
+ .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 5 +-
+ drivers/net/ethernet/freescale/gianfar.c | 8 +--
+ drivers/net/ethernet/freescale/ucc_geth.c | 5 +-
+ drivers/net/ethernet/hisilicon/hisi_femac.c | 7 +--
+ drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 7 +--
+ drivers/net/ethernet/lantiq_xrx200.c | 7 +--
+ drivers/net/ethernet/marvell/mv643xx_eth.c | 5 +-
+ drivers/net/ethernet/marvell/mvneta.c | 6 +--
+ .../net/ethernet/marvell/prestera/prestera_main.c | 11 ++--
+ drivers/net/ethernet/marvell/pxa168_eth.c | 9 +---
+ drivers/net/ethernet/marvell/sky2.c | 8 ++-
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++--
+ drivers/net/ethernet/micrel/ks8851_common.c | 7 ++-
+ drivers/net/ethernet/microchip/lan743x_main.c | 5 +-
+ drivers/net/ethernet/nxp/lpc_eth.c | 4 +-
+ drivers/net/ethernet/qualcomm/qca_spi.c | 10 ++--
+ drivers/net/ethernet/qualcomm/qca_uart.c | 9 +---
+ drivers/net/ethernet/renesas/ravb_main.c | 12 +++--
+ drivers/net/ethernet/renesas/sh_eth.c | 5 +-
+ .../net/ethernet/samsung/sxgbe/sxgbe_platform.c | 13 ++---
+ drivers/net/ethernet/socionext/sni_ave.c | 10 ++--
+ .../net/ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +-
+ .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 2 +-
+ .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-visconti.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 14 ++---
+ .../net/ethernet/stmicro/stmmac/stmmac_platform.h | 2 +-
+ drivers/net/ethernet/ti/am65-cpsw-nuss.c | 19 ++++---
+ drivers/net/ethernet/ti/cpsw.c | 7 +--
+ drivers/net/ethernet/ti/cpsw_new.c | 7 +--
+ drivers/net/ethernet/ti/davinci_emac.c | 8 +--
+ drivers/net/ethernet/ti/netcp_core.c | 7 +--
+ drivers/net/ethernet/wiznet/w5100-spi.c | 8 ++-
+ drivers/net/ethernet/wiznet/w5100.c | 2 +-
+ drivers/net/ethernet/xilinx/ll_temac_main.c | 8 +--
+ drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 15 +++---
+ drivers/net/ethernet/xilinx/xilinx_emaclite.c | 8 +--
+ drivers/net/wireless/ath/ath9k/init.c | 5 +-
+ drivers/net/wireless/mediatek/mt76/eeprom.c | 9 +---
+ drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 6 +--
+ drivers/of/of_net.c | 60 ++++++++++------------
+ drivers/staging/octeon/ethernet.c | 10 ++--
+ drivers/staging/wfx/main.c | 7 ++-
+ include/linux/of_net.h | 6 +--
+ include/net/dsa.h | 2 +-
+ net/dsa/dsa2.c | 2 +-
+ net/dsa/slave.c | 2 +-
+ net/ethernet/eth.c | 11 ++--
+ 85 files changed, 218 insertions(+), 364 deletions(-)
+
+diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
+index 665b54c5c8ae5..6d895738222ad 100644
+--- a/eeprom.c
++++ b/eeprom.c
+@@ -91,15 +91,9 @@ void
+ {
+ struct mt76_dev *dev = phy->dev;
+
+-#ifdef CONFIG_OF
+ struct device_node *np = dev->dev->of_node;
+- const u8 *mac = NULL;
+
+- if (np)
+- mac = of_get_mac_address(np);
+- if (!IS_ERR_OR_NULL(mac))
+- ether_addr_copy(phy->macaddr, mac);
+-#endif
++ of_get_mac_address(np, phy->macaddr);
+
+ if (!is_valid_ether_addr(phy->macaddr)) {
+ eth_random_addr(phy->macaddr);
+--
+cgit 1.2.3-1.el7
+
--
2.25.1

View File

@@ -1,47 +0,0 @@
From 4b2e6bb352b400e244646a7bc59bc5ca3ca6f5df Mon Sep 17 00:00:00 2001
From: Roman Yeryomin <roman@advem.lv>
Date: Fri, 3 Sep 2021 17:31:11 +0300
Subject: [PATCH 32/32] iproute2: m_xt.so depends on dynsyms.list
When doing parallel build on a fast machine with bottleneck in i/o,
m_xt.so may start linking faster than dynsyms.list gets populated,
resulting in error:
ld:dynsyms.list:0: syntax error in dynamic list
Fix this by adding dynsyms.list as make dependency to m_xt.so
Described also here:
https://bugs.openwrt.org/index.php?do=details&task_id=3353
Change from v1:
- add dynsysms.list dependancy only when shared libs are enabled
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Fixes: FS#3353
---
.../utils/iproute2/patches/175-reduce-dynamic-syms.patch | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
index da961a183b..c3892e5a0e 100644
--- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
+++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
@@ -26,13 +26,14 @@
q_atm.so: q_atm.c
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
-@@ -205,4 +206,15 @@ static-syms.h: $(wildcard *.c)
+@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c)
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
done > $@
+else
+
+tc: dynsyms.list
++m_xt.so: dynsyms.list
+dynsyms.list: $(wildcard *.c)
+ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \
+ echo "{" > $@ ; \
--
2.25.1

View File

@@ -1,8 +1,16 @@
repo: https://github.com/openwrt/openwrt.git
branch: openwrt-21.02
revision: 378769b5551714ccaa821b481bfeecbf362f351e
revision: c67509efd7d0c43eb3f622f06c8a31aa28d22f6e
output_dir: ./output
patch_folders:
- backports/
- patches/
- patches/backports/
- patches/base
- patches/wifi
- patches/ath79
- patches/ramips
- patches/ipq40xx
- patches/ipq806x
- patches/ipq807x
- patches/rtkmipsel
- patches/rest

View File

@@ -5,7 +5,7 @@ RUN apt-get update \
&& apt-get install -y \
time git-core build-essential gcc-multilib clang \
libncurses5-dev zlib1g-dev gawk flex gettext wget unzip python \
python3 python3-pip python3-yaml libssl-dev rsync llvm llvm-12 \
python3 python3-pip python3-yaml libssl-dev rsync \
&& apt-get clean
RUN git config --global user.email "you@example.com"
RUN git config --global user.name "Your Name"

View File

@@ -0,0 +1,46 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=cc2652
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/cc2652
SECTION:=utils
CATEGORY:=Utilities
TITLE:=cc2652 -- TI CC26x2 firmware upgrade tool
DEPENDS:=+libstdcpp +zlib
endef
define Package/cc2652/description
TI CC26x2 firmware upgrade tool
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Package/cc2652/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/tisbl.init $(1)/etc/init.d/tisbl
$(INSTALL_DIR) $(1)/etc/tifirmware
$(INSTALL_BIN) ./files/firmware/* $(1)/etc/tifirmware/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tisbl $(1)/usr/bin/
$(INSTALL_BIN) ./files/*.sh $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) ./files/tisbl.config $(1)/etc/config/tisbl
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/tisbl.defaults $(1)/etc/uci-defaults
endef
$(eval $(call BuildPackage,cc2652))

View File

@@ -0,0 +1,124 @@
#!/usr/bin/lua
--[[
ByteCnt: 1 1 1 2 1 4
---- --------- ---------- ----- ------ -------
FieldName:Type EventCode DataLength Event Status EventId
--]]
--Type
Command = 0x01
Event = 0x04
--OpCode
GapScan_enable = 0xFE51
--EventCode
HCI_LE_ExtEvent = 0xff
--Status
SUCCESS = 0x00
--Event
GAP_HCI_ExtentionCommandStatus = 0x067F
GAP_AdvertiserScannerEvent = 0x0613
--EventId
GAP_EVT_ADV_REPORT = 0x00400000
GAP_EVT_SCAN_ENABLED = 0x00010000
local write = io.write
function print(...)
local n = select("#",...)
for i = 1,n do
local v = tostring(select(i,...))
write(v)
if i~=n then write'\t' end
end
-- write'\n'
end
function printf(str, ...)
return print(str:format(...))
end
function lshift(x, by)
return x * 2 ^ by
end
function GetUint8(Payload, position)
return string.byte(Payload, position)
end
function GetUint32(Payload, position)
return (lshift(string.byte(Payload, position+3),24) + lshift(string.byte(Payload, position+2),16) + lshift(string.byte(Payload, position+1),8) + string.byte(Payload, position))
end
function GetUint16(Payload, position)
return (lshift(string.byte(Payload, position+1),8) + string.byte(Payload, position))
end
function hexdump(Payload,separator)
for i=1,Payload:len(), 1 do
io.write(string.format("%02X", Payload:byte(i)))
if (i< Payload:len()) then
io.write(separator)
end
end
end
ibeacon_hdr=string.char(0x1A,0xFF,0x4C,0x00,0x02,0x15)
function DumpAdvertiserData(Payload)
--[[
Len(1byte)+Type(1byte)+Data(Len bytes)
--]]
while( Payload:len() > 0 ) do
local Len = GetUint8(Payload,1)
if (GetUint8(Payload,2) == 0xff) then -- manufacturer data
print(" MFR=")
hexdump(Payload:sub(1,Len+1),'')
if (Payload:sub(1,6) == ibeacon_hdr) then
print(" [ibeacon]")
end
end
Payload = string.sub(Payload,Len+2,-1)
end
end
function DumpAdvertiserScannerEvent(Payload)
local Status = GetUint8(Payload,3)
local EventId = GetUint32(Payload,4)
if((EventId==GAP_EVT_ADV_REPORT) and (Status==SUCCESS))
then
local MAC = string.sub(Payload,10,15)
local TxPower = GetUint8(Payload,19)
local RSSI = GetUint8(Payload,20)
printf("MAC=%02X%02X%02X%02X%02X%02X RSI=%d PWR=%d",string.byte(MAC,6),string.byte(MAC,5),string.byte(MAC,4),
string.byte(MAC,3),string.byte(MAC,2),string.byte(MAC,1),RSSI,TxPower)
local DataLength = GetUint16(Payload,30)
DumpAdvertiserData(string.sub(Payload,32,-1))
print("\n")
end
end
function hci_event_paser()
while true do
local Header = io.read(3)
if not Header then break end
local EventType = GetUint8(Header,1)
local EventCode = GetUint8(Header,2)
local DataLength = GetUint8(Header,3)
local Data = io.read(DataLength)
local Event = GetUint16(Data,1)
-- print(EventType,EventCode,DataLength,Event)
if not Data then break end
if(Event==GAP_AdvertiserScannerEvent)
then
DumpAdvertiserScannerEvent(Data)
-- hexdump(ibeacon_hdr)
end
end
end
hci_event_paser()

View File

@@ -0,0 +1,8 @@
#!/bin/sh
com-wr.sh /dev/ttyMSM1 3 "\x01\x1D\xFC\x01\x00" > /dev/null # this command dealy time must >= 3, if small then 3, the following commands will be something wrong
com-wr.sh /dev/ttyMSM1 1 "\x01\x00\xFE\x08\x08\x00\x00\x00\x00\x00\x00\x00" > /dev/null
com-wr.sh /dev/ttyMSM1 1 "\x01\x61\xFE\x02\x01\x02" > /dev/null
com-wr.sh /dev/ttyMSM1 1 "\x01\x61\xFE\x02\x01\x03" > /dev/null
com-wr.sh /dev/ttyMSM1 1 "\x01\x61\xFE\x02\x01\x04" > /dev/null
com-wr.sh /dev/ttyMSM1 1 "\x01\x61\xFE\x02\x01\x05" > /dev/null
com-wr.sh /dev/ttyMSM1 3 "\x01\x51\xFE\x06\x00\x00\xF4\x01\x28\x00" | tee /tmp/blescan.data | ble-scan-rx-parser.sh

View File

@@ -0,0 +1,13 @@
#!/bin/sh
# com-wr.sh tty time command parser
# example com-wr.sh /dev/ttyMSM1 1 "\x01\x1D\xFC\x01\x00" | hexdump.sh --> send "\x01\x1D\xFC\x01\x00" to /dev/ttyMSM1 and then hexdump receive data until 100ms timeout
#command example "\x7E\x03\xD0\xAF und normaler Text"
tty=$1
time=$2
command=$3
parser=$4
stty -F $tty time $time
exec 99< $tty
echo -en $command > $tty
cat $tty
exec 99<&-

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,11 @@
#!/usr/bin/lua
local block = 16
while true do
local bytes = io.read(block)
if not bytes then break end
for b in string.gfind(bytes, ".") do
io.write(string.format("%02X ", string.byte(b)))
end
io.write(string.rep(" ", block - string.len(bytes) + 1))
io.write(string.gsub(bytes, "%c", "."), "\n")
end

View File

@@ -0,0 +1,20 @@
#!/bin/sh
# script---------------- UUID---------------------------------------------------------------------- MAJOR----- MINOR----- POWER-
#example: ibeacon-broadcaster.sh "\xE2\x0A\x39\xF4\x73\xF5\x4B\xC4\xA1\x2F\x17\xD1\xAD\x07\xA9\x61" "\x01\x23" "\x45\x67" "\xC8"
if [ "$#" -eq 4 ]; then
UUID=$1
MAJOR=$2
MINOR=$3
POWER=$4
else
UUID="\xE2\x0A\x39\xF4\x73\xF5\x4B\xC4\xA1\x2F\x17\xD1\xAD\x07\xA9\x61"
MAJOR="\x01\x23"
MINOR="\x45\x67"
POWER="\xC8"
fi
com-wr.sh /dev/ttyMSM1 3 "\x01\x1D\xFC\x01\x00" > /dev/null # this command dealy time must >= 3, if small then 3, the following commands will be something wrong
com-wr.sh /dev/ttyMSM1 1 "\x01\x00\xFE\x08\x01\x00\x00\x00\x00\x00\x00\x00" > /dev/null
com-wr.sh /dev/ttyMSM1 1 "\x01\x3E\xFE\x15\x12\x00\xA0\x00\x00\xA0\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x7F\x01\x01\x00" > /dev/null
com-wr.sh /dev/ttyMSM1 1 "\x09\x44\xFE\x23\x00\x00\x00\x1E\x00\x02\x01\x1A\x1A\xFF\x4C\x00\x02\x15${UUID}${MAJOR}${MINOR}${POWER}\x00" > /dev/null
com-wr.sh /dev/ttyMSM1 1 "\x01\x3F\xFE\x04\x00\x00\x00\x00" | hexdump.sh

View File

@@ -0,0 +1,5 @@
#!/bin/sh
killall -9 ser2net
tisbl.sh /dev/ttyMSM1 115200 2652 /etc/tifirmware/ble5_host_test_bd9.bin 79 34
echo "7000:telnet:0:/dev/ttyMSM1:115200 8DATABITS NONE 1STOPBIT remctl" > /tmp/ser2net.conf
ser2net -c /tmp/ser2net.conf

View File

@@ -0,0 +1,7 @@
config tisbl 'tisbl'
option firmware '/etc/tifirmware/ble5_host_test_bd9.bin'
option tty '/dev/ttyMSM1'
option tichip '2652'
option baudrate '115200'
option resetpin '79'
option backdoorpin '34'

View File

@@ -0,0 +1,13 @@
#!/bin/sh
. /lib/functions.sh
. /lib/functions/system.sh
board=$(board_name)
case $board in
edgecore,eap104)
uci set tisbl.tisbl.backdoorpin=31
uci set tisbl.tisbl.resetpin=35
;;
esac

View File

@@ -0,0 +1,21 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
#start after dbus (60)
START=62
USE_PROCD=1
start_service() {
firmware="$(uci -q get tisbl.tisbl.firmware)"
tty="$(uci -q get tisbl.tisbl.tty)"
tichip="$(uci -q get tisbl.tisbl.tichip)"
baudrate="$(uci -q get tisbl.tisbl.baudrate)"
resetpin="$(uci -q get tisbl.tisbl.resetpin)"
backdoorpin="$(uci -q get tisbl.tisbl.backdoorpin)"
tisbl.sh $tty $baudrate $tichip $firmware $resetpin $backdoorpin
}
service_triggers()
{
procd_add_reload_trigger "tisbl"
}

View File

@@ -0,0 +1,43 @@
#!/bin/sh
# tisbl.sh $tty $baudrate $tichip $firmware $resetpin $backdoorpin
# tisbl.sh /dev/ttyMSM1 115200 2652 /etc/tifirmware/blinky_bd13.bin 79 67
#assumption: resetpin and backdoorpin are low active
tty=$1
baudrate=$2
tichip=$3
firmware=$4
resetpin=$5
backdoorpin=$6
ti_reset() #assumption:resetpin is low active
{
if [ ! -e /sys/class/gpio/gpio${resetpin} ]; then
echo ${resetpin} > /sys/class/gpio/export
fi
echo out > /sys/class/gpio/gpio${resetpin}/direction
echo 1 > /sys/class/gpio/gpio${resetpin}/value
echo 0 > /sys/class/gpio/gpio${resetpin}/value
sleep 1
echo 1 > /sys/class/gpio/gpio${resetpin}/value
}
ti_goto_bootloader() #assumption:backdoorpin is low active
{
if [ ! -e /sys/class/gpio/gpio${backdoorpin} ]; then
echo ${backdoorpin} > /sys/class/gpio/export
fi
echo out > /sys/class/gpio/gpio${backdoorpin}/direction
echo 0 > /sys/class/gpio/gpio${backdoorpin}/value
ti_reset
sleep 1
echo 1 > /sys/class/gpio/gpio${backdoorpin}/value
}
if [ -e $firmware ]; then
ti_goto_bootloader
tisbl $tty $baudrate $tichip $firmware #try to upgrade firmware
fi

View File

@@ -0,0 +1,27 @@
# Executable
EXE = tisbl
# Compiler, Linker Defines
#CC = g++
#CFLAGS = -w -O -Wno-deprecated -I. -fpermissive -std=gnu++0x
#CFLAGS = -I. -fpermissive -Wwrite-strings -lstdc++
CFLAGS = -I. -Wwrite-strings -std=gnu++0x -lstdc++ -fPIC
#CFLAGS = -I. -lstdc++ -Wwrite-strings -std=gnu++0x
#LIBS =
#LDFLAGS = $(LIBS)
# Compile and Assemble C++ Source Files into Object Files
%.o: %.cpp
$(CXX) $(CFLAGS) $(LDFLAGS) -c $< -o $@
# Source and Object files
SRC = $(wildcard *.cpp)
OBJ = $(patsubst %.cpp, %.o, $(SRC))
# Link all Object Files with external Libraries into Binaries
$(EXE): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) -o $(EXE)
# $(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) -o $(EXE) -lz
.PHONY: clean
clean:
-rm -f $(EXE) *.o

View File

@@ -0,0 +1,13 @@
#ifndef __DEBUG_H__
#define __DEBUG_H__
#include <stdio.h>
#define DEBUG 0
#if defined(DEBUG) && DEBUG > 0
#define DEBUG_PRINT(fmt, args...) fprintf(stderr, "$$%d:%s:%d:%s():" fmt, \
(int)time(NULL), __FILE__, __LINE__, __func__, ##args)
#else
#define DEBUG_PRINT(fmt, args...) /* Don't do anything in release builds */
#endif
#endif // __DEBUG_H__

View File

@@ -0,0 +1,257 @@
/******************************************************************************
* Filename: sblAppEx.cpp
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader Library application example.
* This example enumerates all COM devices and lets you
* select which port to connect to. The example assumes the
* connected device is a CC2538, CC2650 or CC2652 and programs
* a blinky onto the device. After programming the blinky,
* bootloader mode may be forced by
* - holding SELECT button on 06EB (for CC2538 and CC26x0 EMKs), or
* - holding BTN-1 on the device LaunchPad (for CC26x2 LPs)
* when resetting the chip.
*
* Copyright (C) 2013 - 2019 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include "serialib.h"
#include "sbllib.h"
#include <vector>
#include <iostream>
#include <fstream>
//#include <time.h>
using namespace std;
// Calculate crc32 checksum the way CC2538 and CC2650 does it.
int calcCrcLikeChip(const unsigned char *pData, unsigned long ulByteCount)
{
unsigned long d, ind;
unsigned long acc = 0xFFFFFFFF;
const unsigned long ulCrcRand32Lut[] =
{
0x00000000, 0x1DB71064, 0x3B6E20C8, 0x26D930AC,
0x76DC4190, 0x6B6B51F4, 0x4DB26158, 0x5005713C,
0xEDB88320, 0xF00F9344, 0xD6D6A3E8, 0xCB61B38C,
0x9B64C2B0, 0x86D3D2D4, 0xA00AE278, 0xBDBDF21C
};
while ( ulByteCount-- )
{
d = *pData++;
ind = (acc & 0x0F) ^ (d & 0x0F);
acc = (acc >> 4) ^ ulCrcRand32Lut[ind];
ind = (acc & 0x0F) ^ (d >> 4);
acc = (acc >> 4) ^ ulCrcRand32Lut[ind];
}
return (acc ^ 0xFFFFFFFF);
}
/// Application status function (used as SBL status callback)
void appStatus(char *pcText, bool bError)
{
if(bError)
{
cerr << pcText;
}
else
{
cout << pcText;
}
}
/// Application progress function (used as SBL progress callback)
static void appProgress(uint32_t progress)
{
fprintf(stdout, "\r%d%% ", progress);
fflush(stdout);
}
// Defines
// Name Hex Dec
// ------------------------------- --------------- ---------------------------------
#define DEVICE_CC2538 0x2538 // 9528
#define DEVICE_CC26X0 0x2650 // 9808
#define DEVICE_CC2640R2 0x2640 // 9792
#define DEVICE_CC26X2 0x2652 // 9810
#define CC2538_FLASH_BASE 0x00200000
#define CC26XX_FLASH_BASE 0x00000000
// Application main function
// tisbl SerialDevNode baudRate deviceType firmware
int main(int argc, char *argv[])
{
// START: Program Configuration
/* UART baud rate. Default: 230400 */
uint32_t baudRate = 115200;
uint32_t deviceType = DEVICE_CC26X2;
SblDevice *pDevice = NULL; // Pointer to SblDevice object
char *SerialDevNode;
int32_t devStatus = -1; // Hold SBL status codes
std::string fileName; // File name to program
uint32_t byteCount = 0; // File size in bytes
uint32_t fileCrc, devCrc; // Variables to save CRC checksum
uint32_t devFlashBase; // Flash start address
static std::vector<char> pvWrite(1);// Vector to application firmware in.
static std::ifstream file; // File stream
// Set callback functions
SblDevice::setCallBackStatusFunction(&appStatus);
SblDevice::setCallBackProgressFunction(&appProgress);
// Select device
// deviceType FlashBase File
// DEVICE_CC2538 CC2538_FLASH_BASE blinky_backdoor_select_btn2538.bin
// DEVICE_CC26X0 CC26XX_FLASH_BASE blinky_backdoor_select_btn2650.bin
// DEVICE_CC2640R2 CC26XX_FLASH_BASE blinky_backdoor_select_btn2640r2.bin
// DEVICE_CC26X2 CC26XX_FLASH_BASE blinky_backdoor_select_btn26x2.bin
if(argc < 5) {
return -1;
}
SerialDevNode = argv[1];
baudRate = atoi(argv[2]);
deviceType = strtol(argv[3], NULL, 16);
fileName = argv[4];
switch(deviceType)
{
case DEVICE_CC2538:
devFlashBase = CC2538_FLASH_BASE;
break;
case DEVICE_CC26X0:
case DEVICE_CC2640R2:
case DEVICE_CC26X2:
devFlashBase = CC26XX_FLASH_BASE;
break;
}
printf("SerialDevNode=%s, baudRate=%d, deviceType=%04x, fileName=%s\n",SerialDevNode,baudRate,deviceType,fileName.c_str());
// Should SBL try to enable XOSC? (Not possible for CC26xx)
bool bEnableXosc = false;
if(deviceType == DEVICE_CC2538)
{
char answer[64];
cout << "Enable device CC2538 XOSC? (Y/N): ";
cin >> answer;
bEnableXosc = (answer[0] == 'Y' || answer[0] == 'y') ? true : false;
}
// Create SBL object
pDevice = SblDevice::Create(deviceType);
if(pDevice == NULL)
{
printf("No SBL device object.\n");
cout << "\n\nAn error occurred: " << pDevice->getLastStatus();
return -1;
}
// Connect to device
printf("Connecting (%s @ %d baud) ...\n", SerialDevNode, baudRate);
if(pDevice->connect(SerialDevNode, baudRate, bEnableXosc) != SBL_SUCCESS)
{
cout << "\n\nAn error occurred: " << pDevice->getLastStatus();
return -1;
}
// Read file
file.open(fileName.c_str(), std::ios::binary);
if(file.is_open())
{
// Get file size:
file.seekg(0, std::ios::end);
byteCount = (uint32_t)file.tellg();
file.seekg(0, std::ios::beg);
// Read data
pvWrite.resize(byteCount);
file.read((char*) &pvWrite[0], byteCount);
}
else
{
cout << "Unable to open file " << fileName.c_str();
cout << "\n\nAn error occurred: " << pDevice->getLastStatus();
return -1;
}
// Calculate file CRC checksum
fileCrc = calcCrcLikeChip((unsigned char *)&pvWrite[0], byteCount);
if(pDevice->calculateCrc32(devFlashBase, byteCount, &devCrc) != SBL_SUCCESS)
{
cout << "\n\nAn error occurred: " << pDevice->getLastStatus();
return -1;
}
printf ("pre-Comparing CRC: fileCrc=%x,devCrc=%x\n",fileCrc,devCrc);
if(fileCrc == devCrc) {
cout << "CRC is same, no need to upgrade\n";
pDevice->reset();
return 0;
}
// Erasing as much flash needed to program firmware.
cout << "Erasing flash ...\n";
if(pDevice->eraseFlashRange(devFlashBase, byteCount) != SBL_SUCCESS)
{
cout << "\n\nAn error occurred: " << pDevice->getLastStatus();
return -1;
}
// Writing file to device flash memory.
cout << "Writing flash ...\n";
if(pDevice->writeFlashRange(devFlashBase, byteCount, &pvWrite[0]) != SBL_SUCCESS)
{
cout << "\n\nAn error occurred: " << pDevice->getLastStatus();
return -1;
}
// Calculate CRC checksum of flashed content.
cout << "Calculating CRC on device ...\n";
if(pDevice->calculateCrc32(devFlashBase, byteCount, &devCrc) != SBL_SUCCESS)
{
cout << "\n\nAn error occurred: " << pDevice->getLastStatus();
return -1;
}
// Compare CRC checksums
printf ("Comparing CRC: fileCrc=%x,devCrc=%x\n",fileCrc,devCrc);
if(fileCrc == devCrc) printf("OK\n");
else printf("Mismatch!\n");
cout << "Resetting device ...\n";
pDevice->reset();
cout << "OK\n";
}

View File

@@ -0,0 +1,673 @@
/******************************************************************************
* Filename: sbl_device.cpp
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader device file.
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <sbllib.h>
#include "sbl_device.h"
#include "sbl_device_cc2538.h"
#include "sbl_device_cc2650.h"
#include "sbl_device_cc2652.h"
#if 0
#include <ComPort.h>
#include <ComPortElement.h>
#else
#include "serialib.h"
#endif
#include <stdarg.h>
// Static variables
//
std::string SblDevice::sm_csLastError;
uint32_t SblDevice::sm_progress = 0;
tProgressFPTR SblDevice::sm_pProgressFunction = NULL;
tStatusFPTR SblDevice::sm_pStatusFunction = NULL;
uint32_t SblDevice::sm_chipType = 0;
//-----------------------------------------------------------------------------
/** \brief Constructor
*/
//-----------------------------------------------------------------------------
SblDevice::SblDevice()
{
m_pCom = NULL;
m_lastDeviceStatus = -1;
m_lastSblStatus = SBL_SUCCESS;
m_bCommInitialized = false;
m_deviceId = 0;
m_ramSize = 0;
m_flashSize = 0;
m_pageEraseSize = 0;
}
//-----------------------------------------------------------------------------
/** \brief Destructor
*/
//-----------------------------------------------------------------------------
SblDevice::~SblDevice()
{
if (m_pCom != nullptr)
{
delete m_pCom;
m_pCom = nullptr;
}
m_lastDeviceStatus = -1;
m_bCommInitialized = false;
m_ramSize = -1;
m_flashSize = -1;
}
//-----------------------------------------------------------------------------
/** \brief Create Serial Bootloader Device
*
* \param[in] ui32ChipType
* Chip type the object should be created for, e.g. 0x2650 for CC2650.
*/
//-----------------------------------------------------------------------------
/*static*/SblDevice *
SblDevice::Create(uint32_t ui32ChipType)
{
if (ui32ChipType == 0)
{
return NULL;
}
sm_chipType = ui32ChipType;
switch (ui32ChipType)
{
case 0x2538:
return (SblDevice *)new SblDeviceCC2538();
case 0x1350:
case 0x1310:
case 0x2670:
case 0x2650:
case 0x2640:
case 0x2630:
case 0x2620:
return (SblDevice *)new SblDeviceCC2650();
case 0x1312:
case 0x1352:
case 0x2642:
case 0x2652:
return (SblDevice *)new SblDeviceCC2652();
default:
return NULL;
}
}
#if 0
//-----------------------------------------------------------------------------
/** \brief Enumerate COM port devices
*
* \param[in/out] pComPortElements
* Pointer to array where enumerated COM devices are stored
* \param[in/out] numElements
* Maximum number of elements to enumerate. Is populated with number
* of devices enumerated.
*
* \return
*
*/
//-----------------------------------------------------------------------------
/*static*/uint32_t
SblDevice::enumerate(ComPortElement *pComPortElements, int &numElements)
{
ComPort com;
if (com.enumerate(pComPortElements, numElements) != ComPort::COMPORT_SUCCESS)
{
printf("Failed to enumerate COM devices.\n");
return SBL_ENUM_ERROR;
}
return SBL_SUCCESS;
}
#endif
//-----------------------------------------------------------------------------
/** \brief Connect to given port number at specified baud rate.
*
* \param[in] csPortNum
* String containing the COM port to use
* \param[in] ui32BaudRate
* Baud rate to use for talking to the device.
* \param[in] bEnableXosc (optional)
* If true, try to enable device XOSC. Defaults to false. This option is
* not available for all device types.
*
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDevice::connect(std::string csPortNum, uint32_t ui32BaudRate,
bool bEnableXosc/* = false*/)
{
DEBUG_PRINT("\n");
int retCode = SBL_SUCCESS;
//
// Check input arguments
//
if (csPortNum.empty() || ui32BaudRate == 0)
{
setState(SBL_ARGUMENT_ERROR, "Cannot connect. Port number '%s' or baud rate '%d' is invalid.\n",
csPortNum.c_str(), ui32BaudRate);
return SBL_ARGUMENT_ERROR;
}
// Try to connect to the specified port at the specified baud rate
if (m_pCom != NULL)
{
// Try to open port
#if 1
char result = m_pCom->openDevice(csPortNum.c_str(),ui32BaudRate);
if(result < 0)
{
setState(SBL_PORT_ERROR, "SBL: Unable to open %s. Error: %d.\n", csPortNum.c_str(), result);
return SBL_PORT_ERROR;
}
#else
if (int result = m_pCom->open(csPortNum,
ui32BaudRate,
SBL_DEFAULT_READ_TIMEOUT,
SBL_DEFAULT_WRITE_TIMEOUT) != ComPort::COMPORT_SUCCESS)
{
setState(SBL_PORT_ERROR, "SBL: Unable to open %s. Error: %d.\n", csPortNum.c_str(), result);
return SBL_PORT_ERROR;
}
#endif
m_csComPort = csPortNum;
m_baudRate = ui32BaudRate;
}
// Check if device is responding at the given baud rate
if ((retCode = initCommunication(bEnableXosc)) != SBL_SUCCESS)
{
return retCode;
}
//
// Read device ID
//
uint32_t tmp;
if ((retCode = readDeviceId(&tmp)) != SBL_SUCCESS)
{
setState(retCode, "Failed to read device ID during initial connect.\n");
return retCode;
}
//
// Read device flash size
//
if ((retCode = readFlashSize(&tmp)) != SBL_SUCCESS)
{
setState(retCode, "Failed to read flash size during initial connect.\n");
return retCode;
}
//
// Read device ram size
//
if ((retCode = readRamSize(&tmp)) != SBL_SUCCESS)
{
setState(retCode, "Failed to read RAM size during initial connect.\n");
return retCode;
}
return SBL_SUCCESS;
}
//-----------------------------------------------------------------------------
/** \brief Send auto baud.
*
* \param[out] bBaudSetOk
* True if response is ACK, false otherwise
*
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDevice::sendAutoBaud(bool &bBaudSetOk)
{
DEBUG_PRINT("\n");
bBaudSetOk = false;
//
// Send 0x55 0x55 and expect ACK
//
char pData[2];
memset(pData, 0x55, 2);
if (m_pCom->writeBytes(pData, 2) != 2)
{
setState(SBL_PORT_ERROR, "Communication initialization failed. Failed to send data.\n");
return SBL_PORT_ERROR;
}
if (getCmdResponse(bBaudSetOk, 2, true) != SBL_SUCCESS)
{
// No response received. Invalid baud rate?
setState(SBL_PORT_ERROR, "No response from device. Device may not be in bootloader mode. Reset device and try again.\nIf problem persists, check connection and baud rate.\n");
return SBL_PORT_ERROR;
}
return SBL_SUCCESS;
}
//-----------------------------------------------------------------------------
/** \brief Get ACK/NAK from the boot loader.
*
* \param[out] bAck
* True if response is ACK, false if response is NAK.
* \param[in] ui32MaxRetries (optional)
* How many times ComPort::readBytes() can time out before fail is issued.
* \param[in] bQuietTimeout (optional)
* Do not set error if no command response is received.
*
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDevice::getCmdResponse(bool &bAck,
uint32_t ui32MaxRetries/* = SBL_DEFAULT_RETRY_COUNT*/,
bool bQuietTimeout/* = false*/)
{
DEBUG_PRINT("\n");
unsigned char pIn[2];
memset(pIn, 0, 2);
uint32_t numBytes = 0;
uint32_t retry = 0;
bAck = false;
uint32_t bytesRecv = 0;
//
// Expect 2 bytes (ACK or NAK)
//
do
{
numBytes = m_pCom->readBytes(pIn, 2);
bytesRecv += numBytes;
retry++;
} while ((bytesRecv < 2) && (retry < ui32MaxRetries));
if (bytesRecv < 2)
{
if (!bQuietTimeout) setState(SBL_TIMEOUT_ERROR, "Timed out waiting for ACK/NAK. No response from device.\n");
return SBL_TIMEOUT_ERROR;
}
else
{
if (pIn[0] == 0x00 && pIn[1] == 0xCC)
{
bAck = true;
return setState(SBL_SUCCESS);
}
else if (pIn[0] == 0x00 && pIn[1] == 0x33)
{
return setState(SBL_SUCCESS);
}
else
{
setState(SBL_ERROR, "ACK/NAK not received. Expected 0x00 0xCC or 0x00 0x33, received 0x%02X 0x%02X. bytesRecv=%d\n", pIn[0], pIn[1], bytesRecv);
return SBL_ERROR;
}
}
return SBL_ERROR;
}
//-----------------------------------------------------------------------------
/** \brief Send command response (ACK/NAK).
*
* \param[in] bAck
* True if response is ACK, false if response is NAK.
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDevice::sendCmdResponse(bool bAck)
{
DEBUG_PRINT("\n");
//
// Send response
//
char pData[2];
pData[0] = 0x00;
pData[1] = (bAck) ? 0xCC : 0x33;
if (m_pCom->writeBytes(pData, 2) != 2)
{
setState(SBL_PORT_ERROR, "Failed to send ACK/NAK response over %s\n",
m_csComPort.c_str());
return SBL_PORT_ERROR;
}
return SBL_SUCCESS;
}
//-----------------------------------------------------------------------------
/** \brief Get response data from device.
*
* \param[out] pcData
* Pointer to where received data will be stored.
* \param[in|out] ui32MaxLen
* Max number of bytes that can be received. Is populated with the actual
* number of bytes received.
* \param[in] ui32MaxRetries (optional)
* How many times ComPort::readBytes() can time out before fail is issued.
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDevice::getResponseData(char *pcData, uint32_t &ui32MaxLen,
uint32_t ui32MaxRetries/* = SBL_DEFAULT_RETRY_COUNT*/)
{
DEBUG_PRINT("\n");
uint32_t numBytes = 0;
uint32_t retry = 0;
unsigned char pcHdr[2];
uint32_t numPayloadBytes;
uint8_t hdrChecksum, dataChecksum;
uint32_t bytesRecv = 0;
setState(SBL_SUCCESS);
//
// Read length and checksum
//
memset(pcHdr, 0, 2);
do
{
bytesRecv += m_pCom->readBytes(&pcHdr[bytesRecv], (2 - bytesRecv));
retry++;
} while ((bytesRecv < 2) && retry < ui32MaxRetries);
//
// Check that we've received 2 bytes
//
if (bytesRecv < 2)
{
setState(SBL_TIMEOUT_ERROR, "Timed out waiting for data header from device.\n");
return SBL_TIMEOUT_ERROR;
}
numPayloadBytes = pcHdr[0] - 2;
hdrChecksum = pcHdr[1];
//
// Check if length byte is too long.
//
if (numPayloadBytes > ui32MaxLen)
{
setState(SBL_ERROR, "Error: Device sending more data than expected. \nMax expected was %d, sent was %d.\n", (uint32_t)ui32MaxLen, (numPayloadBytes + 2));
#if 1
m_pCom->flushReceiver();
#endif
return SBL_ERROR;
}
//
// Read the payload data
//
bytesRecv = 0;
do
{
bytesRecv += m_pCom->readBytes(&pcData[bytesRecv], (numPayloadBytes - bytesRecv));
retry++;
} while (bytesRecv < numPayloadBytes && retry < ui32MaxRetries);
//
// Have we received what we expected?
//
if (bytesRecv < numPayloadBytes)
{
ui32MaxLen = bytesRecv;
setState(SBL_TIMEOUT_ERROR, "Timed out waiting for data from device.\n");
return SBL_TIMEOUT_ERROR;
}
//
// Verify data checksum
//
dataChecksum = generateCheckSum(0, pcData, numPayloadBytes);
if (dataChecksum != hdrChecksum)
{
setState(SBL_ERROR, "Checksum verification error. Expected 0x%02X, got 0x%02X.\n", hdrChecksum, dataChecksum);
return SBL_ERROR;
}
ui32MaxLen = bytesRecv;
return SBL_SUCCESS;
}
//-----------------------------------------------------------------------------
/** \brief Are we connected to the device?
*
* \return
* Returns true if connected to device.
* Returns false if not connected to device.
*/
//-----------------------------------------------------------------------------
bool
SblDevice::isConnected()
{
DEBUG_PRINT("\n");
if (!m_pCom)
{
return false;
}
return true;
}
//-----------------------------------------------------------------------------
/** \brief This function generates the bootloader protocol checksum.
*
* \param[in] ui32Cmd
* The bootloader command
* \param[in] pcData
* Pointer to the command data.
* \param[in] ui32DataLen
* Data length in bytes.
*
* \return
* Returns the generated checksum.
*/
//-----------------------------------------------------------------------------
uint8_t
SblDevice::generateCheckSum(uint32_t ui32Cmd, const char *pcData,
uint32_t ui32DataLen)
{
DEBUG_PRINT("\n");
uint8_t ui8CheckSum = (uint8_t)ui32Cmd;
for (uint32_t i = 0; i < ui32DataLen; i++)
{
ui8CheckSum += pcData[i];
}
return ui8CheckSum;
}
//-----------------------------------------------------------------------------
/** \brief This function sets the SBL status and the SBL error string.
*
* \param[in] ui32Status
* The new SBL status. SBL_SUCCESS, SBL_ERROR, ...
* \param[in] pcFormat
* 'printf' like format string.
* \param[in] ...
* Input variables to the \e pcFormat string.
*
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDevice::setState(const uint32_t &ui32Status, char *pcFormat, ...)
{
DEBUG_PRINT("\n");
va_list args;
char text[2048];
m_lastSblStatus = ui32Status;
// Attempt to do a sanity check. Not possible to say how long
// the formatted text will be, but if we reserve half the space for
// formatted arguments it should be sufficient.
if (strlen(pcFormat) > 2048 / 2) {
return SBL_ERROR;
}
va_start(args, pcFormat);
#if 0
vsprintf_s(text, pcFormat, args);
#else
vsprintf(text, pcFormat, args);
#endif
sm_csLastError = text;
va_end(args);
if (SblDevice::sm_pStatusFunction != NULL)
{
bool error = (m_lastSblStatus == SBL_SUCCESS) ? false : true;
sm_pStatusFunction((char *)sm_csLastError.c_str(), error);
}
return SBL_SUCCESS;
}
//-----------------------------------------------------------------------------
/** \brief Utility function for converting 4 elements in char array into
* 32 bit variable. Data are converted MSB, that is. \e pcSrc[0] is the
* most significant byte.
*
* \param pcSrc[in]
* A pointer to the source array.
*
* \return
* Returns the 32 bit variable.
*/
//-----------------------------------------------------------------------------
/*static */uint32_t
SblDevice::charArrayToUL(const char *pcSrc)
{
DEBUG_PRINT("\n");
uint32_t ui32Val = (unsigned char)pcSrc[3];
ui32Val += (((unsigned long)pcSrc[2]) & 0xFF) << 8;
ui32Val += (((unsigned long)pcSrc[1]) & 0xFF) << 16;
ui32Val += (((unsigned long)pcSrc[0]) & 0xFF) << 24;
return (ui32Val);
}
//-----------------------------------------------------------------------------
/** \brief Utility function for splitting 32 bit variable into char array
* (4 elements). Data are converted MSB, that is, \e pcDst[0] is the
* most significant byte.
*
* \param[in] ui32Src
* The 32 bit variable to convert.
*
* \param[out] pcDst
* Pointer to the char array where the data will be stored.
*
* \return
* void
*/
//-----------------------------------------------------------------------------
/*static */void
SblDevice::ulToCharArray(const uint32_t ui32Src, char *pcDst)
{
DEBUG_PRINT("\n");
// MSB first
pcDst[0] = (uint8_t)(ui32Src >> 24);
pcDst[1] = (uint8_t)(ui32Src >> 16);
pcDst[2] = (uint8_t)(ui32Src >> 8);
pcDst[3] = (uint8_t)(ui32Src >> 0);
}
//-----------------------------------------------------------------------------
/** \brief Utility function for swapping the byte order of a 4B char array.
*
* \param[in|out] pcArray
* The char array to byte swap.
*
* \return
* void
*/
//-----------------------------------------------------------------------------
/*static */void
SblDevice::byteSwap(char *pcArray)
{
DEBUG_PRINT("\n");
uint8_t tmp[2] = { (uint8_t)pcArray[0], (uint8_t)pcArray[1] };
pcArray[0] = pcArray[3];
pcArray[1] = pcArray[2];
pcArray[2] = tmp[1];
pcArray[3] = tmp[0];
}
//-----------------------------------------------------------------------------
/** \brief This functions sets the SBL progress.
*
* \param[in] ui32Progress
* The current progress, typically in percent [0-100].
*
* \return
* void
*/
//-----------------------------------------------------------------------------
/*static*/uint32_t
SblDevice::setProgress(uint32_t ui32Progress)
{
DEBUG_PRINT("\n");
if (sm_pProgressFunction)
{
sm_pProgressFunction(ui32Progress);
}
sm_progress = ui32Progress;
return SBL_SUCCESS;
}

View File

@@ -0,0 +1,143 @@
#ifndef __SBL_DEVICE_H__
#define __SBL_DEVICE_H__
/******************************************************************************
* Filename: sbl_device.h
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader device header file.
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include "serialib.h"
//
// Typedefs for callback functions to report status and progress to application
//
typedef void (*tStatusFPTR)(char *pcText, bool bError);
typedef void (*tProgressFPTR)(uint32_t ui32Value);
class SblDevice
{
public:
// Constructor
~SblDevice();
// Static functions
static SblDevice *Create(uint32_t ui32ChipType);
virtual uint32_t connect(std::string csPortNum, uint32_t ui32BaudRate, bool bEnableXosc = false);
virtual uint32_t ping() = 0;
virtual uint32_t readStatus(uint32_t *pui32Status) = 0;
virtual uint32_t readDeviceId(uint32_t *pui32DeviceId) = 0;
virtual uint32_t readFlashSize(uint32_t *pui32FlashSize) = 0;
virtual uint32_t readRamSize(uint32_t *pui32RamSize) = 0;
virtual uint32_t run(uint32_t ui32Address) { (void)ui32Address; return SBL_UNSUPPORTED_FUNCTION; };
virtual uint32_t reset() = 0;
virtual uint32_t eraseFlashRange(uint32_t ui32StartAddress, uint32_t ui32ByteCount) { (void)ui32StartAddress; (void)ui32ByteCount; return 0; };
virtual uint32_t writeFlashRange(uint32_t ui32StartAddress, uint32_t ui32ByteCount, const char *pcData) { (void)ui32StartAddress; (void)ui32ByteCount; (void)pcData; return 0; };
virtual uint32_t readMemory32(uint32_t ui32StartAddress, uint32_t ui32UnitCount, uint32_t *pui32Data) = 0;
virtual uint32_t readMemory8(uint32_t ui32StartAddress, uint32_t ui32UnitCount, char *pcData) = 0;
virtual uint32_t writeMemory32(uint32_t ui32StartAddress, uint32_t ui32UnitCount, const uint32_t *pui32Data) = 0;
virtual uint32_t writeMemory8(uint32_t ui32StartAddress, uint32_t ui32UnitCount, const char *pcData) = 0;
virtual uint32_t calculateCrc32(uint32_t ui32StartAddress, uint32_t ui32ByteCount, uint32_t *pui32Crc) = 0;
// CC2650 specific
virtual uint32_t eraseFlashBank(){ return SBL_UNSUPPORTED_FUNCTION; };
virtual uint32_t setCCFG(uint32_t ui32Field, uint32_t ui32FieldValue) { (void)ui32Field; (void)ui32FieldValue; return SBL_UNSUPPORTED_FUNCTION; };
// CC2538 specific
virtual uint32_t setXosc() { return SBL_UNSUPPORTED_FUNCTION; };
// Utility functions
bool isConnected();
uint32_t getDeviceId() { return m_deviceId; }
uint32_t getFlashSize() { return m_flashSize; }
uint32_t getRamSize() { return m_ramSize; }
uint32_t getBaudRate() { return m_baudRate; }
uint32_t getLastStatus() {return m_lastSblStatus; }
uint32_t getLastDeviceStatus() { return m_lastDeviceStatus; }
uint32_t getPageEraseSize() { return m_pageEraseSize; }
static std::string &getLastError(void) { return sm_csLastError;}
static uint32_t getProgress() { return sm_progress; }
static uint32_t setProgress(uint32_t ui32Progress);
static void setCallBackStatusFunction(tStatusFPTR pSf) {sm_pStatusFunction = pSf; }
static void setCallBackProgressFunction(tProgressFPTR pPf) {sm_pProgressFunction = pPf; }
protected:
// Constructor
SblDevice();
virtual uint32_t initCommunication(bool bSetXosc) = 0;
virtual uint32_t sendCmd(uint32_t ui32Cmd, const char *pcSendData = NULL, uint32_t ui32SendLen = 0) = 0;
virtual uint32_t sendAutoBaud(bool &bBaudSetOk);
virtual uint32_t getCmdResponse(bool &bAck, uint32_t ui32MaxRetries = SBL_DEFAULT_RETRY_COUNT, bool bQuiet = false);
virtual uint32_t sendCmdResponse(bool bAck);
virtual uint32_t getResponseData(char *pcData, uint32_t &ui32MaxLen, uint32_t ui32MaxRetries = SBL_DEFAULT_RETRY_COUNT);
virtual uint8_t generateCheckSum(uint32_t ui32Cmd, const char *pcData, uint32_t ui32DataLen);
virtual uint32_t addressToPage(uint32_t ui32Address) = 0;
virtual bool addressInRam(uint32_t ui32StartAddress, uint32_t ui32ByteCount = 1) = 0;
virtual bool addressInFlash(uint32_t ui32StartAddress, uint32_t ui32ByteCount = 1) = 0;
virtual uint32_t getBootloaderEnableAddress() = 0;
uint32_t setState(const uint32_t &ui32Status) { m_lastSblStatus = ui32Status; return m_lastSblStatus;}
uint32_t setState(const uint32_t &ui32Status, char *pcFormat, ...);
// Utility
static uint32_t charArrayToUL(const char *pcSrc);
static void ulToCharArray(const uint32_t ui32Src, char *pcDst);
static void byteSwap(char *pcArray);
serialib *m_pCom;
std::string m_csComPort;
bool m_bCommInitialized;
uint32_t m_baudRate;
static uint32_t sm_chipType;
uint32_t m_deviceId;
uint32_t m_flashSize;
uint32_t m_ramSize;
uint32_t m_pageEraseSize;
// Status and progress variables
int32_t m_lastDeviceStatus;
int32_t m_lastSblStatus;
static uint32_t sm_progress;
static std::string sm_csLastError;
static tProgressFPTR sm_pProgressFunction;
static tStatusFPTR sm_pStatusFunction;
private:
};
#endif // __SBL_DEVICE_H__

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,126 @@
#ifndef __SBL_DEVICE_CC2538_H__
#define __SBL_DEVICE_CC2538_H__
/******************************************************************************
* Filename: sbl_device_cc2538.h
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader for CC2538 header file.
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <sbl_device.h>
//
// For more information about the CC2538 serial bootloader interface,
// please refer to the CC2538 ROM User's guide (http://www.ti.com/lit/swru333)
//
#define SBL_CC2538_PAGE_ERASE_SIZE 2048
#define SBL_CC2538_FLASH_START_ADDRESS 0x00200000
#define SBL_CC2538_RAM_START_ADDRESS 0x20000000
#define SBL_CC2538_ACCESS_WIDTH_4B 4
#define SBL_CC2538_ACCESS_WIDTH_1B 1
#define SBL_CC2538_PAGE_ERASE_TIME_MS 20
#define SBL_CC2538_MAX_BYTES_PER_TRANSFER 252
#define SBL_CC2538_DIECFG0 0x400D3014
#define SBL_CC2538_BL_CONFIG_PAGE_OFFSET 2007
#define SBL_CC2538_BL_CONFIG_ENABLED_BM 0x10
class SblDeviceCC2538 : public SblDevice
{
public:
SblDeviceCC2538(); // Constructor
~SblDeviceCC2538(); // Destructor
enum {
CMD_PING = 0x20,
CMD_DOWNLOAD = 0x21,
CMD_RUN = 0x22,
CMD_GET_STATUS = 0x23,
CMD_SEND_DATA = 0x24,
CMD_RESET = 0x25,
CMD_ERASE = 0x26,
CMD_CRC32 = 0x27,
CMD_GET_CHIP_ID = 0x28,
CMD_SET_XOSC = 0x29,
CMD_MEMORY_READ = 0x2A,
CMD_MEMORY_WRITE = 0x2B,
};
enum {
CMD_RET_SUCCESS = 0x40,
CMD_RET_UNKNOWN_CMD = 0x41,
CMD_RET_INVALID_CMD = 0x42,
CMD_RET_INVALID_ADR = 0x43,
CMD_RET_FLASH_FAIL = 0x44,
};
protected:
// Virtual functions from SblDevice
uint32_t ping();
uint32_t readStatus(uint32_t *pui32Status);
uint32_t readDeviceId(uint32_t *pui32DeviceId);
uint32_t readFlashSize(uint32_t *pui32FlashSize);
uint32_t readRamSize(uint32_t *pui32RamSize);
uint32_t run(uint32_t ui32Address);
uint32_t reset();
uint32_t eraseFlashRange(uint32_t ui32StartAddress, uint32_t ui32ByteCount);
uint32_t writeFlashRange(uint32_t ui32StartAddress, uint32_t ui32ByteCount, const char *pcData);
uint32_t readMemory32(uint32_t ui32StartAddress, uint32_t ui32UnitCount, uint32_t *pui32Data);
uint32_t readMemory8(uint32_t ui32StartAddress, uint32_t ui32UnitCount, char *pcData);
uint32_t writeMemory32(uint32_t ui32StartAddress, uint32_t ui32UnitCount, const uint32_t *pui32Data);
uint32_t writeMemory8(uint32_t ui32StartAddress, uint32_t ui32UnitCount, const char *pcData);
uint32_t calculateCrc32(uint32_t ui32StartAddress, uint32_t ui32ByteCount, uint32_t *pui32Crc);
uint32_t sendCmd(uint32_t ui32Cmd, const char *pcSendData = NULL, uint32_t ui32SendLen = 0);
uint32_t addressToPage(uint32_t ui32Address);
bool addressInRam(uint32_t ui32StartAddress, uint32_t ui32ByteCount = 1);
bool addressInFlash(uint32_t ui32StartAddress, uint32_t ui32ByteCount = 1);
uint32_t setXosc();
private:
uint32_t initCommunication(bool bSetXosc);
uint32_t cmdDownload(uint32_t ui32Address, uint32_t ui32Size);
uint32_t cmdSendData(const char *pcData, uint32_t ui32ByteCount);
uint32_t getBootloaderEnableAddress();
std::string getCmdString(uint32_t ui32Cmd);
std::string getCmdStatusString(uint32_t ui32Status);
};
#endif // __SBL_DEVICE_CC2538_H__

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,153 @@
#ifndef __SBL_DEVICE_CC2650_H__
#define __SBL_DEVICE_CC2650_H__
/******************************************************************************
* Filename: sbl_device_cc2650.h
* Revised: $Date: 2013-07-26 09:53:42 +0200 (fr, 26 jul 2013) $
* Revision: $Revision: 26971 $
*
* Description: Serial Bootloader for CC2650 header file.
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <sbl_device.h>
#define SBL_CC2650_PAGE_ERASE_SIZE 4096
#define SBL_CC2650_FLASH_START_ADDRESS 0x00000000
#define SBL_CC2650_RAM_START_ADDRESS 0x20000000
#define SBL_CC2650_ACCESS_WIDTH_32B 1
#define SBL_CC2650_ACCESS_WIDTH_8B 0
#define SBL_CC2650_PAGE_ERASE_TIME_MS 20
#define SBL_CC2650_MAX_BYTES_PER_TRANSFER 252
#define SBL_CC2650_MAX_MEMWRITE_BYTES 247
#define SBL_CC2650_MAX_MEMWRITE_WORDS 61
#define SBL_CC2650_MAX_MEMREAD_BYTES 253
#define SBL_CC2650_MAX_MEMREAD_WORDS 63
#define SBL_CC2650_FLASH_SIZE_CFG 0x4003002C
#define SBL_CC2650_RAM_SIZE_CFG 0x40082250
#define SBL_CC2650_BL_CONFIG_PAGE_OFFSET 0xFDB
#define SBL_CC2650_BL_CONFIG_ENABLED_BM 0xC5
#define SBL_CC2650_BL_WORK_MEMORY_START 0x20000000
#define SBL_CC2650_BL_WORK_MEMORY_END 0x2000016F
#define SBL_CC2650_BL_STACK_MEMORY_START 0x20000FC0
#define SBL_CC2650_BL_STACK_MEMORY_END 0x20000FFF
class SblDeviceCC2650 : public SblDevice
{
public:
SblDeviceCC2650(); // Constructor
~SblDeviceCC2650(); // Destructor
enum {
CMD_PING = 0x20,
CMD_DOWNLOAD = 0x21,
CMD_GET_STATUS = 0x23,
CMD_SEND_DATA = 0x24,
CMD_RESET = 0x25,
CMD_SECTOR_ERASE = 0x26,
CMD_CRC32 = 0x27,
CMD_GET_CHIP_ID = 0x28,
CMD_MEMORY_READ = 0x2A,
CMD_MEMORY_WRITE = 0x2B,
CMD_BANK_ERASE = 0x2C,
CMD_SET_CCFG = 0x2D,
};
/* Early samples had different command IDs */
enum
{
REV1_CMD_BANK_ERASE = 0x2A,
REV1_CMD_SET_CCFG = 0x2B,
REV1_CMD_MEMORY_READ = 0x2C,
REV1_CMD_MEMORY_WRITE = 0x2D,
};
enum {
CMD_RET_SUCCESS = 0x40,
CMD_RET_UNKNOWN_CMD = 0x41,
CMD_RET_INVALID_CMD = 0x42,
CMD_RET_INVALID_ADR = 0x43,
CMD_RET_FLASH_FAIL = 0x44,
};
protected:
// Virtual functions from SblDevice
uint32_t ping();
uint32_t readStatus(uint32_t *pui32Status);
uint32_t readDeviceId(uint32_t *pui32DeviceId);
virtual uint32_t readFlashSize(uint32_t *pui32FlashSize);
virtual uint32_t readRamSize(uint32_t *pui32RamSize);
uint32_t reset();
uint32_t eraseFlashRange(uint32_t ui32StartAddress, uint32_t ui32ByteCount);
uint32_t writeFlashRange(uint32_t ui32StartAddress, uint32_t ui32ByteCount, const char *pcData);
uint32_t readMemory32(uint32_t ui32StartAddress, uint32_t ui32UnitCount, uint32_t *pui32Data);
uint32_t readMemory8(uint32_t ui32StartAddress, uint32_t ui32UnitCount, char *pcData);
uint32_t writeMemory32(uint32_t ui32StartAddress, uint32_t ui32UnitCount, const uint32_t *pui32Data);
uint32_t writeMemory8(uint32_t ui32StartAddress, uint32_t ui32UnitCount, const char *pcData);
uint32_t calculateCrc32(uint32_t ui32StartAddress, uint32_t ui32ByteCount, uint32_t *pui32Crc);
uint32_t sendCmd(uint32_t ui32Cmd, const char *pcSendData = NULL, uint32_t ui32SendLen = 0);
std::string getCmdString(uint32_t ui32Cmd);
uint32_t addressToPage(uint32_t ui32Address);
bool addressInRam(uint32_t ui32StartAddress, uint32_t ui32ByteCount = 1);
bool addressInFlash(uint32_t ui32StartAddress, uint32_t ui32ByteCount = 1);
uint32_t convertCmdForEarlySamples(uint32_t ui32Cmd);
virtual uint32_t getBootloaderEnableAddress();
// CC2650 specific
uint32_t eraseFlashBank();
uint32_t setCCFG(uint32_t ui32Field, uint32_t ui32FieldValue);
// Device revision. Used internally by SBL to handle early samples with different command IDs.
uint32_t m_deviceRev;
private:
uint32_t initCommunication(bool bSetXosc);
uint32_t cmdDownload(uint32_t ui32Address, uint32_t ui32Size);
uint32_t cmdSendData(const char *pcData, uint32_t ui32ByteCount);
std::string getCmdStatusString(uint32_t ui32Status);
bool addressInBLWorkMemory(uint32_t ui32StartAddr, uint32_t ui32ByteCount = 1);
};
#endif // __SBL_DEVICE_CC2650_H__

View File

@@ -0,0 +1,330 @@
/******************************************************************************
* Filename: sbl_device_cc2652.cpp
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader device file for CC13x2/CC26x2
*
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <sbllib.h>
#include "sbl_device.h"
#include "sbl_device_cc2652.h"
#include "serialib.h"
//-----------------------------------------------------------------------------
/** \brief Constructor
*/
//-----------------------------------------------------------------------------
SblDeviceCC2652::SblDeviceCC2652() : SblDeviceCC2650()
{
DEBUG_PRINT("\n");
m_pageEraseSize = SBL_CC2652_PAGE_ERASE_SIZE;
}
//-----------------------------------------------------------------------------
/** \brief Destructor
*/
//-----------------------------------------------------------------------------
SblDeviceCC2652::~SblDeviceCC2652()
{
DEBUG_PRINT("\n");
}
//-----------------------------------------------------------------------------
/** \brief This function reads device FLASH size in bytes.
*
* \param[out] pui32FlashSize
* Pointer to where FLASH size is stored.
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDeviceCC2652::readFlashSize(uint32_t *pui32FlashSize)
{
DEBUG_PRINT("\n");
uint32_t retCode = SBL_SUCCESS;
//
// Read CC2652 DIECFG0 (contains FLASH size information)
//
uint32_t addr = SBL_CC2652_FLASH_SIZE_CFG;
uint32_t value;
if ((retCode = readMemory32(addr, 1, &value)) != SBL_SUCCESS)
{
setState((tSblStatus)retCode, "Failed to read device FLASH size: %s", getLastError().c_str());
return retCode;
}
//
// Calculate flash size (The number of flash sectors are at bits [7:0])
//
value &= 0xFF;
*pui32FlashSize = value*SBL_CC2652_PAGE_ERASE_SIZE;
m_flashSize = *pui32FlashSize;
return SBL_SUCCESS;
}
//-----------------------------------------------------------------------------
/** \brief This function reads device RAM size in bytes.
*
* \param[out] pui32RamSize
* Pointer to where RAM size is stored.
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDeviceCC2652::readRamSize(uint32_t *pui32RamSize)
{
DEBUG_PRINT("\n");
int retCode = SBL_SUCCESS;
uint32_t addr = SBL_CC2652_RAM_SIZE_CFG;
uint32_t value;
if ((retCode = readMemory32(addr, 1, &value)) != SBL_SUCCESS)
{
setState(retCode, "Failed to read device RAM size: %s", getLastError().c_str());
return retCode;
}
uint32_t ramSizeInfo = (value & CHIP_SRAM_SIZE_INFO_M) >> CHIP_SRAM_SIZE_INFO_S;
m_ramSize = calculateRamSize(ramSizeInfo);
if (*pui32RamSize != NULL)
{
*pui32RamSize = m_ramSize;
}
return retCode;
}
//-----------------------------------------------------------------------------
/** \brief Calculate RAM size.
*
* \param[in] ramSizeInfo
* Register value for RAM size configuration (TOP:PRCM:RAMHWOPT).
* The argument is optional and the default value is 3 (RAM size 80 KB)
* \returns uint32_t
* Ram size
*/
//-----------------------------------------------------------------------------
uint32_t SblDeviceCC2652::calculateRamSize(uint32_t ramSizeInfo)
{
DEBUG_PRINT("\n");
uint32_t ramSize;
switch (ramSizeInfo)
{
case 0:
ramSize = (32 * 1024);
break;
case 1:
ramSize = (48 * 1024);
break;
case 2:
ramSize = (64 * 1024);
break;
case 3:
default:
ramSize = (80 * 1024);
break;
}
return ramSize;
}
//-----------------------------------------------------------------------------
/** \brief This function returns the FLASH address of the bootloader enable
* configuration.
*
* \return
* Returns true if the address/range is within the device RAM.
*/
//-----------------------------------------------------------------------------
uint32_t SblDeviceCC2652::getBootloaderEnableAddress()
{
DEBUG_PRINT("\n");
return SBL_CC2652_FLASH_START_ADDRESS + getFlashSize() - getPageEraseSize() + SBL_CC2652_BL_CONFIG_PAGE_OFFSET;
}
//-----------------------------------------------------------------------------
/** \brief This function returns a string with the device command name of
* \e ui32Cmd.
*
* \param[out] ui32Cmd
* The serial bootloader command.
* \return
* Returns std::string with name of device command.
*/
//-----------------------------------------------------------------------------
std::string
SblDeviceCC2652::getCmdString(uint32_t ui32Cmd)
{
DEBUG_PRINT("\n");
std::string cmd = SblDeviceCC2650::getCmdString(ui32Cmd);
if (cmd.find("Unknown") != std::string::npos)
{
switch (ui32Cmd)
{
case SblDeviceCC2652::CMD_DOWNLOAD_CRC: cmd = "CMD_DOWNLOAD_CRC"; break;
default: cmd = "Unknown command"; break;
}
}
return cmd;
}
//-----------------------------------------------------------------------------
/** \brief This function sends the CC2652 download CRC command and handles the
* device response.
*
* \param[in] ui32Address
* The start address in CC2652 flash.
* \param[in] ui32Size
* Number of bytes to be sent.
* \param[in] ui32Crc
* Total number of bytes to be programmed.
*
* \return
* Returns SBL_SUCCESS if command and response was successful.
*/
//-----------------------------------------------------------------------------
uint32_t SblDeviceCC2652::cmdDownloadCrc(uint32_t ui32Address, uint32_t ui32Size, uint32_t ui32Crc)
{
DEBUG_PRINT("\n");
int retCode = SBL_SUCCESS;
bool bSuccess = false;
//
// Check input arguments
//
if (!addressInFlash(ui32Address, ui32Size) &&
!addressInRam(ui32Address, ui32Size))
{
setState(SBL_ARGUMENT_ERROR, "Specified address range (0x%08X + %d bytes) is not in device FLASH nor RAM.\n", ui32Address, ui32Size);
return SBL_ARGUMENT_ERROR;
}
//
// Generate payload
// - 4B Program address
// - 4B Program data
// - 4B CRC
//
char pcPayload[12];
ulToCharArray(ui32Address, &pcPayload[0]);
ulToCharArray(ui32Size, &pcPayload[4]);
ulToCharArray(ui32Crc, &pcPayload[8]);
//
// Send command
//
if ((retCode = sendCmd(SblDeviceCC2652::CMD_DOWNLOAD_CRC, pcPayload, 12) != SBL_SUCCESS))
{
return retCode;
}
//
// Receive command response (ACK/NAK)
//
if ((retCode = getCmdResponse(bSuccess)) != SBL_SUCCESS)
{
return retCode;
}
//
// Return command response
//
return (bSuccess) ? SBL_SUCCESS : SBL_ERROR;
}
//-----------------------------------------------------------------------------
/** \brief Send command.
*
* \param[in] ui32Cmd
* The command to send.
* \param[in] pcSendData
* Pointer to the data to send with the command.
* \param[in] ui32SendLen
* The number of bytes to send from \e pcSendData.
* \return
* Returns SBL_SUCCESS, ...
*/
//-----------------------------------------------------------------------------
uint32_t
SblDeviceCC2652::sendCmd(uint32_t ui32Cmd, const char *pcSendData/* = NULL*/,
uint32_t ui32SendLen/* = 0*/)
{
DEBUG_PRINT("\n");
unsigned char pktLen = ui32SendLen + 3; // +3 => <1B Length>, <1B checksum>, <1B cmd>
std::vector<char> pvPkt((pktLen));
unsigned char pktSum = generateCheckSum(ui32Cmd, pcSendData, ui32SendLen);
//
// Build packet
//
pvPkt.at(0) = pktLen;
pvPkt.at(1) = pktSum;
pvPkt.at(2) = (unsigned char)ui32Cmd;
if (ui32SendLen)
{
memcpy(&pvPkt[3], pcSendData, ui32SendLen);
}
//
// Send packet
//
if (m_pCom->writeBytes(&pvPkt[0], pvPkt.size()) < 1)
{
setState(SBL_PORT_ERROR, "\nWriting to device failed (Command 0x%04x:'%s').\n", ui32Cmd,getCmdString(ui32Cmd).c_str());
return SBL_PORT_ERROR;
}
//
// Empty and deallocate vector
//
pvPkt.clear();
std::vector<char>().swap(pvPkt);
return SBL_SUCCESS;
}

View File

@@ -0,0 +1,77 @@
#ifndef __SBL_DEVICE_CC2652_H__
#define __SBL_DEVICE_CC2652_H__
/******************************************************************************
* Filename: sbl_device_cc2652.h
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader for CC13x2/CC26x2 header file.
*
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include "sbl_device_cc2650.h"
#define SBL_CC2652_PAGE_ERASE_SIZE 8192
#define SBL_CC2652_FLASH_SIZE_CFG 0x4003002C
#define SBL_CC2652_RAM_SIZE_CFG 0x40082250
#define SBL_CC2652_RAM_SIZE_CFG 0x40082250
#define SBL_CC2652_FLASH_START_ADDRESS SBL_CC2650_FLASH_START_ADDRESS
#define SBL_CC2652_BL_CONFIG_PAGE_OFFSET 0x1FDB
#define CHIP_SRAM_SIZE_INFO 0x40082250
#define CHIP_SRAM_SIZE_INFO_M 0x00000003
#define CHIP_SRAM_SIZE_INFO_S 0
class SblDeviceCC2652 : public SblDeviceCC2650
{
public:
SblDeviceCC2652(); // Constructor
~SblDeviceCC2652(); // Destructor
enum {
CMD_DOWNLOAD_CRC = 0x2F,
};
protected:
uint32_t readFlashSize(uint32_t *pui32FlashSize);
uint32_t readRamSize(uint32_t *pui32RamSize);
uint32_t calculateRamSize(uint32_t ramSizeInfo);
uint32_t getBootloaderEnableAddress();
private:
std::string getCmdString(uint32_t ui32Cmd);
uint32_t sendCmd(uint32_t ui32Cmd, const char *pcSendData = NULL, uint32_t ui32SendLen = 0);
uint32_t cmdDownloadCrc(uint32_t ui32Address, uint32_t ui32Size, uint32_t uiCrc);
};
#endif // __SBL_DEVICE_CC2652_H__

View File

@@ -0,0 +1,66 @@
#ifndef __SBL_EB_INFO_H__
#define __SBL_EB_INFO_H__
/******************************************************************************
* Filename: sbl_eb_info.h
* Revised: $Date: 2013-07-09 15:06:47 +0200 (Tue, 09 Jul 2013) $
* Revision: $Revision: 26800 $
*
* Description: Serial Bootloader EB info class header file.
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <string.h>
class SblEbInfo
{
public:
enum
{
DEVICE_NAME_SIZE = 15,
EB_PORT_SIZE = 16,
DESCRIPTION_SIZE = 256
};
char ebPort[EB_PORT_SIZE]; // E.g. COM42
char ebDescription[DESCRIPTION_SIZE];
char devName[DEVICE_NAME_SIZE]; // E.g. CC2538 for CC2650
SblEbInfo& operator = (const SblEbInfo& other) {
strncpy(ebPort, other.ebPort, EB_PORT_SIZE);
strncpy(ebDescription, other.ebDescription, DESCRIPTION_SIZE);
strncpy(devName, other.devName, DEVICE_NAME_SIZE);
return *this;
}
};
#endif // __SBL_EB_INFO_H__

View File

@@ -0,0 +1,39 @@
/******************************************************************************
* Filename: sbllib.cpp
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader Library main file.
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/

View File

@@ -0,0 +1,69 @@
#ifndef __SBLLIB_H__
#define __SBLLIB_H__
/******************************************************************************
* Filename: sbllib.h
* Revised: $Date$
* Revision: $Revision$
*
* Description: Serial Bootloader Library header file.
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <string>
#include <stdint.h>
#include "debug.h"
#define SBL_MAX_DEVICES 20
#define SBL_DEFAULT_RETRY_COUNT 1
#define SBL_DEFAULT_READ_TIMEOUT 100 // in ms
#define SBL_DEFAULT_WRITE_TIMEOUT 200 // in ms
typedef enum {
SBL_SUCCESS = 0,
SBL_ERROR,
SBL_ARGUMENT_ERROR,
SBL_TIMEOUT_ERROR,
SBL_PORT_ERROR,
SBL_ENUM_ERROR,
SBL_UNSUPPORTED_FUNCTION,
} tSblStatus;
#include "serialib.h"
#include "sbl_device.h"
#include "sbl_device_cc2538.h"
#include "sbl_device_cc2650.h"
#include "sbl_device_cc2652.h"
#include "sbl_eb_info.h"
#endif // __SBLLIB_H__

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,220 @@
/*!
\file serialib.h
\brief Header file of the class serialib. This class is used for communication over a serial device.
\author Philippe Lucidarme (University of Angers)
\version 2.0
\date december the 27th of 2019
This Serial library is used to communicate through serial port.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This is a licence-free software, it can be used by anyone who try to build a better world.
*/
#ifndef SERIALIB_H
#define SERIALIB_H
// Used for TimeOut operations
#include <sys/time.h>
// Include for windows
#if defined (_WIN32) || defined (_WIN64)
// Accessing to the serial port under Windows
#include <windows.h>
#endif
// Include for Linux
#ifdef __linux__
#include <stdlib.h>
#include <sys/types.h>
#include <sys/shm.h>
#include <termios.h>
#include <string.h>
#include <iostream>
// File control definitions
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <vector>
#endif
/*! To avoid unused parameters */
#define UNUSED(x) (void)(x)
/*! \class serialib
\brief This class is used for communication over a serial device.
*/
class serialib
{
public:
//_____________________________________
// ::: Constructors and destructors :::
// Constructor of the class
serialib ();
// Destructor
~serialib ();
//_________________________________________
// ::: Configuration and initialization :::
// Open a device
char openDevice (const char *Device,const unsigned int Bauds);
// Close the current device
void closeDevice();
//___________________________________________
// ::: Read/Write operation on characters :::
// Write a char
char writeChar (char);
// Read a char (with timeout)
char readChar (char *pByte,const unsigned int timeOut_ms=0);
//________________________________________
// ::: Read/Write operation on strings :::
// Write a string
char writeString (const char *String);
// Read a string (with timeout)
int readString ( char *receivedString,
char finalChar,
unsigned int maxNbBytes,
const unsigned int timeOut_ms=0);
// _____________________________________
// ::: Read/Write operation on bytes :::
// Write an array of bytes
int writeBytes (const void *Buffer, const unsigned int NbBytes);
// Read an array of byte (with timeout)
int readBytes (void *buffer,unsigned int maxNbBytes,const unsigned int timeOut_ms=100, unsigned int sleepDuration_us=100);
// _________________________
// ::: Special operation :::
// Empty the received buffer
char flushReceiver();
// Return the number of bytes in the received buffer
int available();
// _________________________
// ::: Access to IO bits :::
// Set CTR status (Data Terminal Ready, pin 4)
bool DTR(bool status);
bool setDTR();
bool clearDTR();
// Set RTS status (Request To Send, pin 7)
bool RTS(bool status);
bool setRTS();
bool clearRTS();
// Get RI status (Ring Indicator, pin 9)
bool isRI();
// Get DCD status (Data Carrier Detect, pin 1)
bool isDCD();
// Get CTS status (Clear To Send, pin 8)
bool isCTS();
// Get DSR status (Data Set Ready, pin 9)
bool isDSR();
// Get RTS status (Request To Send, pin 7)
bool isRTS();
// Get CTR status (Data Terminal Ready, pin 4)
bool isDTR();
private:
// Read a string (no timeout)
int readStringNoTimeOut (char *String,char FinalChar,unsigned int MaxNbBytes);
// Current DTR and RTS state (can't be read on WIndows)
bool currentStateRTS;
bool currentStateDTR;
#if defined (_WIN32) || defined( _WIN64)
// Handle on serial device
HANDLE hSerial;
// For setting serial port timeouts
COMMTIMEOUTS timeouts;
#endif
#ifdef __linux__
int fd;
#endif
};
/*! \class timeOut
\brief This class can manage a timer which is used as a timeout.
*/
// Class timeOut
class timeOut
{
public:
// Constructor
timeOut();
// Init the timer
void initTimer();
// Return the elapsed time since initialization
unsigned long int elapsedTime_ms();
private:
// Used to store the previous time (for computing timeout)
struct timeval previousTime;
};
#endif // serialib_H

View File

@@ -0,0 +1,162 @@
#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bluez
PKG_VERSION:=5.37
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
PKG_MD5SUM:=33177e5743e24b2b3738f72be64e3ffb
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/bluez/Default
TITLE:=Bluetooth
URL:=http://www.bluez.org/
endef
define Package/bluez-examples
$(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= python example apps
DEPENDS:=
endef
define Package/bluez-examples/description
contains many examples apps for bluetooth, requiring python
endef
define Package/bluez-libs
$(call Package/bluez/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
DEPENDS:=+libpthread +kmod-bluetooth
endef
define Package/bluez-utils
$(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utilities
DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
endef
define Package/bluez-daemon
$(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= daemon
DEPENDS:=+bluez-libs +bluez-utils +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
endef
define Package/bluez-daemon/conffiles
/etc/bluetooth/main.conf
/etc/bluetooth/network.conf
/etc/bluetooth/input.conf
/etc/bluetooth/proximity.conf
/etc/config/bluetooth
endef
CONFIGURE_ARGS += \
--enable-static \
--enable-shared \
--enable-client \
--enable-datafiles \
--enable-experimental \
--enable-library \
--enable-monitor \
--enable-obex \
--enable-threads \
--enable-tools \
--disable-android \
--disable-cups \
--disable-manpages \
--disable-sixaxis \
--disable-systemd \
--disable-test \
--disable-udev \
TARGET_CPPFLAGS += \
-D_GNU_SOURCE
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
endef
define Package/bluez-examples/install
$(INSTALL_DIR) $(1)/usr/bin/bluez
$(INSTALL_DATA) $(PKG_BUILD_DIR)/test/* $(1)/usr/bin/bluez/
endef
define Package/bluez-libs/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
endef
define Package/bluez-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
endef
define Package/bluez-daemon/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
$(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
$(INSTALL_DIR) $(1)/etc/bluetooth
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/proximity/proximity.conf $(1)/etc/bluetooth/proximity.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
$(INSTALL_BIN) ./files/bluez-bccmd.init $(1)/etc/init.d/bluez-bccmd
$(INSTALL_DIR) $(1)/etc/bluetooth
$(INSTALL_DATA) ./files/csr8x11-a12-bt4.2-patch.psr $(1)/etc/bluetooth/
$(INSTALL_DATA) ./files/csr8x11-coex.psr $(1)/etc/bluetooth/
endef
$(eval $(call BuildPackage,bluez-examples))
$(eval $(call BuildPackage,bluez-libs))
$(eval $(call BuildPackage,bluez-utils))
$(eval $(call BuildPackage,bluez-daemon))

View File

@@ -0,0 +1,15 @@
config bluetoothd
# option config /etc/bluetooth/main.conf
option enabled 1
config hciattach
option initspeed 115200
option tty ttyS1
option type csr
option speed 115200
option flow noflow
option enabled 0
config rfcomm
# option config /etc/bluetooth/rfcomm.conf
option enabled 0

View File

@@ -0,0 +1,37 @@
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
</policy>
<policy at_console="true">
<allow send_path="/"/>
<allow send_path="/org/bluez"/>
<allow send_destination="org.bluez.Manager"/>
<allow receive_sender="org.bluez.Manager"/>
<allow send_destination="org.bluez.Adapter"/>
<allow receive_sender="org.bluez.Adapter"/>
<allow send_destination="org.bluez.Device"/>
<allow receive_sender="org.bluez.Device"/>
<allow send_destination="org.bluez.Service"/>
<allow receive_sender="org.bluez.Service"/>
<allow send_destination="org.bluez.Database"/>
<allow receive_sender="org.bluez.Database"/>
<allow send_destination="org.bluez.Security"/>
<allow receive_sender="org.bluez.Security"/>
</policy>
</busconfig>

View File

@@ -0,0 +1,13 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
#start after dbus (60)
START=62
USE_PROCD=1
PROG=/usr/bin/bluetoothd
start_service() {
procd_open_instance
procd_set_param command "$PROG" -n
procd_close_instance
}

View File

@@ -0,0 +1,43 @@
#!/bin/sh /etc/rc.common
. /lib/ar71xx.sh
START=63
bt_up(){
hciconfig hci0 up
count=5
while [ $count -gt 0 ]
do
if hciconfig hci0 lestates >/dev/null; then
break;
fi
let count=$count-1
sleep 1
done
if [ $count -eq 0 ];then
echo "Failed to enable hci0" >> /tmp/log/bccmd
fi
}
bccmd_init_csr8x11() {
bt_up
bccmd -t hci -d hci0 psload /etc/bluetooth/csr8x11-a12-bt4.2-patch.psr
bccmd -t hci -d hci0 psload /etc/bluetooth/csr8x11-coex.psr
bccmd -t hci -d hci0 warmreset
bt_up
}
start() {
board_name=$(ar71xx_board_name)
case "$board_name" in
cus531mp3|\
cus531mp3-dual|\
cus531mp3-nand)
bccmd_init_csr8x11
;;
esac
}

View File

@@ -0,0 +1,50 @@
// explicit, PSKEY_HCI_LMP_LOCAL_VERSION (0x010d, 269), 1 words
&010d = 0808
// explicit, PSKEY_LMP_REMOTE_VERSION (0x010e, 270), 1 words
&010e = 0008
// patch_hardware_0, PSKEY_PATCH50 (0x212c, 8492), 56 words
&212c = 0000 f001 0617 0513 0118 ff2b ff0e 1a00 2818 009e 081b f100 8888 24f0 f925 f821 0a17 0184 0cf0 0117 0013 0009 02a4 fb25 fa21 f915 f811 fb55 fa61 09e0 ff84 10f0 0117 0013 0009 02a4 f935 f841 f925 f821 0f1b 0712 10a4 0494 0712 e151 0722 f915 f811 0018 ff2b ff0e f000 0518 00e2 5a79
// patch_hardware_1, PSKEY_PATCH51 (0x212d, 8493), 21 words
&212d = 0002 968a 0863 f925 f821 0757 0663 e099 02ec 05e0 f915 0727 f815 0627 0218 ff2b ff0e 9700 8d18 00e2 7e34
// patch_hardware_2, PSKEY_PATCH52 (0x212e, 8494), 16 words
&212e = 0002 0b5a 0100 7834 0040 0327 0223 f815 e311 0218 ff2b ff0e 0b00 5e18 00e2 59c1
// patch_hardware_3, PSKEY_PATCH53 (0x212f, 8495), 17 words
&212f = 0000 7315 0084 04f0 0800 0014 03e0 f800 1215 0b27 0018 ff2b ff0e 7300 1818 00e2 0549
// patch_hardware_4, PSKEY_PATCH54 (0x2130, 8496), 21 words
&2130 = 0001 53f8 0817 0e27 0c00 6384 07f0 0118 ff2b ff0e 5400 0918 00e2 0917 0118 ff2b ff0e 5400 fb18 00e2 91f6
// patch_hardware_5, PSKEY_PATCH55 (0x2131, 8497), 49 words
&2131 = 0002 c0d5 0423 05f4 031b 0012 0280 1df0 021b 0916 1000 00c4 1ef0 0916 03c4 1bf4 031b 0012 0280 17f4 0380 15f4 0480 13f4 0580 11f4 0680 0ff4 0b80 0df4 0d80 0bf4 019c fb00 6719 0d9e 0218 ff2b ff0e c200 8c18 00e2 0218 ff2b ff0e c100 de18 00e2 c5cf
// patch_hardware_6, PSKEY_PATCH56 (0x2132, 8498), 42 words
&2132 = 0003 243f f40b 0827 0923 e019 0916 01b4 0926 0318 ff2b ff0e 2400 4218 00e2 fa0b 3d14 0327 0114 0227 0014 0127 0027 081b 0816 0218 ff2b ff0e f700 fd18 009e e111 081b 0816 0218 ff2b ff0e 3300 ff18 009e fa0f 40f2
// patch_hardware_7, PSKEY_PATCH57 (0x2133, 8499), 23 words
&2133 = 0003 254e 02c0 0916 1000 00c4 02f4 02b0 0916 fec4 e1b1 0922 0816 0318 ff2b ff0e 2500 5218 8000 00c0 08f2 00e2 e402
// patch_hardware_8, PSKEY_PATCH58 (0x2134, 8500), 16 words
&2134 = 0003 21ca fa0b 0227 0323 e019 0916 01b4 0926 0318 ff2b ff0e 2200 cd18 00e2 22dc
// patch_hardware_9, PSKEY_PATCH59 (0x2135, 8501), 18 words
&2135 = 0000 55e2 09f4 0218 ff2b ff0e 2c00 a718 009e 0314 fc0f 0018 ff2b ff0e 5600 0118 00e2 a008
// patch_hardware_10, PSKEY_PATCH60 (0x2136, 8502), 30 words
&2136 = 0004 0d80 1aa4 0418 ff2b ff0e 1d00 ba18 009e 0184 0d2c 0013 8f00 89d0 0117 bf00 d6d4 0318 ff2b ff0e 2700 4218 009e 0418 ff2b ff0e 0e00 8418 00e2 6855
// patch_hardware_11, PSKEY_PATCH61 (0x2137, 8503), 22 words
&2137 = 0002 4da5 0118 ff2b ff0e 6200 c518 009e 031b 2b22 fcc4 2c26 0114 e700 f025 0218 ff2b ff0e 4e00 a818 00e2 8dfc
// patch_sched_get_or_peek_message, PSKEY_PATCH123 (0x220b, 8715), 49 words
&220b = fa0b 0717 0484 2cf0 0617 0690 e119 0c00 d438 041a 001a 022b 23f4 0116 0184 20f0 0216 0327 1df4 e119 0016 0784 19f0 e500 ab15 8000 0054 0100 c018 ff2b fe27 0317 ff0e fe9f e199 0cf4 7d00 f214 0127 0014 0027 0317 000e 019f 0014 021b 0226 fa0f 8392
// patch_spare1, PSKEY_PATCH155 (0x222b, 8747), 60 words
&222b = e70b 1627 a100 8514 0227 0214 0127 6b00 d814 0427 0214 0327 0417 fe27 0317 ff27 1613 0230 0814 0027 e415 0534 ff0e fe9f 0513 0009 01a4 e015 7fc4 7f84 1bf0 0617 1584 18f0 161b 0116 010e 029f e119 049a 11f4 0116 4184 0ef0 e500 ac11 8000 0050 0100 c014 ff27 fe23 0816 ff0e fe9f 0114 02e0 0014 e70f 4d65
// patch_spare2, PSKEY_PATCH156 (0x222c, 8748), 40 words
&222c = f40b 0927 2900 d414 0427 0314 0327 3500 ea14 0627 0314 0527 2900 9614 0827 0414 0727 0917 0110 070e 089f 0917 030e 049f 0617 fe27 0517 ff27 7f14 0027 1514 0127 2a14 0227 0114 0913 ff0e fe9f f40f 3478

View File

@@ -0,0 +1,38 @@
// Set the crystal frequency to 26MHz
&01fe = 6590
// PSKEY_COEX_SCHEME
// 7 = Use Unity-e.
&2480 = 0007
// Signal Configuration
// --------------------
// PSKEY_COEX_PIO_UNITY_3_BT_ACTIVE
// BT_ACTIVE (PIO=0, polarity=active high)
&2483 = 0000 0001
// PSKEY_COEX_PIO_UNITY_3_BT_STATUS
// BT_STATUS (PIO=5, polarity=active high)
&2484 = 0005 0001
// PSKEY_COEX_PIO_UNITY_3_WLAN_DENY
// WLAN_DENY (PIO=1, polarity=active high)
&2485 = 0001 0001
// Priority Configuration
// ----------------------
// PSKEY_coex_transaction_priority_table
&2488 = 0000 0000 0000 0000 0000 0001 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001
// PSKEY_COEX_BLE_TRANSACTION_PRIORITY_TABLE
&2493 = 0000 0000 0000 0000 0000 0000 0000 0000 0001 0001 0001 0000 0000 0000 0000 0001
// PSKEY_COEX_UNITY_EXPRESS_TIMINGS
// BT_ACTIVE lead time - 20 us
// BT_STATUS lead time - 12 us
&248a = 0014 000c
//Disable clock request on PIO2
&0246 = 0000

View File

@@ -0,0 +1,14 @@
#!/bin/sh
# Write bluetooth PIN number here:
pin=
if [ -z "$pin" ]; then
msg="Set bluetooth PIN in file $0"
logger -p user.err "$msg"
for i in /dev/pts/* ; do
[ -w $i ] && echo "$msg" > $i
done
else
echo "PIN:$pin"
fi

View File

@@ -0,0 +1,40 @@
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -101,20 +101,37 @@ int uart_speed(int s)
return B230400;
case 460800:
return B460800;
+/* FIX: Not all platform support this high serial speed
+ claudyus84 @gamil.com
+*/
+#ifdef B500000
case 500000:
return B500000;
+#endif
+#ifdef B576000
case 576000:
return B576000;
+#endif
+#ifdef B921600
case 921600:
return B921600;
+#endif
+#ifdef B1000000
case 1000000:
return B1000000;
+#endif
+#ifdef B1152000
case 1152000:
return B1152000;
+#endif
+#ifdef B1500000
case 1500000:
return B1500000;
+#endif
+#ifdef B2000000
case 2000000:
return B2000000;
+#endif
#ifdef B2500000
case 2500000:
return B2500000;

View File

@@ -0,0 +1,48 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -2441,7 +2441,7 @@ unit_tests = $(am__append_35) unit/test-
@CLIENT_TRUE@ monitor/uuid.h monitor/uuid.c
@CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@ \
-@CLIENT_TRUE@ -lreadline
+@CLIENT_TRUE@ -lreadline -lncurses
@MONITOR_TRUE@monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
@MONITOR_TRUE@ monitor/display.h monitor/display.c \
@@ -2691,13 +2691,13 @@ unit_tests = $(am__append_35) unit/test-
@READLINE_TRUE@ client/display.h
@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
-@READLINE_TRUE@ src/libshared-glib.la @GLIB_LIBS@ -lreadline
+@READLINE_TRUE@ src/libshared-glib.la @GLIB_LIBS@ -lreadline -lncurses
@READLINE_TRUE@tools_obex_client_tool_SOURCES = $(gobex_sources) $(btio_sources) \
@READLINE_TRUE@ tools/obex-client-tool.c
@READLINE_TRUE@tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
-@READLINE_TRUE@ @GLIB_LIBS@ -lreadline
+@READLINE_TRUE@ @GLIB_LIBS@ -lreadline -lncurses
@READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
@READLINE_TRUE@ tools/obex-server-tool.c
@@ -2707,17 +2707,17 @@ unit_tests = $(am__append_35) unit/test-
@READLINE_TRUE@ client/display.h client/display.c
@READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
-@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses
@READLINE_TRUE@tools_obexctl_SOURCES = tools/obexctl.c \
@READLINE_TRUE@ client/display.h client/display.c
@READLINE_TRUE@tools_obexctl_LDADD = gdbus/libgdbus-internal.la \
-@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses
@READLINE_TRUE@tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c
@READLINE_TRUE@tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la \
-@READLINE_TRUE@ -lreadline
+@READLINE_TRUE@ -lreadline -lncurses
@EXPERIMENTAL_TRUE@tools_gatt_service_SOURCES = tools/gatt-service.c
@EXPERIMENTAL_TRUE@tools_gatt_service_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ gdbus/libgdbus-internal.la

View File

@@ -0,0 +1,14 @@
--- a/profiles/audio/a2dp-codecs.h
+++ b/profiles/audio/a2dp-codecs.h
@@ -234,6 +234,11 @@ typedef struct {
uint8_t channel_mode:4;
} __attribute__ ((packed)) a2dp_aptx_t;
+typedef struct {
+ a2dp_vendor_codec_t info;
+ uint8_t unknown[2];
+} __attribute__ ((packed)) a2dp_ldac_t;
+
#else
#error "Unknown byte order"
#endif

View File

@@ -0,0 +1,14 @@
--- a/tools/bccmd.c
+++ b/tools/bccmd.c
@@ -48,7 +48,7 @@
#define CSR_STORES_PSF (0x0002)
#define CSR_STORES_PSROM (0x0004)
#define CSR_STORES_PSRAM (0x0008)
-#define CSR_STORES_DEFAULT (CSR_STORES_PSI | CSR_STORES_PSF)
+#define CSR_STORES_DEFAULT 0
#define CSR_TYPE_NULL 0
#define CSR_TYPE_COMPLEX 1
--
2.1.4

View File

@@ -0,0 +1,93 @@
diff --git a/tools/bccmd.c b/tools/bccmd.c
old mode 100644
new mode 100755
index 6bc28da..1605d1c
--- a/tools/bccmd.c
+++ b/tools/bccmd.c
@@ -636,6 +636,78 @@ static int opt_pskey(int argc, char *argv[], uint16_t *stores, int *reset, int *
return optind;
}
+int inline serialize_u32(uint8_t *array, uint32_t val32)
+{
+ if (NULL == array)
+ return -1;
+
+ array[0] = (val32 & 0xff0000) >> 16;
+ array[1] = val32 >> 24;
+ array[2] = val32 & 0xff;
+ array[3] = (val32 & 0xff00) >> 8;
+
+ return 0;
+}
+
+int inline deserialize_u32(uint8_t *array, uint32_t *pval32)
+{
+ if (NULL == array || NULL == pval32)
+ return -1;
+
+ *pval32 = (array[1]<<24)
+ | (array[0]<<16)
+ | (array[3]<<8)
+ | array[2];
+ return 0;
+}
+
+static int setpio32(int transport, uint32_t varID, uint32_t mask, uint32_t bits)
+{
+ uint8_t array[32];
+ uint8_t *ptr = NULL;
+ uint32_t result = 0;
+ int err;
+
+ memset(array, 0, sizeof(array));
+ ptr = array;
+
+ serialize_u32(ptr, mask);
+ ptr += 4;
+
+ serialize_u32(ptr, bits);
+
+ err = transport_write(transport, varID, array, 12);
+ if (err < 0)
+ return err;
+
+ deserialize_u32(&array[8], &result);
+ printf("result: 0x%x\n", result);
+
+ return 0;
+
+}
+
+
+static int cmd_pio32set(int transport, int argc, char *argv[])
+{
+ uint32_t varID;
+ uint32_t mask;
+ uint32_t bits;
+
+ argc--;
+ argv++;
+
+ if (3 != argc)
+ return -1;
+
+ varID = strtol(argv[0] + 2, NULL, 16);
+ mask = strtol(argv[1] + 2, NULL, 16);
+ bits = strtol(argv[2] + 2, NULL, 16);
+
+ return setpio32(transport, varID, mask, bits);
+}
+
+
#define OPT_PSKEY(min, max, stores, reset, help) \
opt_pskey(argc, argv, (stores), (reset), (help)); \
argc -= optind; argv += optind; optind = 0; \
@@ -1112,6 +1184,7 @@ static struct {
{ "psread", cmd_psread, NULL, "Read all PS keys" },
{ "psload", cmd_psload, "<file>", "Load all PS keys from PSR file" },
{ "pscheck", cmd_pscheck, "<file>", "Check PSR file" },
+ { "pio32set", cmd_pio32set, "<VarID> <mask> <bits>","Set value for PIO32 register" },
{ "adc", cmd_adc, "<mux>", "Read ADC value of <mux> input" },
{ NULL }
};

View File

@@ -0,0 +1,50 @@
diff --git a/tools/bccmd.c b/tools/bccmd.c
index 1605d1c..5655bb5 100755
--- a/tools/bccmd.c
+++ b/tools/bccmd.c
@@ -555,6 +555,37 @@ static int cmd_radiotest(int transport, int argc, char *argv[])
return transport_write(transport, CSR_VARID_RADIOTEST, array, 8);
}
+static int cmd_fullradiotest(int transport, int argc, char *argv[])
+{
+ uint8_t array[8];
+ uint16_t testID;
+ uint16_t word1;
+ uint16_t word2;
+ uint16_t word3;
+
+ OPT_HELP(4, NULL);
+
+ testID = atoi(argv[0]);
+ word1 = atoi(argv[1]);
+ word2 = atoi(argv[2]);
+ word3 = atoi(argv[3]);
+
+ printf("TestID %u, word1 %u, word2 %u, word3 %u\n",
+ testID, word1, word2, word3);
+
+ memset(array, 0, sizeof(array));
+ array[0] = testID & 0xff;
+ array[1] = testID >> 8;
+ array[2] = word1 & 0xff;
+ array[3] = word1 >> 8;
+ array[4] = word2 & 0xff;
+ array[5] = word2 >> 8;
+ array[6] = word3 & 0xff;
+ array[7] = word3 >> 8;
+
+ return transport_write(transport, CSR_VARID_RADIOTEST, array, 8);
+}
+
static int cmd_memtypes(int transport, int argc, char *argv[])
{
uint8_t array[8];
@@ -1176,6 +1207,7 @@ static struct {
{ "hoppingon", cmd_hoppingon, "", "Revert to channel hopping" },
{ "rttxdata1", cmd_rttxdata1, "<freq> <level>", "TXData1 radio test" },
{ "radiotest", cmd_radiotest, "<freq> <level> <id>", "Run radio tests" },
+ { "fullradiotest", cmd_fullradiotest,"<id> <w1> <w2> <w3>", "Run full radio tests" },
{ "memtypes", cmd_memtypes, NULL, "Get memory types" },
{ "psget", cmd_psget, "<key>", "Get value for PS key" },
{ "psset", cmd_psset, "<key> <value>", "Set value for PS key" },

View File

@@ -0,0 +1,29 @@
Index: bluez-5.37/profiles/input/hog.c
===================================================================
--- bluez-5.37.orig/profiles/input/hog.c
+++ bluez-5.37/profiles/input/hog.c
@@ -107,8 +107,13 @@ static struct hog_device *hog_device_new
product, version);
dev = new0(struct hog_device, 1);
- dev->device = btd_device_ref(device);
dev->hog = bt_hog_new_default(name, vendor, product, version, prim);
+ if (!dev->hog) {
+ free(dev);
+ return NULL;
+ }
+
+ dev->device = btd_device_ref(device);
/*
* TODO: Remove attio callback and use .accept once using
@@ -189,6 +194,9 @@ static int hog_probe(struct btd_service
continue;
dev = hog_device_new(device, prim);
+ if (!dev)
+ break;
+
btd_service_set_user_data(service, dev);
return 0;
}

View File

@@ -0,0 +1,29 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=csr8811
PKG_RELEASE:=1
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
include $(INCLUDE_DIR)/package.mk
define Package/csr8811
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TIP CSR8811 support package
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Compile/Default
endef
Build/Compile = $(Build/Compile/Default)
define Package/csr8811/install
$(CP) ./files/* $(1)
endef
$(eval $(call BuildPackage,csr8811))

View File

@@ -0,0 +1,9 @@
#!/bin/sh /etc/rc.common
START=80
boot() {
bccmd -t bcsp -b 115200 -d /dev/ttyMSM1 psload -r /lib/firmware/CSR8811/pb-207-csr8x11-rev8.psr
sleep 1
hciattach -s 115200 /dev/ttyMSM1 any 115200
}

View File

@@ -0,0 +1,320 @@
// =============================================================================
//
// Copyright (c) 2015 - 2017 Qualcomm Technologies International, Ltd.
// All Rights Reserved.
// Qualcomm Technologies International, Ltd. Confidential and Proprietary.
// report this in case of problems:
// $Revision: #8 $
// Built Mon Feb 20 11:33:32 2017 GMT
// Checked-in $DateTime: 2017/02/20 11:36:26 $
// $File: //depot/bc/gemini-a12/dev/patches/10520/pb-207.psr $
//
// Patch is for build 10520 gem_5hci_rom_bt4.1_gemA12_1407301204_dspm_encr128
//
// Issues patched: B-158094, B-169261, B-171616, B-174351, B-176411,
// B-179448, B-180762, B-184008, B-206751, B-208678,
// B-216310, B-220605, B-223811
//
// Documentation from pb-207.pb
// ----------------------------
//
// General purpose patch and PSKEY bundle for CSR8811
// and CSR8311 A12 BT4.2 (build ID 10520).
//
// Documentation from pb-173-common.pb
// -----------------------------------
//
// General patch bundle for Gemini-A12 (build ID 10520)
// Patches and keys in here should be common to all
// package variants.
//
// Documentation from report_bt4p2.pb
// ----------------------------------
//
// Issues patched: B-174351
//
// Report BT version 4.2
//
// Documentation from patch_ulp_adv_avg_to_calc.xap
// ------------------------------------------------
//
// Issues patched: B-171616
//
// BlueCore can be configured through BCCMDVARID_BLE_CONFIG_ADV_RSSI_AVG_PARAM
// to report the advertising rssi average through LE ADVERTISING REPORT to the
// host for a given PEER LE device.
// For more information, See CS-317256-AN.
//
// If the BlueCore is unable to receive a LE ADVERTISING REPORT from the PEER
// before a configured average rssi supervision timeout, then the BlueCore
// should send a LE ADVERTISING REPORT with rssi value equal to -127 conveying
// that the PEER is out of the range; however, it fails to do this.
//
// Documentation from patch_ble_scan_deaf.xap
// ------------------------------------------
//
// Issues patched: B-158094
//
// When BlueCore is asked to do BLE scanning, it scans for a window
// approximately 2.5% shorter than asked for. Generally, this does
// not cause noticeable effects; sometimes BLE adverts can be missed
// making connection initialisation between two BLE devices take
// somewhat longer than expected. In pathological cases, especially
// if the scan window is long, connections may fail to be made entirely.
//
// Documentation from patch_usb_suspend_deep_sleep.xap
// ---------------------------------------------------
//
// Issues patched: B-176411
//
// When BlueCore device is bus powered and is in USB suspend mode,
// the current consumption is approximately 8 mA which is higher
// than the expected current of 250 uA
//
// Documentation from patch_tx_if_reduction.xap
// --------------------------------------------
//
// Issues patched: B-169261
//
// When a BlueCore7 device is configured to use a +/-500 kHz transmit IF, this
// can be overridden and a +/-375 kHz IF used instead. This reduces the
// bandwidthof the transmit spectrum providing a greater margin in a Chinese
// regulatory test.
// Only transmit IFs of +/-500 kHz may be reduced; if BlueCore7 is configured to
// use a TX IF of +/-1 MHz IF that will remain unchanged.
//
// Documentation from coex_shutdown.xap
// ------------------------------------
//
// Issues patched: B-208678
//
// With Coexistence Unity-3 scheme, If the WLAN_DENY signal is asserted during
// the initial phase of an adaptive frequency hopping(AFH) scan, the Bluecore
// device fails to deassert its BT_ACTIVE signal
//
// Documentation from patch_access_address.xap
// -------------------------------------------
//
// Issues patched: B-206751
//
// BlueCore devices may generate access addresses that only
// have one bit transition in the 6 most significant bits.
// The problem is seen on access addresses that have the most
// significant bit set to one and only have one bit transition
// in the 6 most significant bits.
//
// Furthermore, the access address, whilst not identical to the
// advertising channel packets Access Address, may differ by
// only one bit.
//
// Documentation from patch_sched_get_or_peek_message.c
// ----------------------------------------------------
//
// Issues patched: B-220605
//
// During the crossover of a locally initiated
// LMP_unsniff_req and peer initiated LMP_sniff_subrate_req,
// Bluecore responds with LMP_Sniff_Subrate_Rsp even if it
// has initiated LMP_unsniff. This probably confuses peer and
// peer stops responding, leading to a timeout.
//
// Documentation from patch_sched_get_or_peek_message_part2.c
// ----------------------------------------------------------
//
// Issues patched: B-220605
//
// During the crossover of a locally initiated
// LMP_unsniff_req and peer initiated LMP_sniff_subrate_req,
// Bluecore responds with LMP_Sniff_Subrate_Rsp even if it
// has initiated LMP_unsniff. This probably confuses peer and
// peer stops responding, leading to a timeout.
//
// Documentation from patch_ble_advt_restart.xap
// ---------------------------------------------
//
// Issues patched: B-223811
//
// When advertisements are disabled before the expiry of the interval
// and enabled immediately the advertisements are not sent before the
// expiry of the advertising interval
//
// Documentation from patch_whitelist_connection_status.xap
// --------------------------------------------------------
//
// Issues patched: B-180762
//
// If a BlueCore device attempts but fails to form a Low Energy (LE) connection
// to a remote slave using the whitelist, it will make no further attempts to
// initiate a connection to that slave until either the BlueCore is reset or the
// slave is removed and re-added to the whitelist.
//
// Documentation from patch_semp2.xap
// ----------------------------------
//
// Issues patched: B-184008
//
// If HCI_SET_EVENT_MASK_PAGE_2 command is sent with wrong parameters
// to Bluecore device, it returns error code
// 'INVALID_HCI_COMMAND_PARAMETERS'. It should return error code
// 'UNKNOWN_HCI_COMMAND'.
//
// Documentation from patch_disc_ll_pdu.xap
// ----------------------------------------
//
// Issues patched: B-179448
//
// If a BlueCore device in the Connection State (regardless if in master or
// slave role) receives an unexpected Data Channel PDU from the peer Link Layer
// during the encryption start or encryption pause procedure, it does not exit
// the Connection State and does not notify the Host with error code
// "Connection Terminated Due to MIC Failure (0x3d)".
//
// Documentation from patch_fsm_shared_patchpoint.c
// ------------------------------------------------
//
// Issues patched: B-216310
//
// In a particular scenario where the peer device retries a Role Switch
// (after a failed Role Switch) without EPR sequence, the Hydra/BlueCore
// Devices do not handle the user data Start/Stop operation properly.
// As a result the user data does not resume after the procedure is finished.
//
// Version information for input files
// -----------------------------------
//
// Created by patchmaker.pl Revision: #68 Date: 2016/01/18
//
// Input file: pb-207.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/pb-207.pb
// File revision: 4
//
// Input file: pb-173-common.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/pb-173-common.pb
// File revision: 7
//
// Input file: report_bt4p2.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/report_bt4p2.pb
// File revision: 1
//
// Input file: patch_ulp_adv_avg_to_calc.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ulp_adv_avg_to_calc.xap
// File revision: 4
//
// Input file: ../patch_utils.inc
// Depot file: //depot/bc/gemini-a12/dev/patches/patch_utils.inc
// File revision: 1
//
// Input file: patch_ble_scan_deaf.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ble_scan_deaf.xap
// File revision: 3
//
// Input file: patch_usb_suspend_deep_sleep.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_usb_suspend_deep_sleep.xap
// File revision: 3
//
// Input file: patch_tx_if_reduction.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_tx_if_reduction.xap
// File revision: 1
//
// Input file: coex_shutdown.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/coex_shutdown.xap
// File revision: 3
//
// Input file: patch_access_address.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_access_address.xap
// File revision: 2
//
// Input file: patch_sched_get_or_peek_message.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_sched_get_or_peek_message.c
// File revision: 3
//
// Input file: patch_sched_get_or_peek_message_part2.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_sched_get_or_peek_message_part2.c
// File revision: 2
//
// Input file: patch_ble_advt_restart.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ble_advt_restart.xap
// File revision: 2
//
// Input file: patch_whitelist_connection_status.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_whitelist_connection_status.xap
// File revision: 4
//
// Input file: patch_semp2.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_semp2.xap
// File revision: 3
//
// Input file: patch_disc_ll_pdu.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_disc_ll_pdu.xap
// File revision: 4
//
// Input file: patch_fsm_shared_patchpoint.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_fsm_shared_patchpoint.c
// File revision: 3
// explicit, PSKEY_HCI_LMP_LOCAL_VERSION (0x010d, 269), 1 words
&010d = 0808
// explicit, PSKEY_LMP_REMOTE_VERSION (0x010e, 270), 1 words
&010e = 0008
// patch_hardware_0, PSKEY_PATCH50 (0x212c, 8492), 56 words
&212c = 0000 f001 0617 0513 0118 ff2b ff0e 1a00 2818 009e 081b f100 8888 24f0 f925 f821 0a17 0184 0cf0 0117 0013 0009 02a4 fb25 fa21 f915 f811 fb55 fa61 09e0 ff84 10f0 0117 0013 0009 02a4 f935 f841 f925 f821 0f1b 0712 10a4 0494 0712 e151 0722 f915 f811 0018 ff2b ff0e f000 0518 00e2 5a79
// patch_hardware_1, PSKEY_PATCH51 (0x212d, 8493), 21 words
&212d = 0002 968a 0863 f925 f821 0757 0663 e099 02ec 05e0 f915 0727 f815 0627 0218 ff2b ff0e 9700 8d18 00e2 7e34
// patch_hardware_2, PSKEY_PATCH52 (0x212e, 8494), 16 words
&212e = 0002 0b5a 0100 7834 0040 0327 0223 f815 e311 0218 ff2b ff0e 0b00 5e18 00e2 59c1
// patch_hardware_3, PSKEY_PATCH53 (0x212f, 8495), 17 words
&212f = 0000 7315 0084 04f0 0800 0014 03e0 f800 1215 0b27 0018 ff2b ff0e 7300 1818 00e2 0549
// patch_hardware_4, PSKEY_PATCH54 (0x2130, 8496), 21 words
&2130 = 0001 53f8 0817 0e27 0c00 6384 07f0 0118 ff2b ff0e 5400 0918 00e2 0917 0118 ff2b ff0e 5400 fb18 00e2 91f6
// patch_hardware_5, PSKEY_PATCH55 (0x2131, 8497), 49 words
&2131 = 0002 c0d5 0423 05f4 031b 0012 0280 1df0 021b 0916 1000 00c4 1ef0 0916 03c4 1bf4 031b 0012 0280 17f4 0380 15f4 0480 13f4 0580 11f4 0680 0ff4 0b80 0df4 0d80 0bf4 019c fb00 6719 0d9e 0218 ff2b ff0e c200 8c18 00e2 0218 ff2b ff0e c100 de18 00e2 c5cf
// patch_hardware_6, PSKEY_PATCH56 (0x2132, 8498), 42 words
&2132 = 0003 243f f40b 0827 0923 e019 0916 01b4 0926 0318 ff2b ff0e 2400 4218 00e2 fa0b 3d14 0327 0114 0227 0014 0127 0027 081b 0816 0218 ff2b ff0e f700 fd18 009e e111 081b 0816 0218 ff2b ff0e 3300 ff18 009e fa0f 40f2
// patch_hardware_7, PSKEY_PATCH57 (0x2133, 8499), 23 words
&2133 = 0003 254e 02c0 0916 1000 00c4 02f4 02b0 0916 fec4 e1b1 0922 0816 0318 ff2b ff0e 2500 5218 8000 00c0 08f2 00e2 e402
// patch_hardware_8, PSKEY_PATCH58 (0x2134, 8500), 16 words
&2134 = 0003 21ca fa0b 0227 0323 e019 0916 01b4 0926 0318 ff2b ff0e 2200 cd18 00e2 22dc
// patch_hardware_9, PSKEY_PATCH59 (0x2135, 8501), 18 words
&2135 = 0000 55e2 09f4 0218 ff2b ff0e 2c00 a718 009e 0314 fc0f 0018 ff2b ff0e 5600 0118 00e2 a008
// patch_hardware_10, PSKEY_PATCH60 (0x2136, 8502), 30 words
&2136 = 0004 0d80 1aa4 0418 ff2b ff0e 1d00 ba18 009e 0184 0d2c 0013 8f00 89d0 0117 bf00 d6d4 0318 ff2b ff0e 2700 4218 009e 0418 ff2b ff0e 0e00 8418 00e2 6855
// patch_hardware_11, PSKEY_PATCH61 (0x2137, 8503), 22 words
&2137 = 0002 4da5 0118 ff2b ff0e 6200 c518 009e 031b 2b22 fcc4 2c26 0114 e700 f025 0218 ff2b ff0e 4e00 a818 00e2 8dfc
// patch_hardware_12, PSKEY_PATCH62 (0x2138, 8504), 19 words
&2138 = 0002 0f22 0310 081b 0100 8022 0100 b012 04f4 0114 e019 0426 0218 ff2b ff0e 0f00 2618 00e2 bc41
// patch_hardware_13, PSKEY_PATCH63 (0x2139, 8505), 12 words
&2139 = 0002 0d95 0513 0100 b022 0218 ff2b ff0e 0f00 db18 00e2 7a40
// patch_fsm_shared_patchpoint, PSKEY_PATCH121 (0x2209, 8713), 36 words
&2209 = fc0b 0b13 0717 1d00 c184 1df0 081b 0016 6384 05f0 1380 17f0 0114 13e0 6084 13f0 0100 da80 0df0 0d1b 5d9a 0af4 b900 f014 0127 0214 0027 e315 0010 000e 019f 0014 0d1b 5d26 fc0f a1a6
// patch_sched_get_or_peek_message, PSKEY_PATCH123 (0x220b, 8715), 49 words
&220b = fa0b 0717 0484 2cf0 0617 0690 e119 0c00 d438 041a 001a 022b 23f4 0116 0184 20f0 0216 0327 1df4 e119 0016 0784 19f0 e500 ab15 8000 0054 0100 c018 ff2b fe27 0317 ff0e fe9f e199 0cf4 7d00 f214 0127 0014 0027 0317 000e 019f 0014 021b 0226 fa0f 8392
// patch_spare1, PSKEY_PATCH155 (0x222b, 8747), 60 words
&222b = e70b 1627 a100 8514 0227 0214 0127 6b00 d814 0427 0214 0327 0417 fe27 0317 ff27 1613 0230 0814 0027 e415 0534 ff0e fe9f 0513 0009 01a4 e015 7fc4 7f84 1bf0 0617 1584 18f0 161b 0116 010e 029f e119 049a 11f4 0116 4184 0ef0 e500 ac11 8000 0050 0100 c014 ff27 fe23 0816 ff0e fe9f 0114 02e0 0014 e70f 4d65
// patch_spare2, PSKEY_PATCH156 (0x222c, 8748), 40 words
&222c = f40b 0927 2900 d414 0427 0314 0327 3500 ea14 0627 0314 0527 2900 9614 0827 0414 0727 0917 0110 070e 089f 0917 030e 049f 0617 fe27 0517 ff27 7f14 0027 1514 0127 2a14 0227 0114 0913 ff0e fe9f f40f 3478
&01fe = 6590
//Interface, BCSP
//&01f9 = 0001
//Interface, H4
&01f9 = 0003
//Bit rate for 8811, 115200
&01ea = 0001 c200

View File

@@ -0,0 +1,29 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nrf52840
PKG_RELEASE:=1
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
include $(INCLUDE_DIR)/package.mk
define Package/nrf52840
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TIP NRF52840 support package
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Compile/Default
endef
Build/Compile = $(Build/Compile/Default)
define Package/nrf52840/install
$(CP) ./files/* $(1)
endef
$(eval $(call BuildPackage,nrf52840))

View File

@@ -0,0 +1,19 @@
#!/bin/sh /etc/rc.common
START=80
boot() {
. /lib/functions/system.sh
case $(board_name) in
edgecore,eap102)
echo 54 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio54/direction
echo 0 > /sys/class/gpio/gpio54/value
echo 1 > /sys/class/gpio/gpio54/value
btmgmt --index 0 static-addr FF:02:03:04:05:FF
btmgmt --index 0 auto-power
hciconfig hci0 up
hcitool -i hci0 cmd 0x3f 0x006
;;
esac
}

View File

@@ -0,0 +1,320 @@
// =============================================================================
//
// Copyright (c) 2015 - 2017 Qualcomm Technologies International, Ltd.
// All Rights Reserved.
// Qualcomm Technologies International, Ltd. Confidential and Proprietary.
// report this in case of problems:
// $Revision: #8 $
// Built Mon Feb 20 11:33:32 2017 GMT
// Checked-in $DateTime: 2017/02/20 11:36:26 $
// $File: //depot/bc/gemini-a12/dev/patches/10520/pb-207.psr $
//
// Patch is for build 10520 gem_5hci_rom_bt4.1_gemA12_1407301204_dspm_encr128
//
// Issues patched: B-158094, B-169261, B-171616, B-174351, B-176411,
// B-179448, B-180762, B-184008, B-206751, B-208678,
// B-216310, B-220605, B-223811
//
// Documentation from pb-207.pb
// ----------------------------
//
// General purpose patch and PSKEY bundle for CSR8811
// and CSR8311 A12 BT4.2 (build ID 10520).
//
// Documentation from pb-173-common.pb
// -----------------------------------
//
// General patch bundle for Gemini-A12 (build ID 10520)
// Patches and keys in here should be common to all
// package variants.
//
// Documentation from report_bt4p2.pb
// ----------------------------------
//
// Issues patched: B-174351
//
// Report BT version 4.2
//
// Documentation from patch_ulp_adv_avg_to_calc.xap
// ------------------------------------------------
//
// Issues patched: B-171616
//
// BlueCore can be configured through BCCMDVARID_BLE_CONFIG_ADV_RSSI_AVG_PARAM
// to report the advertising rssi average through LE ADVERTISING REPORT to the
// host for a given PEER LE device.
// For more information, See CS-317256-AN.
//
// If the BlueCore is unable to receive a LE ADVERTISING REPORT from the PEER
// before a configured average rssi supervision timeout, then the BlueCore
// should send a LE ADVERTISING REPORT with rssi value equal to -127 conveying
// that the PEER is out of the range; however, it fails to do this.
//
// Documentation from patch_ble_scan_deaf.xap
// ------------------------------------------
//
// Issues patched: B-158094
//
// When BlueCore is asked to do BLE scanning, it scans for a window
// approximately 2.5% shorter than asked for. Generally, this does
// not cause noticeable effects; sometimes BLE adverts can be missed
// making connection initialisation between two BLE devices take
// somewhat longer than expected. In pathological cases, especially
// if the scan window is long, connections may fail to be made entirely.
//
// Documentation from patch_usb_suspend_deep_sleep.xap
// ---------------------------------------------------
//
// Issues patched: B-176411
//
// When BlueCore device is bus powered and is in USB suspend mode,
// the current consumption is approximately 8 mA which is higher
// than the expected current of 250 uA
//
// Documentation from patch_tx_if_reduction.xap
// --------------------------------------------
//
// Issues patched: B-169261
//
// When a BlueCore7 device is configured to use a +/-500 kHz transmit IF, this
// can be overridden and a +/-375 kHz IF used instead. This reduces the
// bandwidthof the transmit spectrum providing a greater margin in a Chinese
// regulatory test.
// Only transmit IFs of +/-500 kHz may be reduced; if BlueCore7 is configured to
// use a TX IF of +/-1 MHz IF that will remain unchanged.
//
// Documentation from coex_shutdown.xap
// ------------------------------------
//
// Issues patched: B-208678
//
// With Coexistence Unity-3 scheme, If the WLAN_DENY signal is asserted during
// the initial phase of an adaptive frequency hopping(AFH) scan, the Bluecore
// device fails to deassert its BT_ACTIVE signal
//
// Documentation from patch_access_address.xap
// -------------------------------------------
//
// Issues patched: B-206751
//
// BlueCore devices may generate access addresses that only
// have one bit transition in the 6 most significant bits.
// The problem is seen on access addresses that have the most
// significant bit set to one and only have one bit transition
// in the 6 most significant bits.
//
// Furthermore, the access address, whilst not identical to the
// advertising channel packets Access Address, may differ by
// only one bit.
//
// Documentation from patch_sched_get_or_peek_message.c
// ----------------------------------------------------
//
// Issues patched: B-220605
//
// During the crossover of a locally initiated
// LMP_unsniff_req and peer initiated LMP_sniff_subrate_req,
// Bluecore responds with LMP_Sniff_Subrate_Rsp even if it
// has initiated LMP_unsniff. This probably confuses peer and
// peer stops responding, leading to a timeout.
//
// Documentation from patch_sched_get_or_peek_message_part2.c
// ----------------------------------------------------------
//
// Issues patched: B-220605
//
// During the crossover of a locally initiated
// LMP_unsniff_req and peer initiated LMP_sniff_subrate_req,
// Bluecore responds with LMP_Sniff_Subrate_Rsp even if it
// has initiated LMP_unsniff. This probably confuses peer and
// peer stops responding, leading to a timeout.
//
// Documentation from patch_ble_advt_restart.xap
// ---------------------------------------------
//
// Issues patched: B-223811
//
// When advertisements are disabled before the expiry of the interval
// and enabled immediately the advertisements are not sent before the
// expiry of the advertising interval
//
// Documentation from patch_whitelist_connection_status.xap
// --------------------------------------------------------
//
// Issues patched: B-180762
//
// If a BlueCore device attempts but fails to form a Low Energy (LE) connection
// to a remote slave using the whitelist, it will make no further attempts to
// initiate a connection to that slave until either the BlueCore is reset or the
// slave is removed and re-added to the whitelist.
//
// Documentation from patch_semp2.xap
// ----------------------------------
//
// Issues patched: B-184008
//
// If HCI_SET_EVENT_MASK_PAGE_2 command is sent with wrong parameters
// to Bluecore device, it returns error code
// 'INVALID_HCI_COMMAND_PARAMETERS'. It should return error code
// 'UNKNOWN_HCI_COMMAND'.
//
// Documentation from patch_disc_ll_pdu.xap
// ----------------------------------------
//
// Issues patched: B-179448
//
// If a BlueCore device in the Connection State (regardless if in master or
// slave role) receives an unexpected Data Channel PDU from the peer Link Layer
// during the encryption start or encryption pause procedure, it does not exit
// the Connection State and does not notify the Host with error code
// "Connection Terminated Due to MIC Failure (0x3d)".
//
// Documentation from patch_fsm_shared_patchpoint.c
// ------------------------------------------------
//
// Issues patched: B-216310
//
// In a particular scenario where the peer device retries a Role Switch
// (after a failed Role Switch) without EPR sequence, the Hydra/BlueCore
// Devices do not handle the user data Start/Stop operation properly.
// As a result the user data does not resume after the procedure is finished.
//
// Version information for input files
// -----------------------------------
//
// Created by patchmaker.pl Revision: #68 Date: 2016/01/18
//
// Input file: pb-207.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/pb-207.pb
// File revision: 4
//
// Input file: pb-173-common.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/pb-173-common.pb
// File revision: 7
//
// Input file: report_bt4p2.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/report_bt4p2.pb
// File revision: 1
//
// Input file: patch_ulp_adv_avg_to_calc.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ulp_adv_avg_to_calc.xap
// File revision: 4
//
// Input file: ../patch_utils.inc
// Depot file: //depot/bc/gemini-a12/dev/patches/patch_utils.inc
// File revision: 1
//
// Input file: patch_ble_scan_deaf.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ble_scan_deaf.xap
// File revision: 3
//
// Input file: patch_usb_suspend_deep_sleep.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_usb_suspend_deep_sleep.xap
// File revision: 3
//
// Input file: patch_tx_if_reduction.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_tx_if_reduction.xap
// File revision: 1
//
// Input file: coex_shutdown.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/coex_shutdown.xap
// File revision: 3
//
// Input file: patch_access_address.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_access_address.xap
// File revision: 2
//
// Input file: patch_sched_get_or_peek_message.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_sched_get_or_peek_message.c
// File revision: 3
//
// Input file: patch_sched_get_or_peek_message_part2.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_sched_get_or_peek_message_part2.c
// File revision: 2
//
// Input file: patch_ble_advt_restart.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ble_advt_restart.xap
// File revision: 2
//
// Input file: patch_whitelist_connection_status.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_whitelist_connection_status.xap
// File revision: 4
//
// Input file: patch_semp2.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_semp2.xap
// File revision: 3
//
// Input file: patch_disc_ll_pdu.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_disc_ll_pdu.xap
// File revision: 4
//
// Input file: patch_fsm_shared_patchpoint.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_fsm_shared_patchpoint.c
// File revision: 3
// explicit, PSKEY_HCI_LMP_LOCAL_VERSION (0x010d, 269), 1 words
&010d = 0808
// explicit, PSKEY_LMP_REMOTE_VERSION (0x010e, 270), 1 words
&010e = 0008
// patch_hardware_0, PSKEY_PATCH50 (0x212c, 8492), 56 words
&212c = 0000 f001 0617 0513 0118 ff2b ff0e 1a00 2818 009e 081b f100 8888 24f0 f925 f821 0a17 0184 0cf0 0117 0013 0009 02a4 fb25 fa21 f915 f811 fb55 fa61 09e0 ff84 10f0 0117 0013 0009 02a4 f935 f841 f925 f821 0f1b 0712 10a4 0494 0712 e151 0722 f915 f811 0018 ff2b ff0e f000 0518 00e2 5a79
// patch_hardware_1, PSKEY_PATCH51 (0x212d, 8493), 21 words
&212d = 0002 968a 0863 f925 f821 0757 0663 e099 02ec 05e0 f915 0727 f815 0627 0218 ff2b ff0e 9700 8d18 00e2 7e34
// patch_hardware_2, PSKEY_PATCH52 (0x212e, 8494), 16 words
&212e = 0002 0b5a 0100 7834 0040 0327 0223 f815 e311 0218 ff2b ff0e 0b00 5e18 00e2 59c1
// patch_hardware_3, PSKEY_PATCH53 (0x212f, 8495), 17 words
&212f = 0000 7315 0084 04f0 0800 0014 03e0 f800 1215 0b27 0018 ff2b ff0e 7300 1818 00e2 0549
// patch_hardware_4, PSKEY_PATCH54 (0x2130, 8496), 21 words
&2130 = 0001 53f8 0817 0e27 0c00 6384 07f0 0118 ff2b ff0e 5400 0918 00e2 0917 0118 ff2b ff0e 5400 fb18 00e2 91f6
// patch_hardware_5, PSKEY_PATCH55 (0x2131, 8497), 49 words
&2131 = 0002 c0d5 0423 05f4 031b 0012 0280 1df0 021b 0916 1000 00c4 1ef0 0916 03c4 1bf4 031b 0012 0280 17f4 0380 15f4 0480 13f4 0580 11f4 0680 0ff4 0b80 0df4 0d80 0bf4 019c fb00 6719 0d9e 0218 ff2b ff0e c200 8c18 00e2 0218 ff2b ff0e c100 de18 00e2 c5cf
// patch_hardware_6, PSKEY_PATCH56 (0x2132, 8498), 42 words
&2132 = 0003 243f f40b 0827 0923 e019 0916 01b4 0926 0318 ff2b ff0e 2400 4218 00e2 fa0b 3d14 0327 0114 0227 0014 0127 0027 081b 0816 0218 ff2b ff0e f700 fd18 009e e111 081b 0816 0218 ff2b ff0e 3300 ff18 009e fa0f 40f2
// patch_hardware_7, PSKEY_PATCH57 (0x2133, 8499), 23 words
&2133 = 0003 254e 02c0 0916 1000 00c4 02f4 02b0 0916 fec4 e1b1 0922 0816 0318 ff2b ff0e 2500 5218 8000 00c0 08f2 00e2 e402
// patch_hardware_8, PSKEY_PATCH58 (0x2134, 8500), 16 words
&2134 = 0003 21ca fa0b 0227 0323 e019 0916 01b4 0926 0318 ff2b ff0e 2200 cd18 00e2 22dc
// patch_hardware_9, PSKEY_PATCH59 (0x2135, 8501), 18 words
&2135 = 0000 55e2 09f4 0218 ff2b ff0e 2c00 a718 009e 0314 fc0f 0018 ff2b ff0e 5600 0118 00e2 a008
// patch_hardware_10, PSKEY_PATCH60 (0x2136, 8502), 30 words
&2136 = 0004 0d80 1aa4 0418 ff2b ff0e 1d00 ba18 009e 0184 0d2c 0013 8f00 89d0 0117 bf00 d6d4 0318 ff2b ff0e 2700 4218 009e 0418 ff2b ff0e 0e00 8418 00e2 6855
// patch_hardware_11, PSKEY_PATCH61 (0x2137, 8503), 22 words
&2137 = 0002 4da5 0118 ff2b ff0e 6200 c518 009e 031b 2b22 fcc4 2c26 0114 e700 f025 0218 ff2b ff0e 4e00 a818 00e2 8dfc
// patch_hardware_12, PSKEY_PATCH62 (0x2138, 8504), 19 words
&2138 = 0002 0f22 0310 081b 0100 8022 0100 b012 04f4 0114 e019 0426 0218 ff2b ff0e 0f00 2618 00e2 bc41
// patch_hardware_13, PSKEY_PATCH63 (0x2139, 8505), 12 words
&2139 = 0002 0d95 0513 0100 b022 0218 ff2b ff0e 0f00 db18 00e2 7a40
// patch_fsm_shared_patchpoint, PSKEY_PATCH121 (0x2209, 8713), 36 words
&2209 = fc0b 0b13 0717 1d00 c184 1df0 081b 0016 6384 05f0 1380 17f0 0114 13e0 6084 13f0 0100 da80 0df0 0d1b 5d9a 0af4 b900 f014 0127 0214 0027 e315 0010 000e 019f 0014 0d1b 5d26 fc0f a1a6
// patch_sched_get_or_peek_message, PSKEY_PATCH123 (0x220b, 8715), 49 words
&220b = fa0b 0717 0484 2cf0 0617 0690 e119 0c00 d438 041a 001a 022b 23f4 0116 0184 20f0 0216 0327 1df4 e119 0016 0784 19f0 e500 ab15 8000 0054 0100 c018 ff2b fe27 0317 ff0e fe9f e199 0cf4 7d00 f214 0127 0014 0027 0317 000e 019f 0014 021b 0226 fa0f 8392
// patch_spare1, PSKEY_PATCH155 (0x222b, 8747), 60 words
&222b = e70b 1627 a100 8514 0227 0214 0127 6b00 d814 0427 0214 0327 0417 fe27 0317 ff27 1613 0230 0814 0027 e415 0534 ff0e fe9f 0513 0009 01a4 e015 7fc4 7f84 1bf0 0617 1584 18f0 161b 0116 010e 029f e119 049a 11f4 0116 4184 0ef0 e500 ac11 8000 0050 0100 c014 ff27 fe23 0816 ff0e fe9f 0114 02e0 0014 e70f 4d65
// patch_spare2, PSKEY_PATCH156 (0x222c, 8748), 40 words
&222c = f40b 0927 2900 d414 0427 0314 0327 3500 ea14 0627 0314 0527 2900 9614 0827 0414 0727 0917 0110 070e 089f 0917 030e 049f 0617 fe27 0517 ff27 7f14 0027 1514 0127 2a14 0227 0114 0913 ff0e fe9f f40f 3478
&01fe = 6590
//Interface, BCSP
//&01f9 = 0001
//Interface, H4
&01f9 = 0003
//Bit rate for 8811, 115200
&01ea = 0001 c200

View File

@@ -0,0 +1,23 @@
include $(TOPDIR)/rules.mk
ARCH:=arm
BOARD:=ipq807x
BOARDNAME:=Qualcomm Atheros AX
SUBTARGETS:=ipq807x ipq60xx ipq50xx
FEATURES:=squashfs ramdisk nand pcie usb
KERNELNAME:=Image dtbs
CPU_TYPE:=cortex-a7
KERNEL_PATCHVER:=4.4
KERNEL_NAME_SUFFIX=-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016
include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-ssdk swconfig \
kmod-qca-nss-drv \
kmod-usb-phy-ipq807x kmod-usb-dwc3-of-simple \
kmod-ath11k-ahb kmod-qrtr_mproc wpad \
kmod-gpio-button-hotplug \
qca-thermald-10.4 qca-ssdk-shell kmod-qca-nss-drv-bridge-mgr \
uboot-envtools
$(eval $(call BuildTarget))

View File

@@ -0,0 +1,50 @@
#!/bin/sh
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
sercomm,wallaby|\
wallys,dr6018|\
wallys,dr6018-v4|\
cig,wf188n|\
cig,wf194c|\
cig,wf194c4)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" "tx rx link"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
;;
edgecore,eap101)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "eth1"
ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "eth2"
ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
;;
edgecore,eap102)
ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
;;
edgecore,eap104)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy1tpt"
ucidef_set_led_netdev "wan" "wan" "yellow:uplink" "eth0"
;;
hfcl,ion4xi|\
hfcl,ion4xe)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
;;
glinet,ax1800|\
glinet,axt1800)
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" "tx rx link"
;;
esac
board_config_flush
exit 0

View File

@@ -0,0 +1,114 @@
#!/bin/sh
. /lib/functions.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
qcom_setup_interfaces()
{
local board="$1"
ucidef_add_switch "switch0"
ucidef_add_switch_attr "switch0" "enable" "false"
ucidef_add_switch_attr "switch0" "reset" "false"
case $board in
hfcl,ion4xi|\
hfcl,ion4xe)
ucidef_set_interface_wan "eth0 eth1"
ucidef_set_interface_lan ""
;;
cig,wf188|\
tplink,ex227|\
tplink,ex447)
ucidef_set_interface_wan "eth0"
ucidef_set_interface_lan ""
;;
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01)
ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4"
ucidef_set_interface_wan "eth5"
;;
cig,wf194c|\
cig,wf194c4|\
edgecore,eap106|\
qcom,ipq5018-mp03.3|\
yuncore,ax840|\
motorola,q14|\
sercomm,wallaby)
ucidef_set_interface_lan "eth0"
ucidef_set_interface_wan "eth1"
;;
edgecore,eap101|\
glinet,axt1800)
ucidef_set_interface_lan "eth1 eth2"
ucidef_set_interface_wan "eth0"
;;
edgecore,eap102|\
edgecore,eap104|\
wallys,dr6018|\
cig,wf188n|\
cig,wf196)
ucidef_set_interface_lan "eth1"
ucidef_set_interface_wan "eth0"
;;
qcom,ipq807x-hk14)
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
ucidef_set_interface_wan "eth4"
;;
wallys,dr6018-v4|\
glinet,ax1800)
ucidef_set_interface_lan "eth1 eth2 eth3 eth4"
ucidef_set_interface_wan "eth0"
;;
cybertan,eww622-a1|\
qcom,ipq5018-mp03.1)
ucidef_set_interface_lan "eth1"
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch1"
ucidef_add_switch_attr "switch1" "enable" "false"
ucidef_add_switch_attr "switch1" "reset" "true"
;;
esac
}
qcom_setup_macs()
{
local board="$1"
case $board in
cig,wf194c|\
cig,wf194c4|\
cig,wf196)
mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2)
wan_mac=$(macaddr_canonicalize $mac)
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth0 $lan_mac
ucidef_set_network_device_mac eth1 $wan_mac
ucidef_set_label_macaddr $wan_mac
;;
cybertan,eww622-a1)
mac=$(grep -i -m 1 mac_addr_base= /dev/`cat /proc/mtd | grep devinfo | cut -d: -f1` | cut -d= -f2)
[ -z "$mac"] && mac="00:11:22:33:44:55"
wan_mac=$(macaddr_canonicalize $mac)
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth0 $wan_mac
ucidef_set_network_device_mac eth1 $lan_mac
ucidef_set_label_macaddr $wan_mac
;;
*)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
[ -n "$wan_mac" ] && ucidef_set_label_macaddr "$wan_mac"
}
board_config_update
board=$(board_name)
qcom_setup_interfaces $board
qcom_setup_macs $board
board_config_flush
exit 0

View File

@@ -0,0 +1,17 @@
#!/bin/sh
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
edgecore,eap106)
ucidef_set_wifi_scanning 'soc/10000000.pci/pci0001:00/0001:00:00.0/0001:01:00.0'
;;
esac
board_config_flush
exit 0

View File

@@ -0,0 +1,172 @@
#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions.sh
. /lib/functions/system.sh
ath11k_generate_macs() {
touch /lib/firmware/ath11k-macs
eth=$(cat /sys/class/net/eth0/address)
mac1=$(macaddr_add $eth 2)
mac2=$(macaddr_add $eth 3)
mac3=$(macaddr_add $eth 4)
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
}
ath11k_generate_macs_eap101() {
touch /lib/firmware/ath11k-macs
eth=$(cat /sys/class/net/eth0/address)
mac1=$(macaddr_add $eth 4)
mac2=$(macaddr_add $eth 3)
mac3=$(macaddr_add $eth 5)
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
}
ath11k_generate_macs_wf194() {
touch /lib/firmware/ath11k-macs
mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2)
eth=$(macaddr_canonicalize $mac)
mac1=$(macaddr_add $eth 2)
mac2=$(macaddr_add $eth 3)
mac3=$(macaddr_add $eth 4)
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
}
ath11k_generate_macs_ion4x() {
touch /lib/firmware/ath11k-macs
wifimac0=$(grep WLAN0_BASEMAC= /dev/mtd15 |cut -d '=' -f2)
wifimac1=$(grep WLAN1_BASEMAC= /dev/mtd15 |cut -d '=' -f2)
wifimac2=00:00:00:00:00:00
echo -ne \\x${wifimac0//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${wifimac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${wifimac2//:/\\x} >> /lib/firmware/ath11k-macs
}
caldata_die() {
echo "caldata: " "$*"
exit 1
}
caldata_extract() {
local part=$1
local offset=$(($2))
local count=$(($3))
local mtd
mtd=$(find_mtd_chardev $part)
[ -n "$mtd" ] || caldata_die "no mtd device found for partition $part"
dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
caldata_die "failed to extract calibration data from $mtd"
}
board=$(board_name)
case "$FIRMWARE" in
"ath11k/IPQ8074/hw2.0/caldata.bin")
case "$board" in
cig,wf194c|\
cig,wf194c4|\
cig,wf196|\
edgecore,eap102 |\
edgecore,eap106 |\
qcom,ipq807x-hk01|\
qcom,ipq807x-hk14|\
tplink,ex227|\
tplink,ex447|\
yuncore,ax840|\
sercomm,wallaby)
caldata_extract "0:ART" 0x1000 0x20000
;;
esac
;;
"ath11k/IPQ6018/hw1.0/caldata.bin")
case "$board" in
cig,wf188|\
cig,wf188n|\
edgecore,eap101|\
hfcl,ion4xi|\
hfcl,ion4xe|\
wallys,dr6018|\
wallys,dr6018-v4|\
qcom,ipq6018-cp01|\
xiaomi,ax1800|\
glinet,ax1800)
caldata_extract "0:ART" 0x1000 0x20000
;;
esac
;;
ath11k/IPQ5018/hw1.0/caldata.bin)
case "$board" in
cybertan,eww622-a1|\
edgecore,eap104|\
motorola,q14|\
qcom,ipq5018-mp03.1)
caldata_extract "0:ART" 0x1000 0x20000
;;
esac
;;
ath11k/qcn6122/hw1.0/caldata_1.bin)
case "$board" in
motorola,q14)
caldata_extract "0:ART" 0x26800 0x20000
;;
esac
;;
ath11k/qcn6122/hw1.0/caldata_2.bin)
case "$board" in
motorola,q14|\
edgecore,eap104)
caldata_extract "0:ART" 0x4c000 0x20000
;;
esac
;;
ath11k/QCN9074/hw1.0/caldata_1.bin)
case "$board" in
cig,wf196|\
cybertan,eww622-a1|\
qcom,ipq5018-mp03.1|\
qcom,ipq807x-hk14)
caldata_extract "0:ART" 0x26800 0x20000
;;
esac
;;
ath11k/QCN9074/hw1.0/caldata_2.bin)
case "$board" in
qcom,ipq807x-hk14|\
qcom,ipq5018-mp03.3)
caldata_extract "0:ART" 0x4C000 0x20000
;;
esac
;;
ath11k-macs)
case "$board" in
hfcl,ion4xi|\
hfcl,ion4xe)
ath11k_generate_macs_ion4x
;;
edgecore,eap101)
ath11k_generate_macs_eap101
;;
edgecore,eap102|\
edgecore,eap106|\
cig,wf188n)
ath11k_generate_macs
;;
cig,wf194c|\
cig,wf194c)
ath11k_generate_macs_wf194
;;
esac
;;
*)
exit 1
;;
esac

View File

@@ -0,0 +1,16 @@
#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
board=$(board_name)
case "$FIRMWARE" in
"ath10k/pre-cal-pci-0001:01:00.0.bin")
case $board in
edgecore,eap106)
caldata_extract "0:ART" 0x33000 0x2f20
;;
esac
esac

View File

@@ -0,0 +1,3 @@
#!/bin/sh
mac=$(cat /etc/board.json | jsonfilter -e '@["network-device"]["'$DEVICENAME'"]'.macaddr)
[ -n "$mac" ] && ip link set $DEVICENAME address $mac

View File

@@ -0,0 +1,30 @@
#!/bin/sh /etc/rc.common
START=30
boot() {
. /lib/functions.sh
case "$(board_name)" in
cig,wf194c|\
cig,wf194c4|\
cig,wf196)
aq-fw-download /lib/firmware/AQR-G4_v5.5.6-AQR_CIG_WIFI_ID44858_VER1745.cld miireg 0 > /dev/null
sleep 1
ssdk_sh debug phy set 0 0x4004c441 0x8
;;
edgecore,eap106)
aq-fw-download /lib/firmware/AQR-G4_v5.5.6-AQR_CIG_WIFI_ID44858_VER1745.cld miireg 8 > /dev/null
sleep 1
ssdk_sh debug phy set 8 0x4004c441 0x8
;;
esac
case "$(board_name)" in
cig,wf196)
# setup the leds
ssdk_sh debug phy set 0 0x401ec431 0xc00f
ssdk_sh debug phy set 0 0x401ec430 0x806f
;;
esac
}

View File

@@ -0,0 +1,18 @@
#!/bin/sh /etc/rc.common
START=99
boot() {
case "$(board_name)" in
hfcl,ion4xe|\
hfcl,ion4xi)
fw_setenv boot_count 0
;;
edgecore,eap101|\
edgecore,eap102)
avail=$(fw_printenv -n upgrade_available)
[ "${avail}" -eq 1 ] || fw_setenv upgrade_available 1
fw_setenv bootcount 0
;;
esac
}

View File

@@ -0,0 +1,14 @@
#!/bin/sh /etc/rc.common
START=10
boot() {
. /lib/functions.sh
case "$(board_name)" in
cig,wf188|\
cig,wf188n)
watchdog -t 5 /dev/watchdog1
;;
esac
}

View File

@@ -0,0 +1,164 @@
. /lib/functions/system.sh
RAMFS_COPY_BIN='fw_printenv fw_setenv'
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
qca_do_upgrade() {
local tar_file="$1"
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
board_dir=${board_dir%/}
local dev=$(find_mtd_chardev "0:HLOS")
tar Oxf $tar_file ${board_dir}/kernel | mtd write - ${dev}
if [ -n "$UPGRADE_BACKUP" ]; then
tar Oxf $tar_file ${board_dir}/root | mtd -j "$UPGRADE_BACKUP" write - rootfs
else
tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs
fi
}
find_mmc_part() {
local DEVNAME PARTNAME
if grep -q "$1" /proc/mtd; then
echo "" && return 0
fi
for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do
PARTNAME=$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=')
[ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0
done
}
do_flash_emmc() {
local tar_file=$1
local emmcblock=$(find_mmc_part $2)
local board_dir=$3
local part=$4
[ -z "$emmcblock" ] && {
echo failed to find $2
return
}
echo erase $4
dd if=/dev/zero of=${emmcblock} 2> /dev/null
echo flash $4
tar Oxf $tar_file ${board_dir}/$part | dd of=${emmcblock}
}
emmc_do_upgrade() {
local tar_file="$1"
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
board_dir=${board_dir%/}
do_flash_emmc $tar_file '0:HLOS' $board_dir kernel
do_flash_emmc $tar_file 'rootfs' $board_dir root
local emmcblock="$(find_mmc_part "rootfs_data")"
if [ -e "$emmcblock" ]; then
mkfs.ext4 -F "$emmcblock"
fi
}
platform_check_image() {
local magic_long="$(get_magic_long "$1")"
board=$(board_name)
case $board in
cig,wf188|\
cig,wf188n|\
cig,wf194c|\
cig,wf194c4|\
cig,wf196|\
cybertan,eww622-a1|\
glinet,ax1800|\
glinet,axt1800|\
wallys,dr6018|\
wallys,dr6018-v4|\
edgecore,eap101|\
edgecore,eap102|\
edgecore,eap104|\
edgecore,eap106|\
hfcl,ion4xi|\
hfcl,ion4xe|\
tplink,ex227|\
tplink,ex447|\
yuncore,ax840|\
motorola,q14|\
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01|\
qcom,ipq807x-hk14|\
qcom,ipq5018-mp03.3)
[ "$magic_long" = "73797375" ] && return 0
;;
esac
return 1
}
platform_do_upgrade() {
CI_UBIPART="rootfs"
CI_ROOTPART="ubi_rootfs"
CI_IPQ807X=1
board=$(board_name)
case $board in
cig,wf188)
qca_do_upgrade $1
;;
motorola,q14)
emmc_do_upgrade $1
;;
cig,wf188n|\
cig,wf194c|\
cig,wf194c4|\
cig,wf196|\
cybertan,eww622-a1|\
edgecore,eap104|\
glinet,ax1800|\
glinet,axt1800|\
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01|\
qcom,ipq807x-hk14|\
qcom,ipq5018-mp03.3|\
wallys,dr6018|\
wallys,dr6018-v4|\
yuncore,ax840|\
tplink,ex447|\
tplink,ex227)
nand_upgrade_tar "$1"
;;
hfcl,ion4xi|\
hfcl,ion4xe)
if grep -q rootfs_1 /proc/cmdline; then
CI_UBIPART="rootfs"
fw_setenv primary 0 || exit 1
else
CI_UBIPART="rootfs_1"
fw_setenv primary 1 || exit 1
fi
nand_upgrade_tar "$1"
;;
edgecore,eap106)
CI_UBIPART="rootfs1"
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"
nand_upgrade_tar "$1"
;;
edgecore,eap101|\
edgecore,eap102)
if [ "$(find_mtd_chardev rootfs)" ]; then
CI_UBIPART="rootfs"
else
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
fw_setenv active 2 || exit 1
else
CI_UBIPART="rootfs1"
fw_setenv active 1 || exit 1
fi
fi
nand_upgrade_tar "$1"
;;
esac
}

View File

@@ -0,0 +1,829 @@
# CONFIG_AHCI_IPQ is not set
CONFIG_ALIGNMENT_TRAP=y
# CONFIG_ALLOW_DEV_COREDUMP is not set
# CONFIG_AMBA_PL08X is not set
# CONFIG_APM_EMULATION is not set
# CONFIG_APQ_GCC_8084 is not set
# CONFIG_APQ_MMCC_8084 is not set
# CONFIG_AR8216_PHY is not set
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
CONFIG_ARCH_HAS_SG_CHAIN=y
CONFIG_ARCH_HAS_TICK_BROADCAST=y
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
# CONFIG_ARCH_IPQ40XX is not set
# CONFIG_ARCH_IPQ806x is not set
# CONFIG_ARCH_IPQ807x is not set
# CONFIG_ARCH_IPQ6018 is not set
# CONFIG_ARCH_IPQ5018 is not set
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
# CONFIG_ARCH_MSM8960 is not set
# CONFIG_ARCH_MSM8974 is not set
CONFIG_ARCH_MSM8X60=y
CONFIG_ARCH_MULTIPLATFORM=y
# CONFIG_ARCH_MULTI_CPU_AUTO is not set
CONFIG_ARCH_MULTI_V6_V7=y
CONFIG_ARCH_MULTI_V7=y
CONFIG_ARCH_NR_GPIO=0
CONFIG_ARCH_QCOM=y
CONFIG_QSEECOM=m
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
CONFIG_ARM=y
CONFIG_ARM_AMBA=y
CONFIG_ARM_ARCH_TIMER=y
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
# CONFIG_ARM_ATAG_DTB_COMPAT is not set
CONFIG_ARM_CCI=y
CONFIG_ARM_CCI400_COMMON=y
CONFIG_ARM_CCI400_PMU=y
CONFIG_ARM_CCI_PMU=y
CONFIG_ARM_CPU_SUSPEND=y
CONFIG_ARM_GIC=y
CONFIG_ARM_HAS_SG_CHAIN=y
# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
CONFIG_ARM_CPUIDLE=y
CONFIG_ARM_L1_CACHE_SHIFT=6
CONFIG_ARM_L1_CACHE_SHIFT_6=y
# CONFIG_ARM_LPAE is not set
CONFIG_ARM_MODULE_PLTS=y
CONFIG_ARM_PATCH_PHYS_VIRT=y
CONFIG_ARM_PMU=y
CONFIG_ARM_PSCI=y
CONFIG_ARM_PSCI_FW=y
CONFIG_ARM_QCOM_CPUFREQ=y
# CONFIG_ARM_SMMU is not set
# CONFIG_ARM_SP805_WATCHDOG is not set
CONFIG_ARM_THUMB=y
# CONFIG_ARM_THUMBEE is not set
CONFIG_ARM_UNWIND=y
CONFIG_ARM_VIRT_EXT=y
CONFIG_AT803X_PHY=y
# CONFIG_ATA is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NVME=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_VIRTIO_BLK is not set
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_BOUNCE=y
CONFIG_BUILD_BIN2C=y
# CONFIG_CNSS_QCN9000 is not set
# CONFIG_CNSS2 is not set
# CONFIG_CNSS2_GENL is not set
# CONFIG_CNSS2_DEBUG is not set
# CONFIG_CNSS2_PM is not set
# CONFIG_CNSS2_PCI_DRIVER is not set
# CONFIG_CNSS2_CALIBRATION_SUPPORT is not set
# CONFIG_CNSS2_SMMU is not set
# CONFIG_CNSS2_RAMDUMP is not set
# CONFIG_CACHE_L2X0 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_CC_STACKPROTECTOR_NONE is not set
CONFIG_CC_STACKPROTECTOR_REGULAR=y
# CONFIG_CHARGER_QCOM_SMBB is not set
CONFIG_CLEANCACHE=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_CLKSRC_OF=y
CONFIG_CLKSRC_PROBE=y
CONFIG_CLKSRC_QCOM=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_COMMON_CLK=y
CONFIG_COMMON_CLK_QCOM=y
CONFIG_CONFIGFS_FS=y
CONFIG_COREDUMP=y
# CONFIG_CORESIGHT is not set
# CONFIG_CORESIGHT_CSR is not set
# CONFIG_CORESIGHT_CTI is not set
# NFIG_CORESIGHT_EVENT is not set
# CONFIG_CORESIGHT_HWEVENT is not set
# CONFIG_CORESIGHT_LINKS_AND_SINKS is not set
# CONFIG_CORESIGHT_LINK_AND_SINK_TMC is not set
# CONFIG_CORESIGHT_QCOM_REPLICATOR is not set
# CONFIG_CORESIGHT_QPDI is not set
# CONFIG_CORESIGHT_SINK_ETBV10 is not set
# CONFIG_CORESIGHT_SINK_TPIU is not set
# CONFIG_CORESIGHT_SOURCE_DUMMY is not set
# CONFIG_CORESIGHT_SOURCE_ETM3X is not set
# CONFIG_CORESIGHT_SOURCE_ETM4X is not set
# CONFIG_CORESIGHT_REMOTE_ETM is not set
# CONFIG_CORESIGHT_STM is not set
# CONFIG_CORESIGHT_TPDA is not set
# CONFIG_CORESIGHT_TPDM is not set
# CONFIG_CORESIGHT_TPDM_DEFAULT_ENABLE is not set
# CONFIG_CORESIGHT_STREAM is not set
CONFIG_CPUFREQ_DT=y
CONFIG_CPUFREQ_DT_PLATDEV=y
CONFIG_CPU_32v6K=y
CONFIG_CPU_32v7=y
CONFIG_CPU_ABRT_EV7=y
# CONFIG_CPU_BIG_ENDIAN is not set
# CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_CPU_CACHE_V7=y
CONFIG_CPU_CACHE_VIPT=y
CONFIG_CPU_COPY_V6=y
CONFIG_CPU_CP15=y
CONFIG_CPU_CP15_MMU=y
# CONFIG_CPU_SW_DOMAIN_PAN is not set
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_HAS_ASID=y
# CONFIG_CPU_ICACHE_DISABLE is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_CPU_PABRT_V7=y
CONFIG_CPU_PM=y
CONFIG_CPU_RMAP=y
# CONFIG_CPU_THERMAL is not set
CONFIG_CPU_TLB_V7=y
CONFIG_CPU_V7=y
CONFIG_CRC16=y
# CONFIG_CRC32_SARWATE is not set
CONFIG_CRC32_SLICEBY8=y
CONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_CRYPTO_DEV_QCOM_MSM_QCE is not set
# CONFIG_CRYPTO_DEV_OTA_CRYPTO is not set
# CONFIG_FIPS_ENABLE is not set
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_CMAC=y
# CONFIG_CRYPTO_DEV_QCOM_ICE is not set
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_LZO=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_XZ=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_GCM=y
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_GPIO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
# CONFIG_DEBUG_MEM_USAGE is not set
# CONFIG_DEBUG_UART_8250 is not set
# CONFIG_DEBUG_USER is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DEVMEM=y
# CONFIG_DIAG_OVER_USB is not set
CONFIG_DMADEVICES=y
CONFIG_DMA_ENGINE=y
CONFIG_DMA_OF=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DTC=y
# CONFIG_DWMAC_GENERIC is not set
# CONFIG_DWMAC_IPQ806X is not set
# CONFIG_DWMAC_SUNXI is not set
# CONFIG_DW_DMAC_PCI is not set
# CONFIG_VHOST_NET is not set
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
CONFIG_DYNAMIC_DEBUG=y
CONFIG_ETHERNET_PACKET_MANGLE=y
CONFIG_EXT4_FS=y
# CONFIG_EXT4_USE_FOR_EXT2 is not set
CONFIG_FB=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_CMDLINE=y
CONFIG_FB_QCOM_QPIC=y
CONFIG_FB_QCOM_QPIC_ER_SSD1963_PANEL=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FIXED_PHY=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_FS_MBCACHE=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
# CONFIG_GENERIC_CPUFREQ_KRAIT is not set
CONFIG_GENERIC_IDLE_POLL_SETUP=y
CONFIG_GENERIC_IO=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
CONFIG_GENERIC_MSI_IRQ=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_PHY=y
CONFIG_GENERIC_PINCONF=y
CONFIG_GENERIC_SCHED_CLOCK=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_DEVRES=y
# CONFIG_GPIO_LATCH is not set
# CONFIG_GPIO_NXP_74HC153 is not set
CONFIG_GPIO_SYSFS=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT_MAP=y
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
CONFIG_HAVE_ARCH_BITREVERSE=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_ARCH_PFN_VALID=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_ARM_ARCH_TIMER=y
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
CONFIG_HAVE_BPF_JIT=y
CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_HAVE_DEBUG_KMEMLEAK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
# CONFIG_SRD_TRACE is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_IDE=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_XZ=y
# CONFIG_HAVE_KPROBES is not set
# CONFIG_HAVE_KRETPROBES is not set
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_HAVE_NET_DSA=y
CONFIG_HAVE_OPROFILE=y
# CONFIG_HAVE_OPTPROBES is not set
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_SMP=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_UID16=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_HIGHMEM=y
CONFIG_HIGHPTE=y
CONFIG_HOTPLUG_CPU=y
CONFIG_HWMON=y
CONFIG_HWSPINLOCK=y
CONFIG_HWSPINLOCK_QCOM=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_MSM=y
CONFIG_HZ_FIXED=0
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_QUP=y
# CONFIG_IIO is not set
# CONFIG_IIO_BUFFER is not set
# CONFIG_IIO_TRIGGER is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_INPUT_PM8941_PWRKEY is not set
CONFIG_IOMMU_HELPER=y
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
# CONFIG_IPQ_DWC3_QTI_EXTCON is not set
# CONFIG_IPQ_GCC_4019 is not set
# CONFIG_IPQ_GCC_5018 is not set
# CONFIG_IPQ_APSS_5018 is not set
# CONFIG_IPQ_GCC_6018 is not set
# CONFIG_IPQ_APSS_6018 is not set
# CONFIG_IPQ_GCC_806X is not set
# CONFIG_IPQ_ADSS_807x is not set
# CONFIG_IPQ_APSS_807x is not set
# CONFIG_IPQ_GCC_807x is not set
# CONFIG_IPQ_ADCC_4019 is not set
# CONFIG_IPQ_LCC_806X is not set
# CONFIG_IPQ_REMOTEPROC_ADSP is not set
# CONFIG_IPQ_SUBSYSTEM_RESTART is not set
# CONFIG_IPQ_SUBSYSTEM_RESTART_TEST is not set
CONFIG_IRQCHIP=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
CONFIG_JBD2=y
# CONFIG_IPC_ROUTER is not set
# CONFIG_IPC_ROUTER_SECURITY is not set
# CONFIG_IPC_LOGGING is not set
CONFIG_KPSS_XCC=y
# CONFIG_KRAITCC is not set
# CONFIG_KRAIT_CLOCKS is not set
# CONFIG_KRAIT_L2_ACCESSORS is not set
CONFIG_LEDS_IPQ=y
CONFIG_LEDS_PWM=y
CONFIG_LEDS_TLC591XX=y
# CONFIG_LEDS_PCA9956B is not set
CONFIG_LIBFDT=y
CONFIG_LOCKUP_DETECTOR=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_MDIO=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_BOARDINFO=y
CONFIG_MDIO_GPIO=y
# CONFIG_MDIO_QCA is not set
CONFIG_MFD_QCOM_RPM=y
CONFIG_MFD_SPMI_PMIC=y
# CONFIG_SLIMBUS is not set
# CONFIG_SLIMBUS_MSM_CTRL is not set
# CONFIG_SLIMBUS_MSM_NGD is not set
# CONFIG_OF_SLIMBUS is not set
CONFIG_MFD_SYSCON=y
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
CONFIG_MIGHT_HAVE_PCI=y
CONFIG_MMC=y
CONFIG_MMC_ARMMMCI=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_QCOM_DML=y
CONFIG_MMC_QCOM_TUNING=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_MSM=y
# CONFIG_MMC_SDHCI_OF_ARASAN is not set
# CONFIG_MMC_SDHCI_PCI is not set
CONFIG_MMC_SDHCI_PLTFM=y
# CONFIG_MMC_TIFM_SD is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_MODULES_USE_ELF_REL=y
# CONFIG_MPLS_ROUTING is not set
# CONFIG_MSM_GCC_8660 is not set
# CONFIG_MSM_GCC_8916 is not set
# CONFIG_MSM_GCC_8960 is not set
# CONFIG_MSM_GCC_8974 is not set
# CONFIG_MSM_LCC_8960 is not set
# CONFIG_MSM_MMCC_8960 is not set
# CONFIG_MSM_MMCC_8974 is not set
# CONFIG_MSM_MHI is not set
# CONFIG_MSM_IPC_ROUTER_MHI_XPRT is not set
# CONFIG_MSM_MHI_DEBUG is not set
# CONFIG_MSM_MHI_DEV is not set
# CONFIG_MSM_MHI_UCI is not set
# CONFIG_DIAGFWD_BRIDGE_CODE is not set
# CONFIG_MSM_BUS_SCALING is not set
# CONFIG_BUS_TOPOLOGY_ADHOC is not set
# CONFIG_QPNP_REVID is not set
# CONFIG_SPS is not set
# CONFIG_SPS_SUPPORT_NDP_BAM is not set
# CONFIG_USB_BAM is not set
# CONFIG_SPS_SUPPORT_BAMDMA is not set
# CONFIG_IPA is not set
# CONFIG_IPA3 is not set
# CONFIG_EP_PCIE is not set
# CONFIG_GSI is not set
# CONFIG_PFT is not set
# CONFIG_SEEMP_CORE is not set
# CONFIG_GPIO_USB_DETECT is not set
# CONFIG_MSM_GLINK is not set
# CONFIG_MSM_GLINK_LOOPBACK_SERVER is not set
# CONFIG_MSM_GLINK_SMEM_NATIVE_XPRT is not set
# CONFIG_MSM_GLINK_PKT is not set
# CONFIG_MSM_IPC_ROUTER_GLINK_XPRT is not set
# CONFIG_MSM_QMI_INTERFACE is not set
# CONFIG_MSM_TEST_QMI_CLIENT is not set
# CONFIG_GLINK_DEBUG_FS is not set
# CONFIG_MSM_RPM_SMD is not set
# CONFIG_MSM_RPM_GLINK is not set
CONFIG_MSM_RPM_LOG=y
# CONFIG_MSM_SMEM is not set
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_NAND_QCOM=y
CONFIG_MTD_QCOM_SMEM_PARTS=y
CONFIG_MTD_SPINAND_GIGADEVICE=y
CONFIG_MTD_SPINAND_MT29F=y
CONFIG_MTD_SPINAND_ONDIEECC=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_FIT_FW=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_BEB_LIMIT=20
CONFIG_MTD_UBI_BLOCK=y
# CONFIG_MTD_UBI_FASTMAP is not set
CONFIG_MTD_UBI_GLUEBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MULTI_IRQ_HANDLER=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEON=y
CONFIG_NET=y
# CONFIG_NET_DSA_MV88E6063 is not set
CONFIG_NET_FLOW_LIMIT=y
CONFIG_NET_PTP_CLASSIFY=y
CONFIG_NO_BOOTMEM=y
CONFIG_NO_HZ=y
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
CONFIG_NR_CPUS=4
CONFIG_NUM_ALT_PARTITION=8
CONFIG_NVMEM=y
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_ADDRESS_PCI=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_FLATTREE=y
CONFIG_OF_GPIO=y
CONFIG_OF_IRQ=y
CONFIG_OF_MDIO=y
CONFIG_OF_MTD=y
CONFIG_OF_NET=y
CONFIG_OF_PCI=y
CONFIG_OF_PCI_IRQ=y
CONFIG_OF_RESERVED_MEM=y
CONFIG_OLD_SIGACTION=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_ON_OOPS_VALUE=1
CONFIG_PANIC_TIMEOUT=5
CONFIG_PCI=y
# CONFIG_PCIEAER is not set
CONFIG_PCIE_DW=y
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_PME=y
CONFIG_PCIE_QCOM=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_DOMAINS_GENERIC=y
CONFIG_PCI_MSI=y
CONFIG_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PGTABLE_LEVELS=2
CONFIG_PHYLIB=y
# CONFIG_PHY_IPQ_BALDUR_USB is not set
# CONFIG_PHY_IPQ_UNIPHY_USB is not set
# CONFIG_PHY_QCOM_APQ8064_SATA is not set
# CONFIG_PHY_QCOM_IPQ806X_SATA is not set
CONFIG_PHY_QCA_PCIE_QMP=y
# CONFIG_PHY_QCOM_UFS is not set
# CONFIG_PHY_IPQ_UNIPHY_PCIE is not set
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_APQ8064 is not set
# CONFIG_PINCTRL_APQ8084 is not set
# CONFIG_PINCTRL_IPQ4019 is not set
# CONFIG_PINCTRL_IPQ6018 is not set
# CONFIG_PINCTRL_IPQ8064 is not set
# CONFIG_PINCTRL_IPQ807x is not set
# CONFIG_PINCTRL_IPQ5018 is not set
CONFIG_PINCTRL_MSM=y
# CONFIG_PINCTRL_MSM8660 is not set
# CONFIG_PINCTRL_MSM8916 is not set
# CONFIG_PINCTRL_MSM8960 is not set
CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
# CONFIG_PL330_DMA is not set
CONFIG_PM=y
CONFIG_PM_CLK=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_GENERIC_DOMAINS=y
CONFIG_PM_GENERIC_DOMAINS_OF=y
CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
CONFIG_PM_OPP=y
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_MSM=y
CONFIG_POWER_SUPPLY=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_RCU=y
CONFIG_PRINTK_TIME=y
CONFIG_PROC_PAGE_MONITOR=y
# CONFIG_PROC_STRIPPED is not set
CONFIG_PSTORE=y
CONFIG_PSTORE_RAM=y
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_PMSG is not set
CONFIG_PWM=y
CONFIG_PWM_IPQ4019=y
# CONFIG_PWM_PCA9685 is not set
CONFIG_PWM_SYSFS=y
CONFIG_QCOM_ADM=y
# CONFIG_QCOM_APM is not set
CONFIG_QCOM_BAM_DMA=y
# CONFIG_QTI_BT_TTY is not set
# CONFIG_QCOM_COINCELL is not set
# CONFIG_QCOM_DCC is not set
CONFIG_QCOM_GDSC=y
CONFIG_QCOM_GSBI=y
# CONFIG_QCOM_HFPLL is not set
# CONFIG_QCOM_MEMORY_DUMP_V2 is not set
# CONFIG_QCOM_MDT_LOADER is not set
CONFIG_QCOM_QFPROM=y
# CONFIG_QCOM_SPMI_TEMP_ALARM is not set
CONFIG_QCOM_RPM_CLK=y
# CONFIG_QCOM_RTB is not set
# CONFIG_QCOM_PM is not set
CONFIG_QCOM_SCM=y
CONFIG_QCOM_SCM_32=y
# CONFIG_HAVE_ARM_SMCCC is not set
CONFIG_QCA_SCM_RESTART_REASON=y
CONFIG_IPQ_TCSR=y
CONFIG_QCOM_QFPROM=y
# CONFIG_QCOM_SMD is not set
CONFIG_QCOM_SMEM=y
CONFIG_QCOM_SMEM_STATE=y
# CONFIG_QCOM_SMD is not set
CONFIG_QCOM_SMP2P=y
# CONFIG_QCOM_SPMI_VADC is not set
CONFIG_QCOM_TSENS=y
CONFIG_QCOM_TZ_LOG=y
CONFIG_QCOM_WDT=y
CONFIG_QMI_ENCDEC=y
CONFIG_RATIONAL=y
# CONFIG_RCU_BOOST is not set
CONFIG_RCU_CPU_STALL_TIMEOUT=21
# CONFIG_RCU_EXPERT is not set
CONFIG_RCU_STALL_COMMON=y
CONFIG_RD_GZIP=y
CONFIG_REGMAP=y
# CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS is not set
CONFIG_REGMAP_MMIO=y
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_CPR3 is not set
CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_QCOM_RPM=y
CONFIG_REGULATOR_QCOM_SPMI=y
# CONFIG_REGULATOR_IPQ40XX is not set
# CONFIG_REGULATOR_RPM_SMD is not set
# CONFIG_REGULATOR_RPM_GLINK is not set
CONFIG_RELAY=y
CONFIG_REMOTEPROC=y
# CONFIG_IPQ807X_REMOTEPROC is not set
CONFIG_RESET_CONTROLLER=y
CONFIG_RFS_ACCEL=y
CONFIG_RPS=y
CONFIG_RTC_CLASS=y
CONFIG_NET_L3_MASTER_DEV=y
# CONFIG_RTC_DRV_CMOS is not set
# CONFIG_RTC_DRV_PM8XXX is not set
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_SATA_AHCI is not set
CONFIG_SCHED_HRTICK=y
# CONFIG_SCSI is not set
# CONFIG_SCHED_INFO is not set
# CONFIG_SCSI_DMA is not set
# CONFIG_SERIAL_8250 is not set
# CONFIG_SERIAL_8250_CONSOLE is not set
# CONFIG_SERIAL_8250_DMA is not set
# CONFIG_SERIAL_AMBA_PL010 is not set
# CONFIG_SERIAL_AMBA_PL011 is not set
CONFIG_SERIAL_MSM=y
CONFIG_SERIAL_MSM_CONSOLE=y
# CONFIG_VIRTIO_CONSOLE is not set
CONFIG_SMP=y
CONFIG_SMP_ON_UP=y
# CONFIG_SND is not set
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
CONFIG_SND_PROC_FS=y
# CONFIG_SND_COMPRESS_OFFLOAD is not set
CONFIG_SND_PCM=y
CONFIG_SND_SOC=y
# CONFIG_SND_SOC_APQ8016_SBC is not set
CONFIG_SND_SOC_I2C_AND_SPI=y
# CONFIG_SND_SOC_IPQ is not set
# CONFIG_SND_SOC_IPQ806X_LPAIF is not set
# CONFIG_SND_SOC_IPQ806X_PCM_RAW is not set
CONFIG_SND_SOC_IPQ_ADSS=y
CONFIG_SND_SOC_IPQ_CODEC=y
CONFIG_SND_SOC_IPQ_CPU_DAI=y
CONFIG_SND_SOC_IPQ_MBOX=y
CONFIG_SND_SOC_IPQ_PCM_I2S=y
CONFIG_SND_SOC_IPQ_PCM_RAW=y
CONFIG_SND_SOC_IPQ_PCM_SPDIF=y
CONFIG_SND_SOC_IPQ_PCM_TDM=y
CONFIG_SND_SOC_IPQ_STEREO=y
CONFIG_SND_SOC_QCOM=y
# CONFIG_SND_SOC_STORM is not set
CONFIG_SOUND=y
CONFIG_SPARSE_IRQ=y
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_QUP=y
CONFIG_SPI_SPIDEV=y
# CONFIG_SPI_VSC7385 is not set
CONFIG_SPMI=y
CONFIG_SPMI_MSM_PMIC_ARB=y
CONFIG_SRCU=y
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_STOPWATCH is not set
CONFIG_SUSPEND=y
CONFIG_SWCONFIG=y
CONFIG_SWIOTLB=y
# CONFIG_SWAP is not set
CONFIG_SWP_EMULATE=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_THERMAL=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_OF=y
CONFIG_THERMAL_WRITABLE_TRIPS=y
# CONFIG_THUMB2_KERNEL is not set
# CONFIG_TICK_CPU_ACCOUNTING is not set
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_TRACING_EVENTS_GPIO=y
CONFIG_UBIFS_FS=y
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_XZ=y
CONFIG_UBIFS_FS_ZLIB=y
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_USB_GADGET=n
CONFIG_USB_SUPPORT=y
# CONFIG_USB_DWC3_OF_SIMPLE is not set
# CONFIG_USB_QCOM_8X16_PHY is not set
# CONFIG_USB_QCOM_KS_BRIDGE is not set
# CONFIG_USB_QCOM_QUSB_PHY is not set
# CONFIG_USB_QCOM_QMP_PHY is not set
# CONFIG_USB_QCA_M31_PHY is not set
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_OHCI_LITTLE_ENDIAN is not set
CONFIG_USE_OF=y
CONFIG_VDSO=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_VFP=y
CONFIG_VFPv3=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_WATCHDOG_CORE=y
# CONFIG_WL_TI is not set
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
CONFIG_XPS=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_BCJ=y
CONFIG_ZBOOT_ROM_BSS=0
CONFIG_ZBOOT_ROM_TEXT=0
CONFIG_ZLIB_DEFLATE=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZONE_DMA_FLAG=0
CONFIG_QCOM_CACHE_DUMP=y
CONFIG_QCOM_CACHE_DUMP_ON_PANIC=y
# CONFIG_QCOM_RESTART_REASON is not set
# CONFIG_QCOM_DLOAD_MODE is not set
CONFIG_FW_AUTH=y
CONFIG_FW_AUTH_TEST=m
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_PUBLIC_KEY_ALGO_RSA=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_PKCS7_MESSAGE_PARSER=n
CONFIG_KEYS=y
# CONFIG_SKB_RECYCLER is not set
CONFIG_SKB_RECYCLER_MULTI_CPU=y
# CONFIG_SKB_RECYCLER_PREALLOC is not set
# CONFIG_U_SERIAL_CONSOLE is not set
CONFIG_SCSI_SCAN_ASYNC=y
# CONFIG_NF_IPV6_DUMMY_HEADER is not set
# CONFIG_RMNET is not set
# CONFIG_RMNET_DATA is not set
# CONFIG_RMNET_CTL is not set
# CONFIG_MSM_SECURE_BUFFER is not set
# CONFIG_STAGING is not set
# CONFIG_ANDROID is not set
# CONFIG_ION is not set
# CONFIG_ION_DUMMY is not set
# CONFIG_ION_MSM is not set
# CONFIG_ION_TEST is not set
# CONFIG_CMA is not set
# CONFIG_CMA_DEBUG is not set
# CONFIG_CMA_DEBUGFS is not set
# CONFIG_DMA_CMA is not set
# CONFIG_CMA_AREAS is not set
# CONFIG_CMA_SIZE_MBYTES is not set
# CONFIG_CMA_SIZE_SEL_MBYTES is not set
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
# CONFIG_CMA_SIZE_SEL_MAX is not set
# CONFIG_CMA_ALIGNMENT is not set
# CONFIG_ASHMEM is not set
# CONFIG_ANDROID_TIMED_OUTPUT is not set
# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
# CONFIG_SYNC is not set
# CONFIG_SW_SYNC is not set
# CONFIG_FSL_MC_BUS is not set
# CONFIG_ALLOC_BUFFERS_IN_4K_CHUNKS is not set
CONFIG_ALLOC_SKB_PAGE_FRAG_DISABLE=y
# CONFIG_MMAP_ALLOW_UNINITIALIZED is not set
# CONFIG_MAILBOX is not set
# CONFIG_MAILBOX_TEST is not set
# CONFIG_QCOM_APCS_IPC is not set
# CONFIG_QCOM_GLINK_SSR is not set
# CONFIG_QCOM_Q6V5_WCSS is not set
# CONFIG_QCOM_SYSMON is not set
# CONFIG_QRTR is not set
# CONFIG_QRTR_SMD is not set
# CONFIG_QRTR_TUN is not set
# CONFIG_RPMSG is not set
# CONFIG_RPMSG_QCOM_GLINK_RPM is not set
# CONFIG_RPMSG_VIRTIO is not set
# CONFIG_RPMSG_CHAR is not set
# CONFIG_RPMSG_QCOM_GLINK_SMEM is not set
# CONFIG_RPMSG_QCOM_SMD is not set
CONFIG_QCA_MINIDUMP=y
# CONFIG_QCA_MINIDUMP_DEBUG is not set
# CONFIG_QRTR_USB is not set
# CONFIG_QRTR_FIFO is not set
CONFIG_QRTR_MHI=y
CONFIG_MHI_BUS=y
# CONFIG_MHI_QTI is not set
# CONFIG_MHI_NETDEV is not set
# CONFIG_MHI_DEBUG is not set
# CONFIG_MHI_UCI is not set
# CONFIG_MHI_SATELLITE is not set
# CONFIG_DIAG_OVER_QRTR is not set
# CONFIG_MSM_ADSPRPC is not set
CONFIG_CRYPTO_MICHAEL_MIC=y
# CONFIG_ARCH_HAS_KCOV is not set
# CONFIG_KCOV is not set
# CONFIG_GCC_PLUGINS is not set
# CONFIG_QTI_Q6V5_ADSP is not set
# CONFIG_MSM_RPM_RPMSG is not set
# CONFIG_RPMSG_QCOM_GLINK_RPM is not set
# CONFIG_REGULATOR_RPM_GLINK is not set
# CONFIG_MTD_NAND_SERIAL is not set
# CONFIG_ARM_QTI_IPQ60XX_CPUFREQ is not set
# CONFIG_PAGE_SCOPE_MULTI_PAGE_READ is not set
# CONFIG_CRYPTO_NO_ZERO_LEN_HASH is not set
# CONFIG_CRYPTO_DISABLE_AES192_TEST is not set
# CONFIG_QTI_EUD is not set
# CONFIG_EUD_EXTCON_SUPPORT is not set
# CONFIG_CLK_TEST_5018 is not set
CONFIG_MAP_E_SUPPORT=y
# CONFIG_IPQ_FLASH_16M_PROFILE is not set
# CONFIG_QGIC2_MSI is not set
CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_LEDS_GPIO=y
# CONFIG_ARCH_IPQ256M is not set
CONFIG_SKB_FIXED_SIZE_2K=y
# CONFIG_IPQ_MEM_PROFILE is not set
# CONFIG_VIRTIO_NET is not set
# CONFIG_QCA_85XX_SWITCH is not set
CONFIG_AQ_PHY=y
CONFIG_DIAG_CHAR=y
# CONFIG_HW_RANDOM_VIRTIO is not set
# CONFIG_BOOTCONFIG_PARTITION is not set
# CONFIG_CRYPTO_DEV_QCEDEV is not set
# CONFIG_CRYPTO_DEV_QCRYPTO is not set
# CONFIG_MHI_BUS_TEST is not set

View File

@@ -0,0 +1,23 @@
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-eap104.dts"
/ {
pmuv8: pmu {
compatible = "arm,cortex-a7-pmu";
};
};

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-eww622-a1.dts"
/ {
model = "CyberTan EWW622-A1";
compatible = "cybertan,eww622-a1", "qcom,ipq5018";
pmuv8: pmu {
compatible = "arm,cortex-a7-pmu";
};
};

View File

@@ -0,0 +1,23 @@
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-q14.dts"
/ {
pmuv8: pmu {
compatible = "arm,cortex-a7-pmu";
};
};

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-cig-wf188.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-cig-wf188n.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-edgecore-eap101.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-wallys-dr6018-v4.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-wallys-dr6018.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-yuncore-ax840.dts"
#include "qcom-ipq6018.dtsi"

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq807x-eap102.dts"
/ {
soc {
pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq807x-eap106.dts"
/ {
soc {
pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq807x-ex227.dts"
/ {
soc {
pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq807x-ex447.dts"
/ {
soc {
pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq807x-wf194c.dts"
/ {
soc {
pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq807x-wf194c4.dts"
/ {
soc {
pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../arm64/boot/dts/qcom/qcom-ipq807x-wf196.dts"
/ {
soc {
pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More