Browse Source

Initial Commit for 1.04.5

1.04.5
xosadmin 4 weeks ago
commit
854d831460
  1. 1
      .gitattributes
  2. 32
      .gitignore
  3. 6
      BSDmakefile
  4. 12
      COPYING
  5. 32
      Config.in
  6. 32
      LICENSES/BSD-2-Clause
  7. 36
      LICENSES/BSD-3-Clause
  8. 261
      LICENSES/GPL-1.0
  9. 355
      LICENSES/GPL-2.0
  10. 24
      LICENSES/ISC
  11. 25
      LICENSES/Linux-syscall-note
  12. 30
      LICENSES/MIT
  13. 129
      Makefile
  14. 87
      README.md
  15. 389
      config/Config-build.in
  16. 138
      config/Config-devel.in
  17. 314
      config/Config-images.in
  18. 1190
      config/Config-kernel.in
  19. 10
      feeds.conf.default
  20. 180
      include/autotools.mk
  21. 175
      include/cmake.mk
  22. 48
      include/debug.mk
  23. 52
      include/depends.mk
  24. 5
      include/device_table.txt
  25. 326
      include/download.mk
  26. 53
      include/feeds.mk
  27. 2
      include/hardened-ld-pie.specs
  28. 61
      include/hardening.mk
  29. 209
      include/host-build.mk
  30. 513
      include/image-commands.mk
  31. 755
      include/image.mk
  32. 184
      include/kernel-build.mk
  33. 195
      include/kernel-defaults.mk
  34. 41
      include/kernel-version.mk
  35. 302
      include/kernel.mk
  36. BIN
      include/logo.png
  37. 398
      include/logo.svg
  38. 143
      include/meson.mk
  39. 386
      include/netfilter.mk
  40. 37
      include/nls.mk
  41. 40
      include/package-bin.mk
  42. 162
      include/package-defaults.mk
  43. 57
      include/package-dumpinfo.mk
  44. 275
      include/package-ipkg.mk
  45. 12
      include/package-seccomp.mk
  46. 353
      include/package.mk
  47. 198
      include/prereq-build.mk
  48. 118
      include/prereq.mk
  49. 181
      include/quilt.mk
  50. 101
      include/rootfs.mk
  51. 19
      include/scan.awk
  52. 120
      include/scan.mk
  53. 15
      include/shell.sh
  54. 30
      include/site/aarch64
  55. 30
      include/site/aarch64_be
  56. 30
      include/site/arc
  57. 30
      include/site/arm
  58. 30
      include/site/armeb
  59. 2
      include/site/darwin
  60. 3
      include/site/i386
  61. 30
      include/site/i486
  62. 3
      include/site/i686
  63. 78
      include/site/linux
  64. 28
      include/site/m68k
  65. 30
      include/site/mips
  66. 30
      include/site/mips64
  67. 30
      include/site/mips64el
  68. 30
      include/site/mipsel
  69. 30
      include/site/powerpc
  70. 26
      include/site/powerpc64
  71. 30
      include/site/sparc
  72. 30
      include/site/x86_64
  73. 104
      include/subdir.mk
  74. 341
      include/target.mk
  75. 23
      include/toolchain-build.mk
  76. 269
      include/toplevel.mk
  77. 95
      include/trusted-firmware-a.mk
  78. 106
      include/u-boot.mk
  79. 16
      include/uclibc++.mk
  80. 72
      include/unpack.mk
  81. 64
      include/verbose.mk
  82. 108
      include/version.mk
  83. 114
      package/Makefile
  84. 228
      package/base-files/Makefile
  85. 14
      package/base-files/files/bin/board_detect
  86. 532
      package/base-files/files/bin/config_generate
  87. 71
      package/base-files/files/bin/ipcalc.sh
  88. 8
      package/base-files/files/etc/banner
  89. 15
      package/base-files/files/etc/banner.failsafe
  90. 16
      package/base-files/files/etc/board.d/99-default_network
  91. 4
      package/base-files/files/etc/device_info
  92. 52
      package/base-files/files/etc/diag.sh
  93. 6
      package/base-files/files/etc/ethers
  94. 1
      package/base-files/files/etc/fstab
  95. 11
      package/base-files/files/etc/group
  96. 5
      package/base-files/files/etc/hosts
  97. 9
      package/base-files/files/etc/hotplug.d/net/00-sysctl
  98. 53
      package/base-files/files/etc/init.d/boot
  99. 17
      package/base-files/files/etc/init.d/done
  100. 66
      package/base-files/files/etc/init.d/gpio_switch

1
.gitattributes

@ -0,0 +1 @@
* -text

32
.gitignore

