Compare commits
No commits in common. "master" and "0.5.x" have entirely different histories.
|
@ -1,15 +1,6 @@
|
|||
/selected_bsp
|
||||
/selected_community
|
||||
/selected_variant
|
||||
/build
|
||||
/bin*
|
||||
/src/dl
|
||||
/src/openwrt
|
||||
/src/packages/fastd
|
||||
/src/packages/wlanslovenija
|
||||
/src/packages/openwrt
|
||||
/src/packages/gluon
|
||||
/src/packages/routing
|
||||
/.project
|
||||
/*.patch
|
||||
/.mailmap
|
||||
selected_bsp
|
||||
selected_community
|
||||
build
|
||||
bin
|
||||
src
|
||||
.project
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git
|
||||
settings:
|
||||
tags: true
|
||||
|
||||
steps:
|
||||
buildall-layer3:
|
||||
image: openwrtorg/imagebuilder
|
||||
commands:
|
||||
- export HOME=/home/build/openwrt
|
||||
- sudo chown -R build:build .
|
||||
- git config --global user.email "ci@fff.community"
|
||||
- git config --global user.name "FFF CI"
|
||||
- ./buildscript selectvariant layer3
|
||||
- ./buildscript selectbsp bsp/ath79-generic.bsp
|
||||
- ./buildscript prepare
|
||||
- ./buildscript buildall
|
||||
|
||||
buildall-node:
|
||||
image: openwrtorg/imagebuilder
|
||||
commands:
|
||||
- export HOME=/home/build/openwrt
|
||||
- sudo chown -R build:build .
|
||||
- git config --global user.email "ci@fff.community"
|
||||
- git config --global user.name "FFF CI"
|
||||
- ./buildscript selectvariant node
|
||||
- ./buildscript selectbsp bsp/ath79-generic.bsp
|
||||
- ./buildscript prepare
|
||||
- ./buildscript buildall
|
||||
|
||||
distribute:
|
||||
image: alpine/git
|
||||
volumes:
|
||||
- /var/lib/woodpecker/artifacts:/var/run/artifacts
|
||||
commands:
|
||||
- rm -rf /var/run/artifacts/$(git describe --tags)
|
||||
- mkdir -p /var/run/artifacts/$(git describe --tags)
|
||||
- cp -r bin/* /var/run/artifacts/$(git describe --tags)/
|
||||
- echo
|
||||
- echo
|
||||
- echo "You can download the built firmware images here:"
|
||||
- echo "https://ci.fff.community/artifacts/$(git describe --tags)"
|
||||
|
||||
when:
|
||||
branch: [ master ]
|
356
LICENSES/GPL-2.0
356
LICENSES/GPL-2.0
|
@ -1,356 +0,0 @@
|
|||
Valid-License-Identifier: GPL-2.0-only
|
||||
Valid-License-Identifier: GPL-2.0
|
||||
Valid-License-Identifier: GPL-2.0-or-later
|
||||
Valid-License-Identifier: GPL-2.0+
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-2.0-only.html
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU General Public License (GPL) version 2 only' use:
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
For 'GNU General Public License (GPL) version 2 or any later version' use:
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
License-Text:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) 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
|
||||
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 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 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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
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
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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 a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE 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.
|
||||
|
||||
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
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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,
|
||||
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, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
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.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This 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 Library General
|
||||
Public License instead of this License.
|
690
LICENSES/GPL-3.0
690
LICENSES/GPL-3.0
|
@ -1,690 +0,0 @@
|
|||
Valid-License-Identifier: GPL-3.0-only
|
||||
Valid-License-Identifier: GPL-3.0
|
||||
Valid-License-Identifier: GPL-3.0-or-later
|
||||
Valid-License-Identifier: GPL-3.0+
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-3.0-only.html
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-3.0-or-later.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU General Public License (GPL) version 3 only' use:
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
For 'GNU General Public License (GPL) version 3 or any later version' use:
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
License-Text:
|
||||
|
||||
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>.
|
138
README.md
138
README.md
|
@ -4,110 +4,104 @@ firmware
|
|||
# Was ist Freifunk?
|
||||
Freifunk ist eine nicht-kommerzielle Initiative für freie Funknetzwerke. Jeder Nutzer im Freifunk-Netz stellt einen günstigen WLAN-Router für sich selbst und den Datentransfer der anderen Teilnehmer zur Verfügung. Dieses Netzwerk kann von jedem genutzt werden.
|
||||
|
||||
Weitere Informationen gibt es auf <https://freifunk.net/> und auf <https://wiki.freifunk-franken.de/w/Hauptseite>.
|
||||
|
||||
# Firmware selbst kompilieren
|
||||
## Voraussetzungen
|
||||
* `apt-get install zlib1g-dev lua5.2 build-essential unzip libncurses-dev gawk git subversion libssl-dev rsync python3-distutils` (Sicherlich müssen noch mehr Abhängigkeiten installiert werden, diese Liste wird sich hoffentlich nach und nach füllen. Ein erster Ansatzpunkt sind die Abhängigkeiten von OpenWrt selbst)
|
||||
* `git clone https://git.freifunk-franken.de/freifunk-franken/firmware.git`
|
||||
|
||||
## Benutzung des Buildscripts
|
||||
### Prerequisites
|
||||
* `apt-get install zlib1g-dev lua5.2 build-essential unzip libncurses-dev gawk git subversion` (Sicherlich müssen noch mehr Abhängigkeiten Installiert werden, diese Liste wird sich hoffentlich nach und nach Füllen. Ein erster Ansatzpunkt sind die Abhängigkeiten von OpenWRT selbst)
|
||||
* `git clone https://github.com/FreifunkFranken/firmware.git`
|
||||
* `cd firmware`
|
||||
|
||||
## Erste Schritte
|
||||
Je nachdem, für welche Hardware die Firmware gebaut werden soll, muss das BSP gewählt werden:
|
||||
* `./buildscript selectbsp bsp/ath79-generic.bsp`
|
||||
* Um die vorhandenen BSPs zu sehen, kann `./buildscript selectbsp help` ausgeführt werden.
|
||||
### Erste Schritte
|
||||
Mit Hilfe der Community-Files werden Parameter, wie die ESSID, der Kanal sowie z.B. die Netmon-IP gesetzt. Diese Einstellungen sind Community weit einheitlich und müssen i.d.R. nicht geändert werden.
|
||||
* `./buildscript selectcommunity community/franken.cfg`
|
||||
Je nach dem, für welche Hardware die Firmware gebaut werden soll muss das BSP gewählt werden:
|
||||
* `./buildscript selectbsp bsp/board wr1043nd.bsp`
|
||||
* `./buildscript`
|
||||
|
||||
## Was ist ein BSP?
|
||||
Ein BSP (Board-Support-Package) beschreibt, was zu tun ist, damit ein Firmware Image für eine spezielle Hardware gebaut werden kann.
|
||||
Typischerweise besteht ein bsp aus:
|
||||
* target-subtarget.bsp
|
||||
* target-subtarget/.config
|
||||
Typischerweise ist eine folgene Ordner-Struktur vorhanden:
|
||||
* .config
|
||||
* root_file_system/
|
||||
* etc/
|
||||
* rc.local.board
|
||||
* config/
|
||||
* board
|
||||
* network
|
||||
* system
|
||||
* crontabs/
|
||||
* root
|
||||
|
||||
Die Daten des BSP werden nie alleine verwendet. Zuerst werden immer die Daten aus dem "default"-BSP zum Ziel kopiert, erst danach werden die Daten des eigentlichen BSPs dazu kopiert. Durch diesen Effekt kann ein BSP die "default" Daten überschreiben.
|
||||
Die Daten des BSP werden nie alleine verwendet. Zu erst werden immer die Daten aus dem "default"-BSP zum Ziel kopiert, erst danach werden die Daten des eigentlichen BSPs dazu kopiert. Durch diesen Effekt kann ein BSP die "default" Daten überschreiben.
|
||||
|
||||
## Die Verwendung des Buildscripts
|
||||
Die BSP-Datei wird durch das Buildscript automatisch als dot-Script geladen, somit stehen dort alle Funktionen zur Verfügung.
|
||||
Das Buildscript generiert ein dynamisches sed-Script. Dies geschieht, damit die Templates mit den richtigen Werten gefüllt werden können.
|
||||
|
||||
### `./buildscript selectvariant`
|
||||
Hier wählt man aus ob man Node Firmware oder Layer3 Firmware bauen möchte:
|
||||
* `./buildscript selectvariant [node/layer3]`
|
||||
* Um die verschiedenen Varianten zu sehen, kann `./buildscript selectvariant help` ausgeführt werden.
|
||||
## Der Verwendung des Buildscripts
|
||||
Das BSP file durch das Buildscript automatisch als dot-Script geladen, somit stehen dort alle Funktionen zur Verfügung.
|
||||
Das Buildscript lädt ebenfalls automatisch das Community file und generiert ein dynamisches sed-Script, dies geschieht, damit die Templates mit den richtigen Werten gefüllt werden können.
|
||||
|
||||
### `./buildscript prepare`
|
||||
* Sourcen werden in einen separaten src-Folder geladen, sofern diese nicht schon da sind. Zu den Sourcen zählen folgende Komponenten:
|
||||
* OpenWrt
|
||||
* Sämtliche Packages (ggf. werden Patches angewandt)
|
||||
* Eine OpenWrt Feed-Config wird mit dem lokalen Source Verzeichnis als Quelle angelegt
|
||||
* OpenWRT
|
||||
* Sämtliche Packages (ggfs werden Patches angewandt)
|
||||
|
||||
* Ein ggfs altes Target wird gelöscht
|
||||
* OpenWRT wird ins Target exportiert (kopiert)
|
||||
* Eine OpenWRT Feed-Config wird mit dem lokalen Source Verzeichnis als Quelle angelegt
|
||||
* Die Feeds werden geladen
|
||||
* Spezielle Auswahl an Paketen wird geladen
|
||||
* Patches werden angewandt
|
||||
* board_prepare() aus dem BSP wird aufgerufen (wird z.B. für Patches für eine bestimmte Hardware verwendet)
|
||||
|
||||
### `./buildscript config openwrt`
|
||||
Um das Arbeiten mit den .config-Dateien von OpenWrt zu vereinfachen, bietet das Buildscript die Möglichkeit das `menuconfig` von OpenWrt aufzurufen. Nachdem man die gewünschten Einstellungen vorgenommen hat, hat man die Möglichkeit, die frisch editierte Konfiguration in das BSP zu übernehmen.
|
||||
Dieses Kommando arbeitet folgendermaßen:
|
||||
* prebuild
|
||||
* OpenWrt: `make menuconfig`
|
||||
* Speichern, y/n?
|
||||
* Config-Format vereinfachen
|
||||
* Config ins BSP zurück speichern
|
||||
|
||||
### `./buildscript updatefeeds`
|
||||
Aktualisiert die OpenWrt Feeds für zusätzliche Pakete, die in die Firmware eingebaut werden. Dabei werden die Referenzen im build/ Verzeichnis aktualisiert. Dieser Schritt wird bereits von `./buildscript prepare` übernommen, daher ist dies nur bei manuellen Änderungen der Feeds nötig.
|
||||
|
||||
### `./buildscript clean`
|
||||
Entfernt den Inhalt der bin/ und build/ Verzeichnisse und die Feeds in src/packages/. Damit werden beim nächsten `./buildscript prepare` alle Dateien die für das Bauen der Firmware nötig sind neu heruntergeladen. Dies kann nötig sein wenn z.B. seit dem letzen build ein größerer Versionssprung in OpenWRT gemacht wurde. Wenn es Fehler beim bauen gibt, wie fehlende Dependencies o.Ä., ist ein clean mal einen Versuch wert.
|
||||
* Nach einem clean muss daher erst noch einmal `./buildscript prepare` ausgeführt werden, bevor man mit `./buildscipt build` bauen kann!
|
||||
* board_prepare() aus dem BSP wird aufgerufen (wird. z.B. fur Patches für eine bestimmte HW verwendet)
|
||||
|
||||
### `./buildscript build`
|
||||
Sollte man am besten mit Hilfe des Tools 'screen' oder ähnlichem laufen lassen um einen Abbruch des Builds bei Verbindungsproblemen oder ähnlichem zu verhindern.
|
||||
* prebuild
|
||||
* $target/files aufräumen
|
||||
* (In $target/files liegen Dateien, die später direkt im Ziel-Image landen)
|
||||
* Files aus default-bsp und bsp kopieren
|
||||
* OpenWrt- und Kernel-Config kopieren
|
||||
* OpenWRT- und Kernel-Config kopieren
|
||||
* board_prebuild() aus dem BSP wird aufgerufen
|
||||
* Templates transformieren
|
||||
* GIT Versionen speichern: $target/files/etc/firmware_release
|
||||
* OpenWrt: make
|
||||
* OpenWRT: make
|
||||
* postbuild
|
||||
* board_postbuild() wird aufgerufen
|
||||
|
||||
### `./buildscript buildall`
|
||||
Kann verwendet werden um für alle BSPs Firmware zu bauen. Das kann jedoch mehrere Stunden dauern.
|
||||
### `./buildscript config`
|
||||
Um das Arbeiten mit den OpenWRT .config's zu vereinfachen bietet das Buildscript die Möglichkeit die OpenWRT menuconfig und die OpenWRT kernel_menuconfig aufzurufen. Im Anschluss hat man die Möglichkeit die frisch editierten Configs in das BSP zu übernehmen.
|
||||
* prebuild
|
||||
* OpenWRT: `make menuconfig ; make kernel_menuconfig`
|
||||
* Speichern, y/n?
|
||||
* Config-Format vereinfachen
|
||||
* Config ins BSP zurück speichern
|
||||
|
||||
## Erweiterung eines BSPs
|
||||
Beispielhaftes Vorgehen um den WR1043V2 zu unterstützen.
|
||||
|
||||
### Repository auschecken
|
||||
```
|
||||
git clone https://git.freifunk-franken.de/freifunk-franken/firmware.git
|
||||
git clone https://github.com/FreifunkFranken/firmware.git
|
||||
cd firmware
|
||||
```
|
||||
|
||||
### Erste Images erzeugen
|
||||
Du fügst die Dateinamen der Images, die zusätzlich kopiert werden sollen, in das `images`-Array ein. Hierbei können Wildcards verwendet werden, um z.B. sysupgrade.bin und ggf. meherere factory.bin Ergebnisse aus dem OpenWrt Buildverzeichnis in unser Buildverzeichnis zu kopieren.
|
||||
|
||||
### Erstes Images erzeugen
|
||||
Du fügst im board_postbuild ein, dass auch die Images für den wr1043v2 kopiert werden:
|
||||
```
|
||||
vim bsp/ath79-generic.bsp
|
||||
images=(
|
||||
// ...
|
||||
openwrt-${chipset}-${subtarget}-tl-wr1043nd-v2-squashfs-*"
|
||||
// ...
|
||||
)
|
||||
vim bsp/board_wr1043nd.bsp
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-sysupgrade.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
```
|
||||
|
||||
Dann muss auf jeden Fall noch das Netzwerk richtig konfiguriert werden. Dazu muss man den Router sehr gut kennen, i.d.R. lernt man den erst beim Verwenden kennen, daher ist ein guter Startpunkt die Config vom v1 zu kopieren und erstmal zu gucken was passiert.
|
||||
Wichtig: Zur Laufzeit wird (wenn keine Anpassung in fff-boardname vorgenommen wurde) die Datei `network.$(cat /var/sysinfo/board_name)` geladen. Um den richtigen Dateinamen zu bestimmen kann zunächst ein normales OpenWrt in der gleichen Version auf den Router installiert werden; dort kan man sich dann diese Datei ansehen.
|
||||
Dann muss auf jeden Fall noch das Netzwerk richtig konfiguriert werden. Dazu muss man den Router sehr gut kennen, i.d.R. lernt man den erst beim Verwenden kennen, daher ist ein guter Startpunkt die Config vom v1 zu kopieren und erstmal zu gucken was passiert:
|
||||
```
|
||||
cd src/packages/fff/fff-network/mips
|
||||
cp network.tplink,wr1043nd-v1 network.tplink,wr1043nd-v2
|
||||
cp bsp/wr1043nd/root_file_system/etc/network.tl-wr1043nd-v1 bsp/wr1043nd/root_file_system/etc/network.tl-wr1043nd-v2
|
||||
```
|
||||
|
||||
Anschließend kann ein erstes Image erzeugt werden:
|
||||
```
|
||||
./buildscript selectbsp bsp/ath79-generic.bsp
|
||||
./buildscript selectbsp bsp/board_wr1043nd.bsp
|
||||
./buildscript selectcommunity community/franken.cfg
|
||||
|
||||
./buildscript prepare
|
||||
./buildscript build
|
||||
|
@ -115,8 +109,8 @@ Anschließend kann ein erstes Image erzeugt werden:
|
|||
Jetzt gehst du n Kaffee trinken.
|
||||
|
||||
### Netzwerkeinstellungen korrekt setzen
|
||||
Am Ende sollte im bin/ Verzeichnis unter anderem das Image für v1 und v2 liegen. Das v2 Image wird auf den Router geflasht. Achtung: Eventuell ist das Netzwerk jetzt so falsch eingestellt, dass man nicht mehr über Netzwerk auf den Router zugreifen kann. Am einfachsten ist es den Router dann über eine serielle Konsole zu verwenden. Alternativ kann aber auch der OpenWrt Failsafe Modus verwendet werden, dort werden unsere Netzwerkeinstellungen nicht angewendet. Außerdem kann man an den unterschiedlichen LAN-Ports mit der IPv6 Link-Local aus der MAC Adresse des Geräts versuchen drauf zu kommen. Es kann auch sein, dass die IPv6 +/- 1 am Ende hat. Letztlich kann das funktionieren, die serielle Konsole ist hier aber häufig einfacher!
|
||||
Wenn man dann auf dem Router drauf ist, muss als erstes festgestellt werden, welches Ethernet-Device für den WAN Port zuständig ist. Mir sind da folgende Möglichkeiten bekannt. a) WAN ist eth0, b) WAN ist eth1, c) WAN ist teil vom Switch eth0. Dementsprechend wird das WANDEV auf dem Router in der /etc/network.tl-wr1043nd-v2 konfiguriert. Wenn WAN ein eigenes ethX hat, dann muss WAN_PORTS="" sein. Dann muss eingestellt werden welches Ethernet-Device an dem internen Switch angeschlossen ist (swconfig list). Dieses wird als SWITCHDEV konfiguriert. Es muss noch eingestellt werden, welches Ethernet oder Wifi Device die MAC Adresse hat, die auch unter dem Gerät steht. Dieses Device wird als ROUTERMAC eingetragen. Nun ist es an der Zeit die Einstellungen zu testen, dafür muss die falsche Netzwerk-Config zurück gesetzt werden:
|
||||
Am Ende sollte im bin/ Verzeichnis das Image für v1 und v2 liegen. Das v2 Image wird auf den Router geflasht. Achtung: Eventuell ist das Netzwerk jetzt so falsch eingestellt, dass man nicht mehr über Netzwerk auf den Router zugreifen kann. Am einfachsten ist es den Router dann über eine serielle Konsole zu verwenden. Theoretisch kann man an den unterschiedlichen LAN-Ports mit der IPv6 Link-Local aus der MAC Adresse des Geräts versuchen drauf zu kommen. Es kann auch sein, dass die IPv6 +/- 1 am Ende hat. Letztlich kann das funktionieren, ist aber aufwändig und da am LAN Einstellungen verändert werden sollen, ist die serielle Konsole das Mittel der Wahl!
|
||||
Wenn man dann auf dem Router drauf ist, muss als erstes festgestellt werden, welches Ethernet-Device für den WAN Port zuständig ist. Mir sind da folgende Möglichkeiten bekannt. a) WAN ist eth0, b) WAN ist eth1, c) WAN ist teil vom Switch eth0. Dementsprechend wird das WANDEV auf dem Router in der /etc/network.tl-wr1043nd-v2 konfiguriert. Wenn WAN ein eigenes ethX hat, dann muss WAN_PORTS="" sein. Dann muss eingestellt werden welches Ethernet-Device an dem internen Switch angeschlossen ist (swconfig list). Dieses wird als SWITCHDEV konfiguriert. Ich glaub CLIENTIF musst nicht angepasst werden. Aber es muss noch eingestellt werden, welches Ethernet oder Wifi Device die MAC Adresse hat, die auch unter dem Gerät steht. Dieses Device wird als ROUTERMAC eingetragen. Nun ist es an der Zeit die Einstellungen zu testen, dafür muss die falsche Netzwerk-Config zurück gesetzt werden:
|
||||
```
|
||||
cp /rom/etc/config/network /etc/config/network
|
||||
reboot
|
||||
|
@ -130,23 +124,13 @@ reboot
|
|||
```
|
||||
|
||||
### Einstellungen testen und ins BSP übernehmen
|
||||
Wenn jetzt die Ports immer noch alle korrekt funktionieren kann man die Datei auf den eigenen PC kopieren:
|
||||
Wenn jetzt die Ports immer noch alle korrekt funktionieren kann man die datei auf den eigenen PC kopieren:
|
||||
```
|
||||
scp root@[ipv6ll%scope]:/etc/network.tl-wr1043nd-v2 /path/to/git/firmware/bsp/wr1043nd/root_file_system/etc/network.tl-wr1043nd-v2
|
||||
```
|
||||
|
||||
### BSP commiten und Patch erzeugen
|
||||
Nun kann man mit `git status` die Änderungen sehen.
|
||||
|
||||
Damit man an mehreren Änderungen gleichzeitig arbeiten kann, sollte zunächst mit `git checkout -b mein-neues-feature` ein neuer Branch erzeugt werden. Dann können die Änderungen mit `git add` gestaged und danach mit `git commit` eingecheckt werden.
|
||||
|
||||
Die so erzeugten Änderungen können dann mit einem Pull Request im [Gitea](https://git.freifunk-franken.de/freifunk-franken/firmware) submitted werden. Dafür ist ein [Account](https://docs.freifunk-franken.de/services/git.freifunk-franken/#anmeldung) nötig. Dazu muss das Firmware-Repository zunächst geforkt werden. Die SSH-Adresse des Forks (steht oben rechts) kann dann mit `git remote set-url origin gitea@git.freifunk-franken.de:meinname/firmware.git` in das lokale Repository eingetragen werden. Danach kann der weiter oben erstellte Branch mit `git push origin mein-neues-feature` in den Fork hochgeladen werden. Nun kann der Pull Request im Freifunk Franken Repository [angelegt](https://git.freifunk-franken.de/freifunk-franken/firmware/pulls) werden.
|
||||
|
||||
Soll der Pull Request später geändert werden, dann müssen zunächst die nötigen Änderungen gemacht und danach mit `git commit --amend` in den bereits bestehenden Commit eingefügt werden. Dies kann dann mit `git push --force origin mein-neues-feature` in den Fork hochgeladen werden. Force ist hierbei nötig, da bereits bestehende Commits geändert werden. Der Pull Request wird dann automatisch aktualisiert. Um Reviews zu erleichtern sollten die Änderungen im Pull Request als Kommentar beschrieben werden.
|
||||
Nun kann man mit `git status` die Änderungen sehen. Mit `git add` staged man diese und mit `git commit` checkt man sie ein. `git format-patch origin/HEAD` erzeugt dann aus deinen Commits ein (oder mehr) Patches. Diese schickst du dann mit `git send-email --to franken-dev@freifunk.net *.patch` an unsere Liste. Dort nimmt sich jemand die Zeit und schaut kurz drüber und wenn alles passt finden deine Änderungen in den Hauptentwicklungszweig und sind ab dann Teil der Freifunk-Franken-Firmware.
|
||||
|
||||
### Patch schicken
|
||||
Auf der Mailingliste franken-dev@freifunk.net kannst du natürlich jederzeit Fragen stellen, falls etwas nicht klar sein sollte.
|
||||
|
||||
## Hinzufügen von Paketen zum Image
|
||||
Das Hinzufügen von Paketen sollte mit Bedacht erfolgen, da dies (bei unvorsichtiger Konfiguration) den Betrieb des Routers und eventuell des Freifunk-Netzes beeinträchtigen könnte.
|
||||
Mit dem Firmware-Verzeichnis als Arbeitsverzeichnis kann mittels des Befehls `./build/<target>/scripts/feeds install <paket>` ein Paket zur menuconfig hinzugefügt werden.
|
||||
Mittels des schon bekannten `./buildscript config openwrt` kann das Paket dann ausgewählt werden. Es wird beim anschließenden Build zum Image hinzugefügt.
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
chipset=ath79
|
||||
subtarget=generic
|
||||
images=("openwrt-${chipset}-${subtarget}-glinet_gl-ar150-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_archer-c25-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_archer-c60-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_archer-c60-v2-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_archer-c7-v2-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_archer-c7-v4-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_archer-c7-v5-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_cpe210-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_cpe210-v2-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_cpe210-v3-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_cpe510-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr3500-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr3600-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr4300-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr4310-v1-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v2-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v3-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v4-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043n-v5-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-ubnt_nanostation-loco-m-xw-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-ubnt_unifi-ap-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-ubnt_unifiac-mesh-squashfs-*"
|
||||
)
|
|
@ -1,111 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_ath79=y
|
||||
CONFIG_TARGET_ath79_generic=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_glinet_gl-ar150=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_glinet_gl-ar150=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c25-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c25-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v2=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v2="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v2=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v4=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v4="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v5=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v5="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v1="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v2=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v2="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v3=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v3="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe510-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe510-v1="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr3500-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr3500-v1=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr3600-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr3600-v1=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr4300-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr4300-v1=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr4310-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr4310-v1=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v1=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v2=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v2=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v3=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v3=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v4=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v4=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043n-v5=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043n-v5=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr710n-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr710n-v1=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr842n-v2=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr842n-v2=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_bullet-m-ar7240=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_bullet-m-ar7240="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_bullet-m-ar7241=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_bullet-m-ar7241="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-loco-m=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-loco-m="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-loco-m-xw=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-loco-m-xw="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-m=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-m="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_picostation-m=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_picostation-m="-rssileds"
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_unifi-ap=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_unifi-ap=""
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_unifiac-mesh=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_unifiac-mesh="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
|
||||
CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=1
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_hostapd-mini=y
|
||||
CONFIG_PACKAGE_iwinfo=m
|
||||
CONFIG_PACKAGE_libiwinfo=m
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_PACKAGE_wpad-mini=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca9887=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca9888=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca988x=m
|
||||
CONFIG_PACKAGE_kmod-ath10k-smallbuffers=m
|
||||
CONFIG_PACKAGE_kmod-ath10k=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers=m
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=1024
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -0,0 +1,20 @@
|
|||
machine=ubnt-nano-m
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
machine=wdr4300
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
machine=wdr4900
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
machine=wr1043nd
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-sysupgrade.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
machine=wr740n
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-*.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
machine=wr741
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v2-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v4-squashfs-*.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
machine=wr841
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v9-squashfs-*.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
machine=wr842
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr842n-v2-squashfs-*.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -6,8 +6,4 @@
|
|||
|
||||
Welcome to the free wireless experience
|
||||
More information at http://franken.freifunk.net
|
||||
|
||||
Data protection notes may be found in:
|
||||
/etc/dataprotection.en (in English)
|
||||
/etc/dataprotection.de (in German)
|
||||
---------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../tmp/bat-hosts
|
|
@ -0,0 +1,6 @@
|
|||
config 'alfred' 'alfred'
|
||||
option interface 'br-mesh'
|
||||
option mode 'slave'
|
||||
option batmanif 'bat0'
|
||||
option start_vis '0'
|
||||
option run_facters '0'
|
|
@ -0,0 +1,12 @@
|
|||
config 'mesh' 'bat0'
|
||||
option 'aggregated_ogms'
|
||||
option 'ap_isolation'
|
||||
option 'bonding'
|
||||
option 'fragmentation'
|
||||
option 'gw_bandwidth'
|
||||
option 'gw_mode' 'client'
|
||||
option 'gw_sel_class' '1'
|
||||
option 'log_level'
|
||||
option 'orig_interval'
|
||||
option 'vis_mode'
|
||||
option 'bridge_loop_avoidance' '0'
|
|
@ -0,0 +1,24 @@
|
|||
config 'script'
|
||||
option 'error_level' '0'
|
||||
option 'logfile' '/var/log/configurator.log'
|
||||
option 'version' '1'
|
||||
option 'sync_hostname' '1'
|
||||
|
||||
config 'api'
|
||||
option 'ipv4_address' '1'
|
||||
option 'ipv6_interface' 'br-mesh'
|
||||
option 'ipv6_address' '${NETMON_IP}'
|
||||
option 'timeout' '5'
|
||||
option 'retry' '5'
|
||||
option 'api_key' '1'
|
||||
|
||||
config 'crawl'
|
||||
option 'method' 'hash'
|
||||
option 'nickname' '1'
|
||||
option 'password' '1'
|
||||
option 'login_string' '1'
|
||||
option 'router_id' '1'
|
||||
option 'update_hash' '1'
|
||||
|
||||
config 'netmon'
|
||||
option 'autoadd_ipv6_address' '1'
|
|
@ -0,0 +1,33 @@
|
|||
config dnsmasq
|
||||
option domainneeded 1
|
||||
option boguspriv 1
|
||||
option filterwin2k '0' #enable for dial on demand
|
||||
option localise_queries 1
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts 1
|
||||
option nonegcache 0
|
||||
option authoritative 0
|
||||
option readethers 1
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.auto'
|
||||
#list server '/mycompany.local/1.2.3.4'
|
||||
#option nonwildcard 1
|
||||
#list interface br-lan
|
||||
#list notinterface lo
|
||||
|
||||
#config dhcp mesh
|
||||
# option interface mesh
|
||||
# option start X.10
|
||||
# option limit 100
|
||||
# option leasetime 6h
|
||||
|
||||
config dhcp lan
|
||||
option interface lan
|
||||
option start 100
|
||||
option limit 150
|
||||
option leasetime 12h
|
||||
|
||||
config dhcp wan
|
||||
option interface wan
|
||||
option ignore 1
|
|
@ -0,0 +1,4 @@
|
|||
config dropbear
|
||||
option PasswordAuth 'on'
|
||||
option Port '22'
|
||||
# option BannerFile '/etc/banner'
|
|
@ -0,0 +1,103 @@
|
|||
config defaults
|
||||
option syn_flood 1
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
config forwarding
|
||||
option src lan
|
||||
option dest wan
|
||||
|
||||
# We need to accept udp packets on port 68,
|
||||
# see https://dev.openwrt.org/ticket/4108
|
||||
config rule
|
||||
option src wan
|
||||
option proto udp
|
||||
option dest_port 68
|
||||
option target ACCEPT
|
||||
|
||||
#Allow ping
|
||||
config rule
|
||||
option src wan
|
||||
option proto icmp
|
||||
option icmp_type echo-request
|
||||
option target ACCEPT
|
||||
|
||||
#Allow SSH on WAN
|
||||
config rule
|
||||
option src wan
|
||||
option dest_port 22
|
||||
option target ACCEPT
|
||||
option proto tcp
|
||||
|
||||
# include a file with users custom iptables rules
|
||||
config include
|
||||
option path /etc/firewall.user
|
||||
|
||||
|
||||
### EXAMPLE CONFIG SECTIONS
|
||||
# do not allow a specific ip to access wan
|
||||
#config rule
|
||||
# option src lan
|
||||
# option src_ip 192.168.45.2
|
||||
# option dest wan
|
||||
# option proto tcp
|
||||
# option target REJECT
|
||||
|
||||
# block a specific mac on wan
|
||||
#config rule
|
||||
# option dest wan
|
||||
# option src_mac 00:11:22:33:44:66
|
||||
# option target REJECT
|
||||
|
||||
# block incoming ICMP traffic on a zone
|
||||
#config rule
|
||||
# option src lan
|
||||
# option proto ICMP
|
||||
# option target DROP
|
||||
|
||||
# port redirect port coming in on wan to lan
|
||||
#config redirect
|
||||
# option src wan
|
||||
# option src_dport 80
|
||||
# option dest lan
|
||||
# option dest_ip 192.168.16.235
|
||||
# option dest_port 80
|
||||
# option proto tcp
|
||||
|
||||
|
||||
### FULL CONFIG SECTIONS
|
||||
#config rule
|
||||
# option src lan
|
||||
# option src_ip 192.168.45.2
|
||||
# option src_mac 00:11:22:33:44:55
|
||||
# option src_port 80
|
||||
# option dest wan
|
||||
# option dest_ip 194.25.2.129
|
||||
# option dest_port 120
|
||||
# option proto tcp
|
||||
# option target REJECT
|
||||
|
||||
#config redirect
|
||||
# option src lan
|
||||
# option src_ip 192.168.45.2
|
||||
# option src_mac 00:11:22:33:44:55
|
||||
# option src_port 1024
|
||||
# option src_dport 80
|
||||
# option dest_ip 194.25.2.129
|
||||
# option dest_port 120
|
||||
# option proto tcp
|
|
@ -0,0 +1,4 @@
|
|||
config upgrade 'upgrade'
|
||||
option path '${UPGRADE_PATH}'
|
||||
option auto 0
|
||||
option remote 1
|
|
@ -0,0 +1,27 @@
|
|||
config interface 'loopback'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config interface 'w2mesh'
|
||||
option mtu '1532'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config interface 'mesh'
|
||||
option type 'bridge'
|
||||
option auto '1'
|
||||
|
||||
config interface 'wan'
|
||||
option proto 'dhcp'
|
||||
option ifname 'eth1'
|
||||
|
||||
config interface 'ethmesh'
|
||||
option mtu '1532'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config interface 'bat'
|
||||
option ifname 'bat0'
|
||||
option mtu '1500'
|
|
@ -0,0 +1,9 @@
|
|||
config 'script'
|
||||
option 'error_level' '0'
|
||||
option 'logfile' '/var/log/nodewatcher.log'
|
||||
option 'data_file' '/tmp/crawldata/node.data'
|
||||
|
||||
config 'network'
|
||||
option 'mesh_interface' 'br-mesh'
|
||||
option 'iface_blacklist' 'lo ifb0' # This devices won't be sent to netmon at all
|
||||
option 'ip_whitelist' 'br-mesh' # For this devices the IPs will be sent to netmon
|
|
@ -0,0 +1,84 @@
|
|||
# QoS configuration for OpenWrt
|
||||
|
||||
# INTERFACES:
|
||||
config interface wan
|
||||
option classgroup "Default"
|
||||
option enabled 1
|
||||
option overhead 1
|
||||
option upload 128
|
||||
option download 1024
|
||||
|
||||
# RULES:
|
||||
config classify
|
||||
option target "Bulk"
|
||||
option layer7 "edonkey"
|
||||
config classify
|
||||
option target "Bulk"
|
||||
option layer7 "bittorrent"
|
||||
config classify
|
||||
option target "Priority"
|
||||
option ports "22,53"
|
||||
config classify
|
||||
option target "Normal"
|
||||
option proto "tcp"
|
||||
option ports "20,21,25,80,110,443,993,995"
|
||||
config classify
|
||||
option target "Express"
|
||||
option ports "5190"
|
||||
config default
|
||||
option target "Express"
|
||||
option proto "udp"
|
||||
option pktsize "-500"
|
||||
config reclassify
|
||||
option target "Priority"
|
||||
option proto "icmp"
|
||||
config default
|
||||
option target "Bulk"
|
||||
option portrange "1024-65535"
|
||||
config reclassify
|
||||
option target "Priority"
|
||||
option proto "tcp"
|
||||
option pktsize "-128"
|
||||
option mark "!Bulk"
|
||||
option tcpflags "SYN"
|
||||
config reclassify
|
||||
option target "Priority"
|
||||
option proto "tcp"
|
||||
option pktsize "-128"
|
||||
option mark "!Bulk"
|
||||
option tcpflags "ACK"
|
||||
|
||||
# Don't change the stuff below unless you
|
||||
# really know what it means :)
|
||||
|
||||
config classgroup "Default"
|
||||
option classes "Priority Express Normal Bulk"
|
||||
option default "Normal"
|
||||
|
||||
config class "Priority"
|
||||
option packetsize 400
|
||||
option maxsize 400
|
||||
option avgrate 10
|
||||
option priority 20
|
||||
config class "Priority_down"
|
||||
option packetsize 1000
|
||||
option avgrate 10
|
||||
|
||||
|
||||
config class "Express"
|
||||
option packetsize 1000
|
||||
option maxsize 800
|
||||
option avgrate 50
|
||||
option priority 10
|
||||
|
||||
config class "Normal"
|
||||
option packetsize 1500
|
||||
option packetdelay 100
|
||||
option avgrate 10
|
||||
option priority 5
|
||||
config class "Normal_down"
|
||||
option avgrate 20
|
||||
|
||||
config class "Bulk"
|
||||
option avgrate 1
|
||||
option packetdelay 200
|
|
@ -0,0 +1,11 @@
|
|||
config location 'location'
|
||||
option latitude 0
|
||||
option longitude 0
|
||||
option elevation 0
|
||||
option direction ''
|
||||
option tags 'indoor omnidirectional'
|
||||
|
||||
config contact 'contact'
|
||||
option name ''
|
||||
option email ''
|
||||
option telephone ''
|
|
@ -0,0 +1,29 @@
|
|||
config 'system'
|
||||
option 'hostname' 'OpenWrt'
|
||||
option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3'
|
||||
|
||||
config 'led' 'status_led_green'
|
||||
option 'name' 'status'
|
||||
option 'sysfs' 'tp-link:green:system'
|
||||
option 'trigger' 'heartbeat'
|
||||
|
||||
config 'led' 'status_led_blue'
|
||||
option 'name' 'status'
|
||||
option 'sysfs' 'tp-link:blue:system'
|
||||
option 'trigger' 'heartbeat'
|
||||
|
||||
config 'led' 'led_vpn_green'
|
||||
option 'name' 'VPN'
|
||||
option 'sysfs' 'tp-link:green:qss'
|
||||
option 'trigger' 'netdev'
|
||||
option 'dev' '${VPN_PROJECT}VPN'
|
||||
option 'mode' 'link'
|
||||
|
||||
config 'led' 'led_vpn_blue'
|
||||
option 'name' 'VPN'
|
||||
option 'sysfs' 'tp-link:blue:qss'
|
||||
option 'trigger' 'netdev'
|
||||
option 'dev' '${VPN_PROJECT}VPN'
|
||||
option 'mode' 'link'
|
||||
|
||||
# vim: noexpandtab
|
|
@ -0,0 +1,2 @@
|
|||
config timeserver
|
||||
option hostname time.fu-berlin.de
|
|
@ -0,0 +1,26 @@
|
|||
config wifi-device radio0
|
||||
option type mac80211
|
||||
option channel ${BATMAN_CHANNEL}
|
||||
option phy phy0
|
||||
option hwmode 11g
|
||||
option htmode HT20
|
||||
option country DE
|
||||
|
||||
config wifi-iface
|
||||
option device radio0
|
||||
option network w2mesh
|
||||
option ifname w2mesh
|
||||
option mode adhoc
|
||||
option bssid ${BSSID_MESH}
|
||||
option ssid '${ESSID_MESH}'
|
||||
option mcast_rate 6000
|
||||
option encryption none
|
||||
option hidden 1
|
||||
|
||||
config wifi-iface
|
||||
option device radio0
|
||||
option network mesh
|
||||
option ifname w2ap
|
||||
option mode ap
|
||||
option ssid '${ESSID_AP}'
|
||||
option encryption none
|
|
@ -0,0 +1,174 @@
|
|||
#!/bin/sh
|
||||
# Netmon Configurator (C) 2010-2012 Freifunk Oldenburg
|
||||
# Lizenz: GPL v3
|
||||
|
||||
test -f /tmp/started || exit
|
||||
|
||||
#Get the configuration from the uci configuration file
|
||||
#If it does not exists, then get it from a normal bash file with variables.
|
||||
if [ -f /etc/config/configurator ];then
|
||||
API_IPV4_ADRESS=`uci get configurator.@api[0].ipv4_address`
|
||||
API_IPV6_ADRESS=`uci get configurator.@api[0].ipv6_address`
|
||||
API_IPV6_INTERFACE=`uci get configurator.@api[0].ipv6_interface`
|
||||
API_TIMEOUT=`uci get configurator.@api[0].timeout`
|
||||
API_RETRY=`uci get configurator.@api[0].retry`
|
||||
SCRIPT_VERSION=`uci get configurator.@script[0].version`
|
||||
SCRIPT_ERROR_LEVEL=`uci get configurator.@script[0].error_level`
|
||||
SCRIPT_LOGFILE=`uci get configurator.@script[0].logfile`
|
||||
SCRIPT_SYNC_HOSTNAME=`uci get configurator.@script[0].sync_hostname`
|
||||
CRAWL_METHOD=`uci get configurator.@crawl[0].method`
|
||||
CRAWL_ROUTER_ID=`uci get configurator.@crawl[0].router_id`
|
||||
CRAWL_UPDATE_HASH=`uci get configurator.@crawl[0].update_hash`
|
||||
CRAWL_NICKNAME=`uci get configurator.@crawl[0].nickname`
|
||||
CRAWL_PASSWORD=`uci get configurator.@crawl[0].password`
|
||||
AUTOADD_IPV6_ADDRESS=`uci get configurator.@netmon[0].autoadd_ipv6_address`
|
||||
else
|
||||
. `dirname $0`/configurator_config
|
||||
fi
|
||||
|
||||
API_RETRY=$(($API_RETRY - 1))
|
||||
|
||||
if [ "$API_IPV4_ADRESS" != "1" ]; then
|
||||
netmon_api=$API_IPV4_ADRESS
|
||||
else
|
||||
netmon_api="[$API_IPV6_ADRESS"%"$API_IPV6_INTERFACE]"
|
||||
fi
|
||||
|
||||
if [ "$SCRIPT_ERROR_LEVEL" -gt "1" ]; then
|
||||
err() {
|
||||
echo "$(date) [configurator]: $1" >> $SCRIPT_LOGFILE
|
||||
}
|
||||
else
|
||||
err() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
sync_hostname() {
|
||||
err "Syncing hostname"
|
||||
api_return=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=get_hostname&authentificationmethod=$CRAWL_METHOD&nickname=$CRAWL_NICKNAME&password=$CRAWL_PASSWORD&router_auto_update_hash=$CRAWL_UPDATE_HASH&router_id=$CRAWL_ROUTER_ID")
|
||||
ret=${api_return%%,*}
|
||||
if [ "$ret" != "success" ]; then
|
||||
err "Ther was an error fetching the hostname"
|
||||
exit 0
|
||||
elif [ "$ret" = "success" ]; then
|
||||
netmon_hostname=${api_return%,*}
|
||||
netmon_hostname=${netmon_hostname#*,}
|
||||
|
||||
#check for valid hostname as specified in rfc 1123
|
||||
#see http://stackoverflow.com/a/3824105
|
||||
regex='^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])'
|
||||
regex=$regex'(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$'
|
||||
if [ "${#netmon_hostname}" -le "255" ]; then
|
||||
if echo -n $netmon_hostname | egrep -q "$regex"; then
|
||||
if [ "$netmon_hostname" != "`cat /proc/sys/kernel/hostname`" ]; then
|
||||
err "Setting new hostname: $netmon_hostname"
|
||||
uci set system.@system[0].hostname=$netmon_hostname
|
||||
uci commit
|
||||
echo $netmon_hostname > /proc/sys/kernel/hostname
|
||||
else
|
||||
err "Hostname is up to date"
|
||||
fi
|
||||
else
|
||||
err "Hostname ist malformed"
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
err "Hostname exceeds the maximum length of 255 characters"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
assign_router() {
|
||||
hostname=`cat /proc/sys/kernel/hostname`
|
||||
|
||||
#Choose right login String
|
||||
#Here maybe a ; to much at the end..??
|
||||
login_strings=$(awk '{ mac=toupper($1); gsub(":", "", mac); printf mac ";" }' /sys/class/net/br-mesh/address /sys/class/net/eth0/address /sys/class/net/ath0/address 2> /dev/null)
|
||||
ergebnis=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=test_login_strings&login_strings=$login_strings")
|
||||
router_auto_assign_login_string=${ergebnis#*;}
|
||||
ergebnis=${ergebnis%;*}
|
||||
if [ "$ergebnis" = "error" ]; then
|
||||
router_auto_assign_login_string=${login_strings%%;*}
|
||||
err "A router with this login string does not exist: $login_strings"
|
||||
err "Using $router_auto_assign_login_string as login string"
|
||||
fi
|
||||
|
||||
#Try to assign Router with choosen login string
|
||||
ergebnis=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=router_auto_assign&router_auto_assign_login_string=$router_auto_assign_login_string&hostname=$hostname")
|
||||
ret=${ergebnis%%;*}
|
||||
errstr=${ergebnis#*;}
|
||||
errstr=${errstr%%;*}
|
||||
if [ "$ret" != "success" ]; then
|
||||
err "The router has not been assigned to a router in Netmon"
|
||||
err "Failure on router_auto_assign: $errstr. Exiting"
|
||||
exit 0
|
||||
elif [ "$ret" = "success" ]; then
|
||||
update_hash=${ergebnis%;*;*}
|
||||
update_hash=${update_hash##*;}
|
||||
api_key=${ergebnis##*;}
|
||||
#write new config
|
||||
uci set configurator.@crawl[0].router_id=$errstr
|
||||
uci set configurator.@crawl[0].update_hash=$update_hash
|
||||
uci set configurator.@api[0].api_key=$api_key
|
||||
#set also new router id for nodewatcher
|
||||
#uci set nodewatcher.@crawl[0].router_id=$errstr
|
||||
|
||||
err "The router $errstr has been assigned with a router in Netmon"
|
||||
uci commit
|
||||
|
||||
CRAWL_METHOD=`uci get configurator.@crawl[0].method`
|
||||
CRAWL_ROUTER_ID=$errstr
|
||||
CRAWL_UPDATE_HASH=$update_hash
|
||||
CRAWL_NICKNAME=`uci get configurator.@crawl[0].nickname`
|
||||
CRAWL_PASSWORD=`uci get configurator.@crawl[0].password`
|
||||
fi
|
||||
}
|
||||
|
||||
autoadd_ipv6_address() {
|
||||
err "Doing IPv6 autoadd"
|
||||
ipv6_link_local_addr=$(ip addr show dev br-mesh scope link | awk '/inet6/{print $2}')
|
||||
ipv6_link_local_netmask=${ipv6_link_local_addr##*/}
|
||||
ipv6_link_local_addr=${ipv6_link_local_addr%%/*}
|
||||
ergebnis=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=autoadd_ipv6_address&authentificationmethod=$CRAWL_METHOD&nickname=$CRAWL_NICKNAME&password=$CRAWL_PASSWORD&router_auto_update_hash=$CRAWL_UPDATE_HASH&router_id=$CRAWL_ROUTER_ID&networkinterface_name=br-mesh&ip=$ipv6_link_local_addr&netmask=$ipv6_link_local_netmask&ipv=6")
|
||||
ret=${ergebnis%%,*}
|
||||
if [ "$ret" = "success" ]; then
|
||||
uci set configurator.@netmon[0].autoadd_ipv6_address='0'
|
||||
uci commit
|
||||
err "The IPv6 address of the router $CRAWL_ROUTER_ID has been added to the router in Netmon"
|
||||
err "IPv6 Autoadd has been disabled cause it is no longer necesarry"
|
||||
else
|
||||
routerid=${ergebnis##*,}
|
||||
if [ "$routerid" = "$CRAWL_ROUTER_ID" ]; then
|
||||
err "The IPv6 address already exists in Netmon on this router. Maybe because of a previos assignment"
|
||||
uci set configurator.@netmon[0].autoadd_ipv6_address='0'
|
||||
uci commit
|
||||
err "IPv6 Autoadd has been disabled cause it is no longer necesarry"
|
||||
else
|
||||
err "The IPv6 address already exists in Netmon on another router $routerid"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$CRAWL_METHOD" = "login" ]; then
|
||||
err "Authentification method is: username and passwort"
|
||||
elif [ "$CRAWL_METHOD" = "hash" ]; then
|
||||
err "Authentification method: autoassign and hash"
|
||||
err "Checking if the router is already assigned to a router in Netmon"
|
||||
if [ "$CRAWL_UPDATE_HASH" = "1" ]; then
|
||||
err "The router is not assigned to a router in Netmon"
|
||||
err "Trying to assign the router"
|
||||
assign_router
|
||||
else
|
||||
err "The router is already assigned to a router in Netmon"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$AUTOADD_IPV6_ADDRESS" = "1" ]; then
|
||||
autoadd_ipv6_address
|
||||
fi
|
||||
|
||||
if [ "$SCRIPT_SYNC_HOSTNAME" = "1" ]; then
|
||||
sync_hostname
|
||||
fi
|
|
@ -0,0 +1,7 @@
|
|||
*/5 * * * * sh /etc/fastdstart.sh; sh /etc/nodewatcher.sh; sh /etc/configurator.sh; sh /etc/wlanwatchdog.sh >> /var/log/wlanwatchdog.log 2>&1
|
||||
*/1 * * * * /usr/sbin/batctl gw off; sleep 1; /usr/sbin/batctl gw client
|
||||
|
||||
#15 01 * * * rdate -s time.fu-berlin.de > /dev/null
|
||||
|
||||
#Enable zapp script if you are running a gateway
|
||||
#*/1 * * * * /etc/init.d/zapp
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/ash
|
||||
|
||||
# functions
|
||||
#FIXME: define here your favorite methods to get the values
|
||||
get_wlan_client_interface() {
|
||||
echo "wlan0"
|
||||
}
|
||||
|
||||
get_wlan_mesh_interface() {
|
||||
echo "wlan0-1"
|
||||
}
|
||||
|
||||
get_eth_client_interface() {
|
||||
echo ""
|
||||
}
|
||||
|
||||
get_eth_mesh_interface() {
|
||||
echo ""
|
||||
}
|
||||
|
||||
get_bridge_interface() {
|
||||
echo "br-mesh"
|
||||
}
|
||||
|
||||
get_batman_interface() {
|
||||
echo "bat0"
|
||||
}
|
||||
|
||||
get_vpn_interface() {
|
||||
test -f /etc/fastdstart.sh || exit;
|
||||
local $(grep -o project=.* /etc/fastdstart.sh)
|
||||
echo ${project}VPN | tr -d '"'
|
||||
}
|
||||
|
||||
get_debug_level() {
|
||||
echo "0"
|
||||
}
|
||||
|
||||
print_definitions() {
|
||||
echo "# interfaces"
|
||||
echo "WLAN_CLIENT_INTERFACE=$(get_wlan_client_interface)"
|
||||
echo "WLAN_MESH_INTERFACE=$(get_wlan_mesh_interface)"
|
||||
echo "ETH_CLIENT_INTERFACE=$(get_eth_client_interface)"
|
||||
echo "ETH_MESH_INTERFACE=$(get_eth_mesh_interface)"
|
||||
echo "BRIDGE_INTERFACE=$(get_bridge_interface)"
|
||||
echo "BATMAN_INTERFACE=$(get_batman_interface)"
|
||||
echo "VPN_INTERFACE=$(get_vpn_interface)"
|
||||
echo ""
|
||||
echo "# variables"
|
||||
echo "DEBUG=$(get_debug_level)"
|
||||
}
|
||||
|
||||
# program
|
||||
print_definitions
|
|
@ -0,0 +1,94 @@
|
|||
#!/bin/sh
|
||||
|
||||
SERVER="no"
|
||||
#SERVERNAME="--servername--"
|
||||
|
||||
project="${VPN_PROJECT}"
|
||||
|
||||
test_ipv4_host1="keyserver.freifunk-franken.de" # Freifunk-Franken keyserver
|
||||
test_ipv4_host2="8.8.8.8" # Google DNS
|
||||
test_ipv6_host1="heise.de" # heise Zeitschriftenverlag
|
||||
|
||||
if [ "$SERVER" = "no" ]; then
|
||||
test -f /tmp/started || exit
|
||||
fi
|
||||
|
||||
# Only do something with fastd when the router has internet connection
|
||||
if ping -w5 -c3 "$test_ipv4_host1" &>/dev/null ||
|
||||
ping -w5 -c3 "$test_ipv4_host2" &>/dev/null ||
|
||||
ping6 -w5 -c3 "$test_ipv6_host1" &>/dev/null; then
|
||||
mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null)
|
||||
if [ "$SERVER" = "no" ]; then
|
||||
hostname=$(cat /proc/sys/kernel/hostname)
|
||||
|
||||
if [ "$hostname" = "OpenWrt" ]; then
|
||||
hostname=""
|
||||
fi
|
||||
|
||||
if [ "$hostname" = "" ]; then
|
||||
hostname=$mac
|
||||
fi
|
||||
else
|
||||
hostname=$SERVERNAME
|
||||
fi
|
||||
|
||||
if [ ! -d /etc/fastd ]; then
|
||||
mkdir /etc/fastd
|
||||
fi
|
||||
|
||||
if [ ! -d /etc/fastd/$project ]; then
|
||||
mkdir /etc/fastd/$project
|
||||
|
||||
mkdir /tmp/fastd_${project}_peers
|
||||
ln -s /tmp/fastd_${project}_peers /etc/fastd/$project/peers
|
||||
echo "#!/bin/sh" > /etc/fastd/$project/up.sh
|
||||
echo "ip link set up dev ${project}VPN" >> /etc/fastd/$project/up.sh
|
||||
echo "echo enable > /sys/devices/virtual/net/${project}VPN/batman_adv/no_rebroadcast" >> /etc/fastd/$project/up.sh
|
||||
echo "batctl if add ${project}VPN" >> /etc/fastd/$project/up.sh
|
||||
chmod +x /etc/fastd/$project/up.sh
|
||||
|
||||
secret=$(fastd --generate-key 2>&1 | grep -i secret | awk '{ print $2 }')
|
||||
echo "include peers from \"/etc/fastd/$project/peers\";" >> /etc/fastd/${project}/${project}.conf
|
||||
echo "log to syslog level warn;" >> /etc/fastd/${project}/${project}.conf
|
||||
echo "method \"null\";" >> /etc/fastd/${project}/${project}.conf
|
||||
# http://lists.nord-west.net/pipermail/freifunk-ol-dev/2013-July/000322.html
|
||||
# echo "bind 0.0.0.0:10000;" >> /etc/fastd/${project}/${project}.conf
|
||||
echo "interface \"${project}VPN\";" >> /etc/fastd/${project}/${project}.conf
|
||||
echo "mtu 1426;" >> /etc/fastd/${project}/${project}.conf
|
||||
echo "secret \"$secret\";" >> /etc/fastd/${project}/${project}.conf
|
||||
echo "on up \"/etc/fastd/${project}/up.sh\";" >> /etc/fastd/${project}/${project}.conf
|
||||
echo "secure handshakes no;" >> /etc/fastd/${project}/${project}.conf
|
||||
fi
|
||||
|
||||
if [ ! -d /tmp/fastd_${project}_peers ]; then
|
||||
mkdir /tmp/fastd_${project}_peers
|
||||
fi
|
||||
|
||||
pubkey=$(fastd -c /etc/fastd/$project/$project.conf --show-key --machine-readable)
|
||||
# port=666
|
||||
|
||||
|
||||
# fire up
|
||||
if [ "$(/sbin/ifconfig -a | grep -i ethernet | grep $project)" = "" ]; then
|
||||
/bin/rm /var/run/fastd.$project.pid
|
||||
fastd -c /etc/fastd/$project/$project.conf -d --pid-file /var/run/fastd.$project.pid
|
||||
fi
|
||||
|
||||
# register
|
||||
wget -T15 "http://keyserver.freifunk-franken.de/${project}/?mac=$mac&name=$hostname&port=$port&key=$pubkey" -O /tmp/fastd_${project}_output
|
||||
|
||||
filenames=$(awk '/^####/ { gsub(/^####/, "", $0); gsub(/.conf/, "", $0); print $0; }' /tmp/fastd_${project}_output)
|
||||
for file in $filenames; do
|
||||
awk "{ if(a) print }; /^####$file.conf$/{a=1}; /^$/{a=0};" /tmp/fastd_${project}_output | sed 's/ float;/;/g' > /etc/fastd/$project/peers/$file
|
||||
echo 'float yes;' >> /etc/fastd/$project/peers/$file
|
||||
done
|
||||
|
||||
#reload
|
||||
kill -HUP $(cat /var/run/fastd.$project.pid)
|
||||
else
|
||||
echo "Der Router kann keine Verbindung zum Fastdserver aufbauen"
|
||||
echo "$0 macht nichts!"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
# vim: noexpandtab
|
|
@ -0,0 +1,101 @@
|
|||
#!/bin/sh
|
||||
|
||||
#solves MTU problem with bad ISPs
|
||||
iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
|
||||
|
||||
# Wenn ein router direkt am Netz hängt, ist er auch ssh Angriffen ausgesetzt.
|
||||
# Das wirkt bei kleinen Geräten wie ein DOS
|
||||
WAN=$(uci get network.wan.ifname)
|
||||
iptables -A INPUT -i $WAN -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
iptables -A INPUT -i $WAN -j REJECT
|
||||
|
||||
# Limit ssh to 3 new connections per 60 seconds
|
||||
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name dropbear
|
||||
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 3 --rttl --name dropbear -j DROP
|
||||
|
||||
|
||||
# Im folgenden ebtables rules, die unnötigen Broadcast-Overhead reduzieren sollen:
|
||||
|
||||
######## CLEAN UP ############
|
||||
ebtables -F
|
||||
ebtables -X
|
||||
|
||||
######## IN_ONLY ############
|
||||
ebtables -N IN_ONLY -P RETURN
|
||||
|
||||
# Daten aus dem BATMAN werden erlaubt
|
||||
# Alles außer Daten von BATMAN werden DROP'ed
|
||||
ebtables -A IN_ONLY -i ! bat0 --logical-in br-mesh -j DROP
|
||||
|
||||
######## OUT_ONLY ############
|
||||
ebtables -N OUT_ONLY -P RETURN
|
||||
|
||||
# Daten ins BATMAN werden erlaubt
|
||||
# Alles außer Daten ins BATMAN werden DROP'ed
|
||||
ebtables -A OUT_ONLY --logical-out br-mesh -o ! bat0 -j DROP
|
||||
|
||||
######## MULTICAST_OUT ############
|
||||
ebtables -N MULTICAST_OUT -P DROP
|
||||
|
||||
# Verbiete ARP Antworten an alle
|
||||
ebtables -A MULTICAST_OUT -p ARP --arp-op Reply --arp-ip-src 0.0.0.0 -j DROP
|
||||
# Verbiete ARP Requests an alle
|
||||
ebtables -A MULTICAST_OUT -p ARP --arp-op Request --arp-ip-dst 0.0.0.0 -j DROP
|
||||
# Erlaube alle anderen ARP's
|
||||
ebtables -A MULTICAST_OUT -p ARP -j RETURN
|
||||
# Erlaube DHCP Requests
|
||||
ebtables -A MULTICAST_OUT -p IPv4 --ip-proto udp --ip-dport 67 -j RETURN
|
||||
# Erlaube DHCPv6 Requests
|
||||
ebtables -A MULTICAST_OUT -p IPv6 --ip6-proto udp --ip6-dport 547 -j RETURN
|
||||
# Erlaube PING
|
||||
ebtables -A MULTICAST_OUT -p IPv4 --ip-proto icmp -j RETURN
|
||||
# Erlaube alles was nicht IP ?? ist " hop-by-hop " ??
|
||||
ebtables -A MULTICAST_OUT -p IPv6 --ip6-proto 0 -j RETURN
|
||||
# Erlaube PINGv6
|
||||
ebtables -A MULTICAST_OUT -p IPv6 --ip6-proto ipv6-icmp -j RETURN
|
||||
# Erlaube Organisation der Multicast Gruppen
|
||||
ebtables -A MULTICAST_OUT -p IPv4 --ip-proto igmp -j RETURN
|
||||
|
||||
######## INPUT ############
|
||||
ebtables -P INPUT ACCEPT
|
||||
|
||||
# Erlaube nur DHCP Antworten von BATMAN -> KNOTEN
|
||||
ebtables -A INPUT -p IPv4 --ip-proto udp --ip-dport 68 -j IN_ONLY
|
||||
# Erlaube nur DHCPv6 Antworten von BATMAN -> KNOTEN
|
||||
ebtables -A INPUT -p IPv6 --ip6-proto udp --ip6-dport 546 -j IN_ONLY
|
||||
# Erlaube nur Router-Advertisment von BATMAN -> KNOTEN
|
||||
ebtables -A INPUT -p IPv6 --ip6-proto ipv6-icmp --ip6-icmp-type router-advertisement -j IN_ONLY
|
||||
# Verbiete Router-Solicitation von BATMAN -> KNOTEN
|
||||
ebtables -A INPUT -p IPv6 -i bat0 --ip6-proto ipv6-icmp --ip6-icmp-type router-solicitation -j DROP
|
||||
|
||||
######## FORWARD ############
|
||||
ebtables -P FORWARD ACCEPT
|
||||
|
||||
# Erlaube nur DHCP Request von CLIENT -> BATMAN
|
||||
ebtables -A FORWARD -p IPv4 --ip-proto udp --ip-dport 67 -j OUT_ONLY
|
||||
# Erlaube nur DHCP Antworten von BATMAN -> CLIENT
|
||||
ebtables -A FORWARD -p IPv4 --ip-proto udp --ip-dport 68 -j IN_ONLY
|
||||
# Erlaube nur DHCPv6 Request von CLIENT -> BATMAN
|
||||
ebtables -A FORWARD -p IPv6 --ip6-proto udp --ip6-dport 547 -j OUT_ONLY
|
||||
# Erlaube nur DHCPv6 Antworten von BATMAN -> CLIENT
|
||||
ebtables -A FORWARD -p IPv6 --ip6-proto udp --ip6-dport 546 -j IN_ONLY
|
||||
# Erlaube nur Router-Solicitation von CLIENT -> BATMAN
|
||||
ebtables -A FORWARD -p IPv6 --ip6-proto ipv6-icmp --ip6-icmp-type router-solicitation -j OUT_ONLY
|
||||
# Erlaube nur Router-Advertisment von BATMAN -> CLIENT
|
||||
ebtables -A FORWARD -p IPv6 --ip6-proto ipv6-icmp --ip6-icmp-type router-advertisement -j IN_ONLY
|
||||
# Regelt alles was an Multicast/Broadcast von CLIENT -> BATMAN geht bei MULTICAST_OUT
|
||||
ebtables -A FORWARD -d Multicast --logical-out br-mesh -o bat0 -j MULTICAST_OUT
|
||||
|
||||
######## OUTPUT ############
|
||||
ebtables -P OUTPUT ACCEPT
|
||||
|
||||
# Erlaube nur DHCP Request von KNOTEN -> BATMAN
|
||||
ebtables -A OUTPUT -p IPv4 --ip-proto udp --ip-dport 67 -j OUT_ONLY
|
||||
# Erlaube nur DHCPv6 Request von KNOTEN -> BATMAN
|
||||
ebtables -A OUTPUT -p IPv6 --ip6-proto udp --ip6-dport 547 -j OUT_ONLY
|
||||
# Erlaube nur Router-Solicitation von KNOTEN -> BATMAN
|
||||
ebtables -A OUTPUT -p IPv6 --ip6-proto ipv6-icmp --ip6-icmp-type router-solicitation -j OUT_ONLY
|
||||
# Verbiete Router-Advertisment von KNOTEN -> BATMAN
|
||||
ebtables -A OUTPUT -p IPv6 -o bat0 --ip6-proto ipv6-icmp --ip6-icmp-type router-advertisement -j DROP
|
||||
# Regelt alles was an Multicast/Broadcast von KNOTEN -> BATMAN geht bei MULTICAST_OUT
|
||||
ebtables -A OUTPUT -d Multicast --logical-out br-mesh -o bat0 -j MULTICAST_OUT
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
wget -T15 http://[`uci get configurator.@api[0].ipv6_address`%`uci get configurator.@api[0].ipv6_interface`]/api_nodewatcher.php?section=get_hostnames_and_mac -O - | grep -v -e "^..-..-" | sort -u > /tmp/bat-hosts
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
|
||||
sleep 3
|
||||
sh /etc/fastdstart.sh
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
|
||||
sh /etc/configurator.sh
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
#!/bin/sh
|
||||
# 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.
|
||||
|
||||
if ! uci get nodewatcher.@network[0].client_interfaces; then
|
||||
echo "Setting nodewatchers client interfaces to: $CLIENTIF"
|
||||
uci set nodewatcher.@network[0].client_interfaces="$CLIENTIF"
|
||||
uci commit
|
||||
fi
|
||||
|
||||
if ! uci get network.$SWITCHDEV.ifname; then
|
||||
|
||||
SWITCHHW=$(swconfig list | awk '{ print $4 }')
|
||||
|
||||
uci set network.$SWITCHDEV=switch
|
||||
uci set network.$SWITCHDEV.name=$SWITCHHW
|
||||
uci set network.$SWITCHDEV.enable=1
|
||||
uci set network.$SWITCHDEV.reset=1
|
||||
uci set network.$SWITCHDEV.enable_vlan=1
|
||||
|
||||
uci set network.${SWITCHDEV}_1=switch_vlan
|
||||
uci set network.${SWITCHDEV}_1.device=$SWITCHHW
|
||||
uci set network.${SWITCHDEV}_1.vlan=1
|
||||
uci set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
|
||||
|
||||
echo "# Allow IPv6 RAs on WAN Port" >> /etc/sysctl.conf
|
||||
|
||||
if [[ "$WANDEV" = "$SWITCHDEV" ]]; then
|
||||
uci set network.${SWITCHDEV}_2=switch_vlan
|
||||
uci set network.${SWITCHDEV}_2.device=$SWITCHHW
|
||||
uci set network.${SWITCHDEV}_2.vlan=2
|
||||
uci set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
|
||||
|
||||
echo "net.ipv6.conf.$WANDEV.2.accept_ra_defrtr = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.2.accept_ra_pinfo = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.2.autoconf = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.2.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
|
||||
else
|
||||
echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
|
||||
fi
|
||||
|
||||
uci set network.${SWITCHDEV}_3=switch_vlan
|
||||
uci set network.${SWITCHDEV}_3.device=$SWITCHHW
|
||||
uci set network.${SWITCHDEV}_3.vlan=3
|
||||
uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
|
||||
|
||||
uci set network.mesh.ifname="$SWITCHDEV.1 bat0"
|
||||
|
||||
uci set network.ethmesh.ifname="$SWITCHDEV.3"
|
||||
|
||||
if [[ "$WANDEV" = "$SWITCHDEV" ]]; then
|
||||
uci set network.wan.ifname=$WANDEV.2
|
||||
else
|
||||
uci set network.wan.ifname=$WANDEV
|
||||
fi
|
||||
|
||||
uci commit
|
||||
/etc/init.d/network restart
|
||||
fi
|
||||
|
||||
if [[ -n "$ETHMESHMAC" ]]; then
|
||||
if uci get network.ethmesh.macaddr
|
||||
then
|
||||
echo "MAC for ethmesh is set already"
|
||||
else
|
||||
echo "Fixing MAC on eth0.3 (ethmesh)"
|
||||
sleep 10
|
||||
NEW_MACADDR=$(cat /sys/class/net/$ETHMESHMAC/address)
|
||||
uci set network.ethmesh.macaddr=$NEW_MACADDR
|
||||
uci commit
|
||||
ifconfig eth0.3 down
|
||||
ifconfig eth0.3 hw ether $NEW_MACADDR
|
||||
ifconfig eth0.3 up
|
||||
/etc/init.d/network restart
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$ROUTERMAC" ]]; then
|
||||
if uci get network.mesh.macaddr
|
||||
then
|
||||
echo "MAC for mesh is set already"
|
||||
else
|
||||
echo "Fixing MAC on br-mesh (mesh)"
|
||||
sleep 10
|
||||
NEW_MACADDR=$(cat /sys/class/net/$ROUTERMAC/address)
|
||||
uci set network.mesh.macaddr=$NEW_MACADDR
|
||||
uci commit
|
||||
ifconfig br-mesh down
|
||||
ifconfig br-mesh hw ether $NEW_MACADDR
|
||||
ifconfig br-mesh up
|
||||
/etc/init.d/network restart
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,234 @@
|
|||
#!/bin/sh
|
||||
# Netmon Nodewatcher (C) 2010-2012 Freifunk Oldenburg
|
||||
# License; GPL v3
|
||||
|
||||
SCRIPT_VERSION="33"
|
||||
|
||||
test -f /tmp/started || exit
|
||||
|
||||
#Get the configuration from the uci configuration file
|
||||
#If it does not exists, then get it from a normal bash file with variables.
|
||||
if [ -f /etc/config/nodewatcher ];then
|
||||
SCRIPT_ERROR_LEVEL=`uci get nodewatcher.@script[0].error_level`
|
||||
SCRIPT_LOGFILE=`uci get nodewatcher.@script[0].logfile`
|
||||
SCRIPT_DATA_FILE=`uci get nodewatcher.@script[0].data_file`
|
||||
MESH_INTERFACE=`uci get nodewatcher.@network[0].mesh_interface`
|
||||
CLIENT_INTERFACES=`uci get nodewatcher.@network[0].client_interfaces`
|
||||
IFACEBLACKLIST=`uci get nodewatcher.@network[0].iface_blacklist`
|
||||
IPWHITELIST=`uci get nodewatcher.@network[0].ip_whitelist`
|
||||
else
|
||||
. `dirname $0`/nodewatcher_config
|
||||
fi
|
||||
|
||||
if [ $SCRIPT_ERROR_LEVEL -gt "1" ]; then
|
||||
err() {
|
||||
echo $1 >> $SCRIPT_LOGFILE
|
||||
}
|
||||
else
|
||||
err() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
#this method checks id the logfile has bekome too big and deletes the first X lines
|
||||
delete_log() {
|
||||
if [ -f $SCRIPT_LOGFILE ]; then
|
||||
if [ `ls -la $SCRIPT_LOGFILE | awk '{ print $5 }'` -gt "6000" ]; then
|
||||
sed -i '1,60d' $SCRIPT_LOGFILE
|
||||
err "`date`: Logfile has been made smaller"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
inArray() {
|
||||
local value
|
||||
for value in $1; do
|
||||
if [ "$value" = "$2" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
#this method generates the crawl data xml file that is beeing fetched by netmon
|
||||
#and provided by a small local httpd
|
||||
crawl() {
|
||||
#Get system data from other locations
|
||||
err "`date`: Collecting basic system status data"
|
||||
hostname="$(cat /proc/sys/kernel/hostname)"
|
||||
uptime=$(awk '{ printf "<uptime>"$1"</uptime><idletime>"$2"</idletime>" }' /proc/uptime)
|
||||
|
||||
memory=$(awk '
|
||||
/^MemTotal/ { printf "<memory_total>"$2"</memory_total>" }
|
||||
/^Cached:/ { printf "<memory_caching>"$2"</memory_caching>" }
|
||||
/^Buffers/ { printf "<memory_buffering>"$2"</memory_buffering>" }
|
||||
/^MemFree/ { printf "<memory_free>"$2"</memory_free>" }
|
||||
' /proc/meminfo)
|
||||
cpu=$(awk -F': ' '
|
||||
/model/ { printf "<cpu>"$2"</cpu>" }
|
||||
/system type/ { printf "<chipset>"$2"</chipset>" }
|
||||
' /proc/cpuinfo)
|
||||
model="<model>$(cat /var/sysinfo/model)</model>"
|
||||
local_time="`date +%s`"
|
||||
load=$(awk '{ printf "<loadavg>"$3"</loadavg><processes>"$4"</processes>" }' /proc/loadavg)
|
||||
|
||||
err "`date`: Collecting version information"
|
||||
|
||||
batman_adv_version=$(cat /sys/module/batman_adv/version)
|
||||
kernel_version=$(uname -r)
|
||||
fastd_version=$(fastd -v | awk '{ print $2 }')
|
||||
nodewatcher_version=$SCRIPT_VERSION
|
||||
|
||||
# example for /etc/openwrt_release:
|
||||
#DISTRIB_ID="OpenWrt"
|
||||
#DISTRIB_RELEASE="Attitude Adjustment"
|
||||
#DISTRIB_REVISION="r35298"
|
||||
#DISTRIB_CODENAME="attitude_adjustment"
|
||||
#DISTRIB_TARGET="atheros/generic"
|
||||
#DISTRIB_DESCRIPTION="OpenWrt Attitude Adjustment 12.09-rc1"
|
||||
. /etc/openwrt_release
|
||||
distname=$DISTRIB_ID
|
||||
distversion=$DISTRIB_RELEASE
|
||||
|
||||
# example for /etc/firmware_release:
|
||||
#FIRMWARE_VERSION="95f36685e7b6cbf423f02cf5c7f1e785fd4ccdae-dirty"
|
||||
#BUILD_DATE="build date: Di 29. Jan 19:33:34 CET 2013"
|
||||
#OPENWRT_CORE_REVISION="35298"
|
||||
#OPENWRT_FEEDS_PACKAGES_REVISION="35298"
|
||||
. /etc/firmware_release
|
||||
SYSTEM_DATA="<status>online</status><hostname>$hostname</hostname><distname>$distname</distname><distversion>$distversion</distversion>$cpu$model$memory$load$uptime<local_time>$local_time</local_time><batman_advanced_version>$batman_adv_version</batman_advanced_version><kernel_version>$kernel_version</kernel_version><fastd_version>$fastd_version</fastd_version><nodewatcher_version>$nodewatcher_version</nodewatcher_version><firmware_version>$FIRMWARE_VERSION</firmware_version><firmware_revision>$BUILD_DATE</firmware_revision><openwrt_core_revision>$OPENWRT_CORE_REVISION</openwrt_core_revision><openwrt_feeds_packages_revision>$OPENWRT_FEEDS_PACKAGES_REVISION</openwrt_feeds_packages_revision>"
|
||||
|
||||
err "`date`: Collecting information from network interfaces"
|
||||
|
||||
#Get interfaces
|
||||
#IFACES=`cat /proc/net/dev | awk -F: '!/\|/ { gsub(/[[:space:]]*/, "", $1); split($2, a, " "); printf("%s=%s=%s ", $1, a[1], a[9]) }'`
|
||||
|
||||
interface_data=""
|
||||
#Loop interfaces
|
||||
#for entry in $IFACES; do
|
||||
for filename in `grep 'up\|unknown' /sys/class/net/*/operstate`; do
|
||||
ifpath=${filename%/operstate*}
|
||||
iface=${ifpath#/sys/class/net/}
|
||||
if inArray "$IFACEBLACKLIST" "$iface"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
#Get interface data for whitelisted interfaces
|
||||
awkscript='
|
||||
/ether/ { printf "<mac_addr>"$2"</mac_addr>" }
|
||||
/mtu/ { printf "<mtu>"$5"</mtu>" }'
|
||||
if inArray "$IPWHITELIST" "$iface"; then
|
||||
awkscript=$awkscript'
|
||||
/inet / { split($2, a, "/"); printf "<ipv4_addr>"a[1]"</ipv4_addr>" }
|
||||
/inet6/ && /scope global/ { printf "<ipv6_addr>"$2"</ipv6_addr>" }
|
||||
/inet6/ && /scope link/ { printf "<ipv6_link_local_addr>"$2"</ipv6_link_local_addr>"}'
|
||||
fi
|
||||
addrs=$(ip addr show dev ${iface} | awk "$awkscript")
|
||||
|
||||
traffic_rx=`cat $ifpath/statistics/rx_bytes`
|
||||
traffic_tx=`cat $ifpath/statistics/tx_bytes`
|
||||
|
||||
#interface_data=$interface_data"<$iface><name>$iface</name><mac_addr>$mac_addr</mac_addr><ipv4_addr>$ipv4_addr</ipv4_addr><ipv6_addr>$ipv6_addr</ipv6_addr><ipv6_link_local_addr>$ipv6_link_local_addr</ipv6_link_local_addr><traffic_rx>$traffic_rx</traffic_rx><traffic_tx>$traffic_tx</traffic_tx><mtu>$mtu</mtu>"
|
||||
interface_data=$interface_data"<$iface><name>$iface</name>$addrs<traffic_rx>$traffic_rx</traffic_rx><traffic_tx>$traffic_tx</traffic_tx>"
|
||||
|
||||
|
||||
interface_data=$interface_data$(iwconfig ${iface} 2>/dev/null | awk -F':' '
|
||||
/Mode/{ split($2, m, " "); printf "<wlan_mode>"m[1]"</wlan_mode>" }
|
||||
/Cell/{ split($0, c, " "); printf "<wlan_bssid>"c[5]"</wlan_bssid>" }
|
||||
/ESSID/ { split($0, e, "\""); printf "<wlan_essid>"e[2]"</wlan_essid>" }
|
||||
/Freq/{ split($3, f, " "); printf "<wlan_frequency>"f[1]f[2]"</wlan_frequency>" }
|
||||
/Tx-Power/{ split($0, p, "="); sub(/[[:space:]]*$/, "", p[2]); printf "<wlan_tx_power>"p[2]"</wlan_tx_power>" }
|
||||
')"</$iface>"
|
||||
|
||||
#if [ "`iwconfig ${iface} 2>/dev/null | grep IEEE`" != "" ]; then
|
||||
# wlan_mode="`iwconfig $iface | awk -F':' '/Mode/{ split($2, m, " "); print m[1] }'`"
|
||||
#
|
||||
# if [ $wlan_mode = "Master" ]; then
|
||||
# wlan_bssid="`iw $iface info | awk '/addr/{ print $2 }'`"
|
||||
# elif [ $wlan_mode = "Ad-Hoc" ]; then
|
||||
# wlan_bssid="`iwconfig $iface | awk '/Cell/{ print $5 }'`"
|
||||
# fi
|
||||
#
|
||||
# wlan_essid="`iwconfig ${iface} | awk -F'"' '/ESSID/ { print $2 }'`"
|
||||
# wlan_frequency="`iwconfig $iface | awk -F':' '/Freq/{ split($3, f, " "); print f[1] }'`"
|
||||
# wlan_tx_power="`iwconfig $iface | awk -F'=' '/Tx-Power/{ print $2 }'`"
|
||||
#
|
||||
# interface_data=$interface_data"<wlan_mode>$wlan_mode</wlan_mode><wlan_frequency>$wlan_frequency</wlan_frequency><wlan_essid>$wlan_essid</wlan_essid><wlan_bssid>$wlan_bssid</wlan_bssid><wlan_tx_power>$wlan_tx_power</wlan_tx_power>"
|
||||
#fi
|
||||
#interface_data=$interface_data"</$iface>"
|
||||
done
|
||||
|
||||
err "`date`: Collecting information from batman advanced and it´s interfaces"
|
||||
#B.A.T.M.A.N. advanced
|
||||
if [ -f /sys/module/batman_adv/version ]; then
|
||||
for iface in $(grep active /sys/class/net/*/batman_adv/iface_status); do
|
||||
status=${iface#*:}
|
||||
iface=${iface%/batman_adv/iface_status:active}
|
||||
iface=${iface#/sys/class/net/}
|
||||
BATMAN_ADV_INTERFACES=$BATMAN_ADV_INTERFACES"<$iface><name>$iface</name><status>$status</status></$iface>"
|
||||
done
|
||||
|
||||
# Build a list of direct neighbors
|
||||
batman_adv_originators=$(awk \
|
||||
'BEGIN { FS=" "; i=0 } # set the delimiter to " "
|
||||
/O/ { next } # ignore lines with O (will remove second line)
|
||||
/B/ { next } # ignore line with B (will remove first line)
|
||||
{ sub("\\(", "", $0) # remove parentheses
|
||||
sub("\\)", "", $0)
|
||||
sub("\\[", "", $0)
|
||||
sub("\\]:", "", $0)
|
||||
sub(" ", " ", $0)
|
||||
o=$1".*"$1 # build a regex to find lines that contains the $1 (=originator) twice
|
||||
if ($0 ~ o) # filter for this regex (will remove entries without direct neighbor)
|
||||
{
|
||||
printf "<originator_"i"><originator>"$1"</originator><link_quality>"$3"</link_quality><nexthop>"$4"</nexthop><last_seen>"$2"</last_seen><outgoing_interface>"$5"</outgoing_interface></originator_"i">"
|
||||
i++
|
||||
}
|
||||
}' /sys/kernel/debug/batman_adv/bat0/originators)
|
||||
|
||||
batman_adv_gateway_mode=$(batctl gw)
|
||||
|
||||
batman_adv_gateway_list=$(awk \
|
||||
'BEGIN { FS=" "; i=0 }
|
||||
/Gateway/ { next }
|
||||
/No gateways/ { next }
|
||||
{ sub("=>", "true", $0)
|
||||
sub(" ", "false", $0)
|
||||
sub("\\(", "", $0)
|
||||
sub("\\)", "", $0)
|
||||
sub("\\[", "", $0)
|
||||
sub("\\]:", "", $0)
|
||||
sub(" ", " ", $0)
|
||||
printf "<gateway_"i"><selected>"$1"</selected><gateway>"$2"</gateway><link_quality>"$3"</link_quality><nexthop>"$4"</nexthop><outgoing_interface>"$5"</outgoing_interface><gw_class>"$6" "$7" "$8"</gw_class></gateway_"i">"
|
||||
i++
|
||||
}' /sys/kernel/debug/batman_adv/bat0/gateways)
|
||||
fi
|
||||
err "`date`: Collecting information about conected clients"
|
||||
#CLIENTS
|
||||
SEDDEV=$(brctl showstp $MESH_INTERFACE | awk '/\([0-9]\)/ {
|
||||
sub("\\(", "", $0)
|
||||
sub("\\)", "", $0)
|
||||
print "s/^ "$2"/"$1"/;"
|
||||
}')
|
||||
|
||||
client_count=$(brctl showmacs $MESH_INTERFACE | sed -e "$SEDDEV" | egrep -c "(${CLIENT_INTERFACES// /|}).*no")
|
||||
|
||||
err "`date`: Putting all information into a XML-File and save it at "$SCRIPT_DATA_FILE
|
||||
|
||||
DATA="<?xml version='1.0' standalone='yes'?><data><system_data>$SYSTEM_DATA</system_data><interface_data>$interface_data</interface_data><batman_adv_interfaces>$BATMAN_ADV_INTERFACES</batman_adv_interfaces><batman_adv_originators>$batman_adv_originators</batman_adv_originators><batman_adv_gateway_mode>$batman_adv_gateway_mode</batman_adv_gateway_mode><batman_adv_gateway_list>$batman_adv_gateway_list</batman_adv_gateway_list><client_count>$client_count</client_count></data>"
|
||||
|
||||
#write data to hxml file that provides the data on httpd
|
||||
echo $DATA | gzip | tee $SCRIPT_DATA_FILE | alfred -s 64
|
||||
}
|
||||
|
||||
LANG=C
|
||||
|
||||
#Prüft ob das logfile zu groß geworden ist
|
||||
err "`date`: Check logfile"
|
||||
delete_log
|
||||
|
||||
#Erzeugt die statusdaten
|
||||
err "`date`: Generate actual status data"
|
||||
crawl
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,3 @@
|
|||
root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:root:/root:/bin/ash
|
||||
nobody:*:65534:65534:nobody:/var:/bin/false
|
||||
daemon:*:65534:65534:daemon:/var:/bin/false
|
|
@ -13,9 +13,6 @@ export HOME=${HOME:-/root}
|
|||
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
|
||||
# update uhttpd passwd on passwd-change
|
||||
[ -e /etc/rc.d/S50uhttpd ] && passwd() { /bin/passwd "$@" && /etc/init.d/uhttpd restart; }
|
||||
|
||||
# I'm lazy, let's add some aliases
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
|
@ -23,7 +20,6 @@ alias l='ls -CF'
|
|||
alias la='ls -A'
|
||||
alias ll='ls -alF'
|
||||
alias ls='ls --color=auto'
|
||||
alias ip='ip --color=auto'
|
||||
|
||||
# and color my prompt
|
||||
export PS1='\[\033[01;32m\]\u@\H\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Put your custom commands here that should be executed once
|
||||
# the system init finished. By default this file does nothing.
|
||||
|
||||
/usr/sbin/configurenetwork
|
||||
|
||||
sleep 3
|
||||
|
||||
/usr/sbin/configurehood
|
||||
|
||||
touch /tmp/started
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
# Put your custom commands here that should be executed once
|
||||
# the system init finished. By default this file does nothing.
|
||||
|
||||
BOARD=$(cat /var/sysinfo/board_name)
|
||||
case "$BOARD" in
|
||||
tl-wr1043nd)
|
||||
BOARD=tl-wr1043nd-v1
|
||||
;;
|
||||
tl-wr741nd)
|
||||
grep "Atheros AR7240 rev 2" /proc/cpuinfo && BOARD=tl-wr741nd-v2 || BOARD=tl-wr741nd-v4
|
||||
;;
|
||||
tl-wr741nd-v4)
|
||||
grep 740 /var/sysinfo/model && BOARD=tl-wr740n-v4
|
||||
;;
|
||||
tl-wr841n-v7)
|
||||
BOARD=tl-wr841nd-v7
|
||||
;;
|
||||
esac
|
||||
if ! uci get board.model.name; then
|
||||
uci set board.model.name=$BOARD
|
||||
fi
|
||||
|
||||
. /etc/network.$BOARD
|
||||
|
||||
. /etc/network.sh
|
||||
|
||||
# collect environment info and write to dot-script
|
||||
/etc/environment.sh > /tmp/environment
|
||||
|
||||
# Starting NTP-Client Daemon after 30s to ensure that the interface is up
|
||||
( sleep 30 ; ntpd -p ${NTPD_IP} ) &
|
||||
|
||||
. /etc/firewall.user
|
||||
|
||||
/etc/init.d/qos disable
|
||||
/etc/init.d/qos stop
|
||||
|
||||
#busybox-httpd for crawldata
|
||||
mkdir /tmp/crawldata
|
||||
httpd -h /tmp/crawldata
|
||||
|
||||
touch /tmp/started
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# SHOWMACS need br-ctl! NO BUSYBOX!
|
||||
#
|
||||
# Version 0.2
|
||||
#
|
||||
# by Tim Niemeyer (reddog@mastersword.de)
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
DEV=$1
|
||||
|
||||
SEDDEV=`brctl showstp $DEV | egrep '\([0-9]\)' | sed -e "s/(//;s/)//" | awk '{ print "s/^ "$2"/"$1"/;" }'`
|
||||
SEDMAC=`cat /etc/bat-hosts | sed -e "s/^/s\//;s/$/\/;/;s/ /\//"`
|
||||
|
||||
brctl showmacs $DEV | sed -e "$SEDMAC" | sed -e "$SEDDEV"
|
|
@ -0,0 +1,71 @@
|
|||
kernel.panic=3
|
||||
net.ipv4.conf.default.arp_ignore=1
|
||||
net.ipv4.conf.all.arp_ignore=1
|
||||
net.ipv4.conf.all.forwarding=0
|
||||
net.ipv4.conf.all.send_redirects=0
|
||||
net.ipv4.tcp_ecn=0
|
||||
net.ipv4.tcp_fin_timeout=30
|
||||
net.ipv4.tcp_keepalive_time=120
|
||||
net.ipv4.tcp_syncookies=1
|
||||
net.ipv4.tcp_timestamps=0
|
||||
net.ipv4.netfilter.ip_conntrack_checksum=0
|
||||
net.ipv4.netfilter.ip_conntrack_max=16384
|
||||
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600
|
||||
net.ipv4.netfilter.ip_conntrack_udp_timeout=60
|
||||
net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180
|
||||
net.core.netdev_max_backlog=30
|
||||
net.netfilter.nf_conntrack_checksum=0
|
||||
|
||||
#Controls source route verification
|
||||
net.ipv4.conf.default.rp_filter=1
|
||||
|
||||
#Do not accept source routing
|
||||
net.ipv4.conf.all.accept_source_route=0
|
||||
net.ipv4.conf.all.accept_redirects=0
|
||||
net.ipv4.conf.default.accept_source_route=0
|
||||
net.ipv4.conf.default.accept_redirects=0
|
||||
net.ipv4.icmp_echo_ignore_broadcasts=1
|
||||
net.ipv4.icmp_ignore_bogus_error_responses=1
|
||||
net.ipv4.ip_forward=0
|
||||
# net.ipv6.conf.all.forwarding=1
|
||||
|
||||
# disable bridge firewalling by default
|
||||
net.bridge.bridge-nf-call-arptables=0
|
||||
net.bridge.bridge-nf-call-ip6tables=0
|
||||
net.bridge.bridge-nf-call-iptables=0
|
||||
|
||||
net.ipv6.conf.default.accept_dad=0
|
||||
net.ipv6.conf.default.accept_ra=0
|
||||
net.ipv6.conf.default.accept_redirects=0
|
||||
net.ipv6.conf.all.accept_dad=0
|
||||
net.ipv6.conf.all.accept_ra=1
|
||||
net.ipv6.conf.all.accept_redirects=0
|
||||
|
||||
# Number of Router Solicitations to send until assuming no routers are present.
|
||||
# This is host and not router
|
||||
net.ipv6.conf.default.router_solicitations = 0
|
||||
net.ipv6.conf.all.router_solicitations = 0
|
||||
|
||||
# Accept Router Preference in RA?
|
||||
net.ipv6.conf.default.accept_ra_rtr_pref = 0
|
||||
net.ipv6.conf.all.accept_ra_rtr_pref = 1
|
||||
|
||||
# Learn Prefix Information in Router Advertisement
|
||||
net.ipv6.conf.default.accept_ra_pinfo = 0
|
||||
net.ipv6.conf.all.accept_ra_pinfo = 1
|
||||
|
||||
# Setting controls whether the system will accept Hop Limit settings from a router advertisement
|
||||
net.ipv6.conf.default.accept_ra_defrtr = 0
|
||||
net.ipv6.conf.all.accept_ra_defrtr = 1
|
||||
|
||||
#router advertisements can cause the system to assign a global unicast address to an interface
|
||||
net.ipv6.conf.default.autoconf = 0
|
||||
net.ipv6.conf.all.autoconf = 1
|
||||
|
||||
#how many neighbor solicitations to send out per address?
|
||||
net.ipv6.conf.default.dad_transmits = 3
|
||||
net.ipv6.conf.all.dad_transmits = 3
|
||||
|
||||
# How many global unicast IPv6 addresses can be assigned to each interface?
|
||||
net.ipv6.conf.default.max_addresses = 0
|
||||
net.ipv6.conf.all.max_addresses = 0
|
|
@ -0,0 +1,5 @@
|
|||
/etc/shadow
|
||||
/etc/dropbear/dropbear_dss_host_key
|
||||
/etc/dropbear/dropbear_rsa_host_key
|
||||
/etc/dropbear/authorized_keys
|
||||
/etc/network.mode
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
BOARD=`uci get board.model.name`
|
||||
FILE="openwrt-ar71xx-generic-$BOARD-squashfs-sysupgrade.bin"
|
||||
|
||||
echo -ne "\nHardware: $BOARD\n"
|
||||
echo -ne "Downloading $FILE\n\n"
|
||||
cd /tmp/
|
||||
wget http://$(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface)/dev/firmware/current/${FILE}
|
||||
wget http://$(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface)/dev/firmware/current/${FILE}.md5
|
||||
echo -ne "\ndone. Comparing md5 sums: "
|
||||
md5sum -c ${FILE}.md5
|
||||
ret=$?
|
||||
echo
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo -ne "md5 sums do not match. Try restarting this script to redownload the firmware.\n\n"
|
||||
rm -f ${FILE}*
|
||||
exit 1
|
||||
else
|
||||
while true; do
|
||||
read -p "md5 sums correct. Should I start upgrading the firmware (y/N)? " yn
|
||||
case $yn in
|
||||
[Yy] ) echo -ne "\nStarting firmware upgrade. Don't touch me until I reboot.\n\n\n"; sysupgrade ${FILE}; break;;
|
||||
[Nn]|* ) echo -ne "\nAborting firmware upgrade.\n\n"; rm -f ${FILE}*; exit 0;;
|
||||
esac
|
||||
done
|
||||
fi
|
|
@ -0,0 +1,173 @@
|
|||
#!/bin/ash
|
||||
|
||||
test -f /tmp/started || exit
|
||||
|
||||
# environment
|
||||
. "/tmp/environment" || exit 1
|
||||
|
||||
# constants
|
||||
MINUTE=60
|
||||
HOUR=3600
|
||||
DAY=86400
|
||||
TIMEOUT_SHORT=$((4*$MINUTE))
|
||||
TIMEOUT_MEDIUM=$((29*$MINUTE))
|
||||
TIMEOUT_LONG=$DAY
|
||||
ORIGINATOR_QUALITY_MIN=50
|
||||
CLIENT_AGE_MAX=60
|
||||
STATEFILE="/tmp/wlanwatchdogstate"
|
||||
DEBUGFILE="/root/wlanwatchdog_debug.log.gz"
|
||||
|
||||
# variables
|
||||
STATE=
|
||||
SINCE=
|
||||
|
||||
# functions
|
||||
debug_output() {
|
||||
echo "==== DEBUG OUTPUT ===="
|
||||
echo "date: $(date)"
|
||||
echo "=== INTERFACES ==="
|
||||
ifconfig 2>&1
|
||||
echo "=== BATMAN ==="
|
||||
echo "== ORIGINATORS =="
|
||||
batctl o 2>&1
|
||||
echo "== STATISTICS =="
|
||||
batctl s 2>&1
|
||||
echo "== GATEWAYS =="
|
||||
batctl gwl 2>&1
|
||||
echo "=== BRIDGE ==="
|
||||
echo "== $BRIDGE_INTERFACE =="
|
||||
brctl showmacs $BRIDGE_INTERFACE 2>&1
|
||||
echo "=== CONNECTIVITY TESTS ==="
|
||||
echo "== PING GATEWAY OVER MESH =="
|
||||
ping -6 -c3 $(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface) 2>&1
|
||||
echo "== PING HOST OVER INTERNET =="
|
||||
ping -4 -c3 freifunk-ol.de 2>&1
|
||||
echo "=== WLAN ==="
|
||||
echo "== $WLAN_CLIENT_INTERFACE =="
|
||||
iw dev $WLAN_CLIENT_INTERFACE station dump 2>&1
|
||||
echo "== $WLAN_MESH_INTERFACE =="
|
||||
iw dev $WLAN_MESH_INTERFACE station dump 2>&1
|
||||
echo "== SCAN =="
|
||||
iwlist scanning 2>&1
|
||||
echo "=== WATCHDOG LOG ==="
|
||||
cat "/var/log/wlanwatchdog.log"
|
||||
}
|
||||
|
||||
get_time() {
|
||||
date +%s
|
||||
}
|
||||
|
||||
count_originators() {
|
||||
local COUNT=0
|
||||
if [ -n "$BATMAN_INTERFACE" ]; then
|
||||
COUNT=$(tail -n +3 /sys/kernel/debug/batman_adv/$BATMAN_INTERFACE/originators 2> /dev/null | \
|
||||
grep "$1" | \
|
||||
grep -o "^\([0-9a-f]\{2\}:\?\)\+[[:space:]]\+[0-9.]\+s[[:space:]]\+([ 0-9]\+)" | \
|
||||
cut -d\( -f2 | \
|
||||
cut -d\) -f1 | \
|
||||
tr -d " " | \
|
||||
awk -vlimit=$ORIGINATOR_QUALITY_MIN '$1>=limit{print $1}' | \
|
||||
wc -l)
|
||||
fi
|
||||
echo $COUNT
|
||||
}
|
||||
|
||||
count_clients() {
|
||||
local COUNT=0
|
||||
local NUMBER=
|
||||
if [ -n "$BRIDGE_INTERFACE" ] && [ -n "$WLAN_CLIENT_INTERFACE" ]; then
|
||||
NUMBER=$(brctl showstp $BRIDGE_INTERFACE 2> /dev/null | \
|
||||
grep -e "^$WLAN_CLIENT_INTERFACE " | \
|
||||
cut -d" " -f2 | \
|
||||
tr -d "()")
|
||||
fi
|
||||
if [ -n "$BRIDGE_INTERFACE" ] && [ -n "$NUMBER" ]; then
|
||||
COUNT=$(brctl showmacs "^$BRIDGE_INTERFACE " 2> /dev/null | \
|
||||
grep -o "^[[:space:]]*$NUMBER[[:space:]]\+\([0-9a-f]\{2\}:\?\)\+[[:space:]]\+no[[:space:]]\+[0-9]\+" | \
|
||||
tr "\t" " " | \
|
||||
tr -s " " | \
|
||||
cut -d" " -f5 | \
|
||||
awk -vlimit=$CLIENT_AGE_MAX '$1<=limit{print $1}' | \
|
||||
wc -l)
|
||||
fi
|
||||
echo $COUNT
|
||||
}
|
||||
|
||||
count_neighbours() {
|
||||
count_originators "$WLAN_MESH_INTERFACE"
|
||||
}
|
||||
|
||||
scan_wlan() {
|
||||
#FIXME: if you can; is there an easier way to get the current frequency?
|
||||
#FIXME: this should reanimate the wlan driver; do passive and active scanning the job equally well?
|
||||
local FREQUENCY=$(iwlist $WLAN_MESH_INTERFACE frequency 2> /dev/null | \
|
||||
grep -o "Current Frequency=[0-9.]\+ GHz" | \
|
||||
grep -o "[0-9.]*" | \
|
||||
tr -d ".")
|
||||
[ -n "$FREQUENCY" ] && iw $WLAN_MESH_INTERFACE scan freq $FREQUENCY passive 1> /dev/null 2> /dev/null
|
||||
}
|
||||
|
||||
fsm_load() {
|
||||
if [ -f "$STATEFILE" ]; then
|
||||
STATE=""
|
||||
SINCE=""
|
||||
. "$STATEFILE" || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
fsm_save() {
|
||||
echo -e "STATE=${STATE}\nSINCE=${SINCE}" > "$STATEFILE" || return 1
|
||||
}
|
||||
|
||||
fsm_entry() {
|
||||
SINCE=$(get_time)
|
||||
case $STATE in
|
||||
pending)
|
||||
scan_wlan
|
||||
;;
|
||||
error)
|
||||
if [ -n "$DEBUG" ] && [ "$DEBUG" -eq "1" ]; then
|
||||
debug_output | gzip > ${DEBUGFILE}
|
||||
fi
|
||||
reboot
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
fsm_transition() {
|
||||
local AGE=-1
|
||||
[ -n "$SINCE" ] && AGE=$(( $(get_time) - $SINCE ))
|
||||
local OLDSTATE=$STATE
|
||||
case $STATE in
|
||||
working)
|
||||
if [ "$(count_neighbours)" -eq "0" ] && [ "$(count_clients)" -eq "0" ]; then
|
||||
STATE=pending
|
||||
fi
|
||||
;;
|
||||
pending)
|
||||
if [ "$AGE" -ge "$TIMEOUT_MEDIUM" ]; then
|
||||
STATE=error
|
||||
elif [ "$(count_originators)" -eq "0" ] && [ "$AGE" -ge "$TIMEOUT_SHORT" ]; then
|
||||
STATE=error
|
||||
elif [ "$(count_neighbours)" -gt "0" ] || [ "$(count_clients)" -gt "0" ]; then
|
||||
STATE=working
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [ "$AGE" -ge "$TIMEOUT_LONG" ]; then
|
||||
STATE=error
|
||||
elif [ "$(count_neighbours)" -gt "0" ] || [ "$(count_clients)" -gt "0" ]; then
|
||||
STATE=working
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if [ ! "$OLDSTATE" = "$STATE" ]; then
|
||||
echo "$(date) '$OLDSTATE' -> '$STATE'"
|
||||
fsm_entry
|
||||
fi
|
||||
}
|
||||
|
||||
# program
|
||||
fsm_load
|
||||
fsm_transition
|
||||
fsm_save
|
|
@ -1 +0,0 @@
|
|||
/tmp/.ash_history
|
|
@ -1,6 +0,0 @@
|
|||
chipset=ipq40xx
|
||||
subtarget=generic
|
||||
|
||||
images=(
|
||||
"openwrt-${chipset}-${subtarget}-avm_fritzbox-4040-squashfs-*"
|
||||
)
|
|
@ -1,32 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_ipq40xx=y
|
||||
CONFIG_TARGET_ipq40xx_generic=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_ipq40xx_generic_DEVICE_avm_fritzbox-4040=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ipq40xx_generic_DEVICE_avm_fritzbox-4040="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca4019-ct ath10k-firmware-qca4019"
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca4019=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca4019-ct=m
|
||||
CONFIG_PACKAGE_fff-extra=y
|
||||
CONFIG_PACKAGE_kmod-ath10k=m
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct=m
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
CONFIG_PACKAGE_kmod-hwmon-core=y
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -1,6 +0,0 @@
|
|||
chipset=ipq806x
|
||||
subtarget=generic
|
||||
|
||||
images=(
|
||||
"openwrt-${chipset}-${subtarget}-tplink_c2600-squashfs-*"
|
||||
)
|
|
@ -1,42 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_ipq806x=y
|
||||
CONFIG_TARGET_ipq806x_generic=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_c2600="-ath10k-firmware-qca99x0-ct ath10k-firmware-qca99x0"
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_fff-extra=y
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca99x0=m
|
||||
CONFIG_PACKAGE_kmod-ath10k=y
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct=m
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -1,6 +0,0 @@
|
|||
chipset=mpc85xx
|
||||
subtarget=p1010
|
||||
|
||||
images=(
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr4900-v1-squashfs-*"
|
||||
)
|
|
@ -1,39 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_mpc85xx=y
|
||||
CONFIG_TARGET_mpc85xx_p1010=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_mpc85xx_p1010_DEVICE_tplink_tl-wdr4900-v1=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mpc85xx_p1010_DEVICE_tplink_tl-wdr4900-v1=""
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_fff-extra=y
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -1,6 +0,0 @@
|
|||
chipset=mvebu
|
||||
subtarget=cortexa72
|
||||
|
||||
images=(
|
||||
"openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs*"
|
||||
)
|
|
@ -1,48 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_mvebu=y
|
||||
CONFIG_TARGET_mvebu_cortexa72=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_mvebu_cortexa72_DEVICE_mikrotik_rb5009=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mvebu_cortexa72_DEVICE_mikrotik_rb5009=""
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CHGRP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CHOWN is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_IFCONFIG is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_IP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_MKSWAP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_ROUTE is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_SWAPOFF is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_SWAPON is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_fff-extra=y
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
# CONFIG_TARGET_ROOTFS_EXT4FS is not set
|
||||
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -1,6 +0,0 @@
|
|||
chipset=octeon
|
||||
subtarget=generic
|
||||
|
||||
images=(
|
||||
"openwrt-${chipset}-${subtarget}-ubnt_edgerouter-4-*"
|
||||
)
|
|
@ -1,32 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_octeon=y
|
||||
CONFIG_TARGET_octeon_generic=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_octeon_generic_DEVICE_ubnt_edgerouter-4=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_octeon_generic_DEVICE_ubnt_edgerouter-4=""
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_fff-extra=y
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -1,9 +0,0 @@
|
|||
chipset=ramips
|
||||
subtarget=mt7621
|
||||
|
||||
images=(
|
||||
"openwrt-ramips-mt7621-netgear_r6220-squashfs-*"
|
||||
"openwrt-ramips-mt7621-ubnt_edgerouter-x-squashfs-*"
|
||||
"openwrt-ramips-mt7621-ubnt_edgerouter-x-sfp-squashfs-*"
|
||||
"openwrt-ramips-mt7621-xiaomi_mi-router-4a-gigabit-squashfs-*"
|
||||
)
|
|
@ -1,45 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_ramips=y
|
||||
CONFIG_TARGET_ramips_mt7621=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_netgear_r6220=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_netgear_r6220=""
|
||||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_ubnt_edgerouter-x=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_ubnt_edgerouter-x=""
|
||||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_ubnt_edgerouter-x-sfp=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_ubnt_edgerouter-x-sfp=""
|
||||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-4a-gigabit=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_xiaomi_mi-router-4a-gigabit=""
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_fff-extra=y
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -1,8 +0,0 @@
|
|||
chipset=ramips
|
||||
subtarget=mt76x8
|
||||
images=("openwrt-${chipset}-${subtarget}-tplink_archer-c50-v3-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_archer-c50-v4-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-tplink_tl-wr841n-v13-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-xiaomi_mi-router-4a-100m-squashfs-*"
|
||||
"openwrt-${chipset}-${subtarget}-xiaomi_mi-router-4a-100m-intl-squashfs-*"
|
||||
)
|
|
@ -1,45 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_ramips=y
|
||||
CONFIG_TARGET_ramips_mt76x8=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_archer-c50-v3=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_archer-c50-v3=""
|
||||
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_archer-c50-v4=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_archer-c50-v4=""
|
||||
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_tl-wr841n-v13=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_tl-wr841n-v13=""
|
||||
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m=""
|
||||
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m-intl=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m-intl=""
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_DROPBEAR_CURVE25519 is not set
|
||||
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
|
||||
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,18 @@
|
|||
#what should the one eth0 ethernet port be used for?
|
||||
#directly connect to other mesh nodes - this is the default
|
||||
ETHMODE="BATMAN"
|
||||
|
||||
#Connect with fastd vpn
|
||||
#ETHMODE="WAN"
|
||||
|
||||
#connect normal ff-clients
|
||||
#ETHMODE="CLIENT"
|
||||
|
||||
################
|
||||
## If you want to change the behavior of eth0, you can change it above.
|
||||
## After that you have to reset the config with following commands.
|
||||
#cp /rom/etc/sysctl.conf /etc/sysctl.conf
|
||||
#cp /rom/etc/config/network /etc/config/network
|
||||
#reboot
|
||||
################
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS=""
|
||||
WAN_PORTS=""
|
||||
BATMAN_PORTS=""
|
||||
|
||||
. /etc/network.mode
|
||||
|
||||
CLIENTIF="w2ap"
|
||||
ETHMESHMAC=
|
||||
ROUTERMAC=w2mesh
|
||||
|
||||
uci set network.$SWITCHDEV=interface
|
||||
uci set network.$SWITCHDEV.ifname=$SWITCHDEV
|
||||
uci set network.mesh.ifname="bat0"
|
||||
|
||||
if [ "$ETHMODE" = "WAN" ] ; then
|
||||
## Activate for WAN:
|
||||
echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
|
||||
echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
|
||||
uci set network.wan.ifname=$WANDEV
|
||||
elif [ "$ETHMODE" = "CLIENT" ] ; then
|
||||
## Activate Client:
|
||||
CLIENTIF="w2ap eth0"
|
||||
uci set network.mesh.ifname="bat0 $SWITCHDEV"
|
||||
else
|
||||
## Activate BATMAN:
|
||||
uci set network.ethmesh.ifname="$SWITCHDEV"
|
||||
fi
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,30 @@
|
|||
config 'interface' 'loopback'
|
||||
option 'ifname' 'lo'
|
||||
option 'proto' 'static'
|
||||
option 'ipaddr' '127.0.0.1'
|
||||
option 'netmask' '255.0.0.0'
|
||||
|
||||
config interface 'w2mesh'
|
||||
option mtu '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config interface 'w5mesh'
|
||||
option mtu '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config 'interface' 'mesh'
|
||||
option 'type' 'bridge'
|
||||
option 'auto' '1'
|
||||
|
||||
config 'interface' 'wan'
|
||||
option 'ifname' 'eth0.2'
|
||||
option 'proto' 'dhcp'
|
||||
|
||||
config 'interface' 'ethmesh'
|
||||
option 'mtu' '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
# vim: noexpandtab
|
|
@ -0,0 +1,53 @@
|
|||
config wifi-device radio0
|
||||
option type mac80211
|
||||
option channel ${BATMAN_CHANNEL}
|
||||
option phy phy0
|
||||
option hwmode 11g
|
||||
option htmode HT20
|
||||
option country DE
|
||||
|
||||
config wifi-iface w2mesh
|
||||
option device radio0
|
||||
option network w2mesh
|
||||
option ifname w2mesh
|
||||
option mode adhoc
|
||||
option bssid ${BSSID_MESH}
|
||||
option ssid '${ESSID_MESH}'
|
||||
option mcast_rate 6000
|
||||
option encryption none
|
||||
option hidden 1
|
||||
|
||||
config wifi-iface w2ap
|
||||
option device radio0
|
||||
option network mesh
|
||||
option ifname w2ap
|
||||
option mode ap
|
||||
option ssid '${ESSID_AP}'
|
||||
option encryption none
|
||||
|
||||
config wifi-device radio1
|
||||
option type mac80211
|
||||
option channel ${BATMAN_CHANNEL_5GHZ}
|
||||
option phy phy1
|
||||
option hwmode 11a
|
||||
option htmode HT40+
|
||||
option country DE
|
||||
|
||||
config wifi-iface w5mesh
|
||||
option device radio1
|
||||
option network w5mesh
|
||||
option ifname w5mesh
|
||||
option mode adhoc
|
||||
option bssid ${BSSID_MESH}
|
||||
option ssid '${ESSID_MESH}'
|
||||
option mcast_rate 6000
|
||||
option encryption none
|
||||
option hidden 1
|
||||
|
||||
config wifi-iface w5ap
|
||||
option device radio1
|
||||
option network mesh
|
||||
option ifname w5ap
|
||||
option mode ap
|
||||
option ssid '${ESSID_AP}'
|
||||
option encryption none
|
|
@ -3,3 +3,7 @@ SWITCHDEV=eth0
|
|||
CLIENT_PORTS="0t 1 2"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="0t 3 4"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap w5ap"
|
||||
ETHMESHMAC=
|
||||
ROUTERMAC=w2mesh
|
|
@ -0,0 +1,9 @@
|
|||
WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="0t 4 5"
|
||||
WAN_PORTS="0t 1"
|
||||
BATMAN_PORTS="0t 2 3"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap w5ap"
|
||||
ETHMESHMAC=
|
||||
ROUTERMAC=w5mesh
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,30 @@
|
|||
config 'interface' 'loopback'
|
||||
option 'ifname' 'lo'
|
||||
option 'proto' 'static'
|
||||
option 'ipaddr' '127.0.0.1'
|
||||
option 'netmask' '255.0.0.0'
|
||||
|
||||
config interface 'w2mesh'
|
||||
option mtu '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config interface 'w5mesh'
|
||||
option mtu '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config 'interface' 'mesh'
|
||||
option 'type' 'bridge'
|
||||
option 'auto' '1'
|
||||
|
||||
config 'interface' 'wan'
|
||||
option 'ifname' 'eth0.2'
|
||||
option 'proto' 'dhcp'
|
||||
|
||||
config 'interface' 'ethmesh'
|
||||
option 'mtu' '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
# vim: noexpandtab
|
|
@ -0,0 +1,53 @@
|
|||
config wifi-device radio0
|
||||
option type mac80211
|
||||
option channel ${BATMAN_CHANNEL_5GHZ}
|
||||
option phy phy0
|
||||
option hwmode 11a
|
||||
option htmode HT40+
|
||||
option country DE
|
||||
|
||||
config wifi-iface w5mesh
|
||||
option device radio0
|
||||
option network w5mesh
|
||||
option ifname w5mesh
|
||||
option mode adhoc
|
||||
option bssid ${BSSID_MESH}
|
||||
option ssid '${ESSID_MESH}'
|
||||
option mcast_rate 6000
|
||||
option encryption none
|
||||
option hidden 1
|
||||
|
||||
config wifi-iface w5ap
|
||||
option device radio0
|
||||
option network mesh
|
||||
option ifname w5ap
|
||||
option mode ap
|
||||
option ssid '${ESSID_AP}'
|
||||
option encryption none
|
||||
|
||||
config wifi-device radio1
|
||||
option type mac80211
|
||||
option channel ${BATMAN_CHANNEL}
|
||||
option phy phy1
|
||||
option hwmode 11g
|
||||
option htmode HT20
|
||||
option country DE
|
||||
|
||||
config wifi-iface w2mesh
|
||||
option device radio1
|
||||
option network w2mesh
|
||||
option ifname w2mesh
|
||||
option mode adhoc
|
||||
option bssid ${BSSID_MESH}
|
||||
option ssid '${ESSID_MESH}'
|
||||
option mcast_rate 6000
|
||||
option encryption none
|
||||
option hidden 1
|
||||
|
||||
config wifi-iface w2ap
|
||||
option device radio1
|
||||
option network mesh
|
||||
option ifname w2ap
|
||||
option mode ap
|
||||
option ssid '${ESSID_AP}'
|
||||
option encryption none
|
|
@ -0,0 +1,9 @@
|
|||
WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="0t 4 5"
|
||||
WAN_PORTS="0t 1"
|
||||
BATMAN_PORTS="0t 2 3"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap w5ap"
|
||||
ETHMESHMAC=
|
||||
ROUTERMAC=w5mesh
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="3 4 5t"
|
||||
WAN_PORTS="0 5t"
|
||||
BATMAN_PORTS="1 2 5t"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap"
|
||||
ETHMESHMAC=w2ap
|
||||
ROUTERMAC=eth0
|
|
@ -3,3 +3,7 @@ SWITCHDEV=eth0
|
|||
CLIENT_PORTS="1 2 6t"
|
||||
WAN_PORTS="5 6t"
|
||||
BATMAN_PORTS="3 4 6t"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap"
|
||||
ETHMESHMAC=
|
||||
ROUTERMAC=eth1
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
|||
WANDEV=eth1
|
||||
# WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="1 4 0t"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="2 3 0t"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap"
|
||||
ETHMESHMAC=eth1
|
||||
ROUTERMAC=w2mesh
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
|||
WANDEV=eth1
|
||||
# WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="1 2 0t"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="3 4 0t"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap"
|
||||
ETHMESHMAC=eth1
|
||||
ROUTERMAC=w2mesh
|
|
@ -0,0 +1,10 @@
|
|||
WANDEV=eth1
|
||||
# WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="1 4 0t"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="2 3 0t"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap"
|
||||
ETHMESHMAC=eth1
|
||||
ROUTERMAC=w2mesh
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,11 @@
|
|||
|
||||
WANDEV=eth0
|
||||
# WANDEV=eth0
|
||||
SWITCHDEV=eth1
|
||||
CLIENT_PORTS="1 4 0t"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="3 2 0t"
|
||||
|
||||
CLIENTIF="eth1.1 w2ap"
|
||||
ETHMESHMAC=eth0
|
||||
ROUTERMAC=eth1
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
WANDEV=eth1
|
||||
# WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="1 2 0t"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="3 4 0t"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap"
|
||||
ETHMESHMAC=eth1
|
||||
ROUTERMAC=eth0
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
WANDEV=eth1
|
||||
# WANDEV=eth0
|
||||
SWITCHDEV=eth0
|
||||
CLIENT_PORTS="1 2 0t"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="3 4 0t"
|
||||
|
||||
CLIENTIF="eth0.1 w2ap"
|
||||
ETHMESHMAC=eth1
|
||||
ROUTERMAC=wlan0
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
WANDEV=eth0
|
||||
SWITCHDEV=eth1
|
||||
CLIENT_PORTS="1 4 0t"
|
||||
WAN_PORTS=
|
||||
BATMAN_PORTS="3 2 0t"
|
||||
|
||||
CLIENTIF="eth1.1 w2ap"
|
||||
ETHMESHMAC=eth0
|
||||
ROUTERMAC=eth1
|
|
@ -1,4 +0,0 @@
|
|||
chipset=x86
|
||||
subtarget=64
|
||||
images=("openwrt-${chipset}-${subtarget}-generic-squashfs-combined-*"
|
||||
)
|
|
@ -1,31 +0,0 @@
|
|||
# Generated using "./buildscript config openwrt".
|
||||
# Do no edit manually
|
||||
#
|
||||
CONFIG_TARGET_x86=y
|
||||
CONFIG_TARGET_x86_64=y
|
||||
CONFIG_TARGET_MULTI_PROFILE=y
|
||||
CONFIG_TARGET_DEVICE_x86_64_DEVICE_generic=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_x86_64_DEVICE_generic=""
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_CLEAN_IPKG=y
|
||||
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||
CONFIG_PACKAGE_fff-extra=y
|
||||
CONFIG_PACKAGE_kmod-vmxnet3=y
|
||||
CONFIG_PACKAGE_libuclient=m
|
||||
CONFIG_PACKAGE_libwolfssl=m
|
||||
CONFIG_PACKAGE_opkg=m
|
||||
CONFIG_PACKAGE_wpad-basic=y
|
||||
CONFIG_PACKAGE_uclient-fetch=m
|
||||
CONFIG_PACKAGE_wpad-basic-wolfssl=m
|
||||
CONFIG_STRIP_KERNEL_EXPORTS=y
|
||||
# CONFIG_LIBCURL_FILE is not set
|
||||
# CONFIG_LIBCURL_FTP is not set
|
||||
# CONFIG_LIBCURL_PROXY is not set
|
||||
# CONFIG_LIBCURL_UNIX_SOCKETS is not set
|
||||
# CONFIG_HTOP_LMSENSORS is not set
|
|
@ -0,0 +1,194 @@
|
|||
From 3abc4d782dcbf7814646e03d73bd509181a1ccd1 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Niemeyer <tim.niemeyer@mastersword.de>
|
||||
Date: Fri, 22 Nov 2013 18:59:26 +0100
|
||||
Subject: [PATCH] batman-adv: no rebroadcast option
|
||||
|
||||
---
|
||||
...man-adv_introduce__no_rebroadcast__option.patch | 176 ++++++++++++++++++++
|
||||
1 file changed, 176 insertions(+)
|
||||
create mode 100644 batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch
|
||||
|
||||
diff --git a/batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch b/batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch
|
||||
new file mode 100644
|
||||
index 0000000..57d8491
|
||||
--- /dev/null
|
||||
+++ b/batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch
|
||||
@@ -0,0 +1,176 @@
|
||||
+This patch introduces a new sysfs option named "no_rebroadcast" on
|
||||
+a per hard interface basis. It allows manually enabling a split-horizon
|
||||
+like behaviour for the layer 2 multicast payload frames, in that
|
||||
+incoming multicast payload frames on such a hard interface are only
|
||||
+being rebroadcasted on all interfaces except the incoming one instead
|
||||
+of being rebroadcasted on all interfaces.
|
||||
+
|
||||
+Such an option should only be enabled if you are certain that these
|
||||
+rebroadcasts are unnecessary. This is usually the case for instance
|
||||
+for point-to-point wifi longshots or wired links.
|
||||
+
|
||||
+This option can especially safe a significant amount of upload overhead
|
||||
+if the neighbourhood on a link is rather large, for instance in some
|
||||
+transitive, symmetric VPN configurations.
|
||||
+
|
||||
+Using this option wrongly will break your mesh network, use this option
|
||||
+wisely and at your own risk!
|
||||
+
|
||||
+Signed-off-by: Linus L<>ssing <linus.luessing@web.de>
|
||||
+---
|
||||
+ hard-interface.c | 2 ++
|
||||
+ send.c | 4 +++
|
||||
+ sysfs-class-net-batman-adv | 10 ++++++++
|
||||
+ sysfs.c | 59 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
+ types.h | 1 +
|
||||
+ 5 files changed, 76 insertions(+)
|
||||
+
|
||||
+diff --git a/hard-interface.c b/hard-interface.c
|
||||
+index c60d3ed..4c27f05 100644
|
||||
+--- a/hard-interface.c
|
||||
++++ b/hard-interface.c
|
||||
+@@ -602,6 +602,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
|
||||
+ /* extra reference for return */
|
||||
+ atomic_set(&hard_iface->refcount, 2);
|
||||
+
|
||||
++ atomic_set(&hard_iface->no_rebroadcast, 0);
|
||||
++
|
||||
+ batadv_check_known_mac_addr(hard_iface->net_dev);
|
||||
+ list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);
|
||||
+
|
||||
+diff --git a/send.c b/send.c
|
||||
+index c83be5e..2a0e0cc 100644
|
||||
+--- a/send.c
|
||||
++++ b/send.c
|
||||
+@@ -496,6 +496,10 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
|
||||
+ if (forw_packet->num_packets >= hard_iface->num_bcasts)
|
||||
+ continue;
|
||||
+
|
||||
++ if (atomic_read(&hard_iface->no_rebroadcast) &&
|
||||
++ forw_packet->skb->dev == hard_iface->net_dev)
|
||||
++ continue;
|
||||
++
|
||||
+ /* send a copy of the saved skb */
|
||||
+ skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC);
|
||||
+ if (skb1)
|
||||
+diff --git a/sysfs-class-net-batman-adv b/sysfs-class-net-batman-adv
|
||||
+index bdc0070..88f6f70 100644
|
||||
+--- a/sysfs-class-net-batman-adv
|
||||
++++ b/sysfs-class-net-batman-adv
|
||||
+@@ -13,3 +13,13 @@ Description:
|
||||
+ displays the batman mesh interface this <iface>
|
||||
+ currently is associated with.
|
||||
+
|
||||
++What: /sys/class/net/<iface>/batman-adv/no_rebroadcast
|
||||
++Date: Sep 2013
|
||||
++Contact: Linus L<>ssing <linus.luessing@web.de>
|
||||
++Description:
|
||||
++ With this option set incoming multicast payload frames on
|
||||
++ <iface> are not being rebroadcasted on <iface> again. This
|
||||
++ option should be set on links which are known to be transitive
|
||||
++ and symmetric only, for instance point-to-point wifi longshots
|
||||
++ or wired links. Using this option wrongly is going to
|
||||
++ break your mesh network, use at your own risk!
|
||||
+diff --git a/sysfs.c b/sysfs.c
|
||||
+index 096b511..5e2cd21 100644
|
||||
+--- a/sysfs.c
|
||||
++++ b/sysfs.c
|
||||
+@@ -110,6 +110,17 @@ struct batadv_attribute batadv_attr_vlan_##_name = { \
|
||||
+ .store = _store, \
|
||||
+ };
|
||||
+
|
||||
++/* Use this, if you have customized show and store functions
|
||||
++ * for hard interface attrs
|
||||
++ */
|
||||
++#define BATADV_ATTR_HIF(_name, _mode, _show, _store) \
|
||||
++struct batadv_attribute batadv_attr_hif_##_name = { \
|
||||
++ .attr = {.name = __stringify(_name), \
|
||||
++ .mode = _mode }, \
|
||||
++ .show = _show, \
|
||||
++ .store = _store, \
|
||||
++};
|
||||
++
|
||||
+ /* Use this, if you have customized show and store functions */
|
||||
+ #define BATADV_ATTR(_name, _mode, _show, _store) \
|
||||
+ struct batadv_attribute batadv_attr_##_name = { \
|
||||
+@@ -215,6 +226,52 @@ ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \
|
||||
+ static BATADV_ATTR_VLAN(_name, _mode, batadv_show_vlan_##_name, \
|
||||
+ batadv_store_vlan_##_name)
|
||||
+
|
||||
++#define BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func) \
|
||||
++ssize_t batadv_store_hif_##_name(struct kobject *kobj, \
|
||||
++ struct attribute *attr, char *buff, \
|
||||
++ size_t count) \
|
||||
++{ \
|
||||
++ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
||||
++ struct batadv_hard_iface *hard_iface; \
|
||||
++ size_t res; \
|
||||
++ \
|
||||
++ hard_iface = batadv_hardif_get_by_netdev(net_dev); \
|
||||
++ if (!hard_iface) \
|
||||
++ return 0; \
|
||||
++ \
|
||||
++ res = __batadv_store_bool_attr(buff, count, _post_func, \
|
||||
++ attr, &hard_iface->_name, \
|
||||
++ hard_iface->soft_iface); \
|
||||
++ batadv_hardif_free_ref(hard_iface); \
|
||||
++ return res; \
|
||||
++}
|
||||
++
|
||||
++#define BATADV_ATTR_HIF_SHOW_BOOL(_name) \
|
||||
++ssize_t batadv_show_hif_##_name(struct kobject *kobj, \
|
||||
++ struct attribute *attr, char *buff) \
|
||||
++{ \
|
||||
++ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
||||
++ struct batadv_hard_iface *hard_iface; \
|
||||
++ size_t res; \
|
||||
++ \
|
||||
++ hard_iface = batadv_hardif_get_by_netdev(net_dev); \
|
||||
++ if (!hard_iface) \
|
||||
++ return 0; \
|
||||
++ \
|
||||
++ res = sprintf(buff, "%s\n", \
|
||||
++ atomic_read(&hard_iface->_name) == 0 ? \
|
||||
++ "disabled" : "enabled"); \
|
||||
++ batadv_hardif_free_ref(hard_iface); \
|
||||
++ return res; \
|
||||
++}
|
||||
++
|
||||
++/* Use this, if you are going to turn a [name] in the vlan struct on or off */
|
||||
++#define BATADV_ATTR_HIF_BOOL(_name, _mode, _post_func) \
|
||||
++ static BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func) \
|
||||
++ static BATADV_ATTR_HIF_SHOW_BOOL(_name) \
|
||||
++ static BATADV_ATTR_HIF(_name, _mode, batadv_show_hif_##_name, \
|
||||
++ batadv_store_hif_##_name)
|
||||
++
|
||||
+ static int batadv_store_bool_attr(char *buff, size_t count,
|
||||
+ struct net_device *net_dev,
|
||||
+ const char *attr_name, atomic_t *attr)
|
||||
+@@ -750,10 +807,12 @@ static ssize_t batadv_show_iface_status(struct kobject *kobj,
|
||||
+ static BATADV_ATTR(mesh_iface, S_IRUGO | S_IWUSR, batadv_show_mesh_iface,
|
||||
+ batadv_store_mesh_iface);
|
||||
+ static BATADV_ATTR(iface_status, S_IRUGO, batadv_show_iface_status, NULL);
|
||||
++BATADV_ATTR_HIF_BOOL(no_rebroadcast, S_IRUGO | S_IWUSR, NULL);
|
||||
+
|
||||
+ static struct batadv_attribute *batadv_batman_attrs[] = {
|
||||
+ &batadv_attr_mesh_iface,
|
||||
+ &batadv_attr_iface_status,
|
||||
++ &batadv_attr_hif_no_rebroadcast,
|
||||
+ NULL,
|
||||
+ };
|
||||
+
|
||||
+diff --git a/types.h b/types.h
|
||||
+index f323822..b5a5824 100644
|
||||
+--- a/types.h
|
||||
++++ b/types.h
|
||||
+@@ -76,6 +76,7 @@ struct batadv_hard_iface {
|
||||
+ struct rcu_head rcu;
|
||||
+ struct batadv_hard_iface_bat_iv bat_iv;
|
||||
+ struct work_struct cleanup_work;
|
||||
++ atomic_t no_rebroadcast;
|
||||
+ };
|
||||
+
|
||||
+ /**
|
||||
+--
|
||||
+1.7.10.4
|
||||
+
|
||||
--
|
||||
1.7.10.4
|
|
@ -1,28 +0,0 @@
|
|||
From: Tim Niemeyer <tim@tn-x.org>
|
||||
Date: Sat, 8 Jul 2017 10:46:59 +0200
|
||||
Subject: Disable OpenWrt config migration mechanisms
|
||||
|
||||
This disables all OpenWrt config migration mechanisms except for
|
||||
files listed in /etc/sysupgrade.conf
|
||||
|
||||
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
|
||||
index 9315091302..be8325463e 100755
|
||||
--- a/package/base-files/files/sbin/sysupgrade
|
||||
+++ b/package/base-files/files/sbin/sysupgrade
|
||||
@@ -139,14 +139,14 @@ list_static_conffiles() {
|
||||
local filter=$1
|
||||
|
||||
find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
|
||||
- /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
|
||||
+ /etc/sysupgrade.conf 2>/dev/null) \
|
||||
\( -type f -o -type l \) $filter 2>/dev/null
|
||||
}
|
||||
|
||||
add_conffiles() {
|
||||
local file="$1"
|
||||
|
||||
- ( list_static_conffiles "$find_filter"; list_changed_conffiles ) |
|
||||
+ ( list_static_conffiles "$find_filter" ) |
|
||||
sort -u > "$file"
|
||||
return 0
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
From: Tim Niemeyer <tim@tn-x.org>
|
||||
Date: Sat, 8 Jul 2017 10:47:28 +0200
|
||||
Subject: set root password
|
||||
|
||||
diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow
|
||||
index 39bdb9c90a..b8d180a956 100644
|
||||
--- a/package/base-files/files/etc/shadow
|
||||
+++ b/package/base-files/files/etc/shadow
|
||||
@@ -1,4 +1,4 @@
|
||||
-root:::0:99999:7:::
|
||||
+root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:99999:7:::
|
||||
daemon:*:0:0:99999:7:::
|
||||
ftp:*:0:0:99999:7:::
|
||||
network:*:0:0:99999:7:::
|
|
@ -1,17 +0,0 @@
|
|||
From: Tim Niemeyer <tim@tn-x.org>
|
||||
Date: Sat, 8 Jul 2017 10:47:56 +0200
|
||||
Subject: ntpd host as string
|
||||
|
||||
diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd
|
||||
index 074f14b8f8..a05d1789ff 100755
|
||||
--- a/package/utils/busybox/files/sysntpd
|
||||
+++ b/package/utils/busybox/files/sysntpd
|
||||
@@ -34,7 +34,7 @@ validate_ntp_section() {
|
||||
'enable_server:bool:0' \
|
||||
'enabled:bool:1' \
|
||||
'interface:string' \
|
||||
- 'server:list(host)' \
|
||||
+ 'server:list(string)' \
|
||||
'use_dhcp:bool:1'
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
||||
Date: Wed, 10 Feb 2021 19:12:59 +0100
|
||||
Subject: build: remove libustream and certs from default packages
|
||||
|
||||
This effectively reverts upstream commit e79df3516d3e ("build: add
|
||||
libustream and certs to default pkgs").
|
||||
|
||||
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
||||
[fabian@blaese.de: Rebase onto OpenWrt 23.05]
|
||||
Signed-off-by: Fabian Bläse <fabian@blaese.de>
|
||||
|
||||
diff --git a/include/target.mk b/include/target.mk
|
||||
index b5e3e7ff6f..2324b6cc11 100644
|
||||
--- a/include/target.mk
|
||||
+++ b/include/target.mk
|
||||
@@ -12,12 +12,10 @@ DEVICE_TYPE?=router
|
||||
# Default packages - the really basic set
|
||||
DEFAULT_PACKAGES:=\
|
||||
base-files \
|
||||
- ca-bundle \
|
||||
dropbear \
|
||||
fstools \
|
||||
libc \
|
||||
libgcc \
|
||||
- libustream-mbedtls \
|
||||
logd \
|
||||
mtd \
|
||||
netifd \
|
|
@ -1,27 +0,0 @@
|
|||
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
|
||||
Date: Sun, 6 Aug 2023 19:57:16 +0200
|
||||
Subject: [PATCH 1/2] ipq40xx: re-add label MAC address for FritzBox 4040
|
||||
|
||||
The MAC address of the GMAC is contained inside the CWMP-Account
|
||||
number on the label.
|
||||
|
||||
The label MAC address alias was defined previously, but it has been
|
||||
removed with the switch to IPQESS / DSA.
|
||||
|
||||
Restore the label MAC address alias.
|
||||
|
||||
Fixes: 27b441cbaf42 ("ipq40xx: drop ESSEDMA + AR40xx DTS nodes")
|
||||
Signed-off-by: Fabian Bläse <fabian@blaese.de>
|
||||
|
||||
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
|
||||
index e448206c36..ec1112ee2b 100644
|
||||
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
|
||||
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
|
||||
@@ -14,6 +14,7 @@
|
||||
led-failsafe = &flash;
|
||||
led-running = &power;
|
||||
led-upgrade = &flash;
|
||||
+ label-mac-device = &gmac;
|
||||
};
|
||||
|
||||
soc {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue