Compare commits
276 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b00741e92a | ||
|
|
a6dce2ceb7 | ||
|
|
091a701feb | ||
|
|
aa7a0af5c7 | ||
|
|
058b685a70 | ||
|
|
f8f56aa8c2 | ||
|
|
3ad1ee7da3 | ||
|
|
0d4a0250df | ||
|
|
70b94249fa | ||
|
|
8bc571d273 | ||
|
|
e0008861b0 | ||
|
|
ee71184b2b | ||
|
|
a2d9409ac4 | ||
|
|
3df761d78d | ||
|
|
5ef0e58d80 | ||
|
|
0681abbcf5 | ||
|
|
4292832a6a | ||
|
|
ac7386a15d | ||
|
|
5fab618c87 | ||
|
|
44715a1df0 | ||
|
|
ee76f4feb2 | ||
|
|
85a15a1093 | ||
|
|
751ef82118 | ||
|
|
d839ec4e2d | ||
|
|
183c8ec778 | ||
|
|
944265347a | ||
|
|
17729f6256 | ||
|
|
5657d4ffb0 | ||
|
|
c98e772ab7 | ||
|
|
d92f634312 | ||
|
|
aa451e4976 | ||
|
|
8b46a263ab | ||
|
|
1e750f6fbb | ||
|
|
e260b3d44a | ||
|
|
e262864830 | ||
|
|
6dfbd24454 | ||
|
|
1bc1dab5e1 | ||
|
|
a765362d28 | ||
|
|
836b03aa23 | ||
|
|
b9408b6b39 | ||
|
|
619e883cb0 | ||
|
|
1b6e9b3f64 | ||
|
|
cdd9bee370 | ||
|
|
39868a87d4 | ||
|
|
0f423804f6 | ||
|
|
66fa45ecef | ||
|
|
e6b1094b8d | ||
|
|
ab9025769b | ||
|
|
3e0faf2866 | ||
|
|
8e548ac9bd | ||
|
|
e819523f90 | ||
|
|
ee1eda7c7d | ||
|
|
93970d10d9 | ||
|
|
f5646ae0b9 | ||
|
|
bf48cbd045 | ||
|
|
2500e03ac8 | ||
|
|
9ddb73c0d0 | ||
|
|
73cbccaea4 | ||
|
|
76c9c2b113 | ||
|
|
1ecf0cea11 | ||
|
|
1bb9e55434 | ||
|
|
2e57f7145a | ||
|
|
b1833122ea | ||
|
|
87266b3f7e | ||
|
|
0bada4eed0 | ||
|
|
2c3c7f1b8e | ||
|
|
50cae2e938 | ||
|
|
d2494642aa | ||
|
|
3fdd47d733 | ||
|
|
579be6b930 | ||
|
|
7b5adca44d | ||
|
|
b84317664f | ||
|
|
d60de1995a | ||
|
|
5e7d352508 | ||
|
|
8119298988 | ||
|
|
239cae6bdf | ||
|
|
9e98d6d813 | ||
|
|
ddae7eb7ee | ||
|
|
2765e3ccb6 | ||
|
|
a875052d23 | ||
|
|
cbe956622e | ||
|
|
18f05da13d | ||
|
|
b119562a07 | ||
|
|
12861e01ee | ||
|
|
849e4c7eed | ||
|
|
4987ac2cea | ||
|
|
ee0e1a3da4 | ||
|
|
fdbd5472e2 | ||
|
|
b410c84389 | ||
|
|
feb2f4f0fe | ||
|
|
2da375f0dc | ||
|
|
243cb791ed | ||
|
|
cd25afbc7e | ||
|
|
fb16e01fc9 | ||
|
|
1a80b55f13 | ||
|
|
a252fc748b | ||
|
|
33bb581295 | ||
|
|
f9cdd61a8e | ||
|
|
9bc0ecebfa | ||
|
|
784565b6a0 | ||
|
|
31c41f321f | ||
|
|
34679f23fc | ||
|
|
d469657438 | ||
|
|
64d46c7404 | ||
|
|
538118ef77 | ||
|
|
295c612a4a | ||
|
|
50ad1e5619 | ||
|
|
50d255d4a8 | ||
|
|
88a71fbe77 | ||
|
|
1f5024aa73 | ||
|
|
067d7e9f90 | ||
|
|
202d404f74 | ||
|
|
d03c520e75 | ||
|
|
904581c59e | ||
|
|
d84d34e6e0 | ||
|
|
024a34436d | ||
|
|
206b60a003 | ||
|
|
36de5d6ab5 | ||
|
|
a571b805cb | ||
|
|
5411500caa | ||
|
|
be3b061d7b | ||
|
|
8df40b136a | ||
|
|
d48f38c30f | ||
|
|
9cb5203ef2 | ||
|
|
a3c5c14c8b | ||
|
|
5014dc07ea | ||
|
|
907d94bd61 | ||
|
|
26f35c40b6 | ||
|
|
ee05f20e97 | ||
|
|
cbce6c6d95 | ||
|
|
12b1d2f700 | ||
|
|
006e52545d | ||
|
|
69c0c3c2f9 | ||
|
|
40536320ef | ||
|
|
5bc5df10d8 | ||
|
|
0943f4dc99 | ||
|
|
b0e6bce634 | ||
|
|
02391a5e5a | ||
|
|
43980bfbf0 | ||
|
|
6ca1d74ac1 | ||
|
|
1b34fc20cc | ||
|
|
c14030c6bf | ||
|
|
1ae19596b8 | ||
|
|
4460990610 | ||
|
|
5872b1bfd0 | ||
|
|
3e41081eff | ||
|
|
c4345c7a7d | ||
|
|
2454da3d5e | ||
|
|
305688f537 | ||
|
|
9718dffd27 | ||
|
|
c95622ac6e | ||
|
|
3ba78a839a | ||
|
|
f4db275250 | ||
|
|
ec55b1217a | ||
|
|
6f9067e9d4 | ||
|
|
01000b0cec | ||
|
|
2e29823034 | ||
|
|
3a9f927c2f | ||
|
|
8496275f83 | ||
|
|
3082e83596 | ||
|
|
8dc0a963a8 | ||
|
|
5978ab409c | ||
|
|
93d67c96a6 | ||
|
|
fde584a3ec | ||
|
|
ae63723f0a | ||
|
|
1cf24edac7 | ||
|
|
73e37f2763 | ||
|
|
e1e47d5984 | ||
|
|
cf2b72ed7f | ||
|
|
d3a8cacfcc | ||
|
|
9c4d81ec5e | ||
|
|
6d4d665147 | ||
|
|
09f4533d6d | ||
|
|
fd90eed40c | ||
|
|
462c5653e1 | ||
|
|
1f5b8a32e4 | ||
|
|
ed785589ea | ||
|
|
1e764ea7df | ||
|
|
997ab54373 | ||
|
|
fd7e8e4e75 | ||
|
|
629199f6c8 | ||
|
|
56fd8355b0 | ||
|
|
654e0242e4 | ||
|
|
360d756fbf | ||
|
|
1392bec7de | ||
|
|
88e8ca256b | ||
|
|
40c0d28e84 | ||
|
|
93ebd966fe | ||
|
|
d0748065da | ||
|
|
35e470ad0a | ||
|
|
37d535129b | ||
|
|
494b889af8 | ||
|
|
94c2ceed9e | ||
|
|
1ba74c168b | ||
|
|
8035ac0195 | ||
|
|
06bec84625 | ||
|
|
53bc278ad6 | ||
|
|
6efaeaa667 | ||
|
|
ddba2d122c | ||
|
|
bce80ae125 | ||
|
|
660d8f4048 | ||
|
|
7492906d13 | ||
|
|
8a11563b06 | ||
|
|
b01b9244b4 | ||
|
|
940adf4b67 | ||
|
|
01b096a64b | ||
|
|
4eefe5893e | ||
|
|
a0c1fa13eb | ||
|
|
9c46728612 | ||
|
|
017644efa0 | ||
|
|
956d45fcf2 | ||
|
|
0a8ebb3c13 | ||
|
|
26f2161caf | ||
|
|
aec913d97b | ||
|
|
6a26b457e0 | ||
|
|
b33090a0fa | ||
|
|
e506a0d50f | ||
|
|
794ddf5ca2 | ||
|
|
d604032c2a | ||
|
|
11fd001d8c | ||
|
|
c58384be89 | ||
|
|
04ca5a8678 | ||
|
|
175a3cb22a | ||
|
|
778afce43e | ||
|
|
206012e252 | ||
|
|
5c85a3e607 | ||
|
|
7cf27d7190 | ||
|
|
fe77fb631a | ||
|
|
045944df48 | ||
|
|
7b805b3cca | ||
|
|
cf2900cd06 | ||
|
|
688920e288 | ||
|
|
829cc60a28 | ||
|
|
fa1ac692b5 | ||
|
|
8fb32e9a33 | ||
|
|
6df69462c8 | ||
|
|
d6e0100470 | ||
|
|
cc9a238b4b | ||
|
|
41ad44de0a | ||
|
|
6c1ebe4474 | ||
|
|
c128728811 | ||
|
|
ee211e2fcd | ||
|
|
079ce0413a | ||
|
|
dec6584b22 | ||
|
|
1eda1a7946 | ||
|
|
8f459812b8 | ||
|
|
68f5354178 | ||
|
|
6e6c82c947 | ||
|
|
4a3a4e1b02 | ||
|
|
04aa0de265 | ||
|
|
4d46f75d45 | ||
|
|
5dd4ee6770 | ||
|
|
1d12cfdce2 | ||
|
|
973c18fb8c | ||
|
|
da4e3881ea | ||
|
|
ab26cddca2 | ||
|
|
12b323b700 | ||
|
|
3e8a713bc4 | ||
|
|
79f50ce7df | ||
|
|
08b6c139d5 | ||
|
|
f6c4028e51 | ||
|
|
09a649ff4b | ||
|
|
b3142fff2a | ||
|
|
3a246aad3d | ||
|
|
97662fa367 | ||
|
|
9cec59ca38 | ||
|
|
1d83009dc6 | ||
|
|
3489a674db | ||
|
|
f834fa99ce | ||
|
|
6ab19dcb51 | ||
|
|
543b1ebe2b | ||
|
|
a4c8cb117f | ||
|
|
e5bdc8bd26 | ||
|
|
86a9783976 | ||
|
|
060aa0021f | ||
|
|
b66c7956e0 |
84
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
84
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
name: Bug report
|
||||
description: Create a bug report to help us improve
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of the bug.
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: ImmortalWrt version
|
||||
description: |
|
||||
The ImmortalWrt release or commit hash where this bug occurs (use command below).
|
||||
```. /etc/openwrt_release && echo $DISTRIB_REVISION```
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: target
|
||||
attributes:
|
||||
label: ImmortalWrt target/subtarget
|
||||
description: |
|
||||
The ImmortalWrt target and subtarget where this bug is observed (use command below).
|
||||
```. /etc/openwrt_release && echo $DISTRIB_TARGET```
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: device
|
||||
attributes:
|
||||
label: Device
|
||||
description: |
|
||||
The device exhibiting this bug (if unsure, use command below).
|
||||
```cat /tmp/sysinfo/model```
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: image_kind
|
||||
attributes:
|
||||
label: Image kind
|
||||
options:
|
||||
- Official downloaded image
|
||||
- Self-built image
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Steps to reproduce the reported behaviour.
|
||||
- type: textarea
|
||||
id: behaviour
|
||||
attributes:
|
||||
label: Actual behaviour
|
||||
description: A clear and concise description of what actually happens.
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behaviour
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional info
|
||||
description: Add any additional info you think might be helfpul.
|
||||
- type: textarea
|
||||
id: diffconfig
|
||||
attributes:
|
||||
label: Diffconfig
|
||||
description: |
|
||||
In case of a self-built image, please attach diffconfig.
|
||||
```./scripts/diffconfig.sh```
|
||||
render: text
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Terms
|
||||
description: By submitting this issue, you agree to the terms below.
|
||||
options:
|
||||
- label: I am reporting an issue for ImmortalWrt, not an unsupported fork.
|
||||
required: true
|
||||
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: ImmortalWrt community
|
||||
url: https://t.me/ctcgfw_openwrt_discuss
|
||||
about: Consider reaching out to our community to get help. ImmortalWrt is a complex software project with many pitfalls; there is a good chance someone can help you solve your issue in no time.
|
||||
- name: OpenWrt documentation
|
||||
url: https://openwrt.org/docs/start
|
||||
about: The OpenWrt documentation contains a lot of valuable information.
|
||||
@@ -1,52 +0,0 @@
|
||||
# CONTRIBUTED
|
||||
|
||||
## Thanks to
|
||||
<a href="https://dlercloud.com/"><img src="https://user-images.githubusercontent.com/22235437/111103249-f9ec6e00-8588-11eb-9bfc-67cc55574555.png" width="183" height="52" border="0" alt="Dler Cloud"></a><br/>
|
||||
<a href="https://www.jetbrains.com/"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_square.png" width="120" height="120" border="0" alt="JetBrains Black Box Logo logo"></a><br/>
|
||||
<a href="https://osdn.net/"><img src="https://osdn.net/sflogo.php?group_id=13647&type=2" width="125" height="39" border="0" alt="OSDN"></a>
|
||||
|
||||
## The Source of Packages
|
||||
### Based on: [openwrt/openwrt@openwrt-21.02](https://github.com/openwrt/openwrt/tree/openwrt-21.02).<br/>
|
||||
Package lean: [coolsnowwolf/lede](https://github.com/coolsnowwolf/lede).<br/>
|
||||
Package ntlf9t: [jsda/packages2](https://github.com/jsda/packages2).<br/>
|
||||
luci-app-serverchan source: [tty228/luci-app-serverchan](https://github.com/tty228/luci-app-serverchan).<br/>
|
||||
OpenAppFilter source: [destan19/OpenAppFilter](https://github.com/destan19/OpenAppFilter).<br/>
|
||||
luci-app-k3screenctrl source: [lwz322/luci-app-k3screenctrl](https://github.com/lwz322/luci-app-k3screenctrl).<br/>
|
||||
phicomm-k3screenctrl source: [lwz322/k3screenctrl\_build](https://github.com/lwz322/k3screenctrl_build).<br/>
|
||||
luci-app-smstool source: [f8q8/luci-app-smstool-master](https://github.com/f8q8/luci-app-smstool-master).<br/>
|
||||
luci-app-airwhu source: [KyleRicardo/luci-app-airwhu](https://github.com/KyleRicardo/luci-app-airwhu).<br/>
|
||||
Package Lienol: [Lienol/openwrt-package](https://github.com/Lienol/openwrt-package).<br/>
|
||||
luci-app-bbr-mod source: [ntlf9t/luci-app-bbr-mod](https://github.com/ntlf9t/luci-app-bbr-mod).<br/>
|
||||
Package Openwrt-BBR: [anshi233/Openwrt-BBR](https://github.com/anshi233/Openwrt-BBR).<br/>
|
||||
simple-obfs source: [aa65535/openwrt-simple-obfs](https://github.com/aa65535/openwrt-simple-obfs).<br/>
|
||||
v2ray-plugin source: [honwen/openwrt-v2ray-plugin](https://github.com/honwen/openwrt-v2ray-plugin).<br/>
|
||||
Package zxlhhyccc: [zxlhhyccc/MY-lede](https://github.com/zxlhhyccc/MY-lede).<br/>
|
||||
luci-theme-argon source: [jerrykuku/luci-theme-argon](https://github.com/jerrykuku/luci-theme-argon).<br/>
|
||||
openwrt-chinadns-ng source: [pexcn/openwrt-chinadns-ng](https://github.com/pexcn/openwrt-chinadns-ng).<br/>
|
||||
openwrt-udpspeeder source: [zhfreal/openwrt-UDPspeeder](https://github.com/zhfreal/openwrt-UDPspeeder).<br/>
|
||||
luci-app-onliner source: [rufengsuixing/luci-app-onliner](https://github.com/rufengsuixing/luci-app-onliner).<br/>
|
||||
luci-lib-docker source: [lisaac/luci-lib-docker](https://github.com/lisaac/luci-lib-docker).<br/>
|
||||
openwrt-iptvhelper source: [riverscn/openwrt-iptvhelper](https://github.com/riverscn/openwrt-iptvhelper).<br>
|
||||
luci-app-autoipsetadder source: [rufengsuixing/luci-app-autoipsetadder](https://github.com/rufengsuixing/luci-app-autoipsetadder).<br>
|
||||
luci-app-adguardhome source: [rufengsuixing/luci-app-adguardhome](https://github.com/rufengsuixing/luci-app-adguardhome).<br/>
|
||||
Rclone-OpenWrt source: [ElonH/Rclone-OpenWrt](https://github.com/ElonH/Rclone-OpenWrt).<br/>
|
||||
luci-app-usb3disable source: [rufengsuixing/luci-app-usb3disable](https://github.com/rufengsuixing/luci-app-usb3disable).<br/>
|
||||
lua-maxminddb source: [jerrykuku/lua-maxminddb](https://github.com/jerrykuku/lua-maxminddb).<br/>
|
||||
package openwrt-mwol: [Mleaf/openwrt-mwol](https://github.com/Mleaf/openwrt-mwol).<br/>
|
||||
package gargoyle: [ericpaulbishop/gargoyle](https://github.com/ericpaulbishop/gargoyle).<br/>
|
||||
luci-app-qos-gargoyle source: [kuoruan/luci-app-qos-gargoyle](https://github.com/kuoruan/luci-app-qos-gargoyle).<br/>
|
||||
luci-app-cupsd source: [F-Light/luci-app-cupsd](https://github.com/F-Light/luci-app-cupsd).<br/>
|
||||
ootoc-OpenWRT source: [ElonH/ootoc-OpenWRT](https://github.com/ElonH/ootoc-OpenWRT).<br/>
|
||||
r8168 source: [BROBIRD/openwrt-r8168](https://github.com/BROBIRD/openwrt-r8168).<br/>
|
||||
MentoHUST source: [KyleRicardo/MentoHUST-OpenWrt-ipk](https://github.com/KyleRicardo/MentoHUST-OpenWrt-ipk).<br/>
|
||||
luci-app-mentohust source: [BoringCat/luci-app-mentohust](https://github.com/BoringCat/luci-app-mentohust).<br/>
|
||||
luci-app-minieap source: [BoringCat/luci-app-minieap](https://github.com/BoringCat/luci-app-minieap).<br/>
|
||||
scutclient source: [scutclient/scutclient](https://github.com/scutclient/scutclient).<br/>
|
||||
luci-app-scutclient source: [scutclient/luci-app-scutclient](https://github.com/scutclient/luci-app-scutclient).<br/>
|
||||
MT-Wifi 5.0.4.0: [MeIsReallyBa/mt7615-dbdc-linux5.4](https://github.com/MeIsReallyBa/mt7615-dbdc-linux5.4).<br/>
|
||||
node-request source: [jerrykuku/node-request](https://github.com/jerrykuku/node-request).<br/>
|
||||
luci-app-jd-dailybonus source: [jerrykuku/luci-app-jd-dailybonus](https://github.com/jerrykuku/luci-app-jd-dailybonus).<br/>
|
||||
luci-app-oled source: [NateLol/luci-app-oled](https://github.com/NateLol/luci-app-oled).<br/>
|
||||
luci-app-beardropper source: [NateLol/natelol](https://github.com/NateLol/natelol).<br/>
|
||||
luci-app-vssr source: [jerrykuku/luci-app-vssr](https://github.com/jerrykuku/luci-app-vssr).<br/>
|
||||
luci-proto-minieap source: [ysc3839/luci-proto-minieap](https://github.com/ysc3839/luci-proto-minieap).
|
||||
4
COPYING
4
COPYING
@@ -1,4 +1,4 @@
|
||||
OpenWrt is provided under:
|
||||
ImmortalWrt is provided under:
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
@@ -9,4 +9,4 @@ according with:
|
||||
|
||||
In addition, other licenses may also apply.
|
||||
|
||||
All contributions to OpenWrt are subject to this COPYING file.
|
||||
All contributions to ImmortalWrt are subject to this COPYING file.
|
||||
|
||||
134
LICENSES/GPL-2.0
134
LICENSES/GPL-2.0
@@ -36,48 +36,37 @@ your programs, too.
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
@@ -220,62 +209,9 @@ restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
@@ -366,15 +302,15 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -389,11 +325,11 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
|
||||
674
LICENSES/GPL-3.0
674
LICENSES/GPL-3.0
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
11
Makefile
11
Makefile
@@ -50,13 +50,16 @@ printdb:
|
||||
|
||||
prepare: $(target/stamp-compile)
|
||||
|
||||
clean: FORCE
|
||||
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages
|
||||
_clean: FORCE
|
||||
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(TOPDIR)/staging_dir/packages
|
||||
|
||||
targetclean: clean
|
||||
clean: _clean
|
||||
rm -rf $(BUILD_LOG_DIR)
|
||||
|
||||
targetclean: _clean
|
||||
rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
|
||||
|
||||
dirclean: targetclean
|
||||
dirclean: targetclean clean
|
||||
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(BUILD_DIR_BASE)/host
|
||||
rm -rf $(TMP_DIR)
|
||||
$(MAKE) -C $(TOPDIR)/scripts/config clean
|
||||
|
||||
98
README.md
98
README.md
@@ -18,7 +18,7 @@ If your device is supported, please follow the **Info** link to see install inst
|
||||
To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.<br/>
|
||||
|
||||
### Requirements
|
||||
To build with this project, Ubuntu 18.04 LTS is preferred. And you need use the CPU based on AMD64 architecture, with at least 4GB RAM and 25 GB available disk space. Make sure the __Internet__ is accessible.
|
||||
To build with this project, Ubuntu 20.04 LTS is preferred. And you need use the CPU based on AMD64 architecture, with at least 4GB RAM and 25 GB available disk space. Make sure the __Internet__ is accessible.
|
||||
|
||||
The following tools are needed to compile ImmortalWrt, the package names vary between distributions.
|
||||
|
||||
@@ -31,12 +31,12 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens
|
||||
sudo apt update -y
|
||||
sudo apt full-upgrade -y
|
||||
sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
|
||||
bzip2 ccache cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib g++-multilib \
|
||||
git gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
|
||||
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5 libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
|
||||
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip python3-ply \
|
||||
python-docutils qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
|
||||
vim wget xmlto xxd zlib1g-dev
|
||||
bzip2 ccache clang clangd cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \
|
||||
g++-multilib git gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev libglib2.0-dev \
|
||||
libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5 libncursesw5-dev libreadline-dev \
|
||||
libssl-dev libtool lld lldb lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 \
|
||||
python3 python3-pip python3-ply python-docutils qemu-utils re2c rsync scons squashfs-tools subversion swig \
|
||||
texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
|
||||
```
|
||||
</details>
|
||||
- Method 2:
|
||||
@@ -44,9 +44,6 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens
|
||||
sudo bash -c 'bash <(curl -s https://build-scripts.immortalwrt.eu.org/init_build_environment.sh)'
|
||||
```
|
||||
|
||||
- You can also download and use prebuilt container directly:<br/>
|
||||
See #Quickstart - Build image via OPDE
|
||||
|
||||
Note:
|
||||
- For the for love of god please do __not__ use ROOT user to build your image.
|
||||
- Using CPUs based on other architectures should be fine to compile ImmortalWrt, but more hacks are needed - No warranty at all.
|
||||
@@ -56,76 +53,18 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens
|
||||
- For more details, please see [Build system setup](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) documentation.
|
||||
|
||||
### Quickstart
|
||||
- Method 1:
|
||||
1. Run `git clone -b <branch> --single-branch https://github.com/immortalwrt/immortalwrt` to clone the source code.
|
||||
2. Run `cd immortalwrt` to enter source directory.
|
||||
3. Run `./scripts/feeds update -a` to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default
|
||||
4. Run `./scripts/feeds install -a` to install symlinks for all obtained packages into package/feeds/
|
||||
5. Run `make menuconfig` to select your preferred configuration for the toolchain, target system & firmware packages.
|
||||
6. Run `make` to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.
|
||||
|
||||
- Method 2:
|
||||
<details>
|
||||
<summary>Build image via OPDE</summary>
|
||||
|
||||
- Pull the prebuilt container:
|
||||
```bash
|
||||
docker pull immortalwrt/opde:base
|
||||
# docker run --rm -it immortalwrt/opde:base
|
||||
```
|
||||
|
||||
- For Linux User:
|
||||
```bash
|
||||
git clone -b <branch> --single-branch https://github.com/immortalwrt/immortalwrt && cd immortalwrt
|
||||
docker run --rm -it \
|
||||
-v $PWD:/openwrt \
|
||||
immortalwrt/opde:base zsh
|
||||
./scripts/feeds update -a && ./scripts/feeds install -a
|
||||
```
|
||||
|
||||
- For Windows User:
|
||||
1. Create a volume 'immortalwrt' and clone ImmortalWrt source into volume.
|
||||
```bash
|
||||
docker run --rm -it -v immortalwrt:/openwrt immortalwrt/opde:base git clone -b <branch> --single-branch https://github.com/immortalwrt/immortalwrt .
|
||||
```
|
||||
2. Enter docker container and update feeds.
|
||||
```bash
|
||||
docker run --rm -it -v immortalwrt:/openwrt immortalwrt/opde:base
|
||||
./scripts/feeds update -a && ./scripts/feeds install -a
|
||||
```
|
||||
- Tips: ImmortalWrt source code can not be cloned into NTFS filesystem (symbol link problem during compilation), but docker volume is fine.
|
||||
|
||||
- Proxy Support:
|
||||
```bash
|
||||
docker run --rm -it \
|
||||
-e all_proxy=http://example.com:1081 \
|
||||
-e http_proxy=http://example.com:1081 \
|
||||
-e https_proxy=http://example.com:1081 \
|
||||
-e ALL_PROXY=http://example.com:1081 \
|
||||
-e HTTP_PROXY=http://example.com:1081 \
|
||||
-e HTTPS_PROXY=http://example.com:1081 \
|
||||
-v $PWD:/openwrt \
|
||||
immortalwrt/opde:base zsh
|
||||
```
|
||||
|
||||
> Recommand `http` rather `socks5` protocol
|
||||
>
|
||||
> IP can not be `localhost` or `127.0.0.1`
|
||||
|
||||
- For Windows User, binary is still in volume. It can be copied to outside via followed command:
|
||||
```bash
|
||||
docker run --rm -v <D:\path\to\dir>:/dst -v openwrt:/openwrt -w /dst immortalwrt:base cp /openwrt/bin /dst
|
||||
```
|
||||
> Make sure `D:\path\to\dir` has been appended in [File Sharing](https://docs.docker.com/docker-for-windows/#file-sharing).
|
||||
|
||||
</details>
|
||||
1. Run `git clone -b <branch> --single-branch https://github.com/immortalwrt/immortalwrt` to clone the source code.
|
||||
2. Run `cd immortalwrt` to enter source directory.
|
||||
3. Run `./scripts/feeds update -a` to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default
|
||||
4. Run `./scripts/feeds install -a` to install symlinks for all obtained packages into package/feeds/
|
||||
5. Run `make menuconfig` to select your preferred configuration for the toolchain, target system & firmware packages.
|
||||
6. Run `make` to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.
|
||||
|
||||
### Related Repositories
|
||||
The main repository uses multiple sub-repositories to manage packages of different categories. All packages are installed via the ImmortalWrt package manager called opkg. If you're looking to develop the web interface or port packages to ImmortalWrt, please find the fitting repository below.
|
||||
- [LuCI Web Interface](https://github.com/immortalwrt/luci): Modern and modular interface to control the device via a web browser.
|
||||
- [ImmortalWrt Packages](https://github.com/immortalwrt/packages): Community repository of ported packages.
|
||||
- [OpenWrt Routing](https://github.com/openwrt/routing): Packages specifically focused on (mesh) routing.
|
||||
- [CONTRIBUTED.md](https://github.com/immortalwrt/immortalwrt/blob/master/CONTRIBUTED.md): the 3rd-party packages we introduced.
|
||||
|
||||
## Support Information
|
||||
For a list of supported devices see the [OpenWrt Hardware Database](https://openwrt.org/supported_devices)
|
||||
@@ -140,4 +79,13 @@ For a list of supported devices see the [OpenWrt Hardware Database](https://open
|
||||
- Support Chat: group [#immortalwrt](https://matrix.to/#/#immortalwrt:matrix.org) on [Matrix](https://matrix.org/).
|
||||
|
||||
## License
|
||||
ImmortalWrt is licensed under [GPL-3.0-only](https://spdx.org/licenses/GPL-3.0-only.html).
|
||||
ImmortalWrt is licensed under [GPL-2.0-only](https://spdx.org/licenses/GPL-2.0-only.html).
|
||||
|
||||
## Acknowledgements
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="https://dlercloud.com/"><img src="https://user-images.githubusercontent.com/22235437/111103249-f9ec6e00-8588-11eb-9bfc-67cc55574555.png" width="183" height="52" border="0" alt="Dler Cloud"></a></td>
|
||||
<td><a href="https://www.jetbrains.com/"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_square.png" width="120" height="120" border="0" alt="JetBrains Black Box Logo logo"></a></td>
|
||||
<td><a href="https://osdn.net/"><img src="https://osdn.net/sflogo.php?group_id=13647&type=2" width="125" height="39" border="0" alt="OSDN"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -164,7 +164,6 @@ menu "Global build settings"
|
||||
|
||||
choice
|
||||
prompt "Binary stripping method"
|
||||
default USE_STRIP if EXTERNAL_TOOLCHAIN
|
||||
default USE_STRIP if USE_GLIBC
|
||||
default USE_SSTRIP
|
||||
help
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
src-git-full packages https://github.com/immortalwrt/packages.git^97cadc2b6301460aae91c9b744631e27c0f454c6
|
||||
src-git-full luci https://github.com/immortalwrt/luci.git^dc88c6813733262e0a31a6aad917fbcdeac06c23
|
||||
src-git-full routing https://github.com/openwrt/routing.git^25e76489c83cfcee61e36a491896e1e9bfc3ec13
|
||||
src-git-full telephony https://github.com/openwrt/telephony.git^89cc8fccf757614eac1d45a684f4971393e0d984
|
||||
src-git-full packages https://github.com/immortalwrt/packages.git^b5f328296fa427a8bf4bc7e42a51a08b5897af9e
|
||||
src-git-full luci https://github.com/immortalwrt/luci.git^4094fcb084b71d625d538c0c98e72b15347282f2
|
||||
src-git-full routing https://github.com/openwrt/routing.git^0621622dc5653127f5656010905f71daebf85ad0
|
||||
src-git-full telephony https://github.com/openwrt/telephony.git^920fbc5c0a2e4badf51bceff42e9a1e3eb693462
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*"
|
||||
|
||||
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | mkhash md5
|
||||
find_md5_reproducible=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -print0 | xargs -0 mkhash md5 | sort | mkhash md5
|
||||
|
||||
define rdep
|
||||
.PRECIOUS: $(2)
|
||||
|
||||
@@ -27,7 +27,7 @@ define dl_method
|
||||
$(strip \
|
||||
$(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
|
||||
$(if $(2),$(2), \
|
||||
$(if $(filter @OPENWRT @IMMORTALWRT @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
|
||||
$(if $(filter @OPENWRT @IMMORTALWRT @APACHE/% @DEBIAN/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
|
||||
$(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
|
||||
$(if $(filter svn://%,$(1)),svn, \
|
||||
$(if $(filter cvs://%,$(1)),cvs, \
|
||||
|
||||
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/depends.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
|
||||
BUILD_TYPES += host
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
|
||||
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
|
||||
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
|
||||
@@ -197,8 +197,8 @@ ifndef DUMP
|
||||
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
host-compile:
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \
|
||||
$(XARGS) rm -rf
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
endif
|
||||
endef
|
||||
endif
|
||||
|
||||
2
include/kernel-5.4
Normal file
2
include/kernel-5.4
Normal file
@@ -0,0 +1,2 @@
|
||||
LINUX_VERSION-5.4 = .230
|
||||
LINUX_KERNEL_HASH-5.4.230 = a74fd32ccc1025b72f3ba7183208761f7c6190fb96e8f484f6d543a5a183e62f
|
||||
@@ -10,7 +10,7 @@ ifneq ($(DUMP),1)
|
||||
endif
|
||||
|
||||
KERNEL_FILE_DEPENDS=$(GENERIC_BACKPORT_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
|
||||
include $(INCLUDE_DIR)/download.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
|
||||
@@ -6,9 +6,12 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .215
|
||||
KERNEL_DETAILS_FILE=$(INCLUDE_DIR)/kernel-$(KERNEL_PATCHVER)
|
||||
ifeq ($(wildcard $(KERNEL_DETAILS_FILE)),)
|
||||
$(error Missing kernel version/hash file for $(KERNEL_PATCHVER). Please create $(KERNEL_DETAILS_FILE))
|
||||
endif
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.215 = 2d2bf7c3a25297f2b4686aa50a7cdaac68b52fc4c81b2cd3dddfe9f592b34ebd
|
||||
include $(KERNEL_DETAILS_FILE)
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@@ -64,9 +64,7 @@ $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MARK, $(P_XT)
|
||||
|
||||
# kernel only
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK, $(P_XT)nf_conntrack),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK_RTCACHE, $(P_XT)nf_conntrack_rtcache),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV4, $(P_V4)nf_defrag_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK_IPV4, $(P_V4)nf_conntrack_ipv4),))
|
||||
|
||||
$(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_STATE, $(P_XT)xt_state))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_TARGET_CT, $(P_XT)xt_CT))
|
||||
@@ -124,7 +122,6 @@ $(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_STATISTIC, $(P_XT)xt_st
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_TCPMSS, $(P_XT)xt_tcpmss))
|
||||
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_CLASSIFY, $(P_XT)xt_CLASSIFY))
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_MATCH_DSCP, $(P_V4)ipt_dscp))
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_TARGET_ECN, $(P_V4)ipt_ECN))
|
||||
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_ECN, $(P_XT)xt_ecn))
|
||||
@@ -160,17 +157,14 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_REJECT6,CONFIG_NF_REJECT_IPV6, $(P_V6)nf
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_IPT6,CONFIG_IP6_NF_IPTABLES, $(P_V6)ip6_tables),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_CONNTRACK_IPV6, $(P_V6)nf_conntrack_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_QUEUE, $(P_V6)ip6_queue),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6)))
|
||||
|
||||
|
||||
$(eval $(call nf_add,IPT_IPV6,CONFIG_IP6_NF_TARGET_LOG, $(P_V6)ip6t_LOG))
|
||||
$(eval $(call nf_add,IPT_IPV6,CONFIG_IP6_NF_TARGET_REJECT, $(P_V6)ip6t_REJECT))
|
||||
|
||||
# ipv6 extra
|
||||
@@ -230,11 +224,6 @@ $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_IRC, $(P_XT)nf_connt
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_IRC, $(P_XT)nf_nat_irc))
|
||||
|
||||
|
||||
# ulog
|
||||
|
||||
$(eval $(call nf_add,IPT_ULOG,CONFIG_IP_NF_TARGET_ULOG, $(P_V4)ipt_ULOG))
|
||||
|
||||
|
||||
# nflog
|
||||
|
||||
$(eval $(call nf_add,IPT_NFLOG,CONFIG_NETFILTER_XT_TARGET_NFLOG, $(P_XT)xt_NFLOG))
|
||||
@@ -320,7 +309,6 @@ $(eval $(call nf_add,EBTABLES_IP4,CONFIG_BRIDGE_EBT_SNAT, $(P_EBT)ebt_snat))
|
||||
|
||||
# watchers
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_LOG, $(P_EBT)ebt_log))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_ULOG, $(P_EBT)ebt_ulog))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFLOG, $(P_EBT)ebt_nflog))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nfqueue))
|
||||
|
||||
@@ -383,7 +371,6 @@ IPT_BUILTIN += $(IPT_NAT6-y)
|
||||
IPT_BUILTIN += $(IPT_NAT_EXTRA-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y)
|
||||
IPT_BUILTIN += $(IPT_ULOG-y)
|
||||
IPT_BUILTIN += $(IPT_TPROXY-y)
|
||||
IPT_BUILTIN += $(NFNETLINK-y)
|
||||
IPT_BUILTIN += $(NFNETLINK_LOG-y)
|
||||
|
||||
@@ -84,7 +84,7 @@ ifneq ($(PREV_STAMP_PREPARED),)
|
||||
STAMP_PREPARED:=$(PREV_STAMP_PREPARED)
|
||||
CONFIG_AUTOREBUILD:=
|
||||
else
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
endif
|
||||
STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_*
|
||||
@@ -258,8 +258,8 @@ define Build/CoreTargets
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
compile:
|
||||
-touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \
|
||||
$(XARGS) rm -rf
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ DEFAULT_PACKAGES.router:=\
|
||||
dnsmasq-full \
|
||||
firewall \
|
||||
iptables \
|
||||
ipv6helper \
|
||||
ppp \
|
||||
ppp-mod-pppoe
|
||||
# For easy usage
|
||||
|
||||
@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.2)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.4)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19616-49aba5fcac)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19892-a6dce2ceb7)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.2)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/21.02.4)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt)
|
||||
|
||||
@@ -49,7 +49,6 @@ generate_static_network() {
|
||||
uci -q batch <<-EOF
|
||||
delete network.globals
|
||||
set network.globals='globals'
|
||||
set network.globals.ula_prefix='auto'
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -96,7 +95,7 @@ generate_network() {
|
||||
|
||||
json_select network
|
||||
json_select "$1"
|
||||
json_get_vars device macaddr protocol ipaddr netmask vlan
|
||||
json_get_vars device macaddr metric protocol ipaddr netmask vlan
|
||||
json_get_values ports ports
|
||||
json_select ..
|
||||
json_select ..
|
||||
@@ -154,6 +153,7 @@ generate_network() {
|
||||
set network.$1='interface'
|
||||
set network.$1.type='$type'
|
||||
set network.$1.device='$device'
|
||||
set network.$1.metric='$metric'
|
||||
set network.$1.proto='none'
|
||||
EOF
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[ -f /etc/banner ] && cat /etc/banner
|
||||
[ -n "$FAILSAFE" ] && cat /etc/banner.failsafe
|
||||
|
||||
fgrep -sq '/ overlay ro,' /proc/mounts && {
|
||||
grep -Fsq '/ overlay ro,' /proc/mounts && {
|
||||
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
|
||||
echo 'Please try to remove files from /overlay/upper/... and reboot!'
|
||||
}
|
||||
@@ -51,12 +51,3 @@ in order to prevent unauthorized SSH logins.
|
||||
--------------------------------------------------
|
||||
EOF
|
||||
fi
|
||||
|
||||
service() {
|
||||
[ -f "/etc/init.d/$1" ] || {
|
||||
echo "service "'"'"$1"'"'" not found, the following services are available:"
|
||||
ls "/etc/init.d"
|
||||
return 1
|
||||
}
|
||||
/etc/init.d/$@
|
||||
}
|
||||
|
||||
@@ -8,26 +8,5 @@ alias ll='ls -alF --color=auto'
|
||||
[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
|
||||
service() {
|
||||
if [ -f "/etc/init.d/$1" ]; then
|
||||
/etc/init.d/$@
|
||||
else
|
||||
echo "Usage: service <service> [command]"
|
||||
if [ -n "$1" ]; then
|
||||
echo "Service "'"'"$1"'"'" not found, the following services are available:"
|
||||
else
|
||||
echo "The following services are available:"
|
||||
fi
|
||||
for F in /etc/init.d/* ; do
|
||||
printf "%-30s\t%10s\t%10s\n" "$F" \
|
||||
$( $($F enabled) && echo "enabled" || echo "disabled" ) \
|
||||
$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \
|
||||
| jsonfilter -q -e "@['$(basename $F)'].instances[*].running" | uniq)" = "true" ] \
|
||||
&& echo "running" || echo "stopped" )
|
||||
done;
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
[ -n "$KSH_VERSION" -o \! -s "$HOME/.shinit" ] || . "$HOME/.shinit"
|
||||
[ -z "$KSH_VERSION" -o \! -s "$HOME/.mkshrc" ] || . "$HOME/.mkshrc"
|
||||
|
||||
@@ -183,7 +183,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.immortalwrt.org/releases/21.02-SNAPSHOT"
|
||||
default "https://downloads.immortalwrt.org/releases/21.02.4"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -44,15 +44,18 @@ zbtlink,zbt-wg2626|\
|
||||
zte,mf283plus)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
|
||||
;;
|
||||
h3c,tx1800-plus|\
|
||||
h3c,tx1801-plus|\
|
||||
h3c,tx1806|\
|
||||
jcg,q20)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
hootoo,ht-tm05|\
|
||||
ravpower,rp-wd03)
|
||||
idx="$(find_mtd_index u-boot-env)"
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
|
||||
;;
|
||||
jcg,q20)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
linksys,ea7300-v1|\
|
||||
linksys,ea7300-v2|\
|
||||
linksys,ea7500-v2|\
|
||||
|
||||
@@ -2,7 +2,7 @@ fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0x8fffffff
|
||||
initrd_high=0xffffffff
|
||||
sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr
|
||||
sd_boot=ext4load mmc 0:1 ${loadaddr} fitImage;bootm ${loadaddr}
|
||||
bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;run sd_boot
|
||||
bootdelay=3
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From b382eeafe01df21da3518b2f1dd7d22ee114efb0 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Mon, 24 Oct 2022 14:19:38 +0200
|
||||
Subject: [PATCH] layerscape: adjust LS1021A-IOT config for OpenWrt
|
||||
|
||||
Two configs are required:
|
||||
- FIT
|
||||
- Ext4load
|
||||
|
||||
Let's enable it. U-boot is now bigger than 512K. Let's enlarge it to
|
||||
768K. Envs start at 1M, so it will fit.
|
||||
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
configs/ls1021aiot_sdcard_defconfig | 3 +++
|
||||
include/configs/ls1021aiot.h | 4 ++--
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/configs/ls1021aiot_sdcard_defconfig
|
||||
+++ b/configs/ls1021aiot_sdcard_defconfig
|
||||
@@ -27,8 +27,11 @@ CONFIG_CMD_MII=y
|
||||
# CONFIG_CMD_MDIO is not set
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_EXT2=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
CONFIG_CMD_FAT=y
|
||||
# CONFIG_SPL_EFI_PARTITION is not set
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
--- a/include/configs/ls1021aiot.h
|
||||
+++ b/include/configs/ls1021aiot.h
|
||||
@@ -78,8 +78,8 @@
|
||||
CONFIG_SYS_MONITOR_LEN)
|
||||
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
|
||||
#define CONFIG_SPL_BSS_START_ADDR 0x80100000
|
||||
-#define CONFIG_SPL_BSS_MAX_SIZE 0x80000
|
||||
-#define CONFIG_SYS_MONITOR_LEN 0x80000
|
||||
+#define CONFIG_SPL_BSS_MAX_SIZE 0xc0000
|
||||
+#define CONFIG_SYS_MONITOR_LEN 0xc0000
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000UL
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2020 Lean <coolsnowwolf@gmail.com>
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
@@ -11,7 +11,8 @@ PKG_RELEASE:=$(COMMITCOUNT)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_TARGET_bcm27xx \
|
||||
CONFIG_TARGET_bcm53xx
|
||||
CONFIG_TARGET_bcm53xx \
|
||||
CONFIG_TARGET_mvebu
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
@@ -21,7 +22,8 @@ define Package/autocore-arm
|
||||
MAINTAINER:=CN_SZTL
|
||||
DEPENDS:=@(arm||aarch64) \
|
||||
+TARGET_bcm27xx:bcm27xx-userland \
|
||||
+TARGET_bcm53xx:nvram
|
||||
+TARGET_bcm53xx:nvram \
|
||||
+TARGET_mvebu:mhz
|
||||
VARIANT:=arm
|
||||
endef
|
||||
|
||||
@@ -36,12 +38,8 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/autocore/install/Default
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/generic/10_system.js $(1)/etc/rpcd_10_system.js
|
||||
$(CP) ./files/generic/luci $(1)/etc/rpcd_luci
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/generic/090-cover-index_files $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/generic/60-autocore-reload-rpcd $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) ./files/generic/cpuinfo $(1)/sbin/
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ ! -f '/etc/rpcd_10_system.js' ] || \
|
||||
mv -f '/etc/rpcd_10_system.js' '/www/luci-static/resources/view/status/include/10_system.js'
|
||||
[ ! -f '/etc/rpcd_luci' ] || \
|
||||
mv -f '/etc/rpcd_luci' '/usr/libexec/rpcd/luci'
|
||||
/etc/init.d/rpcd restart
|
||||
|
||||
exit 0
|
||||
@@ -1,114 +0,0 @@
|
||||
'use strict';
|
||||
'require baseclass';
|
||||
'require fs';
|
||||
'require rpc';
|
||||
|
||||
var callSystemBoard = rpc.declare({
|
||||
object: 'system',
|
||||
method: 'board'
|
||||
});
|
||||
|
||||
var callSystemInfo = rpc.declare({
|
||||
object: 'system',
|
||||
method: 'info'
|
||||
});
|
||||
|
||||
var callCPUBench = rpc.declare({
|
||||
object: 'luci',
|
||||
method: 'getCPUBench'
|
||||
});
|
||||
|
||||
var callCPUInfo = rpc.declare({
|
||||
object: 'luci',
|
||||
method: 'getCPUInfo'
|
||||
});
|
||||
|
||||
var callCPUUsage = rpc.declare({
|
||||
object: 'luci',
|
||||
method: 'getCPUUsage'
|
||||
});
|
||||
|
||||
var callTempInfo = rpc.declare({
|
||||
object: 'luci',
|
||||
method: 'getTempInfo'
|
||||
});
|
||||
|
||||
return baseclass.extend({
|
||||
title: _('System'),
|
||||
|
||||
load: function() {
|
||||
return Promise.all([
|
||||
L.resolveDefault(callSystemBoard(), {}),
|
||||
L.resolveDefault(callSystemInfo(), {}),
|
||||
L.resolveDefault(callCPUBench(), {}),
|
||||
L.resolveDefault(callCPUInfo(), {}),
|
||||
L.resolveDefault(callCPUUsage(), {}),
|
||||
L.resolveDefault(callTempInfo(), {}),
|
||||
fs.lines('/usr/lib/lua/luci/version.lua')
|
||||
]);
|
||||
},
|
||||
|
||||
render: function(data) {
|
||||
var boardinfo = data[0],
|
||||
systeminfo = data[1],
|
||||
cpubench = data[2],
|
||||
cpuinfo = data[3],
|
||||
cpuusage = data[4],
|
||||
tempinfo = data[5],
|
||||
luciversion = data[6];
|
||||
|
||||
luciversion = luciversion.filter(function(l) {
|
||||
return l.match(/^\s*(luciname|luciversion)\s*=/);
|
||||
}).map(function(l) {
|
||||
return l.replace(/^\s*\w+\s*=\s*['"]([^'"]+)['"].*$/, '$1');
|
||||
}).join(' ');
|
||||
|
||||
var datestr = null;
|
||||
|
||||
if (systeminfo.localtime) {
|
||||
var date = new Date(systeminfo.localtime * 1000);
|
||||
|
||||
datestr = '%04d-%02d-%02d %02d:%02d:%02d'.format(
|
||||
date.getUTCFullYear(),
|
||||
date.getUTCMonth() + 1,
|
||||
date.getUTCDate(),
|
||||
date.getUTCHours(),
|
||||
date.getUTCMinutes(),
|
||||
date.getUTCSeconds()
|
||||
);
|
||||
}
|
||||
|
||||
var fields = [
|
||||
_('Hostname'), boardinfo.hostname,
|
||||
_('Model'), boardinfo.model + cpubench.cpubench,
|
||||
_('Architecture'), cpuinfo.cpuinfo,
|
||||
_('Target Platform'), (L.isObject(boardinfo.release) ? boardinfo.release.target : ''),
|
||||
_('Firmware Version'), (L.isObject(boardinfo.release) ? boardinfo.release.description + ' / ' : '') + (luciversion || ''),
|
||||
_('Kernel Version'), boardinfo.kernel,
|
||||
_('Local Time'), datestr,
|
||||
_('Uptime'), systeminfo.uptime ? '%t'.format(systeminfo.uptime) : null,
|
||||
_('Load Average'), Array.isArray(systeminfo.load) ? '%.2f, %.2f, %.2f'.format(
|
||||
systeminfo.load[0] / 65535.0,
|
||||
systeminfo.load[1] / 65535.0,
|
||||
systeminfo.load[2] / 65535.0
|
||||
) : null,
|
||||
_('CPU usage (%)'), cpuusage.cpuusage
|
||||
];
|
||||
|
||||
if (tempinfo.tempinfo) {
|
||||
fields.splice(6, 0, _('Temperature'));
|
||||
fields.splice(7, 0, tempinfo.tempinfo);
|
||||
}
|
||||
|
||||
var table = E('table', { 'class': 'table' });
|
||||
|
||||
for (var i = 0; i < fields.length; i += 2) {
|
||||
table.appendChild(E('tr', { 'class': 'tr' }, [
|
||||
E('td', { 'class': 'td left', 'width': '33%' }, [ fields[i] ]),
|
||||
E('td', { 'class': 'td left' }, [ (fields[i + 1] != null) ? fields[i + 1] : '?' ])
|
||||
]));
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
});
|
||||
5
package/emortal/autocore/files/generic/60-autocore-reload-rpcd
Executable file
5
package/emortal/autocore/files/generic/60-autocore-reload-rpcd
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
/etc/init.d/rpcd restart
|
||||
|
||||
exit 0
|
||||
@@ -21,16 +21,22 @@ case "$DISTRIB_TARGET" in
|
||||
cpu_freq="$(( $(vcgencmd measure_clock arm | awk -F '=' '{print $2}') / 1000000 ))Mhz" ;;
|
||||
"bcm53xx"/*)
|
||||
cpu_freq="$(nvram get clkfreq | awk -F ',' '{print $1}')MHz" ;;
|
||||
"mvebu"/*)
|
||||
cpu_freq="$(awk -F ': ' '/BogoMIPS/ {print $2}' "$CPUINFO_PATH" | head -n1)MHz" ;;
|
||||
"x86"/*)
|
||||
cpu_freq="$(awk -F ': ' '/MHz/ {print $2}' "$CPUINFO_PATH" | head -n1)MHz"
|
||||
"mvebu/cortexa72")
|
||||
cpu_freq="$(awk '{printf("%.fMHz", $0 / 1000)}' "$CPUFREQ_PATH/policy0/cpuinfo_cur_freq")"
|
||||
big_cpu_freq="$(awk '{printf("%.fMHz ", $0 / 1000)}' "$CPUFREQ_PATH/policy2/cpuinfo_cur_freq")"
|
||||
;;
|
||||
"mvebu"/*)
|
||||
cpu_freq="$(mhz | awk -F 'cpu_MHz=' '{printf("%.fMHz",$2)}')" ;;
|
||||
"rockchip"/*)
|
||||
cpu_freq="$(awk '{printf("%.fMHz", $0 / 1000)}' "$CPUFREQ_PATH/policy0/cpuinfo_cur_freq")"
|
||||
[ ! -e "$CPUFREQ_PATH/policy4/cpuinfo_cur_freq" ] || \
|
||||
big_cpu_freq="$(awk '{printf("%.fMHz ", $0 / 1000)}' "$CPUFREQ_PATH/policy4/cpuinfo_cur_freq")"
|
||||
;;
|
||||
"x86"/*)
|
||||
cpu_freq="$(awk -F ': ' '/MHz/ {print $2}' "$CPUINFO_PATH" | head -n1)MHz" ;;
|
||||
*)
|
||||
[ ! -e "$CPUFREQ_PATH/policy0/cpuinfo_cur_freq" ] || \
|
||||
cpu_freq="$(awk '{printf("%.fMHz", $0 / 1000)}' "$CPUFREQ_PATH/policy0/cpuinfo_cur_freq")"
|
||||
[ ! -e "$CPUFREQ_PATH/policy4/cpuinfo_cur_freq" ] || \
|
||||
big_cpu_freq="$(awk '{printf("%.fMHz ", $0 / 1000)}' "$CPUFREQ_PATH/policy4/cpuinfo_cur_freq")"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -38,10 +44,11 @@ case "$DISTRIB_TARGET" in
|
||||
"bcm27xx"/*)
|
||||
cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C" ;;
|
||||
"x86"/*)
|
||||
# Intel
|
||||
cpu_temp="$(sensors "coretemp-*" 2>"/dev/null" | grep -E "(Package id |Core )" | grep -Eo "\+[0-9.]*°C" | head -n1 | tr -d "+")"
|
||||
# AMD
|
||||
[ -n "${cpu_temp}" ] || cpu_temp="$(sensors "k*temp-*" 2>"/dev/null" | awk '/Tdie/ {print $2}' | head -n1 | tr -d "+")"
|
||||
if grep -q "GenuineIntel" "/proc/cpuinfo"; then
|
||||
cpu_temp="$(sensors "coretemp-*" 2>"/dev/null" | grep -E "(Package id |Core )" | grep -Eo "\+[0-9.]*°C" | head -n1 | tr -d "+")"
|
||||
elif grep -q "AuthenticAMD" "/proc/cpuinfo"; then
|
||||
cpu_temp="$(sensors "k*temp-*" 2>"/dev/null" | awk '/Tdie/ {print $2}' | head -n1 | tr -d "+")"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
[ ! -e "$THERMAL_PATH/thermal_zone0/temp" ] || \
|
||||
|
||||
@@ -12,13 +12,13 @@ for ifname, stat in pairs(util.ubus("network.device", "status")) do
|
||||
|
||||
status = stat.carrier and "yes" or "no"
|
||||
|
||||
if stat.speed:sub(1, 1) == "-" then
|
||||
if not stat.carrier or not stat.speed or stat.speed:sub(1, 1) == "-" then
|
||||
speed = "-"
|
||||
else
|
||||
speed = stat.speed:sub(1, -2) .. "Mb/s"
|
||||
end
|
||||
|
||||
if not stat.carrier then
|
||||
if speed == '-' then
|
||||
duplex = "-"
|
||||
elseif stat.speed:sub(-1) == "F" then
|
||||
duplex = "Full"
|
||||
|
||||
@@ -1,743 +0,0 @@
|
||||
#!/usr/bin/env lua
|
||||
|
||||
local json = require "luci.jsonc"
|
||||
local fs = require "nixio.fs"
|
||||
|
||||
local function readfile(path)
|
||||
local s = fs.readfile(path)
|
||||
return s and (s:gsub("^%s+", ""):gsub("%s+$", ""))
|
||||
end
|
||||
|
||||
local methods = {
|
||||
getInitList = {
|
||||
args = { name = "name" },
|
||||
call = function(args)
|
||||
local sys = require "luci.sys"
|
||||
local _, name, scripts = nil, nil, {}
|
||||
for _, name in ipairs(args.name and { args.name } or sys.init.names()) do
|
||||
local index = sys.init.index(name)
|
||||
if index then
|
||||
scripts[name] = { index = index, enabled = sys.init.enabled(name) }
|
||||
else
|
||||
return { error = "No such init script" }
|
||||
end
|
||||
end
|
||||
return scripts
|
||||
end
|
||||
},
|
||||
|
||||
setInitAction = {
|
||||
args = { name = "name", action = "action" },
|
||||
call = function(args)
|
||||
local sys = require "luci.sys"
|
||||
if type(sys.init[args.action]) ~= "function" then
|
||||
return { error = "Invalid action" }
|
||||
end
|
||||
return { result = sys.init[args.action](args.name) }
|
||||
end
|
||||
},
|
||||
|
||||
getLocaltime = {
|
||||
call = function(args)
|
||||
return { result = os.time() }
|
||||
end
|
||||
},
|
||||
|
||||
setLocaltime = {
|
||||
args = { localtime = 0 },
|
||||
call = function(args)
|
||||
local sys = require "luci.sys"
|
||||
local date = os.date("*t", args.localtime)
|
||||
if date then
|
||||
sys.call("date -s '%04d-%02d-%02d %02d:%02d:%02d' >/dev/null" %{ date.year, date.month, date.day, date.hour, date.min, date.sec })
|
||||
sys.call("/etc/init.d/sysfixtime restart >/dev/null")
|
||||
end
|
||||
return { result = args.localtime }
|
||||
end
|
||||
},
|
||||
|
||||
getTimezones = {
|
||||
call = function(args)
|
||||
local util = require "luci.util"
|
||||
local zones = require "luci.sys.zoneinfo"
|
||||
|
||||
local tz = readfile("/etc/TZ")
|
||||
local res = util.ubus("uci", "get", {
|
||||
config = "system",
|
||||
section = "@system[0]",
|
||||
option = "zonename"
|
||||
})
|
||||
|
||||
local result = {}
|
||||
local _, zone
|
||||
for _, zone in ipairs(zones.TZ) do
|
||||
result[zone[1]] = {
|
||||
tzstring = zone[2],
|
||||
active = (res and res.value == zone[1]) and true or nil
|
||||
}
|
||||
end
|
||||
return result
|
||||
end
|
||||
},
|
||||
|
||||
getLEDs = {
|
||||
call = function()
|
||||
local iter = fs.dir("/sys/class/leds")
|
||||
local result = { }
|
||||
|
||||
if iter then
|
||||
local led
|
||||
for led in iter do
|
||||
local m, s
|
||||
|
||||
result[led] = { triggers = {} }
|
||||
|
||||
s = readfile("/sys/class/leds/"..led.."/trigger")
|
||||
for s in (s or ""):gmatch("%S+") do
|
||||
m = s:match("^%[(.+)%]$")
|
||||
result[led].triggers[#result[led].triggers+1] = m or s
|
||||
result[led].active_trigger = m or result[led].active_trigger
|
||||
end
|
||||
|
||||
s = readfile("/sys/class/leds/"..led.."/brightness")
|
||||
if s then
|
||||
result[led].brightness = tonumber(s)
|
||||
end
|
||||
|
||||
s = readfile("/sys/class/leds/"..led.."/max_brightness")
|
||||
if s then
|
||||
result[led].max_brightness = tonumber(s)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
},
|
||||
|
||||
getUSBDevices = {
|
||||
call = function()
|
||||
local fs = require "nixio.fs"
|
||||
local iter = fs.glob("/sys/bus/usb/devices/[0-9]*/manufacturer")
|
||||
local result = { }
|
||||
|
||||
if iter then
|
||||
result.devices = {}
|
||||
|
||||
local p
|
||||
for p in iter do
|
||||
local id = p:match("/([^/]+)/manufacturer$")
|
||||
|
||||
result.devices[#result.devices+1] = {
|
||||
id = id,
|
||||
vid = readfile("/sys/bus/usb/devices/"..id.."/idVendor"),
|
||||
pid = readfile("/sys/bus/usb/devices/"..id.."/idProduct"),
|
||||
vendor = readfile("/sys/bus/usb/devices/"..id.."/manufacturer"),
|
||||
product = readfile("/sys/bus/usb/devices/"..id.."/product"),
|
||||
speed = tonumber((readfile("/sys/bus/usb/devices/"..id.."/product")))
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
iter = fs.glob("/sys/bus/usb/devices/*/*-port[0-9]*")
|
||||
|
||||
if iter then
|
||||
result.ports = {}
|
||||
|
||||
local p
|
||||
for p in iter do
|
||||
local port = p:match("([^/]+)$")
|
||||
local link = fs.readlink(p.."/device")
|
||||
|
||||
result.ports[#result.ports+1] = {
|
||||
port = port,
|
||||
device = link and fs.basename(link)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
},
|
||||
|
||||
getConntrackHelpers = {
|
||||
call = function()
|
||||
local ok, fd = pcall(io.open, "/usr/share/fw3/helpers.conf", "r")
|
||||
local rv = {}
|
||||
|
||||
if ok then
|
||||
local entry
|
||||
|
||||
while true do
|
||||
local line = fd:read("*l")
|
||||
if not line then
|
||||
break
|
||||
end
|
||||
|
||||
if line:match("^%s*config%s") then
|
||||
if entry then
|
||||
rv[#rv+1] = entry
|
||||
end
|
||||
entry = {}
|
||||
else
|
||||
local opt, val = line:match("^%s*option%s+(%S+)%s+(%S.*)$")
|
||||
if opt and val then
|
||||
opt = opt:gsub("^'(.+)'$", "%1"):gsub('^"(.+)"$', "%1")
|
||||
val = val:gsub("^'(.+)'$", "%1"):gsub('^"(.+)"$', "%1")
|
||||
entry[opt] = val
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if entry then
|
||||
rv[#rv+1] = entry
|
||||
end
|
||||
|
||||
fd:close()
|
||||
end
|
||||
|
||||
return { result = rv }
|
||||
end
|
||||
},
|
||||
|
||||
getFeatures = {
|
||||
call = function()
|
||||
local fs = require "nixio.fs"
|
||||
local rv = {}
|
||||
local ok, fd
|
||||
|
||||
rv.firewall = fs.access("/sbin/fw3")
|
||||
rv.opkg = fs.access("/bin/opkg")
|
||||
rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt")
|
||||
rv.br2684ctl = fs.access("/usr/sbin/br2684ctl")
|
||||
rv.swconfig = fs.access("/sbin/swconfig")
|
||||
rv.odhcpd = fs.access("/usr/sbin/odhcpd")
|
||||
rv.zram = fs.access("/sys/class/zram-control")
|
||||
rv.sysntpd = fs.readlink("/usr/sbin/ntpd") and true
|
||||
rv.ipv6 = fs.access("/proc/net/ipv6_route")
|
||||
rv.dropbear = fs.access("/usr/sbin/dropbear")
|
||||
rv.cabundle = fs.access("/etc/ssl/certs/ca-certificates.crt")
|
||||
rv.relayd = fs.access("/usr/sbin/relayd")
|
||||
rv.dsl = fs.access("/sbin/vdsl_cpe_control")
|
||||
|
||||
local wifi_features = { "eap", "11n", "11ac", "11r", "acs", "sae", "owe", "suiteb192", "wep", "wps" }
|
||||
|
||||
if fs.access("/usr/sbin/hostapd") then
|
||||
rv.hostapd = { cli = fs.access("/usr/sbin/hostapd_cli") }
|
||||
|
||||
local _, feature
|
||||
for _, feature in ipairs(wifi_features) do
|
||||
rv.hostapd[feature] =
|
||||
(os.execute(string.format("/usr/sbin/hostapd -v%s >/dev/null 2>/dev/null", feature)) == 0)
|
||||
end
|
||||
end
|
||||
|
||||
if fs.access("/usr/sbin/wpa_supplicant") then
|
||||
rv.wpasupplicant = { cli = fs.access("/usr/sbin/wpa_cli") }
|
||||
|
||||
local _, feature
|
||||
for _, feature in ipairs(wifi_features) do
|
||||
rv.wpasupplicant[feature] =
|
||||
(os.execute(string.format("/usr/sbin/wpa_supplicant -v%s >/dev/null 2>/dev/null", feature)) == 0)
|
||||
end
|
||||
end
|
||||
|
||||
ok, fd = pcall(io.popen, "dnsmasq --version 2>/dev/null")
|
||||
if ok then
|
||||
rv.dnsmasq = {}
|
||||
|
||||
while true do
|
||||
local line = fd:read("*l")
|
||||
if not line then
|
||||
break
|
||||
end
|
||||
|
||||
local opts = line:match("^Compile time options: (.+)$")
|
||||
if opts then
|
||||
local opt
|
||||
for opt in opts:gmatch("%S+") do
|
||||
local no = opt:match("^no%-(%S+)$")
|
||||
rv.dnsmasq[string.lower(no or opt)] = not no
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
fd:close()
|
||||
end
|
||||
|
||||
ok, fd = pcall(io.popen, "ipset --help 2>/dev/null")
|
||||
if ok then
|
||||
rv.ipset = {}
|
||||
|
||||
local sets = false
|
||||
|
||||
while true do
|
||||
local line = fd:read("*l")
|
||||
if not line then
|
||||
break
|
||||
elseif line:match("^Supported set types:") then
|
||||
sets = true
|
||||
elseif sets then
|
||||
local set, ver = line:match("^%s+(%S+)%s+(%d+)")
|
||||
if set and not rv.ipset[set] then
|
||||
rv.ipset[set] = tonumber(ver)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
fd:close()
|
||||
end
|
||||
|
||||
return rv
|
||||
end
|
||||
},
|
||||
|
||||
getSwconfigFeatures = {
|
||||
args = { switch = "switch0" },
|
||||
call = function(args)
|
||||
local util = require "luci.util"
|
||||
|
||||
-- Parse some common switch properties from swconfig help output.
|
||||
local swc, err = io.popen("swconfig dev %s help 2>/dev/null" % util.shellquote(args.switch))
|
||||
if swc then
|
||||
local is_port_attr = false
|
||||
local is_vlan_attr = false
|
||||
local rv = {}
|
||||
|
||||
while true do
|
||||
local line = swc:read("*l")
|
||||
if not line then break end
|
||||
|
||||
if line:match("^%s+%-%-vlan") then
|
||||
is_vlan_attr = true
|
||||
|
||||
elseif line:match("^%s+%-%-port") then
|
||||
is_vlan_attr = false
|
||||
is_port_attr = true
|
||||
|
||||
elseif line:match("cpu @") then
|
||||
rv.switch_title = line:match("^switch%d: %w+%((.-)%)")
|
||||
rv.num_vlans = tonumber(line:match("vlans: (%d+)")) or 16
|
||||
rv.min_vid = 1
|
||||
|
||||
elseif line:match(": pvid") or line:match(": tag") or line:match(": vid") then
|
||||
if is_vlan_attr then rv.vid_option = line:match(": (%w+)") end
|
||||
|
||||
elseif line:match(": enable_vlan4k") then
|
||||
rv.vlan4k_option = "enable_vlan4k"
|
||||
|
||||
elseif line:match(": enable_vlan") then
|
||||
rv.vlan_option = "enable_vlan"
|
||||
|
||||
elseif line:match(": enable_learning") then
|
||||
rv.learning_option = "enable_learning"
|
||||
|
||||
elseif line:match(": enable_mirror_rx") then
|
||||
rv.mirror_option = "enable_mirror_rx"
|
||||
|
||||
elseif line:match(": max_length") then
|
||||
rv.jumbo_option = "max_length"
|
||||
end
|
||||
end
|
||||
|
||||
swc:close()
|
||||
|
||||
if not next(rv) then
|
||||
return { error = "No such switch" }
|
||||
end
|
||||
|
||||
return rv
|
||||
else
|
||||
return { error = err }
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
getSwconfigPortState = {
|
||||
args = { switch = "switch0" },
|
||||
call = function(args)
|
||||
local util = require "luci.util"
|
||||
|
||||
local swc, err = io.popen("swconfig dev %s show 2>/dev/null" % util.shellquote(args.switch))
|
||||
if swc then
|
||||
local ports = { }
|
||||
|
||||
while true do
|
||||
local line = swc:read("*l")
|
||||
if not line or (line:match("^VLAN %d+:") and #ports > 0) then
|
||||
break
|
||||
end
|
||||
|
||||
local pnum = line:match("^Port (%d+):$")
|
||||
if pnum then
|
||||
port = {
|
||||
port = tonumber(pnum),
|
||||
duplex = false,
|
||||
speed = 0,
|
||||
link = false,
|
||||
auto = false,
|
||||
rxflow = false,
|
||||
txflow = false
|
||||
}
|
||||
|
||||
ports[#ports+1] = port
|
||||
end
|
||||
|
||||
if port then
|
||||
local m
|
||||
|
||||
if line:match("full[%- ]duplex") then
|
||||
port.duplex = true
|
||||
end
|
||||
|
||||
m = line:match(" speed:(%d+)")
|
||||
if m then
|
||||
port.speed = tonumber(m)
|
||||
end
|
||||
|
||||
m = line:match("(%d+) Mbps")
|
||||
if m and port.speed == 0 then
|
||||
port.speed = tonumber(m)
|
||||
end
|
||||
|
||||
m = line:match("link: (%d+)")
|
||||
if m and port.speed == 0 then
|
||||
port.speed = tonumber(m)
|
||||
end
|
||||
|
||||
if line:match("link: ?up") or line:match("status: ?up") then
|
||||
port.link = true
|
||||
end
|
||||
|
||||
if line:match("auto%-negotiate") or line:match("link:.-auto") then
|
||||
port.auto = true
|
||||
end
|
||||
|
||||
if line:match("link:.-rxflow") then
|
||||
port.rxflow = true
|
||||
end
|
||||
|
||||
if line:match("link:.-txflow") then
|
||||
port.txflow = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
swc:close()
|
||||
|
||||
if not next(ports) then
|
||||
return { error = "No such switch" }
|
||||
end
|
||||
|
||||
return { result = ports }
|
||||
else
|
||||
return { error = err }
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
setPassword = {
|
||||
args = { username = "root", password = "password" },
|
||||
call = function(args)
|
||||
local util = require "luci.util"
|
||||
return {
|
||||
result = (os.execute("(echo %s; sleep 1; echo %s) | /bin/busybox passwd %s >/dev/null 2>&1" %{
|
||||
luci.util.shellquote(args.password),
|
||||
luci.util.shellquote(args.password),
|
||||
luci.util.shellquote(args.username)
|
||||
}) == 0)
|
||||
}
|
||||
end
|
||||
},
|
||||
|
||||
getBlockDevices = {
|
||||
call = function()
|
||||
local fs = require "nixio.fs"
|
||||
|
||||
local block = io.popen("/sbin/block info", "r")
|
||||
if block then
|
||||
local rv = {}
|
||||
|
||||
while true do
|
||||
local ln = block:read("*l")
|
||||
if not ln then
|
||||
break
|
||||
end
|
||||
|
||||
local dev = ln:match("^/dev/(.-):")
|
||||
if dev then
|
||||
local s = tonumber((fs.readfile("/sys/class/block/" .. dev .."/size")))
|
||||
local e = {
|
||||
dev = "/dev/" .. dev,
|
||||
size = s and s * 512
|
||||
}
|
||||
|
||||
local key, val = { }
|
||||
for key, val in ln:gmatch([[(%w+)="(.-)"]]) do
|
||||
e[key:lower()] = val
|
||||
end
|
||||
|
||||
rv[dev] = e
|
||||
end
|
||||
end
|
||||
|
||||
block:close()
|
||||
|
||||
return rv
|
||||
else
|
||||
return { error = "Unable to execute block utility" }
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
setBlockDetect = {
|
||||
call = function()
|
||||
return { result = (os.execute("/sbin/block detect > /etc/config/fstab") == 0) }
|
||||
end
|
||||
},
|
||||
|
||||
getMountPoints = {
|
||||
call = function()
|
||||
local fs = require "nixio.fs"
|
||||
|
||||
local fd, err = io.open("/proc/mounts", "r")
|
||||
if fd then
|
||||
local rv = {}
|
||||
|
||||
while true do
|
||||
local ln = fd:read("*l")
|
||||
if not ln then
|
||||
break
|
||||
end
|
||||
|
||||
local device, mount, fstype, options, freq, pass = ln:match("^(%S*) (%S*) (%S*) (%S*) (%d+) (%d+)$")
|
||||
if device and mount then
|
||||
device = device:gsub("\\(%d+)", function(n) return string.char(tonumber(n, 8)) end)
|
||||
mount = mount:gsub("\\(%d+)", function(n) return string.char(tonumber(n, 8)) end)
|
||||
|
||||
local stat = fs.statvfs(mount)
|
||||
if stat and stat.blocks > 0 then
|
||||
rv[#rv+1] = {
|
||||
device = device,
|
||||
mount = mount,
|
||||
size = stat.bsize * stat.blocks,
|
||||
avail = stat.bsize * stat.bavail,
|
||||
free = stat.bsize * stat.bfree
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
fd:close()
|
||||
|
||||
return { result = rv }
|
||||
else
|
||||
return { error = err }
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
getRealtimeStats = {
|
||||
args = { mode = "interface", device = "eth0" },
|
||||
call = function(args)
|
||||
local util = require "luci.util"
|
||||
|
||||
local flags
|
||||
if args.mode == "interface" then
|
||||
flags = "-i %s" % util.shellquote(args.device)
|
||||
elseif args.mode == "wireless" then
|
||||
flags = "-r %s" % util.shellquote(args.device)
|
||||
elseif args.mode == "conntrack" then
|
||||
flags = "-c"
|
||||
elseif args.mode == "load" then
|
||||
flags = "-l"
|
||||
else
|
||||
return { error = "Invalid mode" }
|
||||
end
|
||||
|
||||
local fd, err = io.popen("luci-bwc %s" % flags, "r")
|
||||
if fd then
|
||||
local parse = json.new()
|
||||
local done
|
||||
|
||||
parse:parse("[")
|
||||
|
||||
while true do
|
||||
local ln = fd:read("*l")
|
||||
if not ln then
|
||||
break
|
||||
end
|
||||
|
||||
done, err = parse:parse((ln:gsub("%d+", "%1.0")))
|
||||
|
||||
if done then
|
||||
err = "Unexpected JSON data"
|
||||
end
|
||||
|
||||
if err then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
fd:close()
|
||||
|
||||
done, err = parse:parse("]")
|
||||
|
||||
if err then
|
||||
return { error = err }
|
||||
elseif not done then
|
||||
return { error = "Incomplete JSON data" }
|
||||
else
|
||||
return { result = parse:get() }
|
||||
end
|
||||
else
|
||||
return { error = err }
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
getConntrackList = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
return { result = sys.net.conntrack() }
|
||||
end
|
||||
},
|
||||
|
||||
getProcessList = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
local res = {}
|
||||
for _, v in pairs(sys.process.list()) do
|
||||
res[#res + 1] = v
|
||||
end
|
||||
return { result = res }
|
||||
end
|
||||
},
|
||||
|
||||
getCPUBench = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
local cpubench = {}
|
||||
|
||||
cpubench.cpubench = sys.exec("cat /etc/bench.log 2>/dev/null")
|
||||
return cpubench
|
||||
end
|
||||
},
|
||||
|
||||
getCPUInfo = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
local cpuinfo = {}
|
||||
|
||||
cpuinfo.cpuinfo = sys.exec("/sbin/cpuinfo")
|
||||
|
||||
if (cpuinfo.cpuinfo == nil) or (cpuinfo.cpuinfo == "") then
|
||||
cpuinfo.cpuinfo = "? x ? (2.33MHz, 2.33°C)"
|
||||
end
|
||||
|
||||
return cpuinfo
|
||||
end
|
||||
},
|
||||
|
||||
getCPUUsage = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
local cpuusage = {}
|
||||
|
||||
cpuusage.cpuusage = sys.exec("top -n1 | awk '/^CPU/ {printf(\"%d%%\", 100 - $8)}'") or "6%"
|
||||
return cpuusage
|
||||
end
|
||||
},
|
||||
|
||||
getETHInfo = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
local rv = json.parse(sys.exec("/sbin/ethinfo")) or {}
|
||||
|
||||
return { ethinfo = rv }
|
||||
end
|
||||
},
|
||||
|
||||
getOnlineUsers = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
local onlineusers = {}
|
||||
|
||||
onlineusers.onlineusers = sys.exec("cat /proc/net/arp | grep 'br-lan' | grep '0x2' | wc -l")
|
||||
return onlineusers
|
||||
|
||||
end
|
||||
},
|
||||
|
||||
getTempInfo = {
|
||||
call = function()
|
||||
local sys = require "luci.sys"
|
||||
local tempinfo = {}
|
||||
|
||||
tempinfo.tempinfo = sys.exec("/sbin/tempinfo 2>/dev/null")
|
||||
return tempinfo
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
local function parseInput()
|
||||
local parse = json.new()
|
||||
local done, err
|
||||
|
||||
while true do
|
||||
local chunk = io.read(4096)
|
||||
if not chunk then
|
||||
break
|
||||
elseif not done and not err then
|
||||
done, err = parse:parse(chunk)
|
||||
end
|
||||
end
|
||||
|
||||
if not done then
|
||||
print(json.stringify({ error = err or "Incomplete input" }))
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
return parse:get()
|
||||
end
|
||||
|
||||
local function validateArgs(func, uargs)
|
||||
local method = methods[func]
|
||||
if not method then
|
||||
print(json.stringify({ error = "Method not found" }))
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
if type(uargs) ~= "table" then
|
||||
print(json.stringify({ error = "Invalid arguments" }))
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
uargs.ubus_rpc_session = nil
|
||||
|
||||
local k, v
|
||||
local margs = method.args or {}
|
||||
for k, v in pairs(uargs) do
|
||||
if margs[k] == nil or
|
||||
(v ~= nil and type(v) ~= type(margs[k]))
|
||||
then
|
||||
print(json.stringify({ error = "Invalid arguments" }))
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
return method
|
||||
end
|
||||
|
||||
if arg[1] == "list" then
|
||||
local _, method, rv = nil, nil, {}
|
||||
for _, method in pairs(methods) do rv[_] = method.args or {} end
|
||||
print((json.stringify(rv):gsub(":%[%]", ":{}")))
|
||||
elseif arg[1] == "call" then
|
||||
local args = parseInput()
|
||||
local method = validateArgs(arg[2], args)
|
||||
local result, code = method.call(args)
|
||||
print((json.stringify(result):gsub("^%[%]$", "{}")))
|
||||
os.exit(code or 0)
|
||||
end
|
||||
@@ -25,12 +25,11 @@ define Package/autosamba/description
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/autosamba/install
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/block
|
||||
$(INSTALL_BIN) ./files/20-smb $(1)/etc/hotplug.d/block/20-smb
|
||||
$(INSTALL_BIN) ./files/20-smb $(1)/etc/hotplug.d/block/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,autosamba))
|
||||
|
||||
120
package/emortal/autosamba/files/20-smb
Executable file → Normal file
120
package/emortal/autosamba/files/20-smb
Executable file → Normal file
@@ -1,32 +1,33 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# D-Team Technology Co.,Ltd. ShenZhen
|
||||
# 作者:Vic
|
||||
#
|
||||
|
||||
#
|
||||
# D-Team Technology Co.,Ltd. ShenZhen
|
||||
# 作者:Vic
|
||||
#
|
||||
# 警告:对着屏幕的哥们,我们允许你使用此脚本,但不允许你抹去作者的信息,请保留这段话。
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/service.sh
|
||||
|
||||
global=0
|
||||
config_file="/etc/config/samba"
|
||||
config_file="/etc/config/samba4"
|
||||
|
||||
wait_for_init() {
|
||||
for i in `seq 30`
|
||||
do
|
||||
[ -e /tmp/procd.done ] || {
|
||||
sleep 1; continue;
|
||||
}
|
||||
return
|
||||
done
|
||||
for i in `seq 30`
|
||||
do
|
||||
[ -e /tmp/procd.done ] || {
|
||||
sleep 1; continue;
|
||||
}
|
||||
return
|
||||
done
|
||||
}
|
||||
|
||||
smb_handle() {
|
||||
config_get path $1 path
|
||||
if [ "$path" = "$2" ] ;then
|
||||
global=1
|
||||
fi
|
||||
config_get path $1 path
|
||||
if [ "$path" = "$2" ] ;then
|
||||
global=1
|
||||
fi
|
||||
}
|
||||
|
||||
chk_en() {
|
||||
@@ -34,67 +35,68 @@ chk_en() {
|
||||
[ $autoshare -eq 0 ] && exit
|
||||
}
|
||||
|
||||
config_load samba
|
||||
config_foreach chk_en samba
|
||||
config_load samba4
|
||||
config_foreach chk_en samba4
|
||||
|
||||
device=`basename $DEVPATH`
|
||||
|
||||
case "$ACTION" in
|
||||
add)
|
||||
|
||||
case "$device" in
|
||||
sd*) ;;
|
||||
md*) ;;
|
||||
hd*);;
|
||||
mmcblk*);;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
path="/dev/$device"
|
||||
|
||||
wait_for_init
|
||||
case "$device" in
|
||||
sd*);;
|
||||
md*);;
|
||||
hd*);;
|
||||
mmcblk*);;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
cat /proc/mounts | while read j
|
||||
do
|
||||
str=${j%% *}
|
||||
if [ "$str" == $path ];then
|
||||
strr=${j#* }
|
||||
target=${strr%% *}
|
||||
global=0
|
||||
config_foreach smb_handle sambashare $target
|
||||
name=${target#*/mnt/}
|
||||
path="/dev/$device"
|
||||
|
||||
if [ $global -eq 0 ] ;then
|
||||
echo -e "\n\nconfig sambashare" >> $config_file
|
||||
echo -e "\toption auto '1'" >> $config_file
|
||||
echo -e "\toption name '$name'" >> $config_file
|
||||
echo -e "\toption path '$target'" >> $config_file
|
||||
echo -e "\toption read_only 'no'" >> $config_file
|
||||
echo -e "\toption guest_ok 'yes'" >> $config_file
|
||||
echo -e "\toption create_mask '0666'" >> $config_file
|
||||
echo -e "\toption dir_mask '0777'" >> $config_file
|
||||
echo -e "\toption device '$device'" >> $config_file
|
||||
/etc/init.d/samba reload
|
||||
wait_for_init
|
||||
|
||||
cat /proc/mounts | grep -v '/boot\|/opt' | while read j
|
||||
do
|
||||
str=${j%% *}
|
||||
if [ "$str" == $path ];then
|
||||
strr=${j#* }
|
||||
target=${strr%% *}
|
||||
global=0
|
||||
config_foreach smb_handle sambashare $target
|
||||
name=${target#*/mnt/}
|
||||
|
||||
if [ $global -eq 0 ] ;then
|
||||
echo -e "\n\nconfig sambashare" >> $config_file
|
||||
echo -e "\toption auto '1'" >> $config_file
|
||||
echo -e "\toption name '$name'" >> $config_file
|
||||
echo -e "\toption path '$target'" >> $config_file
|
||||
echo -e "\toption read_only 'no'" >> $config_file
|
||||
echo -e "\toption guest_ok 'yes'" >> $config_file
|
||||
echo -e "\toption create_mask '0666'" >> $config_file
|
||||
echo -e "\toption dir_mask '0777'" >> $config_file
|
||||
echo -e "\toption device '$device'" >> $config_file
|
||||
echo -e "\toption inherit_owner 'yes'" >> $config_file
|
||||
/etc/init.d/samba4 reload
|
||||
return
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
remove)
|
||||
i=0
|
||||
while true
|
||||
do
|
||||
|
||||
dev=`uci get samba.@sambashare[$i].device`
|
||||
dev=`uci get samba4.@sambashare[$i].device`
|
||||
[ $? -ne 0 ] && break
|
||||
|
||||
|
||||
[ "$dev" = "$device" ] && {
|
||||
auto=`uci get samba.@sambashare[$i].auto`
|
||||
auto=`uci get samba4.@sambashare[$i].auto`
|
||||
[ $auto = "1" ] && {
|
||||
mount_dir=`uci get samba.@sambashare[$i].name`
|
||||
uci delete samba.@sambashare[$i]
|
||||
mount_dir=`uci get samba4.@sambashare[$i].name`
|
||||
uci delete samba4.@sambashare[$i]
|
||||
uci commit
|
||||
/etc/init.d/samba reload
|
||||
/etc/init.d/samba4 reload
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
# <https://immortalwrt.org>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
@@ -36,9 +36,6 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/default-settings/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_DATA) ./files/openwrt_banner $(1)/etc/openwrt_banner
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/99-default-settings $(1)/etc/uci-defaults/
|
||||
endef
|
||||
|
||||
@@ -14,17 +14,16 @@ rm -f /www/luci-static/resources/view/status/include/80_upnp.js
|
||||
ln -sf /sbin/ip /usr/bin/ip
|
||||
|
||||
[ -f '/bin/bash' ] && sed -i 's|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g' /etc/passwd
|
||||
[ -f '/etc/openwrt_banner' ] && mv '/etc/openwrt_banner' '/etc/banner'
|
||||
|
||||
sed -i '/option disabled/d' /etc/config/wireless
|
||||
sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh
|
||||
wifi up
|
||||
|
||||
sed -i '/log-facility/d' /etc/dnsmasq.conf
|
||||
echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
|
||||
echo 'log-facility=/dev/null' >> /etc/dnsmasq.conf
|
||||
|
||||
rm -rf /tmp/luci-modulecache/
|
||||
rm -f /tmp/luci-indexcache
|
||||
|
||||
mv /etc/openwrt_banner /etc/banner
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[0;1;34;94m┌────────────[0;34m────────────[0;37m─────────────[0;1;30;90m────────┐[0m
|
||||
[0;1;34;94m│[0m [0;1;30;90m│[0m
|
||||
[0;1;34;94m│[0m [0;1;34;94mmmmmm[0m [0;37mm[0m [0;1;30;90m""#[0m [0;34m│[0m
|
||||
[0;1;34;94m│[0m [0;34m#[0m [0;34mmmmmm[0m [0;34mm[0;37mmmmm[0m [0;37mmmm[0m [0;37mm[0m[0;1;30;90mmm[0m [0;1;30;90mmm#mm[0m [0;1;30;90mmmm[0m [0;1;34;94m#[0m [0;34m│[0m
|
||||
[0;37m│[0m [0;34m#[0m [0;37m#[0m [0;37m#[0m [0;37m#[0m [0;37m#[0m [0;37m#[0m [0;37m#[0m [0;37m#"[0m [0;1;30;90m"#[0m [0;1;30;90m#"[0m [0;1;30;90m"[0m [0;1;30;90m#[0m [0;1;34;94m"[0m [0;1;34;94m#[0m [0;1;34;94m#[0m [0;34m│[0m
|
||||
[0;37m│[0m [0;37m#[0m [0;37m#[0m [0;37m#[0m [0;37m#[0m [0;37m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;34;94m#[0m [0;1;34;94mm"""#[0m [0;34m#[0m [0;1;34;94m│[0m
|
||||
[0;37m│[0m [0;37mmm#mm[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m"#[0;1;34;94mm#"[0m [0;1;34;94m#[0m [0;1;34;94m"m[0;34mm[0m [0;34m"mm"#[0m [0;34m"mm[0m [0;1;34;94m│[0m
|
||||
[0;1;30;90m│[0m [0;37m│[0m
|
||||
[0;1;30;90m│[0;34m───────────────────[0;1;34;94m────────────[0;37m──────────────│[0m
|
||||
[0;1;30;90m│[0m [0;1;34;94mImmortalWrt[0m [0;1;34;94m21.02.2[0m [0;37m│[0m
|
||||
[0;1;34;94m└[0;1;34;94m─────────────[0;34m──────────────[0;1;30;90m───────────[0;37m───────┘[0m
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
# <https://immortalwrt.org>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=exfat
|
||||
PKG_VERSION:=5.19.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=6.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/namjaejeon/linux-exfat-oot/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=80750bfa3bcdf743ca0d027be8244cc7b6ccd78f20304c2cabbb4011c88e4f0a
|
||||
PKG_HASH:=08513c4ad7bceda6570435f54e76fc91369cbf404968838bdd3f566495f20f36
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-exfat-oot-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=
|
||||
|
||||
47
package/kernel/i40e/Makefile
Normal file
47
package/kernel/i40e/Makefile
Normal file
@@ -0,0 +1,47 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=i40e
|
||||
PKG_VERSION:=2.22.8
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@IMMORTALWRT
|
||||
PKG_HASH:=938eac24067e385d6e7e47788c7a1c47987bbe0ed36f3360809cbaa8caf85c6b
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/i40e-vendor
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Intel(R) Ethernet Controller XL710 Family support (vendor driver)
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-libphy @TARGET_x86
|
||||
CONFLICTS:=kmod-i40e
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/src/intel_auxiliary.ko \
|
||||
$(PKG_BUILD_DIR)/src/i40e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,i40e)
|
||||
endef
|
||||
|
||||
define KernelPackage/i40e-vendor/description
|
||||
Kernel modules for Intel(R) Ethernet Controller XL710 Family 40 Gigabit Ethernet adapters.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
NEED_AUX_BUS=2 \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i40e-vendor))
|
||||
45
package/kernel/igb/Makefile
Normal file
45
package/kernel/igb/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=igb
|
||||
PKG_VERSION:=5.13.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@IMMORTALWRT
|
||||
PKG_HASH:=4ccae73110f3c871a17b7cc6df7dbdf6295fc90f4941e8b2978a471c2fec83cb
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/igb-vendor
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support (vendor driver)
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-i2c-core +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core
|
||||
CONFLICTS:=kmod-igb
|
||||
FILES:=$(PKG_BUILD_DIR)/src/igb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,igb)
|
||||
endef
|
||||
|
||||
define KernelPackage/igb-vendor/description
|
||||
Kernel modules for Intel(R) 82575/82576 PCI-Express Gigabit Ethernet adapters.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
CONFIG_IGB=m \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,igb-vendor))
|
||||
10
package/kernel/igb/patches/100-headers.patch
Normal file
10
package/kernel/igb/patches/100-headers.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/src/igb_main.c
|
||||
+++ b/src/igb_main.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
#include <linux/pm_runtime.h>
|
||||
#endif /* CONFIG_PM_RUNTIME */
|
||||
+#include <linux/ctype.h>
|
||||
|
||||
#include <linux/if_bridge.h>
|
||||
#include "igb.h"
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
net.netfilter.nf_conntrack_acct=1
|
||||
net.netfilter.nf_conntrack_checksum=0
|
||||
net.netfilter.nf_conntrack_max=65536
|
||||
net.netfilter.nf_conntrack_tcp_timeout_established=7440
|
||||
net.netfilter.nf_conntrack_udp_timeout=60
|
||||
net.netfilter.nf_conntrack_udp_timeout_stream=180
|
||||
net.netfilter.nf_conntrack_helper=1
|
||||
net.netfilter.nf_conntrack_buckets=16384
|
||||
net.netfilter.nf_conntrack_expect_max=16384
|
||||
|
||||
@@ -508,6 +508,29 @@ endef
|
||||
$(eval $(call KernelPackage,nbd))
|
||||
|
||||
|
||||
define KernelPackage/nvme
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=NVM Express block device
|
||||
DEPENDS:=@PCI_SUPPORT
|
||||
KCONFIG:= \
|
||||
CONFIG_NVME_CORE \
|
||||
CONFIG_BLK_DEV_NVME \
|
||||
CONFIG_NVME_MULTIPATH=n \
|
||||
CONFIG_NVME_HWMON=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/nvme/host/nvme-core.ko \
|
||||
$(LINUX_DIR)/drivers/nvme/host/nvme.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,nvme-core nvme)
|
||||
endef
|
||||
|
||||
define KernelPackage/nvme/description
|
||||
Kernel module for NVM Express solid state drives directly
|
||||
connected to the PCI or PCI Express bus.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nvme))
|
||||
|
||||
|
||||
define KernelPackage/scsi-core
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=SCSI device support
|
||||
|
||||
@@ -601,7 +601,8 @@ define KernelPackage/crypto-md5
|
||||
DEPENDS:=+kmod-crypto-hash
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_MD5 \
|
||||
CONFIG_CRYPTO_MD5_OCTEON
|
||||
CONFIG_CRYPTO_MD5_OCTEON \
|
||||
CONFIG_CRYPTO_MD5_PPC
|
||||
FILES:=$(LINUX_DIR)/crypto/md5.ko
|
||||
AUTOLOAD:=$(call AutoLoad,09,md5)
|
||||
$(call AddDepends/crypto)
|
||||
@@ -612,6 +613,11 @@ define KernelPackage/crypto-md5/octeon
|
||||
AUTOLOAD+=$(call AutoLoad,09,octeon-md5)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-md5/mpc85xx
|
||||
FILES+=$(LINUX_DIR)/arch/powerpc/crypto/md5-ppc.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,md5-ppc)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,crypto-md5))
|
||||
|
||||
|
||||
@@ -823,6 +829,7 @@ define KernelPackage/crypto-sha1
|
||||
CONFIG_CRYPTO_SHA1_ARM \
|
||||
CONFIG_CRYPTO_SHA1_ARM_NEON \
|
||||
CONFIG_CRYPTO_SHA1_OCTEON \
|
||||
CONFIG_CRYPTO_SHA1_PPC_SPE \
|
||||
CONFIG_CRYPTO_SHA1_SSSE3
|
||||
FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
|
||||
AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
|
||||
@@ -849,7 +856,12 @@ define KernelPackage/crypto-sha1/octeon
|
||||
AUTOLOAD+=$(call AutoLoad,09,octeon-sha1)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-sha1/tegra=$(KernelPakcage/crypto-sha1/arm)
|
||||
KernelPackage/crypto-sha1/tegra=$(KernelPackage/crypto-sha1/arm)
|
||||
|
||||
define KernelPackage/crypto-sha1/mpc85xx
|
||||
FILES+=$(LINUX_DIR)/arch/powerpc/crypto/sha1-ppc-spe.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha1-ppc-spe)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-sha1/x86/64
|
||||
FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
|
||||
@@ -865,6 +877,7 @@ define KernelPackage/crypto-sha256
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_SHA256 \
|
||||
CONFIG_CRYPTO_SHA256_OCTEON \
|
||||
CONFIG_CRYPTO_SHA256_PPC_SPE \
|
||||
CONFIG_CRYPTO_SHA256_SSSE3
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/sha256_generic.ko \
|
||||
@@ -878,6 +891,11 @@ define KernelPackage/crypto-sha256/octeon
|
||||
AUTOLOAD+=$(call AutoLoad,09,octeon-sha256)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-sha256/mpc85xx
|
||||
FILES+=$(LINUX_DIR)/arch/powerpc/crypto/sha256-ppc-spe.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha256-ppc-spe)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-sha256/x86/64
|
||||
FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha256-ssse3)
|
||||
|
||||
@@ -462,7 +462,7 @@ $(eval $(call KernelPackage,fs-nfsd))
|
||||
|
||||
define KernelPackage/fs-ntfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NTFS filesystem support
|
||||
TITLE:=NTFS filesystem read-only (old driver) support
|
||||
KCONFIG:=CONFIG_NTFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/ntfs/ntfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,ntfs)
|
||||
@@ -470,7 +470,8 @@ define KernelPackage/fs-ntfs
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ntfs/description
|
||||
Kernel module for NTFS filesystem support
|
||||
Kernel module for limited NTFS filesystem support. Support for writing
|
||||
is extremely limited and disabled as a result.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ntfs))
|
||||
|
||||
@@ -1083,6 +1083,26 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,bnx2x))
|
||||
|
||||
define KernelPackage/bnxt-en
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=BCM 574xx/575xx 10/25/50-Gigabit ethernet adapter driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-lib-crc32c +kmod-mdio +kmod-ptp +kmod-lib-zlib-inflate +kmod-hwmon-core
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnxt/bnxt_en.ko
|
||||
KCONFIG:= \
|
||||
CONFIG_BNXT \
|
||||
CONFIG_BNXT_SRIOV=y \
|
||||
CONFIG_BNXT_FLOWER_OFFLOAD=y \
|
||||
CONFIG_BNXT_DCB=n \
|
||||
CONFIG_BNXT_HWMON=y
|
||||
AUTOLOAD:=$(call AutoProbe,bnxt_en)
|
||||
endef
|
||||
|
||||
define KernelPackage/bnxt-en/description
|
||||
Broadcom 573xx/574xx/575xx 10/25/40/50-Gigabit ethernet adapter Driver
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,bnxt-en))
|
||||
|
||||
define KernelPackage/be2net
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Broadcom Emulex OneConnect 10Gbps NIC
|
||||
|
||||
@@ -562,23 +562,6 @@ endef
|
||||
$(eval $(call KernelPackage,nf-nathelper-extra))
|
||||
|
||||
|
||||
define KernelPackage/ipt-ulog
|
||||
TITLE:=Module for user-space packet logging
|
||||
KCONFIG:=$(KCONFIG_IPT_ULOG)
|
||||
FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||
AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m)))
|
||||
$(call AddDepends/ipt)
|
||||
endef
|
||||
|
||||
define KernelPackage/ipt-ulog/description
|
||||
Netfilter (IPv4) module for user-space packet logging
|
||||
Includes:
|
||||
- ULOG
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ipt-ulog))
|
||||
|
||||
|
||||
define KernelPackage/ipt-nflog
|
||||
TITLE:=Module for user-space packet logging
|
||||
KCONFIG:=$(KCONFIG_IPT_NFLOG)
|
||||
|
||||
@@ -162,38 +162,6 @@ endef
|
||||
$(eval $(call KernelPackage,misdn))
|
||||
|
||||
|
||||
define KernelPackage/isdn4linux
|
||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=Old ISDN4Linux (deprecated)
|
||||
DEPENDS:=+kmod-ppp
|
||||
KCONFIG:= \
|
||||
CONFIG_ISDN=y \
|
||||
CONFIG_ISDN_I4L \
|
||||
CONFIG_ISDN_PPP=y \
|
||||
CONFIG_ISDN_PPP_VJ=y \
|
||||
CONFIG_ISDN_MPP=y \
|
||||
CONFIG_IPPP_FILTER=y \
|
||||
CONFIG_ISDN_PPP_BSDCOMP \
|
||||
CONFIG_ISDN_CAPI_MIDDLEWARE=y \
|
||||
CONFIG_ISDN_CAPI_CAPIFS_BOOL=y \
|
||||
CONFIG_ISDN_AUDIO=y \
|
||||
CONFIG_ISDN_TTY_FAX=y \
|
||||
CONFIG_ISDN_X25=y \
|
||||
CONFIG_ISDN_DIVERSION
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/isdn/divert/dss1_divert.ko \
|
||||
$(LINUX_DIR)/drivers/isdn/i4l/isdn.ko \
|
||||
$(LINUX_DIR)/drivers/isdn/i4l/isdn_bsdcomp.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,isdn isdn_bsdcomp dss1_divert)
|
||||
endef
|
||||
|
||||
define KernelPackage/isdn4linux/description
|
||||
This driver allows you to use an ISDN adapter for networking
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,isdn4linux))
|
||||
|
||||
|
||||
define KernelPackage/ipip
|
||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=IP-in-IP encapsulation
|
||||
|
||||
@@ -665,22 +665,6 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf2127))
|
||||
|
||||
define KernelPackage/rtc-pt7c4338
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Pericom PT7C4338 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_PT7C4338 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pt7c4338.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pt7c4338)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pt7c4338/description
|
||||
Kernel module for Pericom PT7C4338 i2c RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pt7c4338))
|
||||
|
||||
define KernelPackage/rtc-rs5c372a
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
|
||||
@@ -160,23 +160,6 @@ endef
|
||||
$(eval $(call KernelPackage,w1-slave-ds2433))
|
||||
|
||||
|
||||
define KernelPackage/w1-slave-ds2760
|
||||
TITLE:=Dallas 2760 battery monitor chip (HP iPAQ & others)
|
||||
KCONFIG:= \
|
||||
CONFIG_W1_SLAVE_DS2760 \
|
||||
CONFIG_W1_SLAVE_DS2433_CRC=n
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_ds2760.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_ds2760)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-ds2760/description
|
||||
Kernel module for 1-wire DS2760 battery monitor chip support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-ds2760))
|
||||
|
||||
|
||||
define KernelPackage/w1-slave-ds2413
|
||||
TITLE:=DS2413 2 Ch. Addressable Switch
|
||||
KCONFIG:= \
|
||||
|
||||
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=5.15.58-1
|
||||
PKG_RELEASE:=2
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
|
||||
PKG_HASH:=a3c2a2b7bbaf8943c65fd72f4e7d7ad5e205aeae28b26c835f9d8afa0f9810bf
|
||||
PKG_VERSION:=5.15.92-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.92/
|
||||
PKG_HASH:=d518e3614a0a8b635e7b7febf2a3ee1645a95d953fd353920ceee22f159f26f1
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
|
||||
@@ -824,8 +824,8 @@ mac80211_setup_supplicant_noctl() {
|
||||
|
||||
mac80211_prepare_iw_htmode() {
|
||||
case "$htmode" in
|
||||
VHT20|HT20) iw_htmode=HT20;;
|
||||
HT40*|VHT40|VHT160)
|
||||
VHT20|HT20|HE20) iw_htmode=HT20;;
|
||||
HT40*|VHT40|VHT160|HE40)
|
||||
case "$band" in
|
||||
2g)
|
||||
case "$htmode" in
|
||||
@@ -849,7 +849,7 @@ mac80211_prepare_iw_htmode() {
|
||||
esac
|
||||
[ "$auto_channel" -gt 0 ] && iw_htmode="HT40+"
|
||||
;;
|
||||
VHT80)
|
||||
VHT80|HE80)
|
||||
iw_htmode="80MHZ"
|
||||
;;
|
||||
NONE|NOHT)
|
||||
@@ -956,7 +956,7 @@ mac80211_setup_vif() {
|
||||
mesh)
|
||||
wireless_vif_parse_encryption
|
||||
[ -z "$htmode" ] && htmode="NOHT";
|
||||
if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ] || chan_is_dfs "$phy" "$channel"; then
|
||||
if wpa_supplicant -vmesh || [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ] || chan_is_dfs "$phy" "$channel"; then
|
||||
mac80211_setup_supplicant $vif_enable || failed=1
|
||||
else
|
||||
mac80211_setup_mesh $vif_enable
|
||||
|
||||
@@ -183,7 +183,6 @@ detect_mac80211() {
|
||||
set wireless.default_radio${devidx}.mode=ap
|
||||
set wireless.default_radio${devidx}.ssid=ImmortalWrt
|
||||
set wireless.default_radio${devidx}.encryption=none
|
||||
set wireless.default_radio${devidx}.iw_qos_map_set=none
|
||||
EOF
|
||||
uci -q commit wireless
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3309,6 +3309,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3315,6 +3315,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3560,6 +3562,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
@@ -3566,6 +3568,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -3710,6 +3710,9 @@ ath10k_mac_tx_h_get_txmode(struct ath10k
|
||||
@@ -3717,6 +3717,9 @@ ath10k_mac_tx_h_get_txmode(struct ath10k
|
||||
const struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
||||
__le16 fc = hdr->frame_control;
|
||||
|
||||
@@ -60,7 +60,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
if (!vif || vif->type == NL80211_IFTYPE_MONITOR)
|
||||
return ATH10K_HW_TXRX_RAW;
|
||||
|
||||
@@ -3870,6 +3873,12 @@ static void ath10k_mac_tx_h_fill_cb(stru
|
||||
@@ -3877,6 +3880,12 @@ static void ath10k_mac_tx_h_fill_cb(stru
|
||||
bool noack = false;
|
||||
|
||||
cb->flags = 0;
|
||||
@@ -73,7 +73,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
if (!ath10k_tx_h_use_hwcrypto(vif, skb))
|
||||
cb->flags |= ATH10K_SKB_F_NO_HWCRYPT;
|
||||
|
||||
@@ -3908,6 +3917,7 @@ static void ath10k_mac_tx_h_fill_cb(stru
|
||||
@@ -3915,6 +3924,7 @@ static void ath10k_mac_tx_h_fill_cb(stru
|
||||
cb->flags |= ATH10K_SKB_F_RAW_TX;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
cb->vif = vif;
|
||||
cb->txq = txq;
|
||||
cb->airtime_est = airtime;
|
||||
@@ -4031,7 +4041,11 @@ static int ath10k_mac_tx(struct ath10k *
|
||||
@@ -4038,7 +4048,11 @@ static int ath10k_mac_tx(struct ath10k *
|
||||
ath10k_tx_h_seq_no(vif, skb);
|
||||
break;
|
||||
case ATH10K_HW_TXRX_ETHERNET:
|
||||
@@ -94,7 +94,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
break;
|
||||
case ATH10K_HW_TXRX_RAW:
|
||||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags) &&
|
||||
@@ -4643,12 +4657,10 @@ static void ath10k_mac_op_tx(struct ieee
|
||||
@@ -4650,12 +4664,10 @@ static void ath10k_mac_op_tx(struct ieee
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
struct ieee80211_sta *sta = control->sta;
|
||||
struct ieee80211_txq *txq = NULL;
|
||||
@@ -107,7 +107,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
int ret;
|
||||
u16 airtime;
|
||||
|
||||
@@ -4662,8 +4674,14 @@ static void ath10k_mac_op_tx(struct ieee
|
||||
@@ -4669,8 +4681,14 @@ static void ath10k_mac_op_tx(struct ieee
|
||||
is_mgmt = (txpath == ATH10K_MAC_TX_HTT_MGMT);
|
||||
|
||||
if (is_htt) {
|
||||
@@ -123,7 +123,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
|
||||
ret = ath10k_htt_tx_inc_pending(htt);
|
||||
if (ret) {
|
||||
@@ -5463,6 +5481,30 @@ static int ath10k_mac_set_txbf_conf(stru
|
||||
@@ -5470,6 +5488,30 @@ static int ath10k_mac_set_txbf_conf(stru
|
||||
ar->wmi.vdev_param->txbf, value);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
/*
|
||||
* TODO:
|
||||
* Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
|
||||
@@ -5672,15 +5714,7 @@ static int ath10k_add_interface(struct i
|
||||
@@ -5679,15 +5721,7 @@ static int ath10k_add_interface(struct i
|
||||
|
||||
arvif->def_wep_key_idx = -1;
|
||||
|
||||
@@ -171,7 +171,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
|
||||
/* Configuring number of spatial stream for monitor interface is causing
|
||||
* target assert in qca9888 and qca6174.
|
||||
@@ -9368,6 +9402,7 @@ static const struct ieee80211_ops ath10k
|
||||
@@ -9372,6 +9406,7 @@ static const struct ieee80211_ops ath10k
|
||||
.stop = ath10k_stop,
|
||||
.config = ath10k_config,
|
||||
.add_interface = ath10k_add_interface,
|
||||
@@ -179,7 +179,7 @@ Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com
|
||||
.remove_interface = ath10k_remove_interface,
|
||||
.configure_filter = ath10k_configure_filter,
|
||||
.bss_info_changed = ath10k_bss_info_changed,
|
||||
@@ -10037,6 +10072,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10041,6 +10076,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
if (test_bit(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, ar->wmi.svc_map))
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TDLS_BUFFER_STA);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -9894,6 +9894,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9898,6 +9898,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10252,6 +10267,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10256,6 +10271,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10269,7 +10269,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10273,7 +10273,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
||||
@@ -28,7 +28,7 @@ Forwarded: no
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -1021,6 +1021,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
@@ -1028,6 +1028,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
return ar->last_wmi_vdev_start_status;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ Forwarded: no
|
||||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1053,7 +1087,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
@@ -1060,7 +1094,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = channel->max_power * 2;
|
||||
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
||||
@@ -79,7 +79,7 @@ Forwarded: no
|
||||
|
||||
reinit_completion(&ar->vdev_setup_done);
|
||||
reinit_completion(&ar->vdev_delete_done);
|
||||
@@ -1499,7 +1534,8 @@ static int ath10k_vdev_start_restart(str
|
||||
@@ -1506,7 +1541,8 @@ static int ath10k_vdev_start_restart(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = chandef->chan->max_power * 2;
|
||||
arg.channel.max_reg_power = chandef->chan->max_reg_power * 2;
|
||||
@@ -89,7 +89,7 @@ Forwarded: no
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3427,7 +3463,8 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3434,7 +3470,8 @@ static int ath10k_update_channel_list(st
|
||||
ch->min_power = 0;
|
||||
ch->max_power = channel->max_power * 2;
|
||||
ch->max_reg_power = channel->max_reg_power * 2;
|
||||
|
||||
@@ -72,7 +72,7 @@ Link: https://lore.kernel.org/r/20220506044246.67146-1-pavel@loebl.cz
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/rtnetlink.h>
|
||||
#include <net/addrconf.h>
|
||||
@@ -1226,7 +1227,8 @@ static int brcmf_bus_started(struct brcm
|
||||
@@ -1227,7 +1228,8 @@ static int brcmf_bus_started(struct brcm
|
||||
brcmf_dbg(TRACE, "\n");
|
||||
|
||||
/* add primary networking interface */
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
.add_key = brcmf_cfg80211_add_key,
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1363,6 +1363,8 @@ int brcmf_attach(struct device *dev)
|
||||
@@ -1364,6 +1364,8 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
/* Link to bus module */
|
||||
drvr->hdrlen = 0;
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
/* Attach and link in the protocol */
|
||||
ret = brcmf_proto_attach(drvr);
|
||||
@@ -1445,6 +1447,12 @@ void brcmf_detach(struct device *dev)
|
||||
@@ -1446,6 +1448,12 @@ void brcmf_detach(struct device *dev)
|
||||
if (drvr == NULL)
|
||||
return;
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ Signed-off-by: Pali Rohár <pali@kernel.org>
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
@@ -1106,6 +1106,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
@@ -1108,6 +1108,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_scan(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9435,6 +9435,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9461,6 +9461,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rf = RF3853;
|
||||
else if (rt2x00_rt(rt2x00dev, RT5350))
|
||||
rf = RF5350;
|
||||
@@ -50,8 +50,8 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
* EEPROM LNA
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -4368,6 +4368,43 @@ static void rt2800_config_channel(struct
|
||||
rt2800_iq_calibrate(rt2x00dev, rf->channel);
|
||||
@@ -4372,6 +4372,43 @@ static void rt2800_config_channel(struct
|
||||
rt2800_iq_calibrate(rt2x00dev, rf->channel);
|
||||
}
|
||||
|
||||
+ if (rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
@@ -94,7 +94,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
bbp = rt2800_bbp_read(rt2x00dev, 4);
|
||||
rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf));
|
||||
rt2800_bbp_write(rt2x00dev, 4, bbp);
|
||||
@@ -9566,7 +9603,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9592,7 +9629,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
*/
|
||||
eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
|
||||
|
||||
@@ -104,7 +104,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
if (rt2x00_get_field16(eeprom,
|
||||
EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
|
||||
__set_bit(CAPABILITY_EXTERNAL_PA_TX0,
|
||||
@@ -9577,6 +9615,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9603,6 +9641,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
&rt2x00dev->cap_flags);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
|
||||
if (chan->center_freq > 2457) {
|
||||
bbp = rt2800_bbp_read(rt2x00dev, 30);
|
||||
@@ -6249,46 +6282,6 @@ static int rt2800_init_registers(struct
|
||||
@@ -6275,46 +6308,6 @@ static int rt2800_init_registers(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
|
||||
static void rt2800_bbp4_mac_if_ctrl(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
@@ -9110,7 +9103,7 @@ int rt2800_enable_radio(struct rt2x00_de
|
||||
@@ -9136,7 +9129,7 @@ int rt2800_enable_radio(struct rt2x00_de
|
||||
/*
|
||||
* Wait BBP/RF to wake up.
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ v2: use ++i instead of i = i + 1 in loops
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8428,6 +8428,53 @@ static void rt2800_init_rfcsr_5592(struc
|
||||
@@ -8454,6 +8454,53 @@ static void rt2800_init_rfcsr_5592(struc
|
||||
rt2800_led_open_drain_enable(rt2x00dev);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ v2: use ++i instead of i = i + 1 in loops
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9035,6 +9082,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9061,6 +9108,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
|
||||
|
||||
@@ -54,7 +54,7 @@ v2: use rt2800_wait_bbp_rf_ready()
|
||||
* PWR_PIN_CFG:
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8475,6 +8475,138 @@ static void rt2800_rf_self_txdc_cal(stru
|
||||
@@ -8501,6 +8501,138 @@ static void rt2800_rf_self_txdc_cal(stru
|
||||
rt2800_register_write(rt2x00dev, RF_BYPASS2, mac052c);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ v2: use rt2800_wait_bbp_rf_ready()
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9082,6 +9214,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9108,6 +9240,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
|
||||
|
||||
@@ -41,7 +41,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8607,6 +8607,65 @@ static void rt2800_r_calibration(struct
|
||||
@@ -8633,6 +8633,65 @@ static void rt2800_r_calibration(struct
|
||||
rt2800_register_write(rt2x00dev, PWR_PIN_CFG, MAC_PWR_PIN_CFG);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9216,6 +9275,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9242,6 +9301,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
|
||||
rt2800_r_calibration(rt2x00dev);
|
||||
rt2800_rf_self_txdc_cal(rt2x00dev);
|
||||
@@ -43,7 +43,7 @@ v2: use rt2800_wait_bbp_rf_ready(), fix indentation
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8666,6 +8666,380 @@ static void rt2800_rxdcoc_calibration(st
|
||||
@@ -8692,6 +8692,380 @@ static void rt2800_rxdcoc_calibration(st
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, saverfb0r2);
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ v2: use rt2800_wait_bbp_rf_ready(), fix indentation
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9278,6 +9652,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9304,6 +9678,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rxdcoc_calibration(rt2x00dev);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, true);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, false);
|
||||
@@ -1,52 +0,0 @@
|
||||
From patchwork Sat Sep 17 20:28:29 2022
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12979250
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <linux-wireless-owner@kernel.org>
|
||||
Date: Sat, 17 Sep 2022 21:28:29 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>,
|
||||
Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
Johannes Berg <johannes.berg@intel.com>
|
||||
Subject: [PATCH v3 09/16] rt2x00: don't run Rt5592 IQ calibration on MT7620
|
||||
Message-ID:
|
||||
<31a1c34ddbd296b82f38c18c9ae7339059215fdc.1663445157.git.daniel@makrotopia.org>
|
||||
References: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
The function rt2800_iq_calibrate is intended for Rt5592 only.
|
||||
Don't call it for MT7620 which has it's own calibration functions.
|
||||
|
||||
Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
v2: test for RT5592 instead of !RT6352
|
||||
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -4398,7 +4398,8 @@ static void rt2800_config_channel(struct
|
||||
reg = (rf->channel <= 14 ? 0x1c : 0x24) + 2*rt2x00dev->lna_gain;
|
||||
rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
|
||||
|
||||
- rt2800_iq_calibrate(rt2x00dev, rf->channel);
|
||||
+ if (rt2x00_rt(rt2x00dev, RT5592))
|
||||
+ rt2800_iq_calibrate(rt2x00dev, rf->channel);
|
||||
}
|
||||
|
||||
if (rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
@@ -45,7 +45,7 @@ Reported-by: kernel test robot <lkp@intel.com>
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9041,6 +9041,907 @@ restore_value:
|
||||
@@ -9066,6 +9066,907 @@ restore_value:
|
||||
rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, savemacsysctrl);
|
||||
}
|
||||
|
||||
@@ -953,7 +953,7 @@ Reported-by: kernel test robot <lkp@intel.com>
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9653,6 +10554,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9678,6 +10579,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rxdcoc_calibration(rt2x00dev);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, true);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, false);
|
||||
@@ -65,7 +65,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
static u8 rt2800_rfcsr_read(struct rt2x00_dev *rt2x00dev,
|
||||
const unsigned int word)
|
||||
{
|
||||
@@ -6947,26 +6967,6 @@ static void rt2800_init_bbp_5592(struct
|
||||
@@ -6972,26 +6992,6 @@ static void rt2800_init_bbp_5592(struct
|
||||
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
|
||||
}
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From patchwork Sat Sep 17 20:29:26 2022
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12979254
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <linux-wireless-owner@kernel.org>
|
||||
Date: Sat, 17 Sep 2022 21:29:26 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>,
|
||||
Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
Johannes Berg <johannes.berg@intel.com>
|
||||
Subject: [PATCH v3 13/16] rt2x00: set correct TX_SW_CFG1 MAC register for
|
||||
MT7620
|
||||
Message-ID:
|
||||
<4be38975ce600a34249e12d09a3cb758c6e71071.1663445157.git.daniel@makrotopia.org>
|
||||
References: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
Set correct TX_SW_CFG1 MAC register as it is done also in v3 of the
|
||||
vendor driver[1].
|
||||
|
||||
[1]: https://gitlab.com/dm38/padavan-ng/-/blob/master/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/chips/rt6352.c#L531
|
||||
Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -5966,7 +5966,7 @@ static int rt2800_init_registers(struct
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
||||
} else if (rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401);
|
||||
- rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000);
|
||||
+ rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0001);
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
||||
rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000);
|
||||
rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0);
|
||||
@@ -1,50 +0,0 @@
|
||||
From patchwork Sat Sep 17 20:29:40 2022
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12979255
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <linux-wireless-owner@kernel.org>
|
||||
Date: Sat, 17 Sep 2022 21:29:40 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>,
|
||||
Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
Johannes Berg <johannes.berg@intel.com>
|
||||
Subject: [PATCH v3 14/16] rt2x00: set VGC gain for both chains of MT7620
|
||||
Message-ID:
|
||||
<29e161397e5c9d9399da0fe87d44458aa2b90a78.1663445157.git.daniel@makrotopia.org>
|
||||
References: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
Set bbp66 for all chains of the MT7620.
|
||||
|
||||
Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -5743,7 +5743,8 @@ static inline void rt2800_set_vgc(struct
|
||||
if (qual->vgc_level != vgc_level) {
|
||||
if (rt2x00_rt(rt2x00dev, RT3572) ||
|
||||
rt2x00_rt(rt2x00dev, RT3593) ||
|
||||
- rt2x00_rt(rt2x00dev, RT3883)) {
|
||||
+ rt2x00_rt(rt2x00dev, RT3883) ||
|
||||
+ rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
rt2800_bbp_write_with_rx_chain(rt2x00dev, 66,
|
||||
vgc_level);
|
||||
} else if (rt2x00_rt(rt2x00dev, RT5592)) {
|
||||
@@ -1,70 +0,0 @@
|
||||
From patchwork Sat Sep 17 20:29:55 2022
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12979256
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <linux-wireless-owner@kernel.org>
|
||||
Date: Sat, 17 Sep 2022 21:29:55 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>,
|
||||
Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
Johannes Berg <johannes.berg@intel.com>
|
||||
Subject: [PATCH v3 15/16] rt2x00: set SoC wmac clock register
|
||||
Message-ID:
|
||||
<3e275d259f476f597dab91a9c395015ef3fe3284.1663445157.git.daniel@makrotopia.org>
|
||||
References: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
Instead of using the default value 33 (pci), set US_CYC_CNT init based
|
||||
on Programming guide:
|
||||
If available, set chipset bus clock with fallback to cpu clock/3.
|
||||
|
||||
Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
---
|
||||
.../net/wireless/ralink/rt2x00/rt2800lib.c | 21 +++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -6229,6 +6229,27 @@ static int rt2800_init_registers(struct
|
||||
reg = rt2800_register_read(rt2x00dev, US_CYC_CNT);
|
||||
rt2x00_set_field32(®, US_CYC_CNT_CLOCK_CYCLE, 125);
|
||||
rt2800_register_write(rt2x00dev, US_CYC_CNT, reg);
|
||||
+ } else if (rt2x00_is_soc(rt2x00dev)) {
|
||||
+ struct clk *clk = clk_get_sys("bus", NULL);
|
||||
+ int rate;
|
||||
+
|
||||
+ if (IS_ERR(clk)) {
|
||||
+ clk = clk_get_sys("cpu", NULL);
|
||||
+
|
||||
+ if (IS_ERR(clk)) {
|
||||
+ rate = 125;
|
||||
+ } else {
|
||||
+ rate = clk_get_rate(clk) / 3000000;
|
||||
+ clk_put(clk);
|
||||
+ }
|
||||
+ } else {
|
||||
+ rate = clk_get_rate(clk) / 1000000;
|
||||
+ clk_put(clk);
|
||||
+ }
|
||||
+
|
||||
+ reg = rt2800_register_read(rt2x00dev, US_CYC_CNT);
|
||||
+ rt2x00_set_field32(®, US_CYC_CNT_CLOCK_CYCLE, rate);
|
||||
+ rt2800_register_write(rt2x00dev, US_CYC_CNT, reg);
|
||||
}
|
||||
|
||||
reg = rt2800_register_read(rt2x00dev, HT_FBK_CFG0);
|
||||
@@ -1,79 +0,0 @@
|
||||
From patchwork Sat Sep 17 20:30:09 2022
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12979257
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <linux-wireless-owner@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id E9118ECAAA1
|
||||
for <linux-wireless@archiver.kernel.org>;
|
||||
Sat, 17 Sep 2022 20:30:22 +0000 (UTC)
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S229639AbiIQUaV (ORCPT
|
||||
<rfc822;linux-wireless@archiver.kernel.org>);
|
||||
Sat, 17 Sep 2022 16:30:21 -0400
|
||||
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53912 "EHLO
|
||||
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||
with ESMTP id S229628AbiIQUaT (ORCPT
|
||||
<rfc822;linux-wireless@vger.kernel.org>);
|
||||
Sat, 17 Sep 2022 16:30:19 -0400
|
||||
Received: from fudo.makrotopia.org (fudo.makrotopia.org
|
||||
[IPv6:2a07:2ec0:3002::71])
|
||||
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AEA822B27
|
||||
for <linux-wireless@vger.kernel.org>;
|
||||
Sat, 17 Sep 2022 13:30:16 -0700 (PDT)
|
||||
Received: from local
|
||||
by fudo.makrotopia.org with esmtpsa
|
||||
(TLS1.3:TLS_AES_256_GCM_SHA384:256)
|
||||
(Exim 4.96)
|
||||
(envelope-from <daniel@makrotopia.org>)
|
||||
id 1oZeS7-0003ra-0k;
|
||||
Sat, 17 Sep 2022 22:30:15 +0200
|
||||
Date: Sat, 17 Sep 2022 21:30:09 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>,
|
||||
Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
Johannes Berg <johannes.berg@intel.com>
|
||||
Subject: [PATCH v3 16/16] rt2x00: correctly set BBP register 86 for MT7620
|
||||
Message-ID:
|
||||
<257267247ee4fa7ebc6a5d0c4948b3f8119c0d77.1663445157.git.daniel@makrotopia.org>
|
||||
References: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org>
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
Instead of 0 set the correct value for BBP register 86 for MT7620.
|
||||
|
||||
Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -4225,7 +4225,10 @@ static void rt2800_config_channel(struct
|
||||
rt2800_bbp_write(rt2x00dev, 62, 0x37 - rt2x00dev->lna_gain);
|
||||
rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain);
|
||||
rt2800_bbp_write(rt2x00dev, 64, 0x37 - rt2x00dev->lna_gain);
|
||||
- rt2800_bbp_write(rt2x00dev, 86, 0);
|
||||
+ if (rt2x00_rt(rt2x00dev, RT6352))
|
||||
+ rt2800_bbp_write(rt2x00dev, 86, 0x38);
|
||||
+ else
|
||||
+ rt2800_bbp_write(rt2x00dev, 86, 0);
|
||||
}
|
||||
|
||||
if (rf->channel <= 14) {
|
||||
@@ -52,7 +52,7 @@
|
||||
fail_ifa:
|
||||
#endif
|
||||
wiphy_unregister(local->hw.wiphy);
|
||||
@@ -1371,10 +1371,10 @@ void ieee80211_unregister_hw(struct ieee
|
||||
@@ -1373,10 +1373,10 @@ void ieee80211_unregister_hw(struct ieee
|
||||
tasklet_kill(&local->tx_pending_tasklet);
|
||||
tasklet_kill(&local->tasklet);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Signed-off-by: Xing Song <xing.song@mediatek.com>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2948,6 +2948,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
@@ -2950,6 +2950,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
if (!fwd_skb)
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -3004,15 +3004,19 @@ static void mac80211_hwsim_he_capab(stru
|
||||
@@ -3008,15 +3008,19 @@ static void mac80211_hwsim_he_capab(stru
|
||||
{
|
||||
u16 n_iftype_data;
|
||||
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3302,6 +3306,12 @@ static int mac80211_hwsim_new_radio(stru
|
||||
@@ -3306,6 +3310,12 @@ static int mac80211_hwsim_new_radio(stru
|
||||
sband->vht_cap.vht_mcs.tx_mcs_map =
|
||||
sband->vht_cap.vht_mcs.rx_mcs_map;
|
||||
break;
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
case NL80211_BAND_S1GHZ:
|
||||
memcpy(&sband->s1g_cap, &hwsim_s1g_cap,
|
||||
sizeof(sband->s1g_cap));
|
||||
@@ -3312,6 +3322,13 @@ static int mac80211_hwsim_new_radio(stru
|
||||
@@ -3316,6 +3326,13 @@ static int mac80211_hwsim_new_radio(stru
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
sband->ht_cap.ht_supported = true;
|
||||
sband->ht_cap.cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||
IEEE80211_HT_CAP_GRN_FLD |
|
||||
@@ -3325,10 +3342,6 @@ static int mac80211_hwsim_new_radio(stru
|
||||
@@ -3329,10 +3346,6 @@ static int mac80211_hwsim_new_radio(stru
|
||||
sband->ht_cap.mcs.rx_mask[0] = 0xff;
|
||||
sband->ht_cap.mcs.rx_mask[1] = 0xff;
|
||||
sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
@@ -69,7 +69,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
#endif /* __MAC80211_DRIVER_OPS */
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1490,7 +1490,7 @@ struct ieee80211_local {
|
||||
@@ -1489,7 +1489,7 @@ struct ieee80211_local {
|
||||
};
|
||||
|
||||
static inline struct ieee80211_sub_if_data *
|
||||
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct ieee80211_vif *vif,
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -4344,6 +4344,18 @@ out:
|
||||
@@ -4341,6 +4341,18 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
const struct cfg80211_ops mac80211_config_ops = {
|
||||
.add_virtual_intf = ieee80211_add_iface,
|
||||
.del_virtual_intf = ieee80211_del_iface,
|
||||
@@ -4448,4 +4460,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -4445,4 +4457,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
.reset_tid_config = ieee80211_reset_tid_config,
|
||||
.set_sar_specs = ieee80211_set_sar_specs,
|
||||
.color_change = ieee80211_color_change,
|
||||
|
||||
@@ -156,7 +156,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -4345,15 +4345,15 @@ out:
|
||||
@@ -4342,15 +4342,15 @@ out:
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -176,7 +176,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
const struct cfg80211_ops mac80211_config_ops = {
|
||||
@@ -4460,5 +4460,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -4457,5 +4457,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
.reset_tid_config = ieee80211_reset_tid_config,
|
||||
.set_sar_specs = ieee80211_set_sar_specs,
|
||||
.color_change = ieee80211_color_change,
|
||||
|
||||
@@ -195,7 +195,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return err;
|
||||
}
|
||||
*changed |= err;
|
||||
@@ -3463,8 +3528,11 @@ static int ieee80211_set_csa_beacon(stru
|
||||
@@ -3460,8 +3525,11 @@ static int ieee80211_set_csa_beacon(stru
|
||||
static void ieee80211_color_change_abort(struct ieee80211_sub_if_data *sdata)
|
||||
{
|
||||
sdata->vif.color_change_active = false;
|
||||
@@ -209,7 +209,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
cfg80211_color_change_aborted_notify(sdata->dev);
|
||||
}
|
||||
@@ -4202,8 +4270,11 @@ ieee80211_set_after_color_change_beacon(
|
||||
@@ -4199,8 +4267,11 @@ ieee80211_set_after_color_change_beacon(
|
||||
|
||||
ret = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon,
|
||||
NULL, NULL);
|
||||
@@ -223,7 +223,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -4246,7 +4317,11 @@ ieee80211_set_color_change_beacon(struct
|
||||
@@ -4243,7 +4314,11 @@ ieee80211_set_color_change_beacon(struct
|
||||
err = ieee80211_assign_beacon(sdata, ¶ms->beacon_color_change,
|
||||
NULL, &color_change);
|
||||
if (err < 0) {
|
||||
@@ -246,7 +246,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
@@ -1083,6 +1084,20 @@ ieee80211_vif_get_shift(struct ieee80211
|
||||
@@ -1082,6 +1083,20 @@ ieee80211_vif_get_shift(struct ieee80211
|
||||
return shift;
|
||||
}
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -863,16 +863,20 @@ enum txq_info_flags {
|
||||
@@ -862,16 +862,20 @@ enum txq_info_flags {
|
||||
* @def_flow: used as a fallback flow when a packet destined to @tin hashes to
|
||||
* a fq_flow which is already owned by a different tin
|
||||
* @def_cvars: codel vars for @def_flow
|
||||
@@ -350,7 +350,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
unsigned long flags;
|
||||
|
||||
/* keep last! */
|
||||
@@ -949,8 +953,6 @@ struct ieee80211_sub_if_data {
|
||||
@@ -948,8 +952,6 @@ struct ieee80211_sub_if_data {
|
||||
struct ieee80211_tx_queue_params tx_conf[IEEE80211_NUM_ACS];
|
||||
struct mac80211_qos_map __rcu *qos_map;
|
||||
|
||||
@@ -359,7 +359,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct work_struct csa_finalize_work;
|
||||
bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */
|
||||
struct cfg80211_chan_def csa_chandef;
|
||||
@@ -1185,44 +1187,6 @@ enum mac80211_scan_state {
|
||||
@@ -1184,44 +1186,6 @@ enum mac80211_scan_state {
|
||||
SCAN_ABORT,
|
||||
};
|
||||
|
||||
@@ -404,7 +404,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
DECLARE_STATIC_KEY_FALSE(aql_disable);
|
||||
|
||||
struct ieee80211_local {
|
||||
@@ -1236,8 +1200,13 @@ struct ieee80211_local {
|
||||
@@ -1235,8 +1199,13 @@ struct ieee80211_local {
|
||||
struct codel_params cparams;
|
||||
|
||||
/* protects active_txqs and txqi->schedule_order */
|
||||
@@ -419,7 +419,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u32 aql_threshold;
|
||||
atomic_t aql_total_pending_airtime;
|
||||
|
||||
@@ -1654,125 +1623,6 @@ static inline bool txq_has_queue(struct
|
||||
@@ -1660,125 +1629,6 @@ static inline bool txq_has_queue(struct
|
||||
return !(skb_queue_empty(&txqi->frags) && !txqi->tin.backlog_packets);
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
|
||||
{
|
||||
return ether_addr_equal(raddr, addr) ||
|
||||
@@ -2018,14 +1868,6 @@ int ieee80211_tx_control_port(struct wip
|
||||
@@ -2024,14 +1874,6 @@ int ieee80211_tx_control_port(struct wip
|
||||
u64 *cookie);
|
||||
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *buf, size_t len);
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1216,6 +1216,7 @@ struct ieee80211_local {
|
||||
@@ -1215,6 +1215,7 @@ struct ieee80211_local {
|
||||
u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
|
||||
u32 aql_threshold;
|
||||
atomic_t aql_total_pending_airtime;
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -4265,6 +4265,7 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
@@ -4267,6 +4267,7 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
.vif_type = sdata->vif.type,
|
||||
.control_port_protocol = sdata->control_port_protocol,
|
||||
}, *old, *new = NULL;
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
bool set_offload = false;
|
||||
bool assign = false;
|
||||
bool offload;
|
||||
@@ -4380,10 +4381,10 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
@@ -4382,10 +4383,10 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
if (assign)
|
||||
new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -4601,7 +4601,7 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4603,7 +4603,7 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
|
||||
if (!(status->rx_flags & IEEE80211_RX_AMSDU)) {
|
||||
if (!pskb_may_pull(skb, snap_offs + sizeof(*payload)))
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 20 Sep 2021 15:40:07 +0200
|
||||
Subject: [PATCH] mac80211: mesh: clean up rx_bcn_presp API
|
||||
|
||||
commit a5b983c6073140b624f64e79fea6d33c3e4315a0 upstream.
|
||||
|
||||
We currently pass the entire elements to the rx_bcn_presp()
|
||||
method, but only need mesh_config. Additionally, we use the
|
||||
length of the elements to calculate back the entire frame's
|
||||
length, but that's confusing - just pass the length of the
|
||||
frame instead.
|
||||
|
||||
Link: https://lore.kernel.org/r/20210920154009.a18ed3d2da6c.I1824b773a0fbae4453e1433c184678ca14e8df45@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -645,10 +645,9 @@ struct ieee80211_if_ocb {
|
||||
*/
|
||||
struct ieee802_11_elems;
|
||||
struct ieee80211_mesh_sync_ops {
|
||||
- void (*rx_bcn_presp)(struct ieee80211_sub_if_data *sdata,
|
||||
- u16 stype,
|
||||
- struct ieee80211_mgmt *mgmt,
|
||||
- struct ieee802_11_elems *elems,
|
||||
+ void (*rx_bcn_presp)(struct ieee80211_sub_if_data *sdata, u16 stype,
|
||||
+ struct ieee80211_mgmt *mgmt, unsigned int len,
|
||||
+ const struct ieee80211_meshconf_ie *mesh_cfg,
|
||||
struct ieee80211_rx_status *rx_status);
|
||||
|
||||
/* should be called with beacon_data under RCU read lock */
|
||||
--- a/net/mac80211/mesh.c
|
||||
+++ b/net/mac80211/mesh.c
|
||||
@@ -1354,8 +1354,8 @@ static void ieee80211_mesh_rx_bcn_presp(
|
||||
}
|
||||
|
||||
if (ifmsh->sync_ops)
|
||||
- ifmsh->sync_ops->rx_bcn_presp(sdata,
|
||||
- stype, mgmt, &elems, rx_status);
|
||||
+ ifmsh->sync_ops->rx_bcn_presp(sdata, stype, mgmt, len,
|
||||
+ elems.mesh_config, rx_status);
|
||||
}
|
||||
|
||||
int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata)
|
||||
--- a/net/mac80211/mesh_sync.c
|
||||
+++ b/net/mac80211/mesh_sync.c
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright 2011-2012, Pavel Zubarev <pavel.zubarev@gmail.com>
|
||||
* Copyright 2011-2012, Marco Porsch <marco.porsch@s2005.tu-chemnitz.de>
|
||||
* Copyright 2011-2012, cozybit Inc.
|
||||
+ * Copyright (C) 2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "ieee80211_i.h"
|
||||
@@ -35,12 +36,12 @@ struct sync_method {
|
||||
/**
|
||||
* mesh_peer_tbtt_adjusting - check if an mp is currently adjusting its TBTT
|
||||
*
|
||||
- * @ie: information elements of a management frame from the mesh peer
|
||||
+ * @cfg: mesh config element from the mesh peer (or %NULL)
|
||||
*/
|
||||
-static bool mesh_peer_tbtt_adjusting(struct ieee802_11_elems *ie)
|
||||
+static bool mesh_peer_tbtt_adjusting(const struct ieee80211_meshconf_ie *cfg)
|
||||
{
|
||||
- return (ie->mesh_config->meshconf_cap &
|
||||
- IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING) != 0;
|
||||
+ return cfg &&
|
||||
+ (cfg->meshconf_cap & IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING);
|
||||
}
|
||||
|
||||
void mesh_sync_adjust_tsf(struct ieee80211_sub_if_data *sdata)
|
||||
@@ -76,11 +77,11 @@ void mesh_sync_adjust_tsf(struct ieee802
|
||||
}
|
||||
}
|
||||
|
||||
-static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
|
||||
- u16 stype,
|
||||
- struct ieee80211_mgmt *mgmt,
|
||||
- struct ieee802_11_elems *elems,
|
||||
- struct ieee80211_rx_status *rx_status)
|
||||
+static void
|
||||
+mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, u16 stype,
|
||||
+ struct ieee80211_mgmt *mgmt, unsigned int len,
|
||||
+ const struct ieee80211_meshconf_ie *mesh_cfg,
|
||||
+ struct ieee80211_rx_status *rx_status)
|
||||
{
|
||||
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
@@ -101,10 +102,7 @@ static void mesh_sync_offset_rx_bcn_pres
|
||||
*/
|
||||
if (ieee80211_have_rx_timestamp(rx_status))
|
||||
t_r = ieee80211_calculate_rx_timestamp(local, rx_status,
|
||||
- 24 + 12 +
|
||||
- elems->total_len +
|
||||
- FCS_LEN,
|
||||
- 24);
|
||||
+ len + FCS_LEN, 24);
|
||||
else
|
||||
t_r = drv_get_tsf(local, sdata);
|
||||
|
||||
@@ -119,7 +117,7 @@ static void mesh_sync_offset_rx_bcn_pres
|
||||
* dot11MeshNbrOffsetMaxNeighbor non-peer non-MBSS neighbors
|
||||
*/
|
||||
|
||||
- if (elems->mesh_config && mesh_peer_tbtt_adjusting(elems)) {
|
||||
+ if (mesh_peer_tbtt_adjusting(mesh_cfg)) {
|
||||
msync_dbg(sdata, "STA %pM : is adjusting TBTT\n",
|
||||
sta->sta.addr);
|
||||
goto no_sync;
|
||||
@@ -1,82 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 20 Sep 2021 15:40:08 +0200
|
||||
Subject: [PATCH] mac80211: move CRC into struct ieee802_11_elems
|
||||
|
||||
commit c6e37ed498f958254b5459253199e816b6bfc52f upstream.
|
||||
|
||||
We're currently returning this value, but to prepare for
|
||||
returning the allocated structure, move it into there.
|
||||
|
||||
Link: https://lore.kernel.org/r/20210920154009.479b8ebf999d.If0d4ba75ee38998dc3eeae25058aa748efcb2fc9@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1530,6 +1530,7 @@ struct ieee80211_csa_ie {
|
||||
struct ieee802_11_elems {
|
||||
const u8 *ie_start;
|
||||
size_t total_len;
|
||||
+ u32 crc;
|
||||
|
||||
/* pointers to IEs */
|
||||
const struct ieee80211_tdls_lnkie *lnk_id;
|
||||
@@ -2089,10 +2090,10 @@ static inline void ieee80211_tx_skb(stru
|
||||
ieee80211_tx_skb_tid(sdata, skb, 7);
|
||||
}
|
||||
|
||||
-u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
- struct ieee802_11_elems *elems,
|
||||
- u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
- u8 *bss_bssid);
|
||||
+void ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
+ struct ieee802_11_elems *elems,
|
||||
+ u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
+ u8 *bss_bssid);
|
||||
static inline void ieee802_11_parse_elems(const u8 *start, size_t len,
|
||||
bool action,
|
||||
struct ieee802_11_elems *elems,
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -4102,10 +4102,11 @@ static void ieee80211_rx_mgmt_beacon(str
|
||||
*/
|
||||
if (!ieee80211_is_s1g_beacon(hdr->frame_control))
|
||||
ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4);
|
||||
- ncrc = ieee802_11_parse_elems_crc(variable,
|
||||
- len - baselen, false, &elems,
|
||||
- care_about_ies, ncrc,
|
||||
- mgmt->bssid, bssid);
|
||||
+ ieee802_11_parse_elems_crc(variable,
|
||||
+ len - baselen, false, &elems,
|
||||
+ care_about_ies, ncrc,
|
||||
+ mgmt->bssid, bssid);
|
||||
+ ncrc = elems.crc;
|
||||
|
||||
if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) &&
|
||||
ieee80211_check_tim(elems.tim, elems.tim_len, bss_conf->aid)) {
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1469,10 +1469,10 @@ static size_t ieee802_11_find_bssid_prof
|
||||
return found ? profile_len : 0;
|
||||
}
|
||||
|
||||
-u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
- struct ieee802_11_elems *elems,
|
||||
- u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
- u8 *bss_bssid)
|
||||
+void ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
+ struct ieee802_11_elems *elems,
|
||||
+ u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
+ u8 *bss_bssid)
|
||||
{
|
||||
const struct element *non_inherit = NULL;
|
||||
u8 *nontransmitted_profile;
|
||||
@@ -1524,7 +1524,7 @@ u32 ieee802_11_parse_elems_crc(const u8
|
||||
|
||||
kfree(nontransmitted_profile);
|
||||
|
||||
- return crc;
|
||||
+ elems->crc = crc;
|
||||
}
|
||||
|
||||
void ieee80211_regulatory_limit_wmm_params(struct ieee80211_sub_if_data *sdata,
|
||||
@@ -1,80 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 20 Sep 2021 15:40:09 +0200
|
||||
Subject: [PATCH] mac80211: mlme: find auth challenge directly
|
||||
|
||||
commit 49a765d6785e99157ff5091cc37485732496864e upstream.
|
||||
|
||||
There's no need to parse all elements etc. just to find the
|
||||
authentication challenge - use cfg80211_find_elem() instead.
|
||||
This also allows us to remove WLAN_EID_CHALLENGE handling
|
||||
from the element parsing entirely.
|
||||
|
||||
Link: https://lore.kernel.org/r/20210920154009.45f9b3a15722.Ice3159ffad03a007d6154cbf1fb3a8c48489e86f@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1540,7 +1540,6 @@ struct ieee802_11_elems {
|
||||
const u8 *supp_rates;
|
||||
const u8 *ds_params;
|
||||
const struct ieee80211_tim_ie *tim;
|
||||
- const u8 *challenge;
|
||||
const u8 *rsn;
|
||||
const u8 *rsnx;
|
||||
const u8 *erp_info;
|
||||
@@ -1594,7 +1593,6 @@ struct ieee802_11_elems {
|
||||
u8 ssid_len;
|
||||
u8 supp_rates_len;
|
||||
u8 tim_len;
|
||||
- u8 challenge_len;
|
||||
u8 rsn_len;
|
||||
u8 rsnx_len;
|
||||
u8 ext_supp_rates_len;
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -2889,17 +2889,17 @@ static void ieee80211_auth_challenge(str
|
||||
{
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
struct ieee80211_mgd_auth_data *auth_data = sdata->u.mgd.auth_data;
|
||||
+ const struct element *challenge;
|
||||
u8 *pos;
|
||||
- struct ieee802_11_elems elems;
|
||||
u32 tx_flags = 0;
|
||||
struct ieee80211_prep_tx_info info = {
|
||||
.subtype = IEEE80211_STYPE_AUTH,
|
||||
};
|
||||
|
||||
pos = mgmt->u.auth.variable;
|
||||
- ieee802_11_parse_elems(pos, len - (pos - (u8 *)mgmt), false, &elems,
|
||||
- mgmt->bssid, auth_data->bss->bssid);
|
||||
- if (!elems.challenge)
|
||||
+ challenge = cfg80211_find_elem(WLAN_EID_CHALLENGE, pos,
|
||||
+ len - (pos - (u8 *)mgmt));
|
||||
+ if (!challenge)
|
||||
return;
|
||||
auth_data->expected_transaction = 4;
|
||||
drv_mgd_prepare_tx(sdata->local, sdata, &info);
|
||||
@@ -2907,7 +2907,8 @@ static void ieee80211_auth_challenge(str
|
||||
tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
|
||||
IEEE80211_TX_INTFL_MLME_CONN_TX;
|
||||
ieee80211_send_auth(sdata, 3, auth_data->algorithm, 0,
|
||||
- elems.challenge - 2, elems.challenge_len + 2,
|
||||
+ (void *)challenge,
|
||||
+ challenge->datalen + sizeof(*challenge),
|
||||
auth_data->bss->bssid, auth_data->bss->bssid,
|
||||
auth_data->key, auth_data->key_len,
|
||||
auth_data->key_idx, tx_flags);
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1120,10 +1120,6 @@ _ieee802_11_parse_elems_crc(const u8 *st
|
||||
} else
|
||||
elem_parse_failed = true;
|
||||
break;
|
||||
- case WLAN_EID_CHALLENGE:
|
||||
- elems->challenge = pos;
|
||||
- elems->challenge_len = elen;
|
||||
- break;
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (elen >= 4 && pos[0] == 0x00 && pos[1] == 0x50 &&
|
||||
pos[2] == 0xf2) {
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,115 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Fri, 1 Oct 2021 21:11:08 +0200
|
||||
Subject: [PATCH] mac80211: fix memory leaks with element parsing
|
||||
|
||||
commit 8223ac199a3849257e86ec27865dc63f034b1cf1 upstream.
|
||||
|
||||
My previous commit 5d24828d05f3 ("mac80211: always allocate
|
||||
struct ieee802_11_elems") had a few bugs and leaked the new
|
||||
allocated struct in a few error cases, fix that.
|
||||
|
||||
Fixes: 5d24828d05f3 ("mac80211: always allocate struct ieee802_11_elems")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Link: https://lore.kernel.org/r/20211001211108.9839928e42e0.Ib81ca187d3d3af7ed1bfeac2e00d08a4637c8025@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/agg-rx.c
|
||||
+++ b/net/mac80211/agg-rx.c
|
||||
@@ -499,13 +499,14 @@ void ieee80211_process_addba_request(str
|
||||
elems = ieee802_11_parse_elems(mgmt->u.action.u.addba_req.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
if (!elems || elems->parse_error)
|
||||
- return;
|
||||
+ goto free;
|
||||
}
|
||||
|
||||
__ieee80211_start_rx_ba_session(sta, dialog_token, timeout,
|
||||
start_seq_num, ba_policy, tid,
|
||||
buf_size, true, false,
|
||||
elems ? elems->addba_ext_ie : NULL);
|
||||
+free:
|
||||
kfree(elems);
|
||||
}
|
||||
|
||||
--- a/net/mac80211/ibss.c
|
||||
+++ b/net/mac80211/ibss.c
|
||||
@@ -1659,11 +1659,11 @@ void ieee80211_ibss_rx_queued_mgmt(struc
|
||||
mgmt->u.action.u.chan_switch.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
|
||||
- if (!elems || elems->parse_error)
|
||||
- break;
|
||||
-
|
||||
- ieee80211_rx_mgmt_spectrum_mgmt(sdata, mgmt, skb->len,
|
||||
- rx_status, elems);
|
||||
+ if (elems && !elems->parse_error)
|
||||
+ ieee80211_rx_mgmt_spectrum_mgmt(sdata, mgmt,
|
||||
+ skb->len,
|
||||
+ rx_status,
|
||||
+ elems);
|
||||
kfree(elems);
|
||||
break;
|
||||
}
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -3374,8 +3374,10 @@ static bool ieee80211_assoc_success(stru
|
||||
bss_ies = kmemdup(ies, sizeof(*ies) + ies->len,
|
||||
GFP_ATOMIC);
|
||||
rcu_read_unlock();
|
||||
- if (!bss_ies)
|
||||
- return false;
|
||||
+ if (!bss_ies) {
|
||||
+ ret = false;
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
bss_elems = ieee802_11_parse_elems(bss_ies->data, bss_ies->len,
|
||||
false, mgmt->bssid,
|
||||
@@ -4358,13 +4360,11 @@ void ieee80211_sta_rx_queued_mgmt(struct
|
||||
mgmt->u.action.u.chan_switch.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
|
||||
- if (!elems || elems->parse_error)
|
||||
- break;
|
||||
-
|
||||
- ieee80211_sta_process_chanswitch(sdata,
|
||||
- rx_status->mactime,
|
||||
- rx_status->device_timestamp,
|
||||
- elems, false);
|
||||
+ if (elems && !elems->parse_error)
|
||||
+ ieee80211_sta_process_chanswitch(sdata,
|
||||
+ rx_status->mactime,
|
||||
+ rx_status->device_timestamp,
|
||||
+ elems, false);
|
||||
kfree(elems);
|
||||
} else if (mgmt->u.action.category == WLAN_CATEGORY_PUBLIC) {
|
||||
struct ieee802_11_elems *elems;
|
||||
@@ -4384,17 +4384,17 @@ void ieee80211_sta_rx_queued_mgmt(struct
|
||||
mgmt->u.action.u.ext_chan_switch.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
|
||||
- if (!elems || elems->parse_error)
|
||||
- break;
|
||||
+ if (elems && !elems->parse_error) {
|
||||
+ /* for the handling code pretend it was an IE */
|
||||
+ elems->ext_chansw_ie =
|
||||
+ &mgmt->u.action.u.ext_chan_switch.data;
|
||||
+
|
||||
+ ieee80211_sta_process_chanswitch(sdata,
|
||||
+ rx_status->mactime,
|
||||
+ rx_status->device_timestamp,
|
||||
+ elems, false);
|
||||
+ }
|
||||
|
||||
- /* for the handling code pretend this was also an IE */
|
||||
- elems->ext_chansw_ie =
|
||||
- &mgmt->u.action.u.ext_chan_switch.data;
|
||||
-
|
||||
- ieee80211_sta_process_chanswitch(sdata,
|
||||
- rx_status->mactime,
|
||||
- rx_status->device_timestamp,
|
||||
- elems, false);
|
||||
kfree(elems);
|
||||
}
|
||||
break;
|
||||
@@ -1,41 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 28 Sep 2022 21:56:15 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: fix u8 overflow in
|
||||
cfg80211_update_notlisted_nontrans()
|
||||
|
||||
commit aebe9f4639b13a1f4e9a6b42cdd2e38c617b442d upstream.
|
||||
|
||||
In the copy code of the elements, we do the following calculation
|
||||
to reach the end of the MBSSID element:
|
||||
|
||||
/* copy the IEs after MBSSID */
|
||||
cpy_len = mbssid[1] + 2;
|
||||
|
||||
This looks fine, however, cpy_len is a u8, the same as mbssid[1],
|
||||
so the addition of two can overflow. In this case the subsequent
|
||||
memcpy() will overflow the allocated buffer, since it copies 256
|
||||
bytes too much due to the way the allocation and memcpy() sizes
|
||||
are calculated.
|
||||
|
||||
Fix this by using size_t for the cpy_len variable.
|
||||
|
||||
This fixes CVE-2022-41674.
|
||||
|
||||
Reported-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Tested-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Reviewed-by: Kees Cook <keescook@chromium.org>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -2238,7 +2238,7 @@ cfg80211_update_notlisted_nontrans(struc
|
||||
size_t new_ie_len;
|
||||
struct cfg80211_bss_ies *new_ies;
|
||||
const struct cfg80211_bss_ies *old;
|
||||
- u8 cpy_len;
|
||||
+ size_t cpy_len;
|
||||
|
||||
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 28 Sep 2022 22:01:37 +0200
|
||||
Subject: [PATCH] wifi: cfg80211/mac80211: reject bad MBSSID elements
|
||||
|
||||
commit 8f033d2becc24aa6bfd2a5c104407963560caabc upstream
|
||||
|
||||
Per spec, the maximum value for the MaxBSSID ('n') indicator is 8,
|
||||
and the minimum is 1 since a multiple BSSID set with just one BSSID
|
||||
doesn't make sense (the # of BSSIDs is limited by 2^n).
|
||||
|
||||
Limit this in the parsing in both cfg80211 and mac80211, rejecting
|
||||
any elements with an invalid value.
|
||||
|
||||
This fixes potentially bad shifts in the processing of these inside
|
||||
the cfg80211_gen_new_bssid() function later.
|
||||
|
||||
I found this during the investigation of CVE-2022-41674 fixed by the
|
||||
previous patch.
|
||||
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Fixes: 78ac51f81532 ("mac80211: support multi-bssid")
|
||||
Reviewed-by: Kees Cook <keescook@chromium.org>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1413,6 +1413,8 @@ static size_t ieee802_11_find_bssid_prof
|
||||
for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID, start, len) {
|
||||
if (elem->datalen < 2)
|
||||
continue;
|
||||
+ if (elem->data[0] < 1 || elem->data[0] > 8)
|
||||
+ continue;
|
||||
|
||||
for_each_element(sub, elem->data + 1, elem->datalen - 1) {
|
||||
u8 new_bssid[ETH_ALEN];
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -2103,6 +2103,8 @@ static void cfg80211_parse_mbssid_data(s
|
||||
for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID, ie, ielen) {
|
||||
if (elem->datalen < 4)
|
||||
continue;
|
||||
+ if (elem->data[0] < 1 || (int)elem->data[0] > 8)
|
||||
+ continue;
|
||||
for_each_element(sub, elem->data + 1, elem->datalen - 1) {
|
||||
u8 profile_len;
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 28 Sep 2022 22:07:15 +0200
|
||||
Subject: [PATCH] wifi: mac80211: fix MBSSID parsing use-after-free
|
||||
|
||||
commit ff05d4b45dd89b922578dac497dcabf57cf771c6
|
||||
|
||||
When we parse a multi-BSSID element, we might point some
|
||||
element pointers into the allocated nontransmitted_profile.
|
||||
However, we free this before returning, causing UAF when the
|
||||
relevant pointers in the parsed elements are accessed.
|
||||
|
||||
Fix this by not allocating the scratch buffer separately but
|
||||
as part of the returned structure instead, that way, there
|
||||
are no lifetime issues with it.
|
||||
|
||||
The scratch buffer introduction as part of the returned data
|
||||
here is taken from MLO feature work done by Ilan.
|
||||
|
||||
This fixes CVE-2022-42719.
|
||||
|
||||
Fixes: 5023b14cf4df ("mac80211: support profile split between elements")
|
||||
Co-developed-by: Ilan Peer <ilan.peer@intel.com>
|
||||
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
|
||||
Reviewed-by: Kees Cook <keescook@chromium.org>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1611,6 +1611,14 @@ struct ieee802_11_elems {
|
||||
|
||||
/* whether a parse error occurred while retrieving these elements */
|
||||
bool parse_error;
|
||||
+
|
||||
+ /*
|
||||
+ * scratch buffer that can be used for various element parsing related
|
||||
+ * tasks, e.g., element de-fragmentation etc.
|
||||
+ */
|
||||
+ size_t scratch_len;
|
||||
+ u8 *scratch_pos;
|
||||
+ u8 scratch[];
|
||||
};
|
||||
|
||||
static inline struct ieee80211_local *hw_to_local(
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1478,24 +1478,25 @@ struct ieee802_11_elems *ieee802_11_pars
|
||||
u8 *nontransmitted_profile;
|
||||
int nontransmitted_profile_len = 0;
|
||||
|
||||
- elems = kzalloc(sizeof(*elems), GFP_ATOMIC);
|
||||
+ elems = kzalloc(sizeof(*elems) + len, GFP_ATOMIC);
|
||||
if (!elems)
|
||||
return NULL;
|
||||
elems->ie_start = start;
|
||||
elems->total_len = len;
|
||||
|
||||
- nontransmitted_profile = kmalloc(len, GFP_ATOMIC);
|
||||
- if (nontransmitted_profile) {
|
||||
- nontransmitted_profile_len =
|
||||
- ieee802_11_find_bssid_profile(start, len, elems,
|
||||
- transmitter_bssid,
|
||||
- bss_bssid,
|
||||
- nontransmitted_profile);
|
||||
- non_inherit =
|
||||
- cfg80211_find_ext_elem(WLAN_EID_EXT_NON_INHERITANCE,
|
||||
- nontransmitted_profile,
|
||||
- nontransmitted_profile_len);
|
||||
- }
|
||||
+ elems->scratch_len = len;
|
||||
+ elems->scratch_pos = elems->scratch;
|
||||
+
|
||||
+ nontransmitted_profile = elems->scratch_pos;
|
||||
+ nontransmitted_profile_len =
|
||||
+ ieee802_11_find_bssid_profile(start, len, elems,
|
||||
+ transmitter_bssid,
|
||||
+ bss_bssid,
|
||||
+ nontransmitted_profile);
|
||||
+ non_inherit =
|
||||
+ cfg80211_find_ext_elem(WLAN_EID_EXT_NON_INHERITANCE,
|
||||
+ nontransmitted_profile,
|
||||
+ nontransmitted_profile_len);
|
||||
|
||||
crc = _ieee802_11_parse_elems_crc(start, len, action, elems, filter,
|
||||
crc, non_inherit);
|
||||
@@ -1524,8 +1525,6 @@ struct ieee802_11_elems *ieee802_11_pars
|
||||
offsetofend(struct ieee80211_bssid_index, dtim_count))
|
||||
elems->dtim_count = elems->bssid_index->dtim_count;
|
||||
|
||||
- kfree(nontransmitted_profile);
|
||||
-
|
||||
elems->crc = crc;
|
||||
|
||||
return elems;
|
||||
@@ -1,41 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Thu, 29 Sep 2022 21:50:44 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: ensure length byte is present before
|
||||
access
|
||||
|
||||
commit 567e14e39e8f8c6997a1378bc3be615afca86063 upstream.
|
||||
|
||||
When iterating the elements here, ensure the length byte is
|
||||
present before checking it to see if the entire element will
|
||||
fit into the buffer.
|
||||
|
||||
Longer term, we should rewrite this code using the type-safe
|
||||
element iteration macros that check all of this.
|
||||
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Reported-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -304,7 +304,8 @@ static size_t cfg80211_gen_new_ie(const
|
||||
tmp_old = cfg80211_find_ie(WLAN_EID_SSID, ie, ielen);
|
||||
tmp_old = (tmp_old) ? tmp_old + tmp_old[1] + 2 : ie;
|
||||
|
||||
- while (tmp_old + tmp_old[1] + 2 - ie <= ielen) {
|
||||
+ while (tmp_old + 2 - ie <= ielen &&
|
||||
+ tmp_old + tmp_old[1] + 2 - ie <= ielen) {
|
||||
if (tmp_old[0] == 0) {
|
||||
tmp_old++;
|
||||
continue;
|
||||
@@ -364,7 +365,8 @@ static size_t cfg80211_gen_new_ie(const
|
||||
* copied to new ie, skip ssid, capability, bssid-index ie
|
||||
*/
|
||||
tmp_new = sub_copy;
|
||||
- while (tmp_new + tmp_new[1] + 2 - sub_copy <= subie_len) {
|
||||
+ while (tmp_new + 2 - sub_copy <= subie_len &&
|
||||
+ tmp_new + tmp_new[1] + 2 - sub_copy <= subie_len) {
|
||||
if (!(tmp_new[0] == WLAN_EID_NON_TX_BSSID_CAP ||
|
||||
tmp_new[0] == WLAN_EID_SSID)) {
|
||||
memcpy(pos, tmp_new, tmp_new[1] + 2);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user