@ -0,0 +1,32 @@
*.o
.DS_Store
.*.swp
/env
/dl
/.config
/.config.old
/bin
/build_dir
/staging_dir
/tmp
/logs
/feeds
/feeds.conf
/files
/overlay
/package/feeds
/package/openwrt-packages
/*.patch
key-build*
*.orig
*.rej
*~
.#*
*#
.emacs.desktop*
TAGS*~
git-src
.project
.cproject
.ccache
.vscode*

6
BSDmakefile

@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2006 OpenWrt.org
world ${.TARGETS}:
@gmake [email protected]

12
COPYING

@ -0,0 +1,12 @@
OpenWrt is provided under:
SPDX-License-Identifier: GPL-2.0-only
Being under the terms of the GNU General Public License version 2 only,
according with:
LICENSES/GPL-2.0
In addition, other licenses may also apply.
All contributions to OpenWrt are subject to this COPYING file.

32
Config.in

@ -0,0 +1,32 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2006-2013 OpenWrt.org
mainmenu "OpenWrt Configuration"
config MODULES
option modules
bool
default y
config HAVE_DOT_CONFIG
bool
default y
source "target/Config.in"
source "config/Config-images.in"
source "config/Config-build.in"
source "config/Config-devel.in"
source "toolchain/Config.in"
source "target/imagebuilder/Config.in"
source "target/sdk/Config.in"
source "target/toolchain/Config.in"
source "tmp/.config-package.in"

32
LICENSES/BSD-2-Clause

@ -0,0 +1,32 @@
Valid-License-Identifier: BSD-2-Clause
SPDX-URL: https://spdx.org/licenses/BSD-2-Clause.html
Usage-Guide:
To use the BSD 2-clause "Simplified" License put the following SPDX
tag/value pair into a comment according to the placement guidelines in
the licensing rules documentation:
SPDX-License-Identifier: BSD-2-Clause
License-Text:
Copyright (c) <year> <owner> . All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

36
LICENSES/BSD-3-Clause

@ -0,0 +1,36 @@
Valid-License-Identifier: BSD-3-Clause
SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html
Usage-Guide:
To use the BSD 3-clause "New" or "Revised" License put the following SPDX
tag/value pair into a comment according to the placement guidelines in
the licensing rules documentation:
SPDX-License-Identifier: BSD-3-Clause
License-Text:
Copyright (c) <year> <owner> . All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

261
LICENSES/GPL-1.0

@ -0,0 +1,261 @@
Valid-License-Identifier: GPL-1.0-or-later
Valid-License-Identifier: GPL-1.0+
SPDX-URL: https://spdx.org/licenses/GPL-1.0.html
Usage-Guide:
The GNU General Public License (GPL) version 1 should not be used in new
code. For existing kernel code the 'or any later version' option is
required to be compatible with the general license of the project: GPLv2.
To use the license in source code, put the following SPDX tag/value pair
into a comment according to the placement guidelines in the licensing
rules documentation:
SPDX-License-Identifier: GPL-1.0-or-later
License-Text:
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our 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. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, 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 a 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 tell them 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.
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 Agreement 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 work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
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
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual 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 General
Public License.
d) 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.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 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
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying 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.
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.
7. 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 the 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
the license, you may choose any version ever published by the Free Software
Foundation.
8. 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
9. 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.
10. 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
Appendix: 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 humanity, 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) 19yy <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 1, 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., 675 Mass Ave, Cambridge, MA 02139, 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) 19xx 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 a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!

355
LICENSES/GPL-2.0

@ -0,0 +1,355 @@
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.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.

24
LICENSES/ISC

@ -0,0 +1,24 @@
Valid-License-Identifier: ISC
SPDX-URL: https://spdx.org/licenses/ISC.html
Usage-Guide:
To use the ISC License put the following SPDX tag/value pair into a
comment according to the placement guidelines in the licensing rules
documentation:
SPDX-License-Identifier: ISC
License-Text:
ISC License
Copyright (c) <year> <copyright holders>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

25
LICENSES/Linux-syscall-note

@ -0,0 +1,25 @@
SPDX-Exception-Identifier: Linux-syscall-note
SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html
SPDX-Licenses: GPL-2.0-only, GPL-2.0, GPL-2.0-or-later, GPL-2.0+, GPL-1.0-or-later, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+
Usage-Guide:
This exception is used together with one of the above SPDX-Licenses
to mark user space API (uapi) header files so they can be included
into non GPL compliant user space application code.
To use this exception add it with the keyword WITH to one of the
identifiers in the SPDX-Licenses tag:
SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note
License-Text:
NOTE! This copyright does *not* cover user programs that use kernel
services by normal system calls - this is merely considered normal use
of the kernel, and does *not* fall under the heading of "derived work".
Also note that the GPL below is copyrighted by the Free Software
Foundation, but the instance of code that it refers to (the Linux
kernel) is copyrighted by me and others who actually wrote it.
Also note that the only valid version of the GPL as far as the kernel
is concerned is _this_ particular version of the license (ie v2, not
v2.2 or v3.x or whatever), unless explicitly otherwise stated.
Linus Torvalds

30
LICENSES/MIT

@ -0,0 +1,30 @@
Valid-License-Identifier: MIT
SPDX-URL: https://spdx.org/licenses/MIT.html
Usage-Guide:
To use the MIT License put the following SPDX tag/value pair into a
comment according to the placement guidelines in the licensing rules
documentation:
SPDX-License-Identifier: MIT
License-Text:
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

129
Makefile

@ -0,0 +1,129 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2007 OpenWrt.org
TOPDIR:=${CURDIR}
LC_ALL:=C
LANG:=C
TZ:=UTC
export TOPDIR LC_ALL LANG TZ
empty:=
space:= $(empty) $(empty)
$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt directory must not include any spaces))
world:
DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
ifneq ($(OPENWRT_BUILD),1)
_SINGLE=export MAKEFLAGS=$(space);
override OPENWRT_BUILD=1
export OPENWRT_BUILD
GREP_OPTIONS=
export GREP_OPTIONS
CDPATH=
export CDPATH
include $(TOPDIR)/include/debug.mk
include $(TOPDIR)/include/depends.mk
include $(TOPDIR)/include/toplevel.mk
else
include rules.mk
include $(INCLUDE_DIR)/depends.mk
include $(INCLUDE_DIR)/subdir.mk
include target/Makefile
include package/Makefile
include tools/Makefile
include toolchain/Makefile
$(toolchain/stamp-compile): $(tools/stamp-compile)
$(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared
$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
$(package/stamp-install): $(package/stamp-compile)
$(target/stamp-install): $(package/stamp-compile) $(package/stamp-install)
check: $(tools/stamp-check) $(toolchain/stamp-check) $(package/stamp-check)
printdb:
@true
prepare: $(target/stamp-compile)
clean: FORCE
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages
dirclean: clean
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
rm -rf $(TMP_DIR)
$(MAKE) -C $(TOPDIR)/scripts/config clean
cacheclean:
ifneq ($(CONFIG_CCACHE),)
$(STAGING_DIR_HOST)/bin/ccache -C
endif
ifndef DUMP_TARGET_DB
$(BUILD_DIR)/.prepared: Makefile
@mkdir -p $$(dirname [email protected])
@touch [email protected]
tmp/.prereq_packages: .config
unset ERROR; \
for package in $(sort $(prereq-y) $(prereq-m)); do \
$(_SINGLE)$(NO_TRACE_MAKE) -s -r -C package/$$package prereq || ERROR=1; \
done; \
if [ -n "$$ERROR" ]; then \
echo "Package prerequisite check failed."; \
false; \
fi
touch [email protected]
endif
# check prerequisites before starting to build
prereq: $(target/stamp-prereq) tmp/.prereq_packages
@if [ ! -f "$(INCLUDE_DIR)/site/$(ARCH)" ]; then \
echo 'ERROR: Missing site config for architecture "$(ARCH)" !'; \
echo ' The missing file will cause configure scripts to fail during compilation.'; \
echo ' Please provide a "$(INCLUDE_DIR)/site/$(ARCH)" file and restart the build.'; \
exit 1; \
fi
$(BIN_DIR)/profiles.json: FORCE
$(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
WORK_DIR=$(BUILD_DIR)/json_info_files \
$(SCRIPT_DIR)/json_overview_image_info.py [email protected] \
)
json_overview_image_info: $(BIN_DIR)/profiles.json
checksum: FORCE
$(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))
buildversion: FORCE
$(SCRIPT_DIR)/getver.sh > $(BIN_DIR)/version.buildinfo
feedsversion: FORCE
$(SCRIPT_DIR)/feeds list -fs > $(BIN_DIR)/feeds.buildinfo
diffconfig: FORCE
mkdir -p $(BIN_DIR)
$(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.buildinfo
buildinfo: FORCE
$(_SINGLE)$(SUBMAKE) -r diffconfig buildversion feedsversion
prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile)
$(_SINGLE)$(SUBMAKE) -r buildinfo
world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE
$(_SINGLE)$(SUBMAKE) -r package/index
$(_SINGLE)$(SUBMAKE) -r json_overview_image_info
$(_SINGLE)$(SUBMAKE) -r checksum
ifneq ($(CONFIG_CCACHE),)
$(STAGING_DIR_HOST)/bin/ccache -s
endif
.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean
endif

87
README.md

@ -0,0 +1,87 @@
![OpenWrt logo](include/logo.png)
OpenWrt Project is a Linux operating system targeting embedded devices. Instead
of trying to create a single, static firmware, OpenWrt provides a fully
writable filesystem with package management. This frees you from the
application selection and configuration provided by the vendor and allows you
to customize the device through the use of packages to suit any application.
For developers, OpenWrt is the framework to build an application without having
to build a complete firmware around it; for users this means the ability for
full customization, to use the device in ways never envisioned.
Sunshine!
## Development
To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case
sensitive filesystem required). Cygwin is unsupported because of the lack of a
case sensitive file system.
### Requirements
You need the following tools to compile OpenWrt, the package names vary between
distributions. A complete list with distribution specific packages is found in
the [Build System Setup](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem)
documentation.
```
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.6+ rsync subversion unzip which
```
### Quickstart
1. Run `./scripts/feeds update -a` to obtain all the latest package definitions
defined in feeds.conf / feeds.conf.default
2. Run `./scripts/feeds install -a` to install symlinks for all obtained
packages into package/feeds/
3. Run `make menuconfig` to select your preferred configuration for the
toolchain, target system & firmware packages.
4. Run `make` to build your firmware. This will download all sources, build the
cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen
applications for your target system.
### Related Repositories
The main repository uses multiple sub-repositories to manage packages of
different categories. All packages are installed via the OpenWrt package
manager called `opkg`. If you're looking to develop the web interface or port
packages to OpenWrt, please find the fitting repository below.
* [LuCI Web Interface](https://github.com/openwrt/luci): Modern and modular
interface to control the device via a web browser.
* [OpenWrt Packages](https://github.com/openwrt/packages): Community repository
of ported packages.
* [OpenWrt Routing](https://github.com/openwrt/routing): Packages specifically
focused on (mesh) routing.
## Support Information
For a list of supported devices see the [OpenWrt Hardware Database](https://openwrt.org/supported_devices)
### Documentation
* [Quick Start Guide](https://openwrt.org/docs/guide-quick-start/start)
* [User Guide](https://openwrt.org/docs/guide-user/start)
* [Developer Documentation](https://openwrt.org/docs/guide-developer/start)
* [Technical Reference](https://openwrt.org/docs/techref/start)
### Support Community
* [Forum](https://forum.openwrt.org): For usage, projects, discussions and hardware advise.
* [Support Chat](https://webchat.oftc.net/#openwrt): Channel `#openwrt` on **oftc.net**.
### Developer Community
* [Bug Reports](https://bugs.openwrt.org): Report bugs in OpenWrt
* [Dev Mailing List](https://lists.openwrt.org/mailman/listinfo/openwrt-devel): Send patches
* [Dev Chat](https://webchat.oftc.net/#openwrt-devel): Channel `#openwrt-devel` on **oftc.net**.
## License
OpenWrt is licensed under GPL-2.0

389
config/Config-build.in

@ -0,0 +1,389 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2006-2013 OpenWrt.org
# Copyright (C) 2016 LEDE Project
config EXPERIMENTAL
bool "Enable experimental features by default"
default n
help
Set this option to build with latest bleeding edge features
which may or may not work as expected.
If you would like to help the development of OpenWrt, you are
encouraged to set this option and provide feedback (both
positive and negative). But do so only if you know how to
recover your device in case of flashing potentially non-working
firmware.
If you plan to use this build in production, say NO!
menu "Global build settings"
config JSON_OVERVIEW_IMAGE_INFO
bool "Create JSON info file overview per target"
default y
help
Create a JSON info file called profiles.json in the target
directory containing machine readable list of built profiles
and resulting images.
config ALL_NONSHARED
bool "Select all target specific packages by default"
select ALL_KMODS
default BUILDBOT
config ALL_KMODS
bool "Select all kernel module packages by default"
config ALL
bool "Select all userspace packages by default"
select ALL_KMODS
select ALL_NONSHARED
config BUILDBOT
bool "Set build defaults for automatic builds (e.g. via buildbot)"
default n
help
This option changes several defaults to be more suitable for
automatic builds. This includes the following changes:
- Deleting build directories after compiling (to save space)
- Enabling per-device rootfs support
...
config SIGNED_PACKAGES
bool "Cryptographically signed package lists"
default y
config SIGNATURE_CHECK
bool "Enable signature checking in opkg"
default SIGNED_PACKAGES
comment "General build options"
config TESTING_KERNEL
bool "Use the testing kernel version"
depends on HAS_TESTING_KERNEL
default EXPERIMENTAL
help
If the target supports a newer kernel version than the default,
you can use this config option to enable it
config DISPLAY_SUPPORT
bool "Show packages that require graphics support (local or remote)"
default n
config BUILD_PATENTED
default n
bool "Compile with support for patented functionality"
help
When this option is disabled, software which provides patented functionality
will not be built. In case software provides optional support for patented
functionality, this optional support will get disabled for this package.
config BUILD_NLS
default n
bool "Compile with full language support"
help
When this option is enabled, packages are built with the full versions of
iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
used, it is also built with locale support.
config SHADOW_PASSWORDS
bool
default y
config CLEAN_IPKG
bool
prompt "Remove ipkg/opkg status data files in final images"
default n
help
This removes all ipkg/opkg status data files from the target directory
before building the root filesystem.
config IPK_FILES_CHECKSUMS
bool
prompt "Record files checksums in package metadata"
default n
help
This makes file checksums part of package metadata. It increases size
but provides you with pkg_check command to check for flash coruptions.
config INCLUDE_CONFIG
bool "Include build configuration in firmware" if DEVEL
default n
help
If enabled, buildinfo files will be stored in /etc/build.* of firmware.
config REPRODUCIBLE_DEBUG_INFO
bool "Make debug information reproducible"
default BUILDBOT
help
This strips the local build path out of debug information. This has the
advantage of making it reproducible, but the disadvantage of making local
debugging using ./scripts/remote-gdb harder, since the debug data will
no longer point to the full path on the build host.
config COLLECT_KERNEL_DEBUG
bool
prompt "Collect kernel debug information"
select KERNEL_DEBUG_INFO
default BUILDBOT
help
This collects debugging symbols from the kernel and all compiled modules.
Useful for release builds, so that kernel issues can be debugged offline
later.
menu "Kernel build options"
source "config/Config-kernel.in"
endmenu
comment "Package build options"
config DEBUG
bool
prompt "Compile packages with debugging info"
default n
help
Adds -g3 to the CFLAGS.
config IPV6
bool
prompt "Enable IPv6 support in packages"
default y
help
Enables IPv6 support in kernel (builtin) and packages.
comment "Stripping options"
choice
prompt "Binary stripping method"
default USE_STRIP if EXTERNAL_TOOLCHAIN
default USE_STRIP if USE_GLIBC
default USE_SSTRIP
help
Select the binary stripping method you wish to use.
config NO_STRIP
bool "none"
help
This will install unstripped binaries (useful for native
compiling/debugging).
config USE_STRIP
bool "strip"
help
This will install binaries stripped using strip from binutils.
config USE_SSTRIP
bool "sstrip"
depends on !USE_GLIBC
help
This will install binaries stripped using sstrip.
endchoice
config STRIP_ARGS
string
prompt "Strip arguments"
depends on USE_STRIP
default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
default "--strip-all"
help
Specifies arguments passed to the strip command when stripping binaries.
config SSTRIP_ARGS
string
prompt "Sstrip arguments"
depends on USE_SSTRIP
default "-z"
help
Specifies arguments passed to the sstrip command when stripping binaries.
config STRIP_KERNEL_EXPORTS
bool "Strip unnecessary exports from the kernel image"
help
Reduces kernel size by stripping unused kernel exports from the kernel
image. Note that this might make the kernel incompatible with any kernel
modules that were not selected at the time the kernel image was created.
config USE_MKLIBS
bool "Strip unnecessary functions from libraries"
help
Reduces libraries to only those functions that are necessary for using all
selected packages (including those selected as <M>). Note that this will
make the system libraries incompatible with most of the packages that are
not selected during the build process.
choice
prompt "Preferred standard C++ library"
default USE_LIBSTDCXX if USE_GLIBC
default USE_UCLIBCXX
help
Select the preferred standard C++ library for all packages that support this.
config USE_UCLIBCXX
bool "uClibc++"
config USE_LIBSTDCXX
bool "libstdc++"
endchoice
comment "Hardening build options"
config PKG_CHECK_FORMAT_SECURITY
bool
prompt "Enable gcc format-security"
default y
help
Add -Wformat -Werror=format-security to the CFLAGS. You can disable
this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
Makefile.
choice
prompt "User space ASLR PIE compilation"
default PKG_ASLR_PIE_NONE if ((SMALL_FLASH || LOW_MEMORY_FOOTPRINT) && !SDK)
default PKG_ASLR_PIE_REGULAR
help
Add -fPIC to CFLAGS and -specs=hardened-build-ld to LDFLAGS.
This enables package build as Position Independent Executables (PIE)
to protect against "return-to-text" attacks. This belongs to the
feature of Address Space Layout Randomisation (ASLR), which is
implemented by the kernel and the ELF loader by randomising the
location of memory allocations. This makes memory addresses harder
to predict when an attacker is attempting a memory-corruption exploit.
You can disable this per package by adding PKG_ASLR_PIE:=0 in the package
Makefile.
Be ware that ASLR increases the binary size.
config PKG_ASLR_PIE_NONE
bool "None"
help
PIE is deactivated for all applications
config PKG_ASLR_PIE_REGULAR
bool "Regular"
help
PIE is activated for some binaries, mostly network exposed applications
config PKG_ASLR_PIE_ALL
bool "All"
select BUSYBOX_DEFAULT_PIE
help
PIE is activated for all applications
endchoice
choice
prompt "User space Stack-Smashing Protection"
default PKG_CC_STACKPROTECTOR_REGULAR
help
Enable GCC Stack Smashing Protection (SSP) for userspace applications
config PKG_CC_STACKPROTECTOR_NONE
bool "None"
config PKG_CC_STACKPROTECTOR_REGULAR
bool "Regular"
config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong"
endchoice
choice
prompt "Kernel space Stack-Smashing Protection"
default KERNEL_CC_STACKPROTECTOR_REGULAR
help
Enable GCC Stack-Smashing Protection (SSP) for the kernel
config KERNEL_CC_STACKPROTECTOR_NONE
bool "None"
config KERNEL_CC_STACKPROTECTOR_REGULAR
bool "Regular"
config KERNEL_CC_STACKPROTECTOR_STRONG
bool "Strong"
endchoice
config KERNEL_STACKPROTECTOR
bool
default KERNEL_CC_STACKPROTECTOR_REGULAR || KERNEL_CC_STACKPROTECTOR_STRONG
config KERNEL_STACKPROTECTOR_STRONG
bool
default KERNEL_CC_STACKPROTECTOR_STRONG
choice
prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
default PKG_FORTIFY_SOURCE_1
help
Enable the _FORTIFY_SOURCE macro which introduces additional
checks to detect buffer-overflows in the following standard library
functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
checks that shouldn't change the behavior of conforming programs,
while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
added, but some conforming programs might fail.
config PKG_FORTIFY_SOURCE_NONE
bool "None"
config PKG_FORTIFY_SOURCE_1
bool "Conservative"
config PKG_FORTIFY_SOURCE_2
bool "Aggressive"
endchoice
choice
prompt "Enable RELRO protection"
default PKG_RELRO_FULL
help
Enable a link-time protection known as RELRO (Relocation Read Only)
which helps to protect from certain type of exploitation techniques
altering the content of some ELF sections. "Partial" RELRO makes the
.dynamic section not writeable after initialization, introducing
almost no performance penalty, while "full" RELRO also marks the GOT
as read-only at the cost of initializing all of it at startup.
config PKG_RELRO_NONE
bool "None"
config PKG_RELRO_PARTIAL
bool "Partial"
config PKG_RELRO_FULL
bool "Full"
endchoice
config TARGET_ROOTFS_SECURITY_LABELS
bool
select KERNEL_SQUASHFS_XATTR
select KERNEL_EXT4_FS_SECURITY
select KERNEL_F2FS_FS_SECURITY
select KERNEL_UBIFS_FS_SECURITY
select KERNEL_JFFS2_FS_SECURITY
config SELINUX
bool "Enable SELinux"
select KERNEL_SECURITY_SELINUX
select TARGET_ROOTFS_SECURITY_LABELS
select PACKAGE_procd-selinux
select PACKAGE_busybox-selinux
help
This option enables SELinux kernel features, applies security labels
in squashfs rootfs and selects the selinux-variants of busybox and procd.
Selecting this option results in about 0.5MiB of additional flash space
usage accounting for increased kernel and rootfs size.
choice
prompt "default SELinux type"
depends on TARGET_ROOTFS_SECURITY_LABELS
default SELINUXTYPE_dssp
help
Select SELinux policy to be installed and used for applying rootfs labels.
config SELINUXTYPE_targeted
bool "targeted"
select PACKAGE_refpolicy
help
SELinux Reference Policy (refpolicy)
config SELINUXTYPE_dssp
bool "dssp"
select PACKAGE_selinux-policy
help
Defensec SELinux Security Policy -- OpenWrt edition
endchoice
endmenu

138
config/Config-devel.in

@ -0,0 +1,138 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2006-2013 OpenWrt.org
menuconfig DEVEL
bool "Advanced configuration options (for developers)"
default n
config BROKEN
bool "Show broken platforms / packages / devices" if DEVEL
default n
config BINARY_FOLDER
string "Binary folder" if DEVEL
default ""
help
Store built firmware images and filesystem images in this directory.
If not set, uses './bin/$(BOARD)'
config DOWNLOAD_FOLDER
string "Download folder" if DEVEL
default ""
help
Store downloaded source bundles in this directory.
If not set then defaults to './dl', which is removed by operations such as
'git clean -xdf' or 'make distclean'.
This option is useful if you have a low bandwidth Internet connection, and by
setting a path outside the OpenWrt tree downloads will be saved.
config LOCALMIRROR
string "Local mirror for source packages" if DEVEL
default ""
config AUTOREBUILD
bool "Automatic rebuild of packages" if DEVEL
default y
help
Automatically rebuild packages when their files change.
config AUTOREMOVE
bool "Automatic removal of build directories" if DEVEL
default n
help
Automatically delete build directories after make target completed.
This allows you to symlink build_dir into a scratch location, e.g. a ramdisk,
which does not have enough space to keep a complete build_dir.
config BUILD_SUFFIX
string "Build suffix to append to the target BUILD_DIR variable" if DEVEL
default ""
help
Build suffix to append to the BUILD_DIR variable, i.e: './build_dir/{target-build-dir}_$(BUILD_SUFFIX)'.
This allows you to switch to a different .config whilst retaining all the build
objects generated by the first .config
config TARGET_ROOTFS_DIR
string "Override the default TARGET_ROOTFS_DIR variable" if DEVEL
default ""
help
Override the default TARGET_ROOTFS_DIR variable content $(BUILD_DIR) with
custom path. Use this option to re-define the location of the target
root filesystem directory.
config CCACHE
bool "Use ccache" if DEVEL
default n
help
Compiler cache; see https://ccache.samba.org/
config CCACHE_DIR
string "Set ccache directory" if CCACHE
default ""
help
Store ccache in this directory.
If not set, uses './.ccache'
config EXTERNAL_KERNEL_TREE
string "Use external kernel tree" if DEVEL
default ""
config KERNEL_GIT_CLONE_URI
string "Enter git repository to clone" if DEVEL
default ""
help
Enter the full git repository path i.e.:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
This will create a git clone of the kernel in your build directory.
config KERNEL_GIT_LOCAL_REPOSITORY
string "Enter path to local reference repository" if DEVEL
depends on (KERNEL_GIT_CLONE_URI != "")
default ""
help
Enter a full pathname to a local reference git repository.
In this instance, the --reference option of git clone will
be used thus creating a quick local clone of your repo.
config KERNEL_GIT_REF
string "Enter git ref at which to checkout" if DEVEL
depends on (KERNEL_GIT_CLONE_URI != "")
default ""
help
Enter the git ref at which to checkout the git repository
after it is cloned, and before making it a tar-ball.
It can be a git hash or a branch name.
If unused, the clone's repository HEAD will be checked-out.
config KERNEL_GIT_MIRROR_HASH
string "Enter hash of Git kernel tree source checkout tarball" if DEVEL
depends on (KERNEL_GIT_CLONE_URI != "")
default ""
config BUILD_LOG
bool "Enable log files during build process" if DEVEL
help
If enabled, log files will be written to the ./log directory.
config BUILD_LOG_DIR
string "Log folder" if DEVEL
default ""
help
Store build logs in this directory.
If not set, uses './logs'
config SRC_TREE_OVERRIDE
bool "Enable package source tree override" if DEVEL
help
If enabled, you can force a package to use a git tree as source
code instead of the normal tarball. Create a symlink 'git-src'
in the package directory, pointing to the .git tree that you want
to pull the source code from.
config EXTRA_OPTIMIZATION
string "Additional compiler options" if DEVEL
default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc
default "-fno-caller-saves"
help
Extra target-independent optimizations to use when building for the target.

314
config/Config-images.in

@ -0,0 +1,314 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2006-2013 OpenWrt.org
menu "Target Images"
menuconfig TARGET_ROOTFS_INITRAMFS
bool "ramdisk"
default y if USES_INITRAMFS
help
Embed the root filesystem into the kernel (initramfs).
choice
prompt "Compression"
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ath79_mikrotik
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
default TARGET_INITRAMFS_COMPRESSION_NONE
depends on TARGET_ROOTFS_INITRAMFS
help
Select ramdisk compression.
config TARGET_INITRAMFS_COMPRESSION_NONE
bool "none"
config TARGET_INITRAMFS_COMPRESSION_GZIP
bool "gzip"
config TARGET_INITRAMFS_COMPRESSION_BZIP2
bool "bzip2"
config TARGET_INITRAMFS_COMPRESSION_LZMA
bool "lzma"
config TARGET_INITRAMFS_COMPRESSION_LZO
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lzo"
config TARGET_INITRAMFS_COMPRESSION_LZ4
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lz4"
config TARGET_INITRAMFS_COMPRESSION_XZ
bool "xz"
config TARGET_INITRAMFS_COMPRESSION_ZSTD
depends on !LINUX_5_4 && !LINUX_4_19
bool "zstd"
endchoice
config EXTERNAL_CPIO
string
prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
default ""
help
Kernel uses specified external cpio as INITRAMFS_SOURCE.
config TARGET_INITRAMFS_FORCE
bool "Force"
depends on TARGET_ROOTFS_INITRAMFS
default n
help
Ignore the initramfs passed by the bootloader.
config TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "separate ramdisk"
depends on USES_SEPARATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
default y if USES_SEPARATE_INITRAMFS
help
Generate separate initrd.cpio instead of embedding it.
This is useful for generating images with a dedicated
ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
comment "Root filesystem archives"
config TARGET_ROOTFS_CPIOGZ
bool "cpio.gz"
default y if USES_CPIOGZ
help
Build a compressed cpio archive of the root filesystem.
config TARGET_ROOTFS_TARGZ
bool "tar.gz"
default y if USES_TARGZ
help
Build a compressed tar archive of the root filesystem.
comment "Root filesystem images"
menuconfig TARGET_ROOTFS_EXT4FS
bool "ext4"
default y if USES_EXT4
help
Build an ext4 root filesystem.
config TARGET_EXT4_RESERVED_PCT
int "Percentage of reserved blocks in root filesystem"
depends on TARGET_ROOTFS_EXT4FS
default 0
help
Select the percentage of reserved blocks in the root filesystem.
choice
prompt "Root filesystem block size"
default TARGET_EXT4_BLOCKSIZE_4K
depends on TARGET_ROOTFS_EXT4FS
help
Select the block size of the root filesystem.
config TARGET_EXT4_BLOCKSIZE_4K
bool "4k"
config TARGET_EXT4_BLOCKSIZE_2K
bool "2k"
config TARGET_EXT4_BLOCKSIZE_1K
bool "1k"
endchoice
config TARGET_EXT4_BLOCKSIZE
int
default 4096 if TARGET_EXT4_BLOCKSIZE_4K
default 2048 if TARGET_EXT4_BLOCKSIZE_2K
default 1024 if TARGET_EXT4_BLOCKSIZE_1K
depends on TARGET_ROOTFS_EXT4FS
config TARGET_EXT4_JOURNAL
bool "Create a journaling filesystem"
depends on TARGET_ROOTFS_EXT4FS
default n
help
Create an ext4 filesystem with a journal.
config TARGET_ROOTFS_JFFS2
bool "jffs2"
depends on USES_JFFS2
help
Build a JFFS2 root filesystem.
config TARGET_ROOTFS_JFFS2_NAND
bool "jffs2 for NAND"
default y if USES_JFFS2_NAND
depends on USES_JFFS2_NAND
help
Build a JFFS2 root filesystem for NAND flash.
menuconfig TARGET_ROOTFS_SQUASHFS
bool "squashfs"
default y if USES_SQUASHFS
help
Build a squashfs-lzma root filesystem.
config TARGET_SQUASHFS_BLOCK_SIZE
int "Block size (in KiB)"
depends on TARGET_ROOTFS_SQUASHFS
default 64 if LOW_MEMORY_FOOTPRINT
default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
default 256
menuconfig TARGET_ROOTFS_UBIFS
bool "ubifs"
default y if USES_UBIFS
depends on USES_UBIFS
help
Build a UBIFS root filesystem.
choice
prompt "compression"
default TARGET_UBIFS_COMPRESSION_ZLIB
depends on TARGET_ROOTFS_UBIFS
help
Select compression type
config TARGET_UBIFS_COMPRESSION_NONE
bool "none"
config TARGET_UBIFS_COMPRESSION_LZO
bool "lzo"
config TARGET_UBIFS_COMPRESSION_ZLIB
bool "zlib"
endchoice
config TARGET_UBIFS_FREE_SPACE_FIXUP
bool "free space fixup" if TARGET_ROOTFS_UBIFS
default y
help
The filesystem free space has to be fixed up on first mount.
config TARGET_UBIFS_JOURNAL_SIZE
string
prompt "journal size" if TARGET_ROOTFS_UBIFS
default ""
config GRUB_IMAGES
bool "Build GRUB images (Linux x86 or x86_64 host only)"
depends on TARGET_x86
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
select PACKAGE_grub2-bios-setup
default y
config GRUB_EFI_IMAGES
bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
depends on TARGET_x86
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
select PACKAGE_grub2-efi
select PACKAGE_grub2-bios-setup
select PACKAGE_kmod-fs-vfat
default y
config GRUB_CONSOLE
bool "Use Console Terminal (in addition to Serial)"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default y
config GRUB_SERIAL
string "Serial port device"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "ttyS0"
config GRUB_BAUDRATE
int "Serial port baud rate"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default 38400 if TARGET_x86_generic
default 115200
config GRUB_FLOWCONTROL
bool "Use RTE/CTS on serial console"
depends on GRUB_SERIAL != ""
default n
config GRUB_BOOTOPTS
string "Extra kernel boot options"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
help
If you don't know, just leave it blank.
config GRUB_TIMEOUT
string "Seconds to wait before booting the default entry"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "5"
help
If you don't know, 5 seconds is a reasonable default.
config GRUB_TITLE
string "Title for the menu entry in GRUB"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "OpenWrt"
help
This is the title of the GRUB menu entry.
If unspecified, it defaults to OpenWrt.
config ISO_IMAGES
bool "Build LiveCD image (ISO)"
depends on TARGET_x86
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
config VDI_IMAGES
bool "Build VirtualBox image files (VDI)"
depends on TARGET_x86
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
select PACKAGE_kmod-e1000
config VMDK_IMAGES
bool "Build VMware image files (VMDK)"
depends on TARGET_x86
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
select PACKAGE_kmod-e1000
config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
default y
comment "Image Options"
source "target/linux/*/image/Config.in"
config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MiB)"
depends on USES_BOOT_PART
default 8 if TARGET_apm821xx_sata
default 64 if TARGET_bcm27xx
default 16
config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MiB)"
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml
default 104
help
Select the root filesystem partition size.
config TARGET_ROOTFS_PARTNAME
string "Root partition on target device"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
help
Override the root partition on the final device. If left empty,
it will be mounted by PARTUUID which makes the kernel find the
appropriate disk automatically.
config TARGET_ROOTFS_PERSIST_VAR
bool "Make /var persistent"
default n
help
Do not symlink /var to /tmp, so that its content will persist
across reboots. When enabled, /var/run will still be linked
to /tmp/run.
endmenu

1190
config/Config-kernel.in

File diff suppressed because it is too large

10
feeds.conf.default

@ -0,0 +1,10 @@
src-git packages https://www.renew.sh/mirrorhubs/openwrt-packages
src-git luci https://www.renew.sh/yos/luci
src-git routing https://git.openwrt.org/feed/routing.git
src-git telephony https://git.openwrt.org/feed/telephony.git
src-git leanpackages https://www.renew.sh/yos/lean-packages
#src-git helloworld https://github.com/fw876/helloworld
#src-git video https://github.com/openwrt/video.git
#src-git targets https://github.com/openwrt/targets.git
#src-git oldpackages http://git.openwrt.org/packages.git
#src-link custom /usr/src/openwrt/custom-feed

180
include/autotools.mk

@ -0,0 +1,180 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2007-2020 OpenWrt.org
ifneq ($(__autotools_inc),1)
__autotools_inc=1
autoconf_bool = $(patsubst %,$(if $($(1)),--enable,--disable)-%,$(2))
# delete *.la-files from staging_dir - we can not yet remove respective lines within all package
# Makefiles, since backfire still uses libtool v1.5.x which (may) require those files
define libtool_remove_files
find $(1) -name '*.la' | $(XARGS) rm -f;
endef
AM_TOOL_PATHS:= \
AUTOM4TE=$(STAGING_DIR_HOST)/bin/autom4te \
AUTOCONF=$(STAGING_DIR_HOST)/bin/autoconf \
AUTOMAKE=$(STAGING_DIR_HOST)/bin/automake \
ACLOCAL=$(STAGING_DIR_HOST)/bin/aclocal \
AUTOHEADER=$(STAGING_DIR_HOST)/bin/autoheader \
LIBTOOLIZE=$(STAGING_DIR_HOST)/bin/libtoolize \
LIBTOOL=$(STAGING_DIR_HOST)/bin/libtool \
M4=$(STAGING_DIR_HOST)/bin/m4 \
AUTOPOINT=true
# 1: build dir
# 2: remove files
# 3: automake paths
# 4: libtool paths
# 5: extra m4 dirs
define autoreconf
(cd $(1); \
$(patsubst %,rm -f %;,$(2)) \
$(foreach p,$(3), \
if [ -f $(p)/configure.ac ] || [ -f $(p)/configure.in ]; then \
[ -d $(p)/autom4te.cache ] && rm -rf autom4te.cache; \
[ -e $(p)/config.rpath ] || \
ln -s $(SCRIPT_DIR)/config.rpath $(p)/config.rpath; \
touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; \
$(AM_TOOL_PATHS) \
LIBTOOLIZE='$(STAGING_DIR_HOST)/bin/libtoolize --install' \
$(STAGING_DIR_HOST)/bin/autoreconf -v -f -i -s \
$(if $(word 2,$(3)),--no-recursive) \
-B $(STAGING_DIR_HOST)/share/aclocal \
$(patsubst %,-I %,$(5)) \
$(patsubst %,-I %,$(4)) $(p) || true; \
fi; \
) \
);
endef
# 1: build dir
define patch_libtool
@(cd $(1); \
for lt in $$$$($$(STAGING_DIR_HOST)/bin/find . -name ltmain.sh); do \
lt_version="$$$$($$(STAGING_DIR_HOST)/bin/sed -ne 's,^[[:space:]]*VERSION="\?\([0-9]\.[0-9]\+\).*,\1,p' $$$$lt)"; \
case "$$$$lt_version" in \
1.5|2.2|2.4) echo "autotools.mk: Found libtool v$$$$lt_version - applying patch to $$$$lt"; \
(cd $$$$(dirname $$$$lt) && $$(PATCH) -N -s -p1 < $$(TOPDIR)/tools/libtool/files/libtool-v$$$$lt_version.patch || true) ;; \
*) echo "autotools.mk: error: Unsupported libtool version v$$$$lt_version - cannot patch $$$$lt"; exit 1 ;; \
esac; \
done; \
);
endef
define set_libtool_abiver
sed -i \
-e 's,^soname_spec=.*,soname_spec="\\$$$${libname}\\$$$${shared_ext}.$(PKG_ABI_VERSION)",' \
-e 's,^library_names_spec=.*,library_names_spec="\\$$$${libname}\\$$$${shared_ext}.$(PKG_ABI_VERSION) \\$$$${libname}\\$$$${shared_ext}",' \
$(PKG_BUILD_DIR)/libtool
endef
PKG_LIBTOOL_PATHS?=$(CONFIGURE_PATH)
PKG_AUTOMAKE_PATHS?=$(CONFIGURE_PATH)
PKG_MACRO_PATHS?=m4
PKG_REMOVE_FILES?=aclocal.m4
Hooks/InstallDev/Post += libtool_remove_files
define autoreconf_target
$(strip $(call autoreconf, \
$(PKG_BUILD_DIR), $(PKG_REMOVE_FILES), \
$(PKG_AUTOMAKE_PATHS), $(PKG_LIBTOOL_PATHS), \
$(STAGING_DIR)/host/share/aclocal $(STAGING_DIR_HOSTPKG)/share/aclocal $(STAGING_DIR)/usr/share/aclocal $(PKG_MACRO_PATHS)))
endef
define patch_libtool_target
$(strip $(call patch_libtool, \
$(PKG_BUILD_DIR)))
endef
define gettext_version_target
(cd $(PKG_BUILD_DIR) && \
GETTEXT_VERSION=$(shell $(STAGING_DIR_HOSTPKG)/bin/gettext -V | $(STAGING_DIR_HOST)/bin/sed -rne '1s/.*\b([0-9]\.[0-9]+(\.[0-9]+)?)\b.*/\1/p' ) && \
$(STAGING_DIR_HOST)/bin/sed \
-i $(PKG_BUILD_DIR)/configure.ac \
-e "s/AM_GNU_GETTEXT_VERSION(.*)/AM_GNU_GETTEXT_VERSION(\[