mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-04-19 12:57:16 +00:00
initial commit
This commit is contained in:
commit
4db3b5df09
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/output
|
||||
/.auto.deps
|
||||
/.config.cmd
|
||||
/.config.old
|
||||
/..config.tmp
|
||||
/.config
|
||||
/defconfig
|
||||
*.depend
|
||||
*.o
|
||||
/*.patch
|
||||
/*.diff
|
||||
*.orig
|
||||
*.rej
|
||||
*~
|
||||
*.pyc
|
||||
/.download
|
||||
/.buildroot-ccache-*
|
||||
*.img.gz
|
339
COPYING
Normal file
339
COPYING
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, 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 Lesser 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 Street, 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 Lesser General
|
||||
Public License instead of this License.
|
626
Config.in
Normal file
626
Config.in
Normal file
@ -0,0 +1,626 @@
|
||||
#
|
||||
|
||||
mainmenu "Buildroot $BR2_VERSION Configuration"
|
||||
|
||||
config BR2_HAVE_DOT_CONFIG
|
||||
bool
|
||||
default y
|
||||
|
||||
config BR2_VERSION
|
||||
string
|
||||
option env="BR2_VERSION_FULL"
|
||||
|
||||
config BR2_HOSTARCH
|
||||
string
|
||||
option env="HOSTARCH"
|
||||
|
||||
config BR2_EXTERNAL
|
||||
string
|
||||
option env="BR2_EXTERNAL"
|
||||
|
||||
# Hidden boolean selected by packages in need of Java in order to build
|
||||
# (example: xbmc)
|
||||
config BR2_NEEDS_HOST_JAVA
|
||||
bool
|
||||
|
||||
# Hidden boolean selected by packages in need of javac in order to build
|
||||
# (example: classpath)
|
||||
config BR2_NEEDS_HOST_JAVAC
|
||||
bool
|
||||
|
||||
# Hidden boolean selected by packages in need of jar in order to build
|
||||
# (example: classpath)
|
||||
config BR2_NEEDS_HOST_JAR
|
||||
bool
|
||||
|
||||
# Hidden boolean selected by pre-built packages for x86, when they
|
||||
# need to run on x86-64 machines (example: pre-built external
|
||||
# toolchains, binary tools like SAM-BA, etc.).
|
||||
config BR2_HOSTARCH_NEEDS_IA32_LIBS
|
||||
bool
|
||||
|
||||
# Hidden boolean selected by packages that need to build 32 bits
|
||||
# binaries with the host compiler, even on 64 bits build machines (e.g
|
||||
# bootloaders).
|
||||
config BR2_HOSTARCH_NEEDS_IA32_COMPILER
|
||||
bool
|
||||
|
||||
source "arch/Config.in"
|
||||
|
||||
menu "Build options"
|
||||
|
||||
menu "Commands"
|
||||
|
||||
config BR2_WGET
|
||||
string "Wget command"
|
||||
default "wget --passive-ftp -nd -t 3"
|
||||
|
||||
config BR2_SVN
|
||||
string "Subversion (svn) command"
|
||||
default "svn"
|
||||
|
||||
config BR2_BZR
|
||||
string "Bazaar (bzr) command"
|
||||
default "bzr"
|
||||
|
||||
config BR2_GIT
|
||||
string "Git command"
|
||||
default "git"
|
||||
|
||||
config BR2_CVS
|
||||
string "CVS command"
|
||||
default "cvs"
|
||||
|
||||
config BR2_LOCALFILES
|
||||
string "Local files retrieval command"
|
||||
default "cp"
|
||||
|
||||
config BR2_SCP
|
||||
string "Secure copy (scp) command"
|
||||
default "scp"
|
||||
|
||||
config BR2_SSH
|
||||
string "Secure shell (ssh) command"
|
||||
default "ssh"
|
||||
|
||||
config BR2_HG
|
||||
string "Mercurial (hg) command"
|
||||
default "hg"
|
||||
|
||||
config BR2_ZCAT
|
||||
string "zcat command"
|
||||
default "gzip -d -c"
|
||||
help
|
||||
Command to be used to extract a gzip'ed file to stdout.
|
||||
zcat is identical to gunzip -c except that the former may
|
||||
not be available on your system.
|
||||
Default is "gzip -d -c"
|
||||
Other possible values include "gunzip -c" or "zcat".
|
||||
|
||||
config BR2_BZCAT
|
||||
string "bzcat command"
|
||||
default "bzcat"
|
||||
help
|
||||
Command to be used to extract a bzip2'ed file to stdout.
|
||||
bzcat is identical to bunzip2 -c except that the former may
|
||||
not be available on your system.
|
||||
Default is "bzcat"
|
||||
Other possible values include "bunzip2 -c" or "bzip2 -d -c".
|
||||
|
||||
config BR2_XZCAT
|
||||
string "xzcat command"
|
||||
default "xzcat"
|
||||
help
|
||||
Command to be used to extract a xz'ed file to stdout.
|
||||
Default is "xzcat"
|
||||
|
||||
config BR2_TAR_OPTIONS
|
||||
string "Tar options"
|
||||
default ""
|
||||
help
|
||||
Options to pass to tar when extracting the sources.
|
||||
E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files
|
||||
and to be verbose.
|
||||
|
||||
endmenu
|
||||
|
||||
config BR2_DEFCONFIG_FROM_ENV
|
||||
string
|
||||
option env="BR2_DEFCONFIG"
|
||||
|
||||
config BR2_DEFCONFIG
|
||||
string "Location to save buildroot config"
|
||||
default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != ""
|
||||
default "$(CONFIG_DIR)/defconfig"
|
||||
help
|
||||
When running 'make savedefconfig', the defconfig file will be saved
|
||||
in this location.
|
||||
|
||||
config BR2_DL_DIR
|
||||
string "Download dir"
|
||||
default "$(TOPDIR)/dl"
|
||||
help
|
||||
Directory to store all the source files that we need to fetch.
|
||||
If the Linux shell environment has defined the BR2_DL_DIR
|
||||
environment variable, then this overrides this configuration item.
|
||||
|
||||
The default is $(TOPDIR)/dl
|
||||
|
||||
config BR2_HOST_DIR
|
||||
string "Host dir"
|
||||
default "$(BASE_DIR)/host"
|
||||
help
|
||||
Directory to store all the binary files that are built for the host.
|
||||
This includes the cross compilation toolchain when building the
|
||||
internal buildroot toolchain.
|
||||
|
||||
The default is $(BASE_DIR)/host
|
||||
|
||||
menu "Mirrors and Download locations"
|
||||
|
||||
config BR2_PRIMARY_SITE
|
||||
string "Primary download site"
|
||||
default ""
|
||||
help
|
||||
Primary site to download from. If this option is set then buildroot
|
||||
will try to download package source first from this site and try the
|
||||
default if the file is not found.
|
||||
Valid URIs are URIs recognized by $(WGET) and scp URIs of the form
|
||||
scp://[user@]host:path.
|
||||
|
||||
config BR2_PRIMARY_SITE_ONLY
|
||||
bool "Only allow downloads from primary download site"
|
||||
depends on BR2_PRIMARY_SITE != ""
|
||||
help
|
||||
If this option is enabled, downloads will only be attempted
|
||||
from the primary download site. Other locations, like the
|
||||
package's official download location or the backup download
|
||||
site, will not be considered. Therefore, if the package is
|
||||
not present on the primary site, the download fails.
|
||||
|
||||
This is useful for project developers who want to ensure
|
||||
that the project can be built even if the upstream tarball
|
||||
locations disappear.
|
||||
|
||||
if !BR2_PRIMARY_SITE_ONLY
|
||||
|
||||
config BR2_BACKUP_SITE
|
||||
string "Backup download site"
|
||||
default "http://sources.buildroot.net"
|
||||
help
|
||||
Backup site to download from. If this option is set then buildroot
|
||||
will fall back to download package sources from here if the
|
||||
normal location fails.
|
||||
|
||||
config BR2_KERNEL_MIRROR
|
||||
string "Kernel.org mirror"
|
||||
default "https://www.kernel.org/pub"
|
||||
help
|
||||
kernel.org is mirrored on a number of servers around the world.
|
||||
The following allows you to select your preferred mirror.
|
||||
|
||||
Have a look on the kernel.org site for a list of mirrors, then enter
|
||||
the URL to the base directory. Examples:
|
||||
|
||||
http://www.XX.kernel.org/pub (XX = country code)
|
||||
http://mirror.aarnet.edu.au/pub/ftp.kernel.org
|
||||
|
||||
config BR2_GNU_MIRROR
|
||||
string "GNU Software mirror"
|
||||
default "http://ftp.gnu.org/pub/gnu"
|
||||
help
|
||||
GNU has multiple software mirrors scattered around the world.
|
||||
The following allows you to select your preferred mirror.
|
||||
|
||||
Have a look on the gnu.org site for a list of mirrors, then enter
|
||||
the URL to the base directory. Examples:
|
||||
|
||||
http://ftp.gnu.org/pub/gnu
|
||||
http://mirror.aarnet.edu.au/pub/gnu
|
||||
|
||||
config BR2_LUAROCKS_MIRROR
|
||||
string "LuaRocks mirror"
|
||||
default "http://rocks.moonscript.org"
|
||||
help
|
||||
LuaRocks repository.
|
||||
|
||||
See http://luarocks.org
|
||||
|
||||
config BR2_CPAN_MIRROR
|
||||
string "CPAN mirror (Perl packages)"
|
||||
default "http://cpan.metacpan.org"
|
||||
help
|
||||
CPAN (Comprehensive Perl Archive Network) is a repository
|
||||
of Perl packages. It has multiple software mirrors scattered
|
||||
around the world. This option allows you to select a mirror.
|
||||
|
||||
The list of mirrors is available at:
|
||||
http://search.cpan.org/mirror
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
config BR2_JLEVEL
|
||||
int "Number of jobs to run simultaneously (0 for auto)"
|
||||
default "0"
|
||||
help
|
||||
Number of jobs to run simultaneously. If 0, determine
|
||||
automatically according to number of CPUs on the host
|
||||
system.
|
||||
|
||||
config BR2_CCACHE
|
||||
bool "Enable compiler cache"
|
||||
help
|
||||
This option will enable the use of ccache, a compiler
|
||||
cache. It will cache the result of previous builds to speed
|
||||
up future builds. By default, the cache is stored in
|
||||
$HOME/.buildroot-ccache.
|
||||
|
||||
Note that Buildroot does not try to invalidate the cache
|
||||
contents when the compiler changes in an incompatible
|
||||
way. Therefore, if you make a change to the compiler version
|
||||
and/or configuration, you are responsible for purging the
|
||||
ccache cache by removing the $HOME/.buildroot-ccache
|
||||
directory.
|
||||
|
||||
if BR2_CCACHE
|
||||
|
||||
config BR2_CCACHE_DIR
|
||||
string "Compiler cache location"
|
||||
default "$(HOME)/.buildroot-ccache"
|
||||
help
|
||||
Where ccache should store cached files.
|
||||
|
||||
config BR2_CCACHE_INITIAL_SETUP
|
||||
string "Compiler cache initial setup"
|
||||
help
|
||||
Initial ccache settings to apply, such as --max-files or --max-size.
|
||||
|
||||
For example, if your project is known to require more space than the
|
||||
default max cache size, then you might want to increase the cache size
|
||||
to a suitable amount using the -M (--max-size) option.
|
||||
|
||||
The string you specify here is passed verbatim to ccache. Refer to
|
||||
ccache documentation for more details.
|
||||
|
||||
These initial settings are applied after ccache has been compiled.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_DEPRECATED
|
||||
bool "Show options and packages that are deprecated or obsolete"
|
||||
help
|
||||
This option shows outdated/obsolete versions of packages and
|
||||
options that are otherwise hidden.
|
||||
|
||||
if BR2_DEPRECATED
|
||||
|
||||
config BR2_DEPRECATED_SINCE_2014_08
|
||||
bool
|
||||
default y
|
||||
|
||||
config BR2_DEPRECATED_SINCE_2015_02
|
||||
bool
|
||||
default y
|
||||
|
||||
config BR2_DEPRECATED_SINCE_2015_05
|
||||
bool
|
||||
default y
|
||||
|
||||
config BR2_DEPRECATED_SINCE_2015_08
|
||||
bool
|
||||
default y
|
||||
|
||||
endif
|
||||
|
||||
config BR2_ENABLE_DEBUG
|
||||
bool "build packages with debugging symbols"
|
||||
help
|
||||
Build packages with debugging symbols enabled. All libraries
|
||||
and binaries in the 'staging' directory will have debugging
|
||||
symbols, which allows remote debugging even if libraries and
|
||||
binaries are stripped on the target. Whether libraries and
|
||||
binaries are stripped on the target is controlled by the
|
||||
BR2_STRIP_* options below.
|
||||
|
||||
if BR2_ENABLE_DEBUG
|
||||
choice
|
||||
prompt "gcc debug level"
|
||||
default BR2_DEBUG_2
|
||||
help
|
||||
Set the debug level for gcc
|
||||
|
||||
config BR2_DEBUG_1
|
||||
bool "debug level 1"
|
||||
help
|
||||
Debug level 1 produces minimal information, enough
|
||||
for making backtraces in parts of the program that
|
||||
you don't plan to debug. This includes descriptions
|
||||
of functions and external variables, but no information
|
||||
about local variables and no line numbers.
|
||||
|
||||
config BR2_DEBUG_2
|
||||
bool "debug level 2"
|
||||
help
|
||||
The default gcc debug level is 2
|
||||
|
||||
config BR2_DEBUG_3
|
||||
bool "debug level 3"
|
||||
help
|
||||
Level 3 includes extra information, such as all the
|
||||
macro definitions present in the program. Some debuggers
|
||||
support macro expansion when you use -g3.
|
||||
endchoice
|
||||
endif
|
||||
|
||||
choice
|
||||
prompt "strip command for binaries on target"
|
||||
default BR2_STRIP_strip
|
||||
|
||||
config BR2_STRIP_strip
|
||||
bool "strip"
|
||||
depends on !BR2_PACKAGE_HOST_ELF2FLT
|
||||
help
|
||||
Binaries and libraries in the target filesystem will be
|
||||
stripped using the normal 'strip' command. This allows to
|
||||
save space, mainly by removing debugging symbols. Debugging
|
||||
symbols on the target are needed for native debugging, but
|
||||
not when remote debugging is used.
|
||||
|
||||
config BR2_STRIP_none
|
||||
bool "none"
|
||||
help
|
||||
Do not strip binaries and libraries in the target
|
||||
filesystem.
|
||||
endchoice
|
||||
|
||||
config BR2_STRIP_EXCLUDE_FILES
|
||||
string "executables that should not be stripped"
|
||||
depends on !BR2_STRIP_none
|
||||
default ""
|
||||
help
|
||||
You may specify a space-separated list of binaries and libraries
|
||||
here that should not be stripped on the target.
|
||||
|
||||
config BR2_STRIP_EXCLUDE_DIRS
|
||||
string "directories that should be skipped when stripping"
|
||||
depends on !BR2_STRIP_none
|
||||
default ""
|
||||
help
|
||||
You may specify a space-separated list of directories that should
|
||||
be skipped when stripping. Binaries and libraries in these
|
||||
directories will not be touched.
|
||||
The directories should be specified relative to the target directory,
|
||||
without leading slash.
|
||||
|
||||
choice
|
||||
prompt "gcc optimization level"
|
||||
default BR2_OPTIMIZE_S
|
||||
help
|
||||
Set the optimization level for gcc
|
||||
|
||||
config BR2_OPTIMIZE_0
|
||||
bool "optimization level 0"
|
||||
help
|
||||
Do not optimize. This is the default.
|
||||
|
||||
config BR2_OPTIMIZE_1
|
||||
bool "optimization level 1"
|
||||
help
|
||||
Optimize. Optimizing compilation takes somewhat more time,
|
||||
and a lot more memory for a large function. With -O, the
|
||||
compiler tries to reduce code size and execution time,
|
||||
without performing any optimizations that take a great deal
|
||||
of compilation time. -O turns on the following optimization
|
||||
flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability
|
||||
-fcprop-registers -floop-optimize -fif-conversion
|
||||
-fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts
|
||||
-ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename
|
||||
-ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants
|
||||
-O also turns on -fomit-frame-pointer on machines where doing
|
||||
so does not interfere with debugging.
|
||||
|
||||
config BR2_OPTIMIZE_2
|
||||
bool "optimization level 2"
|
||||
help
|
||||
Optimize even more. GCC performs nearly all supported optimizations
|
||||
that do not involve a space-speed tradeoff. The compiler does not
|
||||
perform loop unrolling or function inlining when you specify -O2.
|
||||
As compared to -O, this option increases both compilation time and
|
||||
the performance of the generated code. -O2 turns on all optimization
|
||||
flags specified by -O. It also turns on the following optimization
|
||||
flags: -fthread-jumps -fcrossjumping -foptimize-sibling-calls
|
||||
-fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm
|
||||
-fexpensive-optimizations -fstrength-reduce -frerun-cse-after-loop
|
||||
-frerun-loop-opt -fcaller-saves -fpeephole2 -fschedule-insns
|
||||
-fschedule-insns2 -fsched-interblock -fsched-spec -fregmove
|
||||
-fstrict-aliasing -fdelete-null-pointer-checks -freorder-blocks
|
||||
-freorder-functions -falign-functions -falign-jumps -falign-loops
|
||||
-falign-labels -ftree-vrp -ftree-pre
|
||||
Please note the warning under -fgcse about invoking -O2 on programs
|
||||
that use computed gotos.
|
||||
|
||||
config BR2_OPTIMIZE_3
|
||||
bool "optimization level 3"
|
||||
help
|
||||
Optimize yet more. -O3 turns on all optimizations specified by -O2
|
||||
and also turns on the -finline-functions, -funswitch-loops and
|
||||
-fgcse-after-reload options.
|
||||
|
||||
config BR2_OPTIMIZE_S
|
||||
bool "optimize for size"
|
||||
help
|
||||
Optimize for size. -Os enables all -O2 optimizations that do not
|
||||
typically increase code size. It also performs further optimizations
|
||||
designed to reduce code size. -Os disables the following optimization
|
||||
flags: -falign-functions -falign-jumps -falign-loops -falign-labels
|
||||
-freorder-blocks -freorder-blocks-and-partition -fprefetch-loop-arrays
|
||||
-ftree-vect-loop-version
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_GOOGLE_BREAKPAD_ENABLE
|
||||
bool "Enable google-breakpad support"
|
||||
select BR2_PACKAGE_GOOGLE_BREAKPAD
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
|
||||
help
|
||||
This option will enable the use of google breakpad, a
|
||||
library and tool suite that allows you to distribute an
|
||||
application to users with compiler-provided debugging
|
||||
information removed, record crashes in compact "minidump"
|
||||
files, send them back to your server and produce C and C++
|
||||
stack traces from these minidumps. Breakpad can also write
|
||||
minidumps on request for programs that have not crashed.
|
||||
|
||||
if BR2_GOOGLE_BREAKPAD_ENABLE
|
||||
|
||||
config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES
|
||||
string "List of executables and libraries to extract symbols from"
|
||||
default ""
|
||||
help
|
||||
You may specify a space-separated list of binaries and
|
||||
libraries with full paths relative to $(TARGET_DIR) of which
|
||||
debug symbols will be dumped for further use with google
|
||||
breakpad.
|
||||
|
||||
A directory structure that can be used by minidump-stackwalk
|
||||
will be created at:
|
||||
|
||||
$(STAGING_DIR)/usr/share/google-breakpad-symbols
|
||||
|
||||
endif
|
||||
|
||||
config BR2_ENABLE_SSP
|
||||
bool "build code with Stack Smashing Protection"
|
||||
depends on BR2_TOOLCHAIN_HAS_SSP
|
||||
help
|
||||
Enable stack smashing protection support using GCCs
|
||||
-fstack-protector-all option.
|
||||
|
||||
See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
|
||||
for details.
|
||||
|
||||
Note that this requires the toolchain to have SSP
|
||||
support. This is always the case for glibc and eglibc
|
||||
toolchain, but is optional in uClibc toolchains.
|
||||
|
||||
comment "enabling Stack Smashing Protection requires support in the toolchain"
|
||||
depends on !BR2_TOOLCHAIN_HAS_SSP
|
||||
|
||||
choice
|
||||
bool "libraries"
|
||||
default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED
|
||||
default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED
|
||||
help
|
||||
Select the type of libraries you want to use on the target.
|
||||
|
||||
The default is to build dynamic libraries and use those on
|
||||
the target filesystem, except when the architecture and/or
|
||||
the selected binary format does not support shared
|
||||
libraries.
|
||||
|
||||
config BR2_STATIC_LIBS
|
||||
bool "static only"
|
||||
help
|
||||
Build and use only static libraries. No shared libraries
|
||||
will be instaled on the target. This potentially increases
|
||||
your code size and should only be used if you know what you
|
||||
are doing. Note that some packages may not be available when
|
||||
this option is enabled, due to their need for dynamic
|
||||
library support.
|
||||
|
||||
config BR2_SHARED_LIBS
|
||||
bool "shared only"
|
||||
depends on BR2_BINFMT_SUPPORTS_SHARED
|
||||
help
|
||||
Build and use only shared libraries. This is the recommended
|
||||
solution as it saves space and build time.
|
||||
|
||||
config BR2_SHARED_STATIC_LIBS
|
||||
bool "both static and shared"
|
||||
depends on BR2_BINFMT_SUPPORTS_SHARED
|
||||
help
|
||||
Build both shared and static libraries, but link executables
|
||||
dynamically. While building both shared and static libraries
|
||||
take more time and more disk space, having static libraries
|
||||
may be useful to link some of the applications statically.
|
||||
|
||||
endchoice
|
||||
|
||||
|
||||
config BR2_PACKAGE_OVERRIDE_FILE
|
||||
string "location of a package override file"
|
||||
default "$(CONFIG_DIR)/local.mk"
|
||||
help
|
||||
A package override file is a short makefile that contains
|
||||
variable definitions of the form <pkg>_OVERRIDE_SRCDIR,
|
||||
which allows to tell Buildroot to use an existing directory
|
||||
as the source directory for a particular package. See the
|
||||
Buildroot documentation for more details on this feature.
|
||||
|
||||
config BR2_GLOBAL_PATCH_DIR
|
||||
string "global patch directories"
|
||||
help
|
||||
You may specify a space separated list of one or more directories
|
||||
containing global package patches. For a specific version
|
||||
<packageversion> of a specific package <packagename>, patches are
|
||||
applied as follows:
|
||||
|
||||
First, the default Buildroot patch set for the package is applied
|
||||
from the package's directory in Buildroot.
|
||||
|
||||
Then for every directory - <global-patch-dir> - that exists in
|
||||
BR2_GLOBAL_PATCH_DIR, if the directory
|
||||
<global-patch-dir>/<packagename>/<packageversion>/ exists, then all
|
||||
*.patch files in this directory will be applied.
|
||||
|
||||
Otherwise, if the directory <global-patch-dir>/<packagename> exists,
|
||||
then all *.patch files in the directory will be applied.
|
||||
|
||||
menu "Advanced"
|
||||
|
||||
config BR2_COMPILER_PARANOID_UNSAFE_PATH
|
||||
bool "paranoid check of library/header paths"
|
||||
help
|
||||
By default, when this option is disabled, when the Buildroot
|
||||
cross-compiler will encounter an unsafe library or header
|
||||
path (such as /usr/include, or /usr/lib), the compiler will
|
||||
display a warning.
|
||||
|
||||
By enabling this option, this warning is turned into an
|
||||
error, which will completely abort the build when such
|
||||
unsafe paths are encountered.
|
||||
|
||||
Note that this mechanism is available for both the internal
|
||||
toolchain (through gcc and binutils patches) and external
|
||||
toolchain backends (through the external toolchain wrapper).
|
||||
|
||||
endmenu
|
||||
|
||||
endmenu
|
||||
|
||||
source "toolchain/Config.in"
|
||||
|
||||
source "system/Config.in"
|
||||
|
||||
source "linux/Config.in"
|
||||
|
||||
source "package/Config.in"
|
||||
|
||||
source "fs/Config.in"
|
||||
|
||||
source "boot/Config.in"
|
||||
|
||||
source "package/Config.in.host"
|
||||
|
||||
source "Config.in.legacy"
|
||||
|
||||
menu "User-provided options"
|
||||
depends on BR2_EXTERNAL != "support/dummy-external"
|
||||
|
||||
source "$BR2_EXTERNAL/Config.in"
|
||||
|
||||
endmenu
|
1487
Config.in.legacy
Normal file
1487
Config.in.legacy
Normal file
File diff suppressed because it is too large
Load Diff
951
Makefile
Normal file
951
Makefile
Normal file
@ -0,0 +1,951 @@
|
||||
# Makefile for buildroot
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
# Copyright (C) 2006-2014 by the Buildroot developers <buildroot@uclibc.org>
|
||||
# Copyright (C) 2014 by the Buildroot developers <buildroot@buildroot.org>
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# Just run 'make menuconfig', configure stuff, then run 'make'.
|
||||
# You shouldn't need to mess with anything beyond this point...
|
||||
#--------------------------------------------------------------
|
||||
|
||||
# Trick for always running with a fixed umask
|
||||
UMASK = 0022
|
||||
ifneq ($(shell umask),$(UMASK))
|
||||
.PHONY: _all $(MAKECMDGOALS)
|
||||
|
||||
$(MAKECMDGOALS): _all
|
||||
@:
|
||||
|
||||
_all:
|
||||
@umask $(UMASK) && $(MAKE) --no-print-directory $(MAKECMDGOALS)
|
||||
|
||||
else # umask
|
||||
|
||||
# This is our default rule, so must come first
|
||||
all:
|
||||
|
||||
# Set and export the version string
|
||||
export BR2_VERSION := 2015.08-rc1
|
||||
|
||||
# Save running make version since it's clobbered by the make package
|
||||
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
|
||||
|
||||
# Check for minimal make version (note: this check will break at make 10.x)
|
||||
MIN_MAKE_VERSION = 3.81
|
||||
ifneq ($(firstword $(sort $(RUNNING_MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
|
||||
$(error You have make '$(RUNNING_MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
|
||||
endif
|
||||
|
||||
export HOSTARCH := $(shell uname -m | \
|
||||
sed -e s/i.86/x86/ \
|
||||
-e s/sun4u/sparc64/ \
|
||||
-e s/arm.*/arm/ \
|
||||
-e s/sa110/arm/ \
|
||||
-e s/ppc64/powerpc64/ \
|
||||
-e s/ppc/powerpc/ \
|
||||
-e s/macppc/powerpc/\
|
||||
-e s/sh.*/sh/)
|
||||
|
||||
# Parallel execution of this Makefile is disabled because it changes
|
||||
# the packages building order, that can be a problem for two reasons:
|
||||
# - If a package has an unspecified optional dependency and that
|
||||
# dependency is present when the package is built, it is used,
|
||||
# otherwise it isn't (but compilation happily proceeds) so the end
|
||||
# result will differ if the order is swapped due to parallel
|
||||
# building.
|
||||
# - Also changing the building order can be a problem if two packages
|
||||
# manipulate the same file in the target directory.
|
||||
#
|
||||
# Taking into account the above considerations, if you still want to execute
|
||||
# this top-level Makefile in parallel comment the ".NOTPARALLEL" line and
|
||||
# use the -j<jobs> option when building, e.g:
|
||||
# make -j$((`getconf _NPROCESSORS_ONLN`+1))
|
||||
.NOTPARALLEL:
|
||||
|
||||
# absolute path
|
||||
TOPDIR := $(shell pwd)
|
||||
CONFIG_CONFIG_IN = Config.in
|
||||
CONFIG = support/kconfig
|
||||
DATE := $(shell date +%Y%m%d)
|
||||
|
||||
# Compute the full local version string so packages can use it as-is
|
||||
# Need to export it, so it can be got from environment in children (eg. mconf)
|
||||
export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
|
||||
|
||||
noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
|
||||
defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
|
||||
randpackageconfig allyespackageconfig allnopackageconfig \
|
||||
print-version olddefconfig
|
||||
|
||||
# Some global targets do not trigger a build, but are used to collect
|
||||
# metadata, or do various checks. When such targets are triggered,
|
||||
# some packages should not do their configuration sanity
|
||||
# checks. Provide them a BR_BUILDING variable set to 'y' when we're
|
||||
# actually building and they should do their sanity checks.
|
||||
#
|
||||
# We're building in two situations: when MAKECMDGOALS is empty
|
||||
# (default target is to build), or when MAKECMDGOALS contains
|
||||
# something else than one of the nobuild_targets.
|
||||
nobuild_targets := source source-check \
|
||||
legal-info external-deps _external-deps \
|
||||
clean distclean
|
||||
ifeq ($(MAKECMDGOALS),)
|
||||
BR_BUILDING = y
|
||||
else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
|
||||
BR_BUILDING = y
|
||||
endif
|
||||
|
||||
# Strip quotes and then whitespaces
|
||||
qstrip = $(strip $(subst ",,$(1)))
|
||||
#"))
|
||||
|
||||
# Variables for use in Make constructs
|
||||
comma := ,
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
ifneq ("$(origin O)", "command line")
|
||||
O := output
|
||||
CONFIG_DIR := $(TOPDIR)
|
||||
NEED_WRAPPER =
|
||||
else
|
||||
# other packages might also support Linux-style out of tree builds
|
||||
# with the O=<dir> syntax (E.G. BusyBox does). As make automatically
|
||||
# forwards command line variable definitions those packages get very
|
||||
# confused. Fix this by telling make to not do so
|
||||
MAKEOVERRIDES =
|
||||
# strangely enough O is still passed to submakes with MAKEOVERRIDES
|
||||
# (with make 3.81 atleast), the only thing that changes is the output
|
||||
# of the origin function (command line -> environment).
|
||||
# Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
|
||||
# To really make O go away, we have to override it.
|
||||
override O := $(O)
|
||||
CONFIG_DIR := $(O)
|
||||
# we need to pass O= everywhere we call back into the toplevel makefile
|
||||
EXTRAMAKEARGS = O=$(O)
|
||||
NEED_WRAPPER = y
|
||||
endif
|
||||
|
||||
# bash prints the name of the directory on 'cd <dir>' if CDPATH is
|
||||
# set, so unset it here to not cause problems. Notice that the export
|
||||
# line doesn't affect the environment of $(shell ..) calls, so
|
||||
# explictly throw away any output from 'cd' here.
|
||||
export CDPATH :=
|
||||
BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
|
||||
$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
|
||||
|
||||
|
||||
# Handling of BR2_EXTERNAL.
|
||||
#
|
||||
# The value of BR2_EXTERNAL is stored in .br-external in the output directory.
|
||||
# On subsequent invocations of make, it is read in. It can still be overridden
|
||||
# on the command line, therefore the file is re-created every time make is run.
|
||||
#
|
||||
# When BR2_EXTERNAL is set to an empty value (e.g. explicitly in command
|
||||
# line), the .br-external file is removed and we point to
|
||||
# support/dummy-external. This makes sure we can unconditionally include the
|
||||
# Config.in and external.mk from the BR2_EXTERNAL directory. In this case,
|
||||
# override is necessary so the user can clear BR2_EXTERNAL from the command
|
||||
# line, but the dummy path is still used internally.
|
||||
|
||||
BR2_EXTERNAL_FILE = $(BASE_DIR)/.br-external
|
||||
-include $(BR2_EXTERNAL_FILE)
|
||||
ifeq ($(BR2_EXTERNAL),)
|
||||
override BR2_EXTERNAL = support/dummy-external
|
||||
$(shell rm -f $(BR2_EXTERNAL_FILE))
|
||||
else
|
||||
_BR2_EXTERNAL = $(shell cd $(BR2_EXTERNAL) >/dev/null 2>&1 && pwd)
|
||||
ifeq ($(_BR2_EXTERNAL),)
|
||||
$(error BR2_EXTERNAL='$(BR2_EXTERNAL)' does not exist, relative to $(TOPDIR))
|
||||
endif
|
||||
override BR2_EXTERNAL := $(_BR2_EXTERNAL)
|
||||
$(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE))
|
||||
endif
|
||||
|
||||
# To make sure that the environment variable overrides the .config option,
|
||||
# set this before including .config.
|
||||
ifneq ($(BR2_DL_DIR),)
|
||||
DL_DIR := $(BR2_DL_DIR)
|
||||
endif
|
||||
|
||||
|
||||
# Need that early, before we scan packages
|
||||
# Avoids doing the $(or...) everytime
|
||||
BR_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf)
|
||||
|
||||
BUILD_DIR := $(BASE_DIR)/build
|
||||
BINARIES_DIR := $(BASE_DIR)/images
|
||||
TARGET_DIR := $(BASE_DIR)/target
|
||||
# initial definition so that 'make clean' works for most users, even without
|
||||
# .config. HOST_DIR will be overwritten later when .config is included.
|
||||
HOST_DIR := $(BASE_DIR)/host
|
||||
GRAPHS_DIR := $(BASE_DIR)/graphs
|
||||
|
||||
LEGAL_INFO_DIR = $(BASE_DIR)/legal-info
|
||||
REDIST_SOURCES_DIR_TARGET = $(LEGAL_INFO_DIR)/sources
|
||||
REDIST_SOURCES_DIR_HOST = $(LEGAL_INFO_DIR)/host-sources
|
||||
LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses
|
||||
LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses
|
||||
LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv
|
||||
LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
|
||||
LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt
|
||||
LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt
|
||||
LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
|
||||
LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
|
||||
|
||||
BR2_CONFIG = $(CONFIG_DIR)/.config
|
||||
|
||||
# Pull in the user's configuration file
|
||||
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
|
||||
-include $(BR2_CONFIG)
|
||||
endif
|
||||
|
||||
# To put more focus on warnings, be less verbose as default
|
||||
# Use 'make V=1' to see the full commands
|
||||
ifeq ("$(origin V)", "command line")
|
||||
KBUILD_VERBOSE = $(V)
|
||||
endif
|
||||
ifndef KBUILD_VERBOSE
|
||||
KBUILD_VERBOSE = 0
|
||||
endif
|
||||
|
||||
ifeq ($(KBUILD_VERBOSE),1)
|
||||
quiet =
|
||||
Q =
|
||||
ifndef VERBOSE
|
||||
VERBOSE = 1
|
||||
endif
|
||||
export VERBOSE
|
||||
else
|
||||
quiet = quiet_
|
||||
Q = @
|
||||
endif
|
||||
|
||||
# we want bash as shell
|
||||
SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||
else if [ -x /bin/bash ]; then echo /bin/bash; \
|
||||
else echo sh; fi; fi)
|
||||
|
||||
# kconfig uses CONFIG_SHELL
|
||||
CONFIG_SHELL := $(SHELL)
|
||||
|
||||
export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE
|
||||
|
||||
ifndef HOSTAR
|
||||
HOSTAR := ar
|
||||
endif
|
||||
ifndef HOSTAS
|
||||
HOSTAS := as
|
||||
endif
|
||||
ifndef HOSTCC
|
||||
HOSTCC := gcc
|
||||
HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
|
||||
endif
|
||||
HOSTCC_NOCCACHE := $(HOSTCC)
|
||||
ifndef HOSTCXX
|
||||
HOSTCXX := g++
|
||||
HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
|
||||
endif
|
||||
HOSTCXX_NOCCACHE := $(HOSTCXX)
|
||||
ifndef HOSTCPP
|
||||
HOSTCPP := cpp
|
||||
endif
|
||||
ifndef HOSTLD
|
||||
HOSTLD := ld
|
||||
endif
|
||||
ifndef HOSTLN
|
||||
HOSTLN := ln
|
||||
endif
|
||||
ifndef HOSTNM
|
||||
HOSTNM := nm
|
||||
endif
|
||||
ifndef HOSTOBJCOPY
|
||||
HOSTOBJCOPY := objcopy
|
||||
endif
|
||||
ifndef HOSTRANLIB
|
||||
HOSTRANLIB := ranlib
|
||||
endif
|
||||
HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
|
||||
HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
|
||||
HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
|
||||
HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
|
||||
HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
|
||||
HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
|
||||
HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
|
||||
HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
|
||||
|
||||
export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD
|
||||
export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
|
||||
|
||||
# Make sure pkg-config doesn't look outside the buildroot tree
|
||||
HOST_PKG_CONFIG_PATH := $(PKG_CONFIG_PATH)
|
||||
unexport PKG_CONFIG_PATH
|
||||
unexport PKG_CONFIG_SYSROOT_DIR
|
||||
unexport PKG_CONFIG_LIBDIR
|
||||
|
||||
# Having DESTDIR set in the environment confuses the installation
|
||||
# steps of some packages.
|
||||
unexport DESTDIR
|
||||
|
||||
# Causes breakage with packages that needs host-ruby
|
||||
unexport RUBYOPT
|
||||
|
||||
include package/pkg-utils.mk
|
||||
include package/doc-asciidoc.mk
|
||||
|
||||
ifeq ($(BR2_HAVE_DOT_CONFIG),y)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Hide troublesome environment variables from sub processes
|
||||
#
|
||||
################################################################################
|
||||
unexport CROSS_COMPILE
|
||||
unexport ARCH
|
||||
unexport CC
|
||||
unexport CXX
|
||||
unexport CPP
|
||||
unexport CFLAGS
|
||||
unexport CXXFLAGS
|
||||
unexport GREP_OPTIONS
|
||||
unexport TAR_OPTIONS
|
||||
unexport CONFIG_SITE
|
||||
unexport QMAKESPEC
|
||||
unexport TERMINFO
|
||||
unexport MACHINE
|
||||
unexport O
|
||||
|
||||
GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
|
||||
|
||||
PACKAGES :=
|
||||
|
||||
# silent mode requested?
|
||||
QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)
|
||||
|
||||
# Strip off the annoying quoting
|
||||
ARCH := $(call qstrip,$(BR2_ARCH))
|
||||
|
||||
KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
|
||||
-e s/i.86/i386/ -e s/sun4u/sparc64/ \
|
||||
-e s/arcle/arc/ \
|
||||
-e s/arceb/arc/ \
|
||||
-e s/arm.*/arm/ -e s/sa110/arm/ \
|
||||
-e s/aarch64.*/arm64/ \
|
||||
-e s/bfin/blackfin/ \
|
||||
-e s/parisc64/parisc/ \
|
||||
-e s/powerpc64.*/powerpc/ \
|
||||
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
|
||||
-e s/sh.*/sh/ \
|
||||
-e s/microblazeel/microblaze/)
|
||||
|
||||
ZCAT := $(call qstrip,$(BR2_ZCAT))
|
||||
BZCAT := $(call qstrip,$(BR2_BZCAT))
|
||||
XZCAT := $(call qstrip,$(BR2_XZCAT))
|
||||
TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
|
||||
|
||||
# packages compiled for the host go here
|
||||
HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))
|
||||
|
||||
# Quotes are needed for spaces and all in the original PATH content.
|
||||
BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"
|
||||
|
||||
# Location of a file giving a big fat warning that output/target
|
||||
# should not be used as the root filesystem.
|
||||
TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
|
||||
|
||||
ifeq ($(BR2_CCACHE),y)
|
||||
CCACHE := $(HOST_DIR)/usr/bin/ccache
|
||||
BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
|
||||
export BR_CACHE_DIR
|
||||
HOSTCC := $(CCACHE) $(HOSTCC)
|
||||
HOSTCXX := $(CCACHE) $(HOSTCXX)
|
||||
endif
|
||||
|
||||
# Scripts in support/ or post-build scripts may need to reference
|
||||
# these locations, so export them so it is easier to use
|
||||
export BR2_CONFIG
|
||||
export TARGET_DIR
|
||||
export STAGING_DIR
|
||||
export HOST_DIR
|
||||
export BINARIES_DIR
|
||||
export BASE_DIR
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# You should probably leave this stuff alone unless you know
|
||||
# what you are doing.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
all: world
|
||||
|
||||
# Include legacy before the other things, because package .mk files
|
||||
# may rely on it.
|
||||
ifneq ($(BR2_DEPRECATED),y)
|
||||
include Makefile.legacy
|
||||
endif
|
||||
|
||||
include package/Makefile.in
|
||||
include support/dependencies/dependencies.mk
|
||||
|
||||
include toolchain/*.mk
|
||||
include toolchain/*/*.mk
|
||||
|
||||
# Include the package override file if one has been provided in the
|
||||
# configuration.
|
||||
PACKAGE_OVERRIDE_FILE = $(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE))
|
||||
ifneq ($(PACKAGE_OVERRIDE_FILE),)
|
||||
-include $(PACKAGE_OVERRIDE_FILE)
|
||||
endif
|
||||
|
||||
include $(sort $(wildcard package/*/*.mk))
|
||||
|
||||
include boot/common.mk
|
||||
include linux/linux.mk
|
||||
include fs/common.mk
|
||||
|
||||
include $(BR2_EXTERNAL)/external.mk
|
||||
|
||||
dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
|
||||
$(HOST_DIR) $(BINARIES_DIR)
|
||||
|
||||
$(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
|
||||
$(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
|
||||
|
||||
prepare: $(BUILD_DIR)/buildroot-config/auto.conf
|
||||
|
||||
world: target-post-image
|
||||
|
||||
.PHONY: all world toolchain dirs clean distclean source outputmakefile \
|
||||
legal-info legal-info-prepare legal-info-clean printvars help \
|
||||
list-defconfigs target-finalize target-post-image source-check
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# staging and target directories do NOT list these as
|
||||
# dependencies anywhere else
|
||||
#
|
||||
################################################################################
|
||||
$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
|
||||
@mkdir -p $@
|
||||
|
||||
# We make a symlink lib32->lib or lib64->lib as appropriate
|
||||
# MIPS64/n32 requires lib32 even though it's a 64-bit arch.
|
||||
ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y)
|
||||
LIB_SYMLINK = lib64
|
||||
else
|
||||
LIB_SYMLINK = lib32
|
||||
endif
|
||||
|
||||
$(STAGING_DIR):
|
||||
@mkdir -p $(STAGING_DIR)/bin
|
||||
@mkdir -p $(STAGING_DIR)/lib
|
||||
@ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
|
||||
@mkdir -p $(STAGING_DIR)/usr/lib
|
||||
@ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
|
||||
@mkdir -p $(STAGING_DIR)/usr/include
|
||||
@mkdir -p $(STAGING_DIR)/usr/bin
|
||||
@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
|
||||
|
||||
RSYNC_VCS_EXCLUSIONS = \
|
||||
--exclude .svn --exclude .git --exclude .hg --exclude .bzr \
|
||||
--exclude CVS
|
||||
|
||||
STRIP_FIND_CMD = find $(TARGET_DIR)
|
||||
ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
|
||||
STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
|
||||
endif
|
||||
STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \)
|
||||
# file exclusions:
|
||||
# - libpthread.so: a non-stripped libpthread shared library is needed for
|
||||
# proper debugging of pthread programs using gdb.
|
||||
# - kernel modules (*.ko): do not function properly when stripped like normal
|
||||
# applications and libraries. Normally kernel modules are already excluded
|
||||
# by the executable permission check above, so the explicit exclusion is only
|
||||
# done for kernel modules with incorrect permissions.
|
||||
STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* *.ko $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print0
|
||||
|
||||
ifeq ($(BR2_ECLIPSE_REGISTER),y)
|
||||
define TOOLCHAIN_ECLIPSE_REGISTER
|
||||
./support/scripts/eclipse-register-toolchain `readlink -f $(O)` \
|
||||
$(notdir $(TARGET_CROSS)) $(BR2_ARCH)
|
||||
endef
|
||||
TARGET_FINALIZE_HOOKS += TOOLCHAIN_ECLIPSE_REGISTER
|
||||
endif
|
||||
|
||||
# Generate locale data. Basically, we call the localedef program
|
||||
# (built by the host-localedef package) for each locale. The input
|
||||
# data comes preferably from the toolchain, or if the toolchain does
|
||||
# not have them (Linaro toolchains), we use the ones available on the
|
||||
# host machine.
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
||||
GLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE))
|
||||
ifneq ($(GLIBC_GENERATE_LOCALES),)
|
||||
PACKAGES += host-localedef
|
||||
|
||||
define GENERATE_GLIBC_LOCALES
|
||||
$(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
|
||||
$(Q)for locale in $(GLIBC_GENERATE_LOCALES) ; do \
|
||||
inputfile=`echo $${locale} | cut -f1 -d'.'` ; \
|
||||
charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
|
||||
if test -z "$${charmap}" ; then \
|
||||
charmap="UTF-8" ; \
|
||||
fi ; \
|
||||
echo "Generating locale $${inputfile}.$${charmap}" ; \
|
||||
I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
|
||||
$(HOST_DIR)/usr/bin/localedef \
|
||||
--prefix=$(TARGET_DIR) \
|
||||
--$(call LOWERCASE,$(BR2_ENDIAN))-endian \
|
||||
-i $${inputfile} -f $${charmap} \
|
||||
$${locale} ; \
|
||||
done
|
||||
endef
|
||||
TARGET_FINALIZE_HOOKS += GENERATE_GLIBC_LOCALES
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
|
||||
LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
|
||||
LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
|
||||
|
||||
# This piece of junk does the following:
|
||||
# First collect the whitelist in a file.
|
||||
# Then go over all the locale dirs and for each subdir, check if it exists
|
||||
# in the whitelist file. If it doesn't, kill it.
|
||||
# Finally, specifically for X11, regenerate locale.dir from the whitelist.
|
||||
define PURGE_LOCALES
|
||||
rm -f $(LOCALE_WHITELIST)
|
||||
for i in $(LOCALE_NOPURGE) locale-archive; do echo $$i >> $(LOCALE_WHITELIST); done
|
||||
|
||||
for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/lib/locale)); \
|
||||
do \
|
||||
for langdir in $$dir/*; \
|
||||
do \
|
||||
grep -qx $${langdir##*/} $(LOCALE_WHITELIST) || rm -rf $$langdir; \
|
||||
done; \
|
||||
done
|
||||
if [ -d $(TARGET_DIR)/usr/share/X11/locale ]; \
|
||||
then \
|
||||
for lang in $(LOCALE_NOPURGE); \
|
||||
do \
|
||||
if [ -f $(TARGET_DIR)/usr/share/X11/locale/$$lang/XLC_LOCALE ]; \
|
||||
then \
|
||||
echo "$$lang/XLC_LOCALE: $$lang"; \
|
||||
fi \
|
||||
done > $(TARGET_DIR)/usr/share/X11/locale/locale.dir; \
|
||||
fi
|
||||
endef
|
||||
TARGET_FINALIZE_HOOKS += PURGE_LOCALES
|
||||
endif
|
||||
|
||||
$(TARGETS_ROOTFS): target-finalize
|
||||
|
||||
target-finalize: $(PACKAGES)
|
||||
@$(call MESSAGE,"Finalizing target directory")
|
||||
$(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
|
||||
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
|
||||
$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
|
||||
$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
|
||||
find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
|
||||
find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
|
||||
find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
|
||||
ifneq ($(BR2_PACKAGE_GDB),y)
|
||||
rm -rf $(TARGET_DIR)/usr/share/gdb
|
||||
endif
|
||||
ifneq ($(BR2_PACKAGE_BASH),y)
|
||||
rm -rf $(TARGET_DIR)/usr/share/bash-completion
|
||||
endif
|
||||
ifneq ($(BR2_PACKAGE_ZSH),y)
|
||||
rm -rf $(TARGET_DIR)/usr/share/zsh
|
||||
endif
|
||||
rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
|
||||
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
|
||||
rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
|
||||
rm -rf $(TARGET_DIR)/usr/share/gtk-doc
|
||||
-rmdir $(TARGET_DIR)/usr/share 2>/dev/null
|
||||
$(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true
|
||||
if test -d $(TARGET_DIR)/lib/modules; then \
|
||||
find $(TARGET_DIR)/lib/modules -type f -name '*.ko' -print0 | \
|
||||
xargs -0 -r $(KSTRIPCMD); fi
|
||||
|
||||
# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads
|
||||
# besides the one in which crash occurred; or SIGTRAP kills my program when
|
||||
# I set a breakpoint"
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \
|
||||
xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG)
|
||||
endif
|
||||
|
||||
mkdir -p $(TARGET_DIR)/etc
|
||||
# Mandatory configuration file and auxiliary cache directory
|
||||
# for recent versions of ldconfig
|
||||
touch $(TARGET_DIR)/etc/ld.so.conf
|
||||
mkdir -p $(TARGET_DIR)/var/cache/ldconfig
|
||||
if [ -x "$(TARGET_CROSS)ldconfig" ]; \
|
||||
then \
|
||||
$(TARGET_CROSS)ldconfig -r $(TARGET_DIR) \
|
||||
-f $(TARGET_DIR)/etc/ld.so.conf; \
|
||||
else \
|
||||
/sbin/ldconfig -r $(TARGET_DIR) \
|
||||
-f $(TARGET_DIR)/etc/ld.so.conf; \
|
||||
fi
|
||||
( \
|
||||
echo "NAME=Buildroot"; \
|
||||
echo "VERSION=$(BR2_VERSION_FULL)"; \
|
||||
echo "ID=buildroot"; \
|
||||
echo "VERSION_ID=$(BR2_VERSION)"; \
|
||||
echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
|
||||
) > $(TARGET_DIR)/etc/os-release
|
||||
|
||||
@$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
|
||||
$(call MESSAGE,"Copying overlay $(d)"); \
|
||||
rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
|
||||
--chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
|
||||
$(d)/ $(TARGET_DIR)$(sep))
|
||||
|
||||
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
|
||||
$(call MESSAGE,"Executing post-build script $(s)"); \
|
||||
$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
|
||||
|
||||
target-post-image: $(TARGETS_ROOTFS) target-finalize
|
||||
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
|
||||
$(call MESSAGE,"Executing post-image script $(s)"); \
|
||||
$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
|
||||
|
||||
source: $(foreach p,$(PACKAGES),$(p)-all-source)
|
||||
|
||||
_external-deps: $(foreach p,$(PACKAGES),$(p)-all-external-deps)
|
||||
external-deps:
|
||||
@$(MAKE1) -Bs $(EXTRAMAKEARGS) _external-deps | sort -u
|
||||
|
||||
# check if download URLs are outdated
|
||||
source-check: $(foreach p,$(PACKAGES),$(p)-all-source-check)
|
||||
|
||||
legal-info-clean:
|
||||
@rm -fr $(LEGAL_INFO_DIR)
|
||||
|
||||
legal-info-prepare: $(LEGAL_INFO_DIR)
|
||||
@$(call MESSAGE,"Collecting legal info")
|
||||
@$(call legal-license-file,buildroot,COPYING,COPYING,HOST)
|
||||
@$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,TARGET)
|
||||
@$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,HOST)
|
||||
@$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,not saved,HOST)
|
||||
@$(call legal-warning,the Buildroot source code has not been saved)
|
||||
@$(call legal-warning,the toolchain has not been saved)
|
||||
@cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
|
||||
|
||||
legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \
|
||||
$(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
|
||||
@cat support/legal-info/README.header >>$(LEGAL_REPORT)
|
||||
@if [ -r $(LEGAL_WARNINGS) ]; then \
|
||||
cat support/legal-info/README.warnings-header \
|
||||
$(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \
|
||||
cat $(LEGAL_WARNINGS); fi
|
||||
@echo "Legal info produced in $(LEGAL_INFO_DIR)"
|
||||
@rm -f $(LEGAL_WARNINGS)
|
||||
|
||||
show-targets:
|
||||
@echo $(PACKAGES) $(TARGETS_ROOTFS)
|
||||
|
||||
graph-build: $(O)/build/build-time.log
|
||||
@install -d $(GRAPHS_DIR)
|
||||
$(foreach o,name build duration,./support/scripts/graph-build-time \
|
||||
--type=histogram --order=$(o) --input=$(<) \
|
||||
--output=$(GRAPHS_DIR)/build.hist-$(o).$(BR_GRAPH_OUT) \
|
||||
$(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep))
|
||||
$(foreach t,packages steps,./support/scripts/graph-build-time \
|
||||
--type=pie-$(t) --input=$(<) \
|
||||
--output=$(GRAPHS_DIR)/build.pie-$(t).$(BR_GRAPH_OUT) \
|
||||
$(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep))
|
||||
|
||||
graph-depends-requirements:
|
||||
@dot -? >/dev/null 2>&1 || \
|
||||
{ echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1; }
|
||||
|
||||
graph-depends: graph-depends-requirements
|
||||
@$(INSTALL) -d $(GRAPHS_DIR)
|
||||
@cd "$(CONFIG_DIR)"; \
|
||||
$(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \
|
||||
|tee $(GRAPHS_DIR)/$(@).dot \
|
||||
|dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT)
|
||||
|
||||
else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
|
||||
|
||||
all: menuconfig
|
||||
|
||||
endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
|
||||
|
||||
# configuration
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
HOSTCFLAGS = $(CFLAGS_FOR_BUILD)
|
||||
export HOSTCFLAGS
|
||||
|
||||
$(BUILD_DIR)/buildroot-config/%onf:
|
||||
mkdir -p $(@D)/lxdialog
|
||||
PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)" $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \
|
||||
obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
|
||||
|
||||
DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG))
|
||||
|
||||
# We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will
|
||||
# recognize that if it's still at its default $(CONFIG_DIR)/defconfig
|
||||
COMMON_CONFIG_ENV = \
|
||||
BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \
|
||||
KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
||||
KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
|
||||
BR2_CONFIG=$(BR2_CONFIG) \
|
||||
BR2_EXTERNAL=$(BR2_EXTERNAL) \
|
||||
SKIP_LEGACY=
|
||||
|
||||
xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
|
||||
|
||||
gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN)
|
||||
|
||||
menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
|
||||
|
||||
nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
|
||||
|
||||
config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
|
||||
|
||||
# For the config targets that automatically select options, we pass
|
||||
# SKIP_LEGACY=y to disable the legacy options. However, in that case
|
||||
# no values are set for the legacy options so a subsequent oldconfig
|
||||
# will query them. Therefore, run an additional olddefconfig.
|
||||
|
||||
oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
|
||||
|
||||
randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --randconfig $(CONFIG_CONFIG_IN)
|
||||
@$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
|
||||
|
||||
allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --allyesconfig $(CONFIG_CONFIG_IN)
|
||||
@$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
|
||||
|
||||
allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --allnoconfig $(CONFIG_CONFIG_IN)
|
||||
@$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
|
||||
|
||||
randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
|
||||
@$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \
|
||||
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
||||
$< --randconfig $(CONFIG_CONFIG_IN)
|
||||
@rm -f $(CONFIG_DIR)/.config.nopkg
|
||||
@$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
|
||||
|
||||
allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
|
||||
@$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \
|
||||
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
||||
$< --allyesconfig $(CONFIG_CONFIG_IN)
|
||||
@rm -f $(CONFIG_DIR)/.config.nopkg
|
||||
@$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
|
||||
|
||||
allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
|
||||
@$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \
|
||||
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
||||
$< --allnoconfig $(CONFIG_CONFIG_IN)
|
||||
@rm -f $(CONFIG_DIR)/.config.nopkg
|
||||
@$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
|
||||
|
||||
silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
$(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
|
||||
|
||||
olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN)
|
||||
|
||||
defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
|
||||
|
||||
# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig
|
||||
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(TOPDIR)/configs/$@ \
|
||||
$< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
|
||||
|
||||
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(BR2_EXTERNAL)/configs/$@ \
|
||||
$< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
|
||||
|
||||
savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< \
|
||||
--savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
|
||||
$(CONFIG_CONFIG_IN)
|
||||
@$(SED) '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)
|
||||
|
||||
.PHONY: defconfig savedefconfig
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Cleanup and misc junk
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# outputmakefile generates a Makefile in the output directory, if using a
|
||||
# separate output directory. This allows convenient use of make in the
|
||||
# output directory.
|
||||
outputmakefile:
|
||||
ifeq ($(NEED_WRAPPER),y)
|
||||
$(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
|
||||
endif
|
||||
|
||||
# printvars prints all the variables currently defined in our Makefiles
|
||||
printvars:
|
||||
@$(foreach V, \
|
||||
$(sort $(.VARIABLES)), \
|
||||
$(if $(filter-out environment% default automatic, \
|
||||
$(origin $V)), \
|
||||
$(info $V=$($V) ($(value $V)))))
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
|
||||
$(BUILD_DIR) $(BASE_DIR)/staging \
|
||||
$(LEGAL_INFO_DIR) $(GRAPHS_DIR)
|
||||
|
||||
distclean: clean
|
||||
ifeq ($(DL_DIR),$(TOPDIR)/dl)
|
||||
rm -rf $(DL_DIR)
|
||||
endif
|
||||
ifeq ($(O),output)
|
||||
rm -rf $(O)
|
||||
endif
|
||||
rm -rf $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \
|
||||
$(CONFIG_DIR)/.auto.deps
|
||||
|
||||
help:
|
||||
@echo 'Cleaning:'
|
||||
@echo ' clean - delete all files created by build'
|
||||
@echo ' distclean - delete all non-source files (including .config)'
|
||||
@echo
|
||||
@echo 'Build:'
|
||||
@echo ' all - make world'
|
||||
@echo ' toolchain - build toolchain'
|
||||
@echo
|
||||
@echo 'Configuration:'
|
||||
@echo ' menuconfig - interactive curses-based configurator'
|
||||
@echo ' nconfig - interactive ncurses-based configurator'
|
||||
@echo ' xconfig - interactive Qt-based configurator'
|
||||
@echo ' gconfig - interactive GTK-based configurator'
|
||||
@echo ' oldconfig - resolve any unresolved symbols in .config'
|
||||
@echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
|
||||
@echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
|
||||
@echo ' randconfig - New config with random answer to all options'
|
||||
@echo ' defconfig - New config with default answer to all options'
|
||||
@echo ' BR2_DEFCONFIG, if set, is used as input'
|
||||
@echo ' savedefconfig - Save current config to BR2_DEFCONFIG (minimal config)'
|
||||
@echo ' allyesconfig - New config where all options are accepted with yes'
|
||||
@echo ' allnoconfig - New config where all options are answered with no'
|
||||
@echo ' randpackageconfig - New config with random answer to package options'
|
||||
@echo ' allyespackageconfig - New config where pkg options are accepted with yes'
|
||||
@echo ' allnopackageconfig - New config where package options are answered with no'
|
||||
@echo
|
||||
@echo 'Package-specific:'
|
||||
@echo ' <pkg> - Build and install <pkg> and all its dependencies'
|
||||
@echo ' <pkg>-source - Only download the source files for <pkg>'
|
||||
@echo ' <pkg>-extract - Extract <pkg> sources'
|
||||
@echo ' <pkg>-patch - Apply patches to <pkg>'
|
||||
@echo ' <pkg>-depends - Build <pkg>'\''s dependencies'
|
||||
@echo ' <pkg>-configure - Build <pkg> up to the configure step'
|
||||
@echo ' <pkg>-build - Build <pkg> up to the build step'
|
||||
@echo ' <pkg>-graph-depends - Generate a graph of <pkg>'\''s dependencies'
|
||||
@echo ' <pkg>-dirclean - Remove <pkg> build directory'
|
||||
@echo ' <pkg>-reconfigure - Restart the build from the configure step'
|
||||
@echo ' <pkg>-rebuild - Restart the build from the build step'
|
||||
@echo ' <pkg>-legal-info - Generate license information for <pkg>'
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
||||
@echo ' busybox-menuconfig - Run BusyBox menuconfig'
|
||||
endif
|
||||
ifeq ($(BR2_LINUX_KERNEL),y)
|
||||
@echo ' linux-menuconfig - Run Linux kernel menuconfig'
|
||||
@echo ' linux-savedefconfig - Run Linux kernel savedefconfig'
|
||||
@echo ' linux-update-defconfig - Save the Linux configuration to the path specified'
|
||||
@echo ' by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE'
|
||||
endif
|
||||
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
|
||||
@echo ' uclibc-menuconfig - Run uClibc menuconfig'
|
||||
endif
|
||||
ifeq ($(BR2_TARGET_BAREBOX),y)
|
||||
@echo ' barebox-menuconfig - Run barebox menuconfig'
|
||||
@echo ' barebox-savedefconfig - Run barebox savedefconfig'
|
||||
endif
|
||||
@echo
|
||||
@echo 'Documentation:'
|
||||
@echo ' manual - build manual in all formats'
|
||||
@echo ' manual-html - build manual in HTML'
|
||||
@echo ' manual-split-html - build manual in split HTML'
|
||||
@echo ' manual-pdf - build manual in PDF'
|
||||
@echo ' manual-text - build manual in text'
|
||||
@echo ' manual-epub - build manual in ePub'
|
||||
@echo ' graph-build - generate graphs of the build times'
|
||||
@echo ' graph-depends - generate graph of the dependency tree'
|
||||
@echo ' list-defconfigs - list all defconfigs (pre-configured minimal systems)'
|
||||
@echo
|
||||
@echo 'Miscellaneous:'
|
||||
@echo ' source - download all sources needed for offline-build'
|
||||
@echo ' source-check - check selected packages for valid download URLs'
|
||||
@echo ' external-deps - list external packages used'
|
||||
@echo ' legal-info - generate info about license compliance'
|
||||
@echo
|
||||
@echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build'
|
||||
@echo ' make O=dir - Locate all output files in "dir", including .config'
|
||||
@echo
|
||||
@echo 'For further details, see README, generate the Buildroot manual, or consult'
|
||||
@echo 'it on-line at http://buildroot.org/docs.html'
|
||||
@echo
|
||||
|
||||
list-defconfigs:
|
||||
@echo 'Built-in configs:'
|
||||
@$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \
|
||||
printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
|
||||
ifneq ($(wildcard $(BR2_EXTERNAL)/configs/*_defconfig),)
|
||||
@echo
|
||||
@echo 'User-provided configs:'
|
||||
@$(foreach b, $(sort $(notdir $(wildcard $(BR2_EXTERNAL)/configs/*_defconfig))), \
|
||||
printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
|
||||
endif
|
||||
@echo
|
||||
|
||||
release: OUT = buildroot-$(BR2_VERSION)
|
||||
|
||||
# Create release tarballs. We need to fiddle a bit to add the generated
|
||||
# documentation to the git output
|
||||
release:
|
||||
git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
|
||||
$(MAKE) O=$(OUT) manual-html manual-text manual-pdf
|
||||
$(MAKE) O=$(OUT) manual-clean
|
||||
tar rf $(OUT).tar $(OUT)
|
||||
gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
|
||||
bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
|
||||
rm -rf $(OUT) $(OUT).tar
|
||||
|
||||
print-version:
|
||||
@echo $(BR2_VERSION_FULL)
|
||||
|
||||
.PHONY: $(noconfig_targets)
|
||||
|
||||
endif #umask
|
62
Makefile.legacy
Normal file
62
Makefile.legacy
Normal file
@ -0,0 +1,62 @@
|
||||
#
|
||||
# Makefile.legacy - support for backward compatibility
|
||||
#
|
||||
# This file contains placeholders to detect backward-compatibility problems.
|
||||
# When a buildroot "API" feature is being deprecated, a rule should be added
|
||||
# here that issues an error when the old feature is used.
|
||||
#
|
||||
# This file is not included if BR2_DEPRECATED is selected, so it is possible
|
||||
# to bypass the errors (although that's usually a bad idea).
|
||||
|
||||
ifeq ($(BR2_LEGACY),y)
|
||||
$(error "You have legacy configuration in your .config! Please check your configuration.")
|
||||
endif
|
||||
|
||||
#
|
||||
# Legacy options from 2014.02
|
||||
#
|
||||
|
||||
# The BUILDROOT_DL_DIR environment variable was renamed by BR2_DL_DIR. We
|
||||
# want to detect someone using the old variable, _except_ if also the new
|
||||
# variable was set. By the time we get here, however, we no longer have
|
||||
# access to the BR2_DL_DIR environment variable (because it has been overridden
|
||||
# by the .config inclusion). However, the environment variable (if defined) was
|
||||
# saved in DL_DIR, so we can use that.
|
||||
ifneq ($(BUILDROOT_DL_DIR),)
|
||||
ifneq ($(BUILDROOT_DL_DIR),$(DL_DIR))
|
||||
$(error "The BUILDROOT_DL_DIR environment variable was renamed to BR2_DL_DIR.")
|
||||
endif
|
||||
endif
|
||||
|
||||
# If a script is using the deprecated BUILDROOT_CONFIG, make sure it fails.
|
||||
# Add some directories in front just in case someone used dirname on it.
|
||||
BUILDROOT_CONFIG_FAKE = /tmp/deprecated/The-BUILDROOT_CONFIG-environment-variable-was-renamed-to-BR2_CONFIG
|
||||
|
||||
# Similar to above for BUILDROOT_CONFIG, but here we have no .config equivalent.
|
||||
ifneq ($(BUILDROOT_CONFIG),)
|
||||
ifneq ($(BUILDROOT_CONFIG),$(BR2_CONFIG))
|
||||
ifneq ($(BUILDROOT_CONFIG),$(BUILDROOT_CONFIG_FAKE))
|
||||
$(error "The BUILDROOT_CONFIG environment variable was renamed to BR2_CONFIG.")
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
BUILDROOT_CONFIG = $(BUILDROOT_CONFIG_FAKE)
|
||||
export BUILDROOT_CONFIG
|
||||
|
||||
#
|
||||
# Legacy options from 2012.08
|
||||
#
|
||||
|
||||
host-pkg-config:
|
||||
@$(call MESSAGE,host-pkg-config is replaced by host-pkgconf)
|
||||
@$(call MESSAGE,please update your .mk files)
|
||||
@false
|
||||
.PHONY: host-pkg-config
|
||||
|
||||
#
|
||||
# Legacy options from 2012.05
|
||||
#
|
||||
GENTARGETS = $$(error The GENTARGETS macro no longer exists; use $$$$(eval $$$$(generic-package)) or $$$$(eval $$$$(host-generic-package)))
|
||||
AUTOTARGETS = $$(error The AUTOTARGETS macro no longer exists; use $$$$(eval $$$$(autotools-package)) or $$$$(eval $$$$(host-autotools-package)))
|
||||
CMAKETARGETS = $$(error The CMAKETARGETS macro no longer exists; use $$$$(eval $$$$(cmake-package)) or $$$$(eval $$$$(host-cmake-package)))
|
6
README.md
Normal file
6
README.md
Normal file
@ -0,0 +1,6 @@
|
||||
**motionEyeOS** is a Linux distribution that turns your single board computer into a video surveillance system. Check out the [wiki](https://github.com/ccrisan/motioneyeos/wiki) for more details.
|
||||
|
||||
Follow us on facebook: [https://www.facebook.com/motioneyeos](https://www.facebook.com/motioneyeos).
|
||||
|
||||
You can support the development of motionEyeOS by making a small donation.
|
||||
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ccrisan%40gmail%2ecom&lc=US&item_name=motionEyeOS&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="[paypal]" /></a>
|
403
arch/Config.in
Normal file
403
arch/Config.in
Normal file
@ -0,0 +1,403 @@
|
||||
menu "Target options"
|
||||
|
||||
config BR2_ARCH_IS_64
|
||||
bool
|
||||
|
||||
config BR2_KERNEL_64_USERLAND_32
|
||||
bool
|
||||
|
||||
config BR2_SOFT_FLOAT
|
||||
bool
|
||||
|
||||
config BR2_ARCH_HAS_MMU_MANDATORY
|
||||
bool
|
||||
|
||||
config BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
bool
|
||||
|
||||
config BR2_ARCH_HAS_FDPIC_SUPPORT
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "Target Architecture"
|
||||
default BR2_i386
|
||||
help
|
||||
Select the target architecture family to build for.
|
||||
|
||||
config BR2_arcle
|
||||
bool "ARC (little endian)"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs
|
||||
that can be used from deeply embedded to high performance host
|
||||
applications. Little endian.
|
||||
|
||||
config BR2_arceb
|
||||
bool "ARC (big endian)"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs
|
||||
that can be used from deeply embedded to high performance host
|
||||
applications. Big endian.
|
||||
|
||||
config BR2_arm
|
||||
bool "ARM (little endian)"
|
||||
# MMU support is set by the subarchitecture file, arch/Config.in.arm
|
||||
help
|
||||
ARM is a 32-bit reduced instruction set computer (RISC) instruction
|
||||
set architecture (ISA) developed by ARM Holdings. Little endian.
|
||||
http://www.arm.com/
|
||||
http://en.wikipedia.org/wiki/ARM
|
||||
|
||||
config BR2_armeb
|
||||
bool "ARM (big endian)"
|
||||
# MMU support is set by the subarchitecture file, arch/Config.in.arm
|
||||
help
|
||||
ARM is a 32-bit reduced instruction set computer (RISC) instruction
|
||||
set architecture (ISA) developed by ARM Holdings. Big endian.
|
||||
http://www.arm.com/
|
||||
http://en.wikipedia.org/wiki/ARM
|
||||
|
||||
config BR2_aarch64
|
||||
bool "AArch64 (little endian)"
|
||||
select BR2_ARCH_IS_64
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Aarch64 is a 64-bit architecture developed by ARM Holdings.
|
||||
http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
|
||||
http://en.wikipedia.org/wiki/ARM
|
||||
|
||||
config BR2_aarch64_be
|
||||
bool "AArch64 (big endian)"
|
||||
select BR2_ARCH_IS_64
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Aarch64 is a 64-bit architecture developed by ARM Holdings.
|
||||
http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
|
||||
http://en.wikipedia.org/wiki/ARM
|
||||
|
||||
config BR2_bfin
|
||||
bool "Blackfin"
|
||||
select BR2_ARCH_HAS_FDPIC_SUPPORT
|
||||
help
|
||||
The Blackfin is a family of 16 or 32-bit microprocessors developed,
|
||||
manufactured and marketed by Analog Devices.
|
||||
http://www.analog.com/
|
||||
http://en.wikipedia.org/wiki/Blackfin
|
||||
|
||||
config BR2_i386
|
||||
bool "i386"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Intel i386 architecture compatible microprocessor
|
||||
http://en.wikipedia.org/wiki/I386
|
||||
|
||||
config BR2_m68k
|
||||
bool "m68k"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
depends on BROKEN # ice in uclibc / inet_ntoa_r
|
||||
help
|
||||
Motorola 68000 family microprocessor
|
||||
http://en.wikipedia.org/wiki/M68k
|
||||
|
||||
config BR2_microblazeel
|
||||
bool "Microblaze AXI (little endian)"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Soft processor core designed for Xilinx FPGAs from Xilinx. AXI bus
|
||||
based architecture (little endian)
|
||||
http://www.xilinx.com
|
||||
http://en.wikipedia.org/wiki/Microblaze
|
||||
|
||||
config BR2_microblazebe
|
||||
bool "Microblaze non-AXI (big endian)"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Soft processor core designed for Xilinx FPGAs from Xilinx. PLB bus
|
||||
based architecture (non-AXI, big endian)
|
||||
http://www.xilinx.com
|
||||
http://en.wikipedia.org/wiki/Microblaze
|
||||
|
||||
config BR2_mips
|
||||
bool "MIPS (big endian)"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
MIPS is a RISC microprocessor from MIPS Technologies. Big endian.
|
||||
http://www.mips.com/
|
||||
http://en.wikipedia.org/wiki/MIPS_Technologies
|
||||
|
||||
config BR2_mipsel
|
||||
bool "MIPS (little endian)"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
MIPS is a RISC microprocessor from MIPS Technologies. Little endian.
|
||||
http://www.mips.com/
|
||||
http://en.wikipedia.org/wiki/MIPS_Technologies
|
||||
|
||||
config BR2_mips64
|
||||
bool "MIPS64 (big endian)"
|
||||
select BR2_ARCH_IS_64
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
MIPS is a RISC microprocessor from MIPS Technologies. Big endian.
|
||||
http://www.mips.com/
|
||||
http://en.wikipedia.org/wiki/MIPS_Technologies
|
||||
|
||||
config BR2_mips64el
|
||||
bool "MIPS64 (little endian)"
|
||||
select BR2_ARCH_IS_64
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
MIPS is a RISC microprocessor from MIPS Technologies. Little endian.
|
||||
http://www.mips.com/
|
||||
http://en.wikipedia.org/wiki/MIPS_Technologies
|
||||
|
||||
config BR2_nios2
|
||||
bool "Nios II"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
Nios II is a soft core processor from Altera Corporation.
|
||||
http://www.altera.com/
|
||||
http://en.wikipedia.org/wiki/Nios_II
|
||||
|
||||
config BR2_powerpc
|
||||
bool "PowerPC"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
|
||||
Big endian.
|
||||
http://www.power.org/
|
||||
http://en.wikipedia.org/wiki/Powerpc
|
||||
|
||||
config BR2_powerpc64
|
||||
bool "PowerPC64 (big endian)"
|
||||
select BR2_ARCH_IS_64
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
|
||||
Big endian.
|
||||
http://www.power.org/
|
||||
http://en.wikipedia.org/wiki/Powerpc
|
||||
|
||||
config BR2_powerpc64le
|
||||
bool "PowerPC64 (little endian)"
|
||||
select BR2_ARCH_IS_64
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
|
||||
Little endian.
|
||||
http://www.power.org/
|
||||
http://en.wikipedia.org/wiki/Powerpc
|
||||
|
||||
config BR2_sh
|
||||
bool "SuperH"
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
help
|
||||
SuperH (or SH) is a 32-bit reduced instruction set computer (RISC)
|
||||
instruction set architecture (ISA) developed by Hitachi.
|
||||
http://www.hitachi.com/
|
||||
http://en.wikipedia.org/wiki/SuperH
|
||||
|
||||
config BR2_sh64
|
||||
bool "SuperH64"
|
||||
depends on BR2_DEPRECATED_SINCE_2015_05
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
SuperH64 (or SH) is a 64-bit reduced instruction set computer (RISC)
|
||||
instruction set architecture (ISA) developed by Hitachi.
|
||||
http://www.hitachi.com/
|
||||
http://en.wikipedia.org/wiki/SuperH
|
||||
|
||||
config BR2_sparc
|
||||
bool "SPARC"
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
SPARC (from Scalable Processor Architecture) is a RISC instruction
|
||||
set architecture (ISA) developed by Sun Microsystems.
|
||||
http://www.oracle.com/sun
|
||||
http://en.wikipedia.org/wiki/Sparc
|
||||
|
||||
config BR2_x86_64
|
||||
bool "x86_64"
|
||||
select BR2_ARCH_IS_64
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
help
|
||||
x86-64 is an extension of the x86 instruction set (Intel i386
|
||||
architecture compatible microprocessor).
|
||||
http://en.wikipedia.org/wiki/X86_64
|
||||
|
||||
config BR2_xtensa
|
||||
bool "Xtensa"
|
||||
# MMU support is set by the subarchitecture file, arch/Config.in.xtensa
|
||||
help
|
||||
Xtensa is a Tensilica processor IP architecture.
|
||||
http://en.wikipedia.org/wiki/Xtensa
|
||||
http://www.tensilica.com/
|
||||
|
||||
endchoice
|
||||
|
||||
# The following string values are defined by the individual
|
||||
# Config.in.$ARCH files
|
||||
config BR2_ARCH
|
||||
string
|
||||
|
||||
config BR2_ENDIAN
|
||||
string
|
||||
|
||||
config BR2_GCC_TARGET_ARCH
|
||||
string
|
||||
|
||||
config BR2_GCC_TARGET_ABI
|
||||
string
|
||||
|
||||
config BR2_GCC_TARGET_CPU
|
||||
string
|
||||
|
||||
config BR2_GCC_TARGET_CPU_REVISION
|
||||
string
|
||||
|
||||
# The value of this option will be passed as --with-fpu=<value> when
|
||||
# building gcc (internal backend) or -mfpu=<value> in the toolchain
|
||||
# wrapper (external toolchain)
|
||||
config BR2_GCC_TARGET_FPU
|
||||
string
|
||||
|
||||
# The value of this option will be passed as --with-float=<value> when
|
||||
# building gcc (internal backend) or -mfloat-abi=<value> in the toolchain
|
||||
# wrapper (external toolchain)
|
||||
config BR2_GCC_TARGET_FLOAT_ABI
|
||||
string
|
||||
|
||||
# The value of this option will be passed as --with-mode=<value> when
|
||||
# building gcc (internal backend) or -m<value> in the toolchain
|
||||
# wrapper (external toolchain)
|
||||
config BR2_GCC_TARGET_MODE
|
||||
string
|
||||
|
||||
# If the architecture has atomic operations, select this:
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
bool
|
||||
|
||||
# Must be selected by binary formats that support shared libraries.
|
||||
config BR2_BINFMT_SUPPORTS_SHARED
|
||||
bool
|
||||
|
||||
# Set up target binary format
|
||||
choice
|
||||
prompt "Target Binary Format"
|
||||
default BR2_BINFMT_ELF if BR2_USE_MMU
|
||||
default BR2_BINFMT_FDPIC if BR2_ARCH_HAS_FDPIC_SUPPORT
|
||||
default BR2_BINFMT_FLAT
|
||||
|
||||
config BR2_BINFMT_ELF
|
||||
bool "ELF"
|
||||
depends on BR2_USE_MMU
|
||||
select BR2_BINFMT_SUPPORTS_SHARED
|
||||
help
|
||||
ELF (Executable and Linkable Format) is a format for libraries and
|
||||
executables used across different architectures and operating
|
||||
systems.
|
||||
|
||||
config BR2_BINFMT_FDPIC
|
||||
bool "FDPIC"
|
||||
depends on BR2_ARCH_HAS_FDPIC_SUPPORT
|
||||
select BR2_BINFMT_SUPPORTS_SHARED
|
||||
help
|
||||
ELF FDPIC binaries are based on ELF, but allow the individual load
|
||||
segments of a binary to be located in memory independently of each
|
||||
other. This makes this format ideal for use in environments where no
|
||||
MMU is available.
|
||||
|
||||
config BR2_BINFMT_FLAT
|
||||
bool "FLAT"
|
||||
depends on !BR2_USE_MMU
|
||||
help
|
||||
FLAT binary is a relatively simple and lightweight executable format
|
||||
based on the original a.out format. It is widely used in environment
|
||||
where no MMU is available.
|
||||
|
||||
endchoice
|
||||
|
||||
# Set up flat binary type
|
||||
choice
|
||||
prompt "FLAT Binary type"
|
||||
depends on BR2_BINFMT_FLAT
|
||||
default BR2_BINFMT_FLAT_ONE
|
||||
|
||||
config BR2_BINFMT_FLAT_ONE
|
||||
bool "One memory region"
|
||||
help
|
||||
All segments are linked into one memory region.
|
||||
|
||||
config BR2_BINFMT_FLAT_SEP_DATA
|
||||
bool "Separate data and code region"
|
||||
help
|
||||
Allow for the data and text segments to be separated and placed in
|
||||
different regions of memory.
|
||||
|
||||
config BR2_BINFMT_FLAT_SHARED
|
||||
bool "Shared binary"
|
||||
# Even though this really generates shared binaries, there is no libdl
|
||||
# and dlopen() cannot be used. So packages that require shared
|
||||
# libraries cannot be built. Therefore, we don't select
|
||||
# BR2_BINFMT_SUPPORTS_SHARED and therefore force BR2_STATIC_LIBS.
|
||||
# Although this adds -static to the compilation, that's not a problem
|
||||
# because the -mid-shared-library option overrides it.
|
||||
help
|
||||
Allow to load and link indiviual FLAT binaries at run time.
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_arcle || BR2_arceb
|
||||
source "arch/Config.in.arc"
|
||||
endif
|
||||
|
||||
if BR2_arm || BR2_armeb
|
||||
source "arch/Config.in.arm"
|
||||
endif
|
||||
|
||||
if BR2_aarch64 || BR2_aarch64_be
|
||||
source "arch/Config.in.aarch64"
|
||||
endif
|
||||
|
||||
if BR2_bfin
|
||||
source "arch/Config.in.bfin"
|
||||
endif
|
||||
|
||||
if BR2_m68k
|
||||
source "arch/Config.in.m68k"
|
||||
endif
|
||||
|
||||
if BR2_microblazeel || BR2_microblazebe
|
||||
source "arch/Config.in.microblaze"
|
||||
endif
|
||||
|
||||
if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el
|
||||
source "arch/Config.in.mips"
|
||||
endif
|
||||
|
||||
if BR2_nios2
|
||||
source "arch/Config.in.nios2"
|
||||
endif
|
||||
|
||||
if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
|
||||
source "arch/Config.in.powerpc"
|
||||
endif
|
||||
|
||||
if BR2_sh || BR2_sh64
|
||||
source "arch/Config.in.sh"
|
||||
endif
|
||||
|
||||
if BR2_sparc
|
||||
source "arch/Config.in.sparc"
|
||||
endif
|
||||
|
||||
if BR2_i386 || BR2_x86_64
|
||||
source "arch/Config.in.x86"
|
||||
endif
|
||||
|
||||
if BR2_xtensa
|
||||
source "arch/Config.in.xtensa"
|
||||
endif
|
||||
|
||||
endmenu # Target options
|
10
arch/Config.in.aarch64
Normal file
10
arch/Config.in.aarch64
Normal file
@ -0,0 +1,10 @@
|
||||
config BR2_ARCH
|
||||
default "aarch64" if BR2_aarch64
|
||||
default "aarch64_be" if BR2_aarch64_be
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE" if BR2_aarch64
|
||||
default "BIG" if BR2_aarch64_be
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
80
arch/Config.in.arc
Normal file
80
arch/Config.in.arc
Normal file
@ -0,0 +1,80 @@
|
||||
choice
|
||||
prompt "Target CPU"
|
||||
depends on BR2_arc
|
||||
default BR2_arc770d
|
||||
help
|
||||
Specific CPU to use
|
||||
|
||||
config BR2_arc750d
|
||||
bool "ARC 750D"
|
||||
|
||||
config BR2_arc770d
|
||||
bool "ARC 770D"
|
||||
|
||||
config BR2_archs38
|
||||
bool "ARC HS38"
|
||||
|
||||
endchoice
|
||||
|
||||
# Choice of atomic instructions presence
|
||||
config BR2_ARC_ATOMIC_EXT
|
||||
bool "Atomic extension (LLOCK/SCOND instructions)"
|
||||
default y if BR2_arc770d || BR2_archs38
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y if BR2_ARC_ATOMIC_EXT
|
||||
|
||||
config BR2_ARCH
|
||||
default "arc" if BR2_arcle
|
||||
default "arceb" if BR2_arceb
|
||||
|
||||
config BR2_arc
|
||||
bool
|
||||
default y if BR2_arcle || BR2_arceb
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE" if BR2_arcle
|
||||
default "BIG" if BR2_arceb
|
||||
|
||||
config BR2_GCC_TARGET_CPU
|
||||
default "arc700" if BR2_arc750d
|
||||
default "arc700" if BR2_arc770d
|
||||
default "archs" if BR2_archs38
|
||||
|
||||
choice
|
||||
prompt "MMU Page Size"
|
||||
default BR2_ARC_PAGE_SIZE_8K
|
||||
help
|
||||
MMU starting from version 3 (found in ARC 770) and now
|
||||
version 4 (found in ARC HS38) allows the selection of the
|
||||
page size during ASIC design creation.
|
||||
|
||||
The following options are available for MMU v3 and v4: 4kB,
|
||||
8kB and 16 kB.
|
||||
|
||||
The default is 8 kB (that really matches the only page size
|
||||
in MMU v2). It is important to build a toolchain with page
|
||||
size matching the hardware configuration. Otherwise
|
||||
user-space applications will fail at runtime.
|
||||
|
||||
config BR2_ARC_PAGE_SIZE_4K
|
||||
bool "4KB"
|
||||
depends on BR2_arc770d || BR2_archs38
|
||||
|
||||
config BR2_ARC_PAGE_SIZE_8K
|
||||
bool "8KB"
|
||||
help
|
||||
This is the one and only option available for MMUv2 and
|
||||
default value for MMU v3 and v4.
|
||||
|
||||
config BR2_ARC_PAGE_SIZE_16K
|
||||
bool "16KB"
|
||||
depends on BR2_arc770d || BR2_archs38
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_ARC_PAGE_SIZE
|
||||
string
|
||||
default "4K" if BR2_ARC_PAGE_SIZE_4K
|
||||
default "8K" if BR2_ARC_PAGE_SIZE_8K
|
||||
default "16K" if BR2_ARC_PAGE_SIZE_16K
|
441
arch/Config.in.arm
Normal file
441
arch/Config.in.arm
Normal file
@ -0,0 +1,441 @@
|
||||
# arm cpu features
|
||||
config BR2_ARM_CPU_HAS_NEON
|
||||
bool
|
||||
|
||||
# for some cores, NEON support is optional
|
||||
config BR2_ARM_CPU_MAYBE_HAS_NEON
|
||||
bool
|
||||
|
||||
# for some cores, VFPv2 is optional
|
||||
config BR2_ARM_CPU_MAYBE_HAS_VFPV2
|
||||
bool
|
||||
|
||||
config BR2_ARM_CPU_HAS_VFPV2
|
||||
bool
|
||||
|
||||
# for some cores, VFPv3 is optional
|
||||
config BR2_ARM_CPU_MAYBE_HAS_VFPV3
|
||||
bool
|
||||
select BR2_ARM_CPU_MAYBE_HAS_VFPV2
|
||||
|
||||
config BR2_ARM_CPU_HAS_VFPV3
|
||||
bool
|
||||
select BR2_ARM_CPU_HAS_VFPV2
|
||||
|
||||
# for some cores, VFPv4 is optional
|
||||
config BR2_ARM_CPU_MAYBE_HAS_VFPV4
|
||||
bool
|
||||
select BR2_ARM_CPU_MAYBE_HAS_VFPV3
|
||||
|
||||
config BR2_ARM_CPU_HAS_VFPV4
|
||||
bool
|
||||
select BR2_ARM_CPU_HAS_VFPV3
|
||||
|
||||
config BR2_ARM_CPU_HAS_ARM
|
||||
bool
|
||||
|
||||
config BR2_ARM_CPU_HAS_THUMB
|
||||
bool
|
||||
|
||||
config BR2_ARM_CPU_HAS_THUMB2
|
||||
bool
|
||||
|
||||
config BR2_ARM_CPU_ARMV4
|
||||
bool
|
||||
|
||||
config BR2_ARM_CPU_ARMV5
|
||||
bool
|
||||
|
||||
config BR2_ARM_CPU_ARMV6
|
||||
bool
|
||||
|
||||
config BR2_ARM_CPU_ARMV7A
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
depends on BR2_arm || BR2_armeb
|
||||
default BR2_arm926t
|
||||
help
|
||||
Specific CPU variant to use
|
||||
|
||||
config BR2_arm920t
|
||||
bool "arm920t"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_ARMV4
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_arm922t
|
||||
bool "arm922t"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_ARMV4
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_arm926t
|
||||
bool "arm926t"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_MAYBE_HAS_VFPV2
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_ARMV5
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_arm1136jf_s
|
||||
bool "arm1136jf-s"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_VFPV2
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_ARMV6
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_arm1176jz_s
|
||||
bool "arm1176jz-s"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_ARMV6
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_arm1176jzf_s
|
||||
bool "arm1176jzf-s"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_VFPV2
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_ARMV6
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_cortex_a5
|
||||
bool "cortex-A5"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_MAYBE_HAS_NEON
|
||||
select BR2_ARM_CPU_MAYBE_HAS_VFPV4
|
||||
select BR2_ARM_CPU_HAS_THUMB2
|
||||
select BR2_ARM_CPU_ARMV7A
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_cortex_a7
|
||||
bool "cortex-A7"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_NEON
|
||||
select BR2_ARM_CPU_HAS_VFPV4
|
||||
select BR2_ARM_CPU_HAS_THUMB2
|
||||
select BR2_ARM_CPU_ARMV7A
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_cortex_a8
|
||||
bool "cortex-A8"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_NEON
|
||||
select BR2_ARM_CPU_HAS_VFPV3
|
||||
select BR2_ARM_CPU_HAS_THUMB2
|
||||
select BR2_ARM_CPU_ARMV7A
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_cortex_a9
|
||||
bool "cortex-A9"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_MAYBE_HAS_NEON
|
||||
select BR2_ARM_CPU_MAYBE_HAS_VFPV3
|
||||
select BR2_ARM_CPU_HAS_THUMB2
|
||||
select BR2_ARM_CPU_ARMV7A
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_cortex_a12
|
||||
bool "cortex-A12"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_NEON
|
||||
select BR2_ARM_CPU_HAS_VFPV4
|
||||
select BR2_ARM_CPU_HAS_THUMB2
|
||||
select BR2_ARM_CPU_ARMV7A
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_cortex_a15
|
||||
bool "cortex-A15"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_NEON
|
||||
select BR2_ARM_CPU_HAS_VFPV4
|
||||
select BR2_ARM_CPU_HAS_THUMB2
|
||||
select BR2_ARM_CPU_ARMV7A
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_cortex_m3
|
||||
bool "cortex-M3"
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_HAS_THUMB2
|
||||
config BR2_fa526
|
||||
bool "fa526/626"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_ARMV4
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_pj4
|
||||
bool "pj4"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_VFPV3
|
||||
select BR2_ARM_CPU_ARMV7A
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_strongarm
|
||||
bool "strongarm sa110/sa1100"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_ARMV4
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_xscale
|
||||
bool "xscale"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_HAS_THUMB
|
||||
select BR2_ARM_CPU_ARMV5
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
config BR2_iwmmxt
|
||||
bool "iwmmxt"
|
||||
select BR2_ARM_CPU_HAS_ARM
|
||||
select BR2_ARM_CPU_ARMV5
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Target ABI"
|
||||
depends on BR2_arm || BR2_armeb
|
||||
default BR2_ARM_EABI
|
||||
help
|
||||
Application Binary Interface to use. The Application Binary
|
||||
Interface describes the calling conventions (how arguments
|
||||
are passed to functions, how the return value is passed, how
|
||||
system calls are made, etc.).
|
||||
|
||||
config BR2_ARM_EABI
|
||||
bool "EABI"
|
||||
help
|
||||
The EABI is currently the standard ARM ABI, which is used in
|
||||
most projects. It supports both the 'soft' floating point
|
||||
model (in which floating point instructions are emulated in
|
||||
software) and the 'softfp' floating point model (in which
|
||||
floating point instructions are executed using an hardware
|
||||
floating point unit, but floating point arguments to
|
||||
functions are passed in integer registers).
|
||||
|
||||
The 'softfp' floating point model is link-compatible with
|
||||
the 'soft' floating point model, i.e you can link a library
|
||||
built 'soft' with some other code built 'softfp'.
|
||||
|
||||
However, passing the floating point arguments in integer
|
||||
registers is a bit inefficient, so if your ARM processor has
|
||||
a floating point unit, and you don't have pre-compiled
|
||||
'soft' or 'softfp' code, using the EABIhf ABI will provide
|
||||
better floating point performances.
|
||||
|
||||
If your processor does not have a floating point unit, then
|
||||
you must use this ABI.
|
||||
|
||||
config BR2_ARM_EABIHF
|
||||
bool "EABIhf"
|
||||
depends on BR2_ARM_CPU_MAYBE_HAS_VFPV2 || BR2_ARM_CPU_HAS_VFPV2
|
||||
help
|
||||
The EABIhf is an extension of EABI which supports the 'hard'
|
||||
floating point model. This model uses the floating point
|
||||
unit to execute floating point instructions, and passes
|
||||
floating point arguments in floating point registers.
|
||||
|
||||
It is more efficient than EABI for floating point related
|
||||
workload. However, it does not allow to link against code
|
||||
that has been pre-built for the 'soft' or 'softfp' floating
|
||||
point models.
|
||||
|
||||
If your processor has a floating point unit, and you don't
|
||||
depend on existing pre-compiled code, this option is most
|
||||
likely the best choice.
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_ARM_ENABLE_NEON
|
||||
bool "Enable NEON SIMD extension support"
|
||||
depends on BR2_ARM_CPU_MAYBE_HAS_NEON
|
||||
select BR2_ARM_CPU_HAS_NEON
|
||||
help
|
||||
For some CPU cores, the NEON SIMD extension is optional.
|
||||
Select this option if you are certain your particular
|
||||
implementation has NEON support and you want to use it.
|
||||
|
||||
choice
|
||||
prompt "Floating point strategy"
|
||||
depends on BR2_ARM_EABI || BR2_ARM_EABIHF
|
||||
default BR2_ARM_FPU_VFPV4D16 if BR2_ARM_CPU_HAS_VFPV4
|
||||
default BR2_ARM_FPU_VFPV3D16 if BR2_ARM_CPU_HAS_VFPV3
|
||||
default BR2_ARM_FPU_VFPV2 if BR2_ARM_CPU_HAS_VFPV2
|
||||
default BR2_ARM_SOFT_FLOAT if !BR2_ARM_CPU_HAS_VFPV2
|
||||
|
||||
config BR2_ARM_SOFT_FLOAT
|
||||
bool "Soft float"
|
||||
depends on BR2_ARM_EABI
|
||||
select BR2_SOFT_FLOAT
|
||||
help
|
||||
This option allows to use software emulated floating
|
||||
point. It should be used for ARM cores that do not include a
|
||||
Vector Floating Point unit, such as ARMv5 cores (ARM926 for
|
||||
example) or certain ARMv6 cores.
|
||||
|
||||
config BR2_ARM_FPU_VFPV2
|
||||
bool "VFPv2"
|
||||
depends on BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_MAYBE_HAS_VFPV2
|
||||
help
|
||||
This option allows to use the VFPv2 floating point unit, as
|
||||
available in some ARMv5 processors (ARM926EJ-S) and some
|
||||
ARMv6 processors (ARM1136JF-S, ARM1176JZF-S and ARM11
|
||||
MPCore).
|
||||
|
||||
Note that this option is also safe to use for newer cores
|
||||
such as Cortex-A, because the VFPv3 and VFPv4 units are
|
||||
backward compatible with VFPv2.
|
||||
|
||||
config BR2_ARM_FPU_VFPV3
|
||||
bool "VFPv3"
|
||||
depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3
|
||||
help
|
||||
This option allows to use the VFPv3 floating point unit, as
|
||||
available in some ARMv7 processors (Cortex-A{8, 9}). This
|
||||
option requires a VFPv3 unit that has 32 double-precision
|
||||
registers, which is not necessarily the case in all SOCs
|
||||
based on Cortex-A{8, 9}. If you're unsure, use VFPv3-D16
|
||||
instead, which is guaranteed to work on all Cortex-A{8, 9}.
|
||||
|
||||
Note that this option is also safe to use for newer cores
|
||||
that have a VFPv4 unit, because VFPv4 is backward compatible
|
||||
with VFPv3. They must of course also have 32
|
||||
double-precision registers.
|
||||
|
||||
config BR2_ARM_FPU_VFPV3D16
|
||||
bool "VFPv3-D16"
|
||||
depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3
|
||||
help
|
||||
This option allows to use the VFPv3 floating point unit, as
|
||||
available in some ARMv7 processors (Cortex-A{8, 9}). This
|
||||
option requires a VFPv3 unit that has 16 double-precision
|
||||
registers, which is generally the case in all SOCs based on
|
||||
Cortex-A{8, 9}, even though VFPv3 is technically optional on
|
||||
Cortex-A9. This is the safest option for those cores.
|
||||
|
||||
Note that this option is also safe to use for newer cores
|
||||
such that have a VFPv4 unit, because the VFPv4 is backward
|
||||
compatible with VFPv3.
|
||||
|
||||
config BR2_ARM_FPU_VFPV4
|
||||
bool "VFPv4"
|
||||
depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4
|
||||
help
|
||||
This option allows to use the VFPv4 floating point unit, as
|
||||
available in some ARMv7 processors (Cortex-A{5, 7, 12,
|
||||
15}). This option requires a VFPv4 unit that has 32
|
||||
double-precision registers, which is not necessarily the
|
||||
case in all SOCs based on Cortex-A{5, 7, 12, 15}. If you're
|
||||
unsure, you should probably use VFPv4-D16 instead.
|
||||
|
||||
Note that if you want binary code that works on all ARMv7
|
||||
cores, including the earlier Cortex-A{8, 9}, you should
|
||||
instead select VFPv3.
|
||||
|
||||
config BR2_ARM_FPU_VFPV4D16
|
||||
bool "VFPv4-D16"
|
||||
depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4
|
||||
help
|
||||
This option allows to use the VFPv4 floating point unit, as
|
||||
available in some ARMv7 processors (Cortex-A{5, 7, 12,
|
||||
15}). This option requires a VFPv4 unit that has 16
|
||||
double-precision registers, which is always available on
|
||||
Cortex-A12 and Cortex-A15, but optional on Cortex-A5 and
|
||||
Cortex-A7.
|
||||
|
||||
Note that if you want binary code that works on all ARMv7
|
||||
cores, including the earlier Cortex-A{8, 9}, you should
|
||||
instead select VFPv3-D16.
|
||||
|
||||
config BR2_ARM_FPU_NEON
|
||||
bool "NEON"
|
||||
depends on BR2_ARM_CPU_HAS_NEON
|
||||
help
|
||||
This option allows to use the NEON SIMD unit, as available
|
||||
in some ARMv7 processors, as a floating-point unit. It
|
||||
should however be noted that using NEON for floating point
|
||||
operations doesn't provide a complete compatibility with the
|
||||
IEEE 754.
|
||||
|
||||
config BR2_ARM_FPU_NEON_VFPV4
|
||||
bool "NEON/VFPv4"
|
||||
depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4
|
||||
depends on BR2_ARM_CPU_HAS_NEON
|
||||
help
|
||||
This option allows to use both the VFPv4 and the NEON SIMD
|
||||
units for floating point operations. Note that some ARMv7
|
||||
cores do not necessarily have VFPv4 and/or NEON support, for
|
||||
example on Cortex-A5 and Cortex-A7, support for VFPv4 and
|
||||
NEON is optional.
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "ARM instruction set"
|
||||
|
||||
config BR2_ARM_INSTRUCTIONS_ARM
|
||||
bool "ARM"
|
||||
depends on BR2_ARM_CPU_HAS_ARM
|
||||
help
|
||||
This option instructs the compiler to generate regular ARM
|
||||
instructions, that are all 32 bits wide.
|
||||
|
||||
config BR2_ARM_INSTRUCTIONS_THUMB
|
||||
bool "Thumb"
|
||||
depends on BR2_ARM_CPU_HAS_THUMB
|
||||
help
|
||||
This option instructions the compiler to generate Thumb
|
||||
instructions, which allows to mix 16 bits instructions and
|
||||
32 bits instructions. This generally provides a much smaller
|
||||
compiled binary size.
|
||||
|
||||
config BR2_ARM_INSTRUCTIONS_THUMB2
|
||||
bool "Thumb2"
|
||||
depends on BR2_ARM_CPU_HAS_THUMB2
|
||||
help
|
||||
This option instructions the compiler to generate Thumb2
|
||||
instructions, which allows to mix 16 bits instructions and
|
||||
32 bits instructions. This generally provides a much smaller
|
||||
compiled binary size.
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_ARCH
|
||||
default "arm" if BR2_arm
|
||||
default "armeb" if BR2_armeb
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE" if BR2_arm
|
||||
default "BIG" if BR2_armeb
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
||||
|
||||
config BR2_GCC_TARGET_CPU
|
||||
default "arm920t" if BR2_arm920t
|
||||
default "arm922t" if BR2_arm922t
|
||||
default "arm926ej-s" if BR2_arm926t
|
||||
default "arm1136j-s" if BR2_arm1136j_s
|
||||
default "arm1136jf-s" if BR2_arm1136jf_s
|
||||
default "arm1176jz-s" if BR2_arm1176jz_s
|
||||
default "arm1176jzf-s" if BR2_arm1176jzf_s
|
||||
default "cortex-a5" if BR2_cortex_a5
|
||||
default "cortex-a7" if BR2_cortex_a7
|
||||
default "cortex-a8" if BR2_cortex_a8
|
||||
default "cortex-a9" if BR2_cortex_a9
|
||||
default "cortex-a12" if BR2_cortex_a12
|
||||
default "cortex-a15" if BR2_cortex_a15
|
||||
default "cortex-m3" if BR2_cortex_m3
|
||||
default "fa526" if BR2_fa526
|
||||
default "marvell-pj4" if BR2_pj4
|
||||
default "strongarm" if BR2_strongarm
|
||||
default "xscale" if BR2_xscale
|
||||
default "iwmmxt" if BR2_iwmmxt
|
||||
|
||||
config BR2_GCC_TARGET_ABI
|
||||
default "aapcs-linux"
|
||||
|
||||
config BR2_GCC_TARGET_FPU
|
||||
default "vfp" if BR2_ARM_FPU_VFPV2
|
||||
default "vfpv3" if BR2_ARM_FPU_VFPV3
|
||||
default "vfpv3-d16" if BR2_ARM_FPU_VFPV3D16
|
||||
default "vfpv4" if BR2_ARM_FPU_VFPV4
|
||||
default "vfpv4-d16" if BR2_ARM_FPU_VFPV4D16
|
||||
default "neon" if BR2_ARM_FPU_NEON
|
||||
default "neon-vfpv4" if BR2_ARM_FPU_NEON_VFPV4
|
||||
|
||||
config BR2_GCC_TARGET_FLOAT_ABI
|
||||
default "soft" if BR2_ARM_SOFT_FLOAT
|
||||
default "softfp" if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABI
|
||||
default "hard" if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABIHF
|
||||
|
||||
config BR2_GCC_TARGET_MODE
|
||||
default "arm" if BR2_ARM_INSTRUCTIONS_ARM
|
||||
default "thumb" if BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2
|
110
arch/Config.in.bfin
Normal file
110
arch/Config.in.bfin
Normal file
@ -0,0 +1,110 @@
|
||||
choice
|
||||
prompt "Target CPU"
|
||||
depends on BR2_bfin
|
||||
default BR2_bf609
|
||||
help
|
||||
Specify target CPU
|
||||
config BR2_bf606
|
||||
bool "bf606"
|
||||
config BR2_bf607
|
||||
bool "bf607"
|
||||
config BR2_bf608
|
||||
bool "bf608"
|
||||
config BR2_bf609
|
||||
bool "bf609"
|
||||
config BR2_bf512
|
||||
bool "bf512"
|
||||
config BR2_bf514
|
||||
bool "bf514"
|
||||
config BR2_bf516
|
||||
bool "bf516"
|
||||
config BR2_bf518
|
||||
bool "bf518"
|
||||
config BR2_bf522
|
||||
bool "bf522"
|
||||
config BR2_bf523
|
||||
bool "bf523"
|
||||
config BR2_bf524
|
||||
bool "bf524"
|
||||
config BR2_bf525
|
||||
bool "bf525"
|
||||
config BR2_bf526
|
||||
bool "bf526"
|
||||
config BR2_bf527
|
||||
bool "bf527"
|
||||
config BR2_bf531
|
||||
bool "bf531"
|
||||
config BR2_bf532
|
||||
bool "bf532"
|
||||
config BR2_bf533
|
||||
bool "bf533"
|
||||
config BR2_bf534
|
||||
bool "bf534"
|
||||
config BR2_bf536
|
||||
bool "bf536"
|
||||
config BR2_bf537
|
||||
bool "bf537"
|
||||
config BR2_bf538
|
||||
bool "bf538"
|
||||
config BR2_bf539
|
||||
bool "bf539"
|
||||
config BR2_bf542
|
||||
bool "bf542"
|
||||
config BR2_bf544
|
||||
bool "bf544"
|
||||
config BR2_bf547
|
||||
bool "bf547"
|
||||
config BR2_bf548
|
||||
bool "bf548"
|
||||
config BR2_bf549
|
||||
bool "bf549"
|
||||
config BR2_bf561
|
||||
bool "bf561"
|
||||
endchoice
|
||||
|
||||
config BR2_ARCH
|
||||
default "bfin"
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE"
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
||||
|
||||
config BR2_GCC_TARGET_CPU
|
||||
default bf606 if BR2_bf606
|
||||
default bf607 if BR2_bf607
|
||||
default bf608 if BR2_bf608
|
||||
default bf609 if BR2_bf609
|
||||
default bf512 if BR2_bf512
|
||||
default bf514 if BR2_bf514
|
||||
default bf516 if BR2_bf516
|
||||
default bf518 if BR2_bf518
|
||||
default bf522 if BR2_bf522
|
||||
default bf523 if BR2_bf523
|
||||
default bf524 if BR2_bf524
|
||||
default bf525 if BR2_bf525
|
||||
default bf526 if BR2_bf526
|
||||
default bf527 if BR2_bf527
|
||||
default bf531 if BR2_bf531
|
||||
default bf532 if BR2_bf532
|
||||
default bf533 if BR2_bf533
|
||||
default bf534 if BR2_bf534
|
||||
default bf536 if BR2_bf536
|
||||
default bf537 if BR2_bf537
|
||||
default bf538 if BR2_bf538
|
||||
default bf539 if BR2_bf539
|
||||
default bf542 if BR2_bf542
|
||||
default bf544 if BR2_bf544
|
||||
default bf547 if BR2_bf547
|
||||
default bf548 if BR2_bf548
|
||||
default bf549 if BR2_bf549
|
||||
default bf561 if BR2_bf561
|
||||
|
||||
config BR2_GCC_TARGET_CPU_REVISION
|
||||
string "Target CPU revision"
|
||||
help
|
||||
Specify a target CPU revision, which will be appended to the
|
||||
value of the -mcpu option. For example, if the selected CPU is
|
||||
bf609, and then selected CPU revision is "0.0", then gcc will
|
||||
receive the -mcpu=bf609-0.0 option.
|
16
arch/Config.in.m68k
Normal file
16
arch/Config.in.m68k
Normal file
@ -0,0 +1,16 @@
|
||||
config BR2_ARCH
|
||||
default "m68k" if BR2_m68k
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "BIG"
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
||||
|
||||
config BR2_GCC_TARGET_ARCH
|
||||
default "68000" if BR2_m68k_68000
|
||||
default "68010" if BR2_m68k_68010
|
||||
default "68020" if BR2_m68k_68020
|
||||
default "68030" if BR2_m68k_68030
|
||||
default "68040" if BR2_m68k_68040
|
||||
default "68060" if BR2_m68k_68060
|
14
arch/Config.in.microblaze
Normal file
14
arch/Config.in.microblaze
Normal file
@ -0,0 +1,14 @@
|
||||
config BR2_ARCH
|
||||
default "microblazeel" if BR2_microblazeel
|
||||
default "microblaze" if BR2_microblazebe
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE" if BR2_microblazeel
|
||||
default "BIG" if BR2_microblazebe
|
||||
|
||||
config BR2_microblaze
|
||||
bool
|
||||
default y if BR2_microblazeel || BR2_microblazebe
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
84
arch/Config.in.mips
Normal file
84
arch/Config.in.mips
Normal file
@ -0,0 +1,84 @@
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
|
||||
default BR2_mips_32 if BR2_mips || BR2_mipsel
|
||||
default BR2_mips_64 if BR2_mips64 || BR2_mips64el
|
||||
help
|
||||
Specific CPU variant to use
|
||||
|
||||
64bit cabable: 3, 4, 64, 64r2
|
||||
non-64bit capable: 1, 2, 32, 32r2
|
||||
|
||||
config BR2_mips_32
|
||||
bool "mips 32"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_mips_32r2
|
||||
bool "mips 32r2"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_mips_64
|
||||
bool "mips 64"
|
||||
depends on BR2_ARCH_IS_64
|
||||
config BR2_mips_64r2
|
||||
bool "mips 64r2"
|
||||
depends on BR2_ARCH_IS_64
|
||||
endchoice
|
||||
|
||||
|
||||
choice
|
||||
prompt "Target ABI"
|
||||
depends on BR2_mips64 || BR2_mips64el
|
||||
default BR2_MIPS_NABI32
|
||||
|
||||
help
|
||||
Application Binary Interface to use
|
||||
|
||||
config BR2_MIPS_NABI32
|
||||
bool "n32"
|
||||
depends on BR2_ARCH_IS_64
|
||||
select BR2_KERNEL_64_USERLAND_32
|
||||
config BR2_MIPS_NABI64
|
||||
bool "n64"
|
||||
depends on BR2_ARCH_IS_64
|
||||
endchoice
|
||||
|
||||
config BR2_MIPS_SOFT_FLOAT
|
||||
bool "Use soft-float"
|
||||
default y
|
||||
select BR2_SOFT_FLOAT
|
||||
help
|
||||
If your target CPU does not have a Floating Point Unit (FPU)
|
||||
or a kernel FPU emulator, but you still wish to support
|
||||
floating point functions, then everything will need to be
|
||||
compiled with soft floating point support (-msoft-float).
|
||||
|
||||
config BR2_ARCH
|
||||
default "mips" if BR2_mips
|
||||
default "mipsel" if BR2_mipsel
|
||||
default "mips64" if BR2_mips64
|
||||
default "mips64el" if BR2_mips64el
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE" if BR2_mipsel || BR2_mips64el
|
||||
default "BIG" if BR2_mips || BR2_mips64
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
||||
|
||||
config BR2_GCC_TARGET_ARCH
|
||||
default "mips1" if BR2_mips_1
|
||||
default "mips2" if BR2_mips_2
|
||||
default "mips3" if BR2_mips_3
|
||||
default "mips4" if BR2_mips_4
|
||||
default "mips32" if BR2_mips_32
|
||||
default "mips32r2" if BR2_mips_32r2
|
||||
default "mips64" if BR2_mips_64
|
||||
default "mips64r2" if BR2_mips_64r2
|
||||
|
||||
config BR2_MIPS_OABI32
|
||||
bool
|
||||
default y if BR2_mips || BR2_mipsel
|
||||
|
||||
config BR2_GCC_TARGET_ABI
|
||||
default "32" if BR2_MIPS_OABI32
|
||||
default "n32" if BR2_MIPS_NABI32
|
||||
default "64" if BR2_MIPS_NABI64
|
8
arch/Config.in.nios2
Normal file
8
arch/Config.in.nios2
Normal file
@ -0,0 +1,8 @@
|
||||
config BR2_ARCH
|
||||
default "nios2"
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE"
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
215
arch/Config.in.powerpc
Normal file
215
arch/Config.in.powerpc
Normal file
@ -0,0 +1,215 @@
|
||||
config BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
bool
|
||||
|
||||
config BR2_POWERPC_CPU_HAS_SPE
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
default BR2_generic_powerpc
|
||||
help
|
||||
Specific CPU variant to use
|
||||
config BR2_generic_powerpc
|
||||
bool "generic"
|
||||
config BR2_powerpc_401
|
||||
bool "401"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_403
|
||||
bool "403"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_405
|
||||
bool "405"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_405fp
|
||||
bool "405 with FPU"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_440
|
||||
bool "440"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_440fp
|
||||
bool "440 with FPU"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_464
|
||||
bool "464"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_464fp
|
||||
bool "464 with FPU"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_476
|
||||
bool "476"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_476fp
|
||||
bool "476 with FPU"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_505
|
||||
bool "505"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_601
|
||||
bool "601"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_602
|
||||
bool "602"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_603
|
||||
bool "603"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_603e
|
||||
bool "603e"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_604
|
||||
bool "604"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_604e
|
||||
bool "604e"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_620
|
||||
bool "620"
|
||||
config BR2_powerpc_630
|
||||
bool "630"
|
||||
config BR2_powerpc_740
|
||||
bool "740"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_7400
|
||||
bool "7400"
|
||||
select BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_7450
|
||||
bool "7450"
|
||||
select BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_750
|
||||
bool "750"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_821
|
||||
bool "821"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_823
|
||||
bool "823"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_860
|
||||
bool "860"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_970
|
||||
bool "970"
|
||||
select BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
config BR2_powerpc_8540
|
||||
bool "8540 / e500v1"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
select BR2_POWERPC_CPU_HAS_SPE
|
||||
config BR2_powerpc_8548
|
||||
bool "8548 / e500v2"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
select BR2_POWERPC_CPU_HAS_SPE
|
||||
config BR2_powerpc_e300c2
|
||||
bool "e300c2"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_e300c3
|
||||
bool "e300c3"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_e500mc
|
||||
bool "e500mc"
|
||||
depends on !BR2_ARCH_IS_64
|
||||
config BR2_powerpc_e5500
|
||||
bool "e5500"
|
||||
depends on !BR2_powerpc64le
|
||||
config BR2_powerpc_e6500
|
||||
bool "e6500"
|
||||
depends on !BR2_powerpc64le
|
||||
select BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
config BR2_powerpc_power4
|
||||
bool "power4"
|
||||
config BR2_powerpc_power5
|
||||
bool "power5"
|
||||
config BR2_powerpc_power6
|
||||
bool "power6"
|
||||
select BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
config BR2_powerpc_power7
|
||||
bool "power7"
|
||||
select BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
config BR2_powerpc_power8
|
||||
bool "power8"
|
||||
select BR2_POWERPC_CPU_HAS_ALTIVEC
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Target ABI"
|
||||
default BR2_powerpc_SPE if BR2_POWERPC_CPU_HAS_SPE
|
||||
default BR2_powerpc_CLASSIC
|
||||
help
|
||||
Application Binary Interface to use
|
||||
|
||||
config BR2_powerpc_CLASSIC
|
||||
bool "Classic"
|
||||
depends on !BR2_POWERPC_CPU_HAS_SPE
|
||||
config BR2_powerpc_SPE
|
||||
bool "SPE"
|
||||
depends on BR2_POWERPC_CPU_HAS_SPE
|
||||
endchoice
|
||||
|
||||
config BR2_POWERPC_SOFT_FLOAT
|
||||
bool "Use soft-float"
|
||||
select BR2_SOFT_FLOAT
|
||||
help
|
||||
If your target CPU does not have a Floating Point Unit (FPU)
|
||||
or a kernel FPU emulator, but you still wish to support
|
||||
floating point functions, then everything will need to be
|
||||
compiled with soft floating point support (-msoft-float).
|
||||
|
||||
config BR2_ARCH
|
||||
default "powerpc" if BR2_powerpc
|
||||
default "powerpc64" if BR2_powerpc64
|
||||
default "powerpc64le" if BR2_powerpc64le
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "BIG" if BR2_powerpc || BR2_powerpc64
|
||||
default "LITTLE" if BR2_powerpc64le
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
||||
|
||||
config BR2_GCC_TARGET_CPU
|
||||
default "401" if BR2_powerpc_401
|
||||
default "403" if BR2_powerpc_403
|
||||
default "405" if BR2_powerpc_405
|
||||
default "405fp" if BR2_powerpc_405fp
|
||||
default "440" if BR2_powerpc_440
|
||||
default "440fp" if BR2_powerpc_440fp
|
||||
default "464" if BR2_powerpc_464
|
||||
default "464fp" if BR2_powerpc_464fp
|
||||
default "476" if BR2_powerpc_476
|
||||
default "476fp" if BR2_powerpc_476fp
|
||||
default "505" if BR2_powerpc_505
|
||||
default "601" if BR2_powerpc_601
|
||||
default "602" if BR2_powerpc_602
|
||||
default "603" if BR2_powerpc_603
|
||||
default "603e" if BR2_powerpc_603e
|
||||
default "604" if BR2_powerpc_604
|
||||
default "604e" if BR2_powerpc_604e
|
||||
default "620" if BR2_powerpc_620
|
||||
default "630" if BR2_powerpc_630
|
||||
default "740" if BR2_powerpc_740
|
||||
default "7400" if BR2_powerpc_7400
|
||||
default "7450" if BR2_powerpc_7450
|
||||
default "750" if BR2_powerpc_750
|
||||
default "821" if BR2_powerpc_821
|
||||
default "823" if BR2_powerpc_823
|
||||
default "860" if BR2_powerpc_860
|
||||
default "970" if BR2_powerpc_970
|
||||
default "8540" if BR2_powerpc_8540
|
||||
default "8548" if BR2_powerpc_8548
|
||||
default "e300c2" if BR2_powerpc_e300c2
|
||||
default "e300c3" if BR2_powerpc_e300c3
|
||||
default "e500mc" if BR2_powerpc_e500mc
|
||||
default "power4" if BR2_powerpc_power4
|
||||
default "power5" if BR2_powerpc_power5
|
||||
default "power6" if BR2_powerpc_power6
|
||||
default "power7" if BR2_powerpc_power7
|
||||
default "power8" if BR2_powerpc_power8
|
||||
|
||||
config BR2_GCC_TARGET_ABI
|
||||
default "altivec" if BR2_PPC_ABI_altivec
|
||||
default "no-altivec" if BR2_PPC_ABI_no-altivec
|
||||
default "spe" if BR2_PPC_ABI_spe
|
||||
default "no-spe" if BR2_PPC_ABI_no-spe
|
||||
default "ibmlongdouble" if BR2_PPC_ABI_ibmlongdouble
|
||||
default "ieeelongdouble" if BR2_PPC_ABI_ieeelongdouble
|
33
arch/Config.in.sh
Normal file
33
arch/Config.in.sh
Normal file
@ -0,0 +1,33 @@
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
depends on BR2_sh
|
||||
default BR2_sh4
|
||||
help
|
||||
Specific CPU variant to use
|
||||
|
||||
config BR2_sh2a
|
||||
bool "sh2a (SH2A big endian)"
|
||||
config BR2_sh4
|
||||
bool "sh4 (SH4 little endian)"
|
||||
config BR2_sh4eb
|
||||
bool "sh4eb (SH4 big endian)"
|
||||
config BR2_sh4a
|
||||
bool "sh4a (SH4A little endian)"
|
||||
config BR2_sh4aeb
|
||||
bool "sh4aeb (SH4A big endian)"
|
||||
endchoice
|
||||
|
||||
config BR2_ARCH
|
||||
default "sh2a" if BR2_sh2a
|
||||
default "sh4" if BR2_sh4
|
||||
default "sh4eb" if BR2_sh4eb
|
||||
default "sh4a" if BR2_sh4a
|
||||
default "sh4aeb" if BR2_sh4aeb
|
||||
default "sh64" if BR2_sh64
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE" if BR2_sh4 || BR2_sh4a || BR2_sh64
|
||||
default "BIG" if BR2_sh2a || BR2_sh4eb || BR2_sh4aeb
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
22
arch/Config.in.sparc
Normal file
22
arch/Config.in.sparc
Normal file
@ -0,0 +1,22 @@
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
depends on BR2_sparc
|
||||
default BR2_sparc_v8
|
||||
help
|
||||
Specific CPU variant to use
|
||||
|
||||
config BR2_sparc_v8
|
||||
bool "v8"
|
||||
config BR2_sparc_leon3
|
||||
bool "leon3"
|
||||
endchoice
|
||||
|
||||
config BR2_ARCH
|
||||
default "sparc" if BR2_sparc
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "BIG"
|
||||
|
||||
config BR2_GCC_TARGET_CPU
|
||||
default "leon3" if BR2_sparc_leon3
|
||||
default "v8" if BR2_sparc_v8
|
270
arch/Config.in.x86
Normal file
270
arch/Config.in.x86
Normal file
@ -0,0 +1,270 @@
|
||||
# i386/x86_64 cpu features
|
||||
config BR2_X86_CPU_HAS_MMX
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_SSE
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_SSE2
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_SSE3
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_SSSE3
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_SSE4
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_SSE42
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_AVX
|
||||
bool
|
||||
config BR2_X86_CPU_HAS_AVX2
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
default BR2_x86_i586 if BR2_i386
|
||||
help
|
||||
Specific CPU variant to use
|
||||
|
||||
config BR2_x86_i386
|
||||
bool "i386"
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_i486
|
||||
bool "i486"
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_i586
|
||||
bool "i586"
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_i686
|
||||
bool "i686"
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_pentiumpro
|
||||
bool "pentium pro"
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_pentium_mmx
|
||||
bool "pentium MMX"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_pentium_m
|
||||
bool "pentium mobile"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_pentium2
|
||||
bool "pentium2"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_pentium3
|
||||
bool "pentium3"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_pentium4
|
||||
bool "pentium4"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_prescott
|
||||
bool "prescott"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_nocona
|
||||
bool "nocona"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
config BR2_x86_core2
|
||||
bool "core2"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
select BR2_X86_CPU_HAS_SSSE3
|
||||
config BR2_x86_corei7
|
||||
bool "corei7"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
select BR2_X86_CPU_HAS_SSSE3
|
||||
select BR2_X86_CPU_HAS_SSE4
|
||||
select BR2_X86_CPU_HAS_SSE42
|
||||
config BR2_x86_corei7_avx
|
||||
bool "corei7-avx"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
select BR2_X86_CPU_HAS_SSSE3
|
||||
select BR2_X86_CPU_HAS_SSE4
|
||||
select BR2_X86_CPU_HAS_SSE42
|
||||
select BR2_X86_CPU_HAS_AVX
|
||||
config BR2_x86_core_avx2
|
||||
bool "core-avx2"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
select BR2_X86_CPU_HAS_SSSE3
|
||||
select BR2_X86_CPU_HAS_SSE4
|
||||
select BR2_X86_CPU_HAS_SSE42
|
||||
select BR2_X86_CPU_HAS_AVX
|
||||
select BR2_X86_CPU_HAS_AVX2
|
||||
config BR2_x86_atom
|
||||
bool "atom"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
select BR2_X86_CPU_HAS_SSSE3
|
||||
config BR2_x86_k6
|
||||
bool "k6"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_k6_2
|
||||
bool "k6-2"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_athlon
|
||||
bool "athlon"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_athlon_4
|
||||
bool "athlon-4"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_opteron
|
||||
bool "opteron"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
config BR2_x86_opteron_sse3
|
||||
bool "opteron w/ SSE3"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
config BR2_x86_barcelona
|
||||
bool "barcelona"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
config BR2_x86_jaguar
|
||||
bool "jaguar"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
select BR2_X86_CPU_HAS_SSSE3
|
||||
select BR2_X86_CPU_HAS_SSE4
|
||||
select BR2_X86_CPU_HAS_SSE42
|
||||
config BR2_x86_steamroller
|
||||
bool "steamroller"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
select BR2_X86_CPU_HAS_SSE2
|
||||
select BR2_X86_CPU_HAS_SSE3
|
||||
select BR2_X86_CPU_HAS_SSSE3
|
||||
select BR2_X86_CPU_HAS_SSE4
|
||||
select BR2_X86_CPU_HAS_SSE42
|
||||
config BR2_x86_geode
|
||||
bool "geode"
|
||||
# Don't include MMX support because there several variant of geode
|
||||
# processor, some with MMX support, some without.
|
||||
# See: http://en.wikipedia.org/wiki/Geode_%28processor%29
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_c3
|
||||
bool "Via/Cyrix C3 (Samuel/Ezra cores)"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_c32
|
||||
bool "Via C3-2 (Nehemiah cores)"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
select BR2_X86_CPU_HAS_SSE
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_winchip_c6
|
||||
bool "IDT Winchip C6"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
config BR2_x86_winchip2
|
||||
bool "IDT Winchip 2"
|
||||
select BR2_X86_CPU_HAS_MMX
|
||||
depends on !BR2_x86_64
|
||||
endchoice
|
||||
|
||||
config BR2_ARCH
|
||||
default "i386" if BR2_x86_i386
|
||||
default "i486" if BR2_x86_i486
|
||||
default "i586" if BR2_x86_i586
|
||||
default "i586" if BR2_x86_pentium_mmx
|
||||
default "i586" if BR2_x86_geode
|
||||
default "i586" if BR2_x86_c3
|
||||
default "i686" if BR2_x86_c32
|
||||
default "i586" if BR2_x86_winchip_c6
|
||||
default "i586" if BR2_x86_winchip2
|
||||
default "i686" if BR2_x86_i686
|
||||
default "i686" if BR2_x86_pentium2
|
||||
default "i686" if BR2_x86_pentium3
|
||||
default "i686" if BR2_x86_pentium4
|
||||
default "i686" if BR2_x86_pentium_m
|
||||
default "i686" if BR2_x86_pentiumpro
|
||||
default "i686" if BR2_x86_prescott
|
||||
default "i686" if BR2_x86_nocona && BR2_i386
|
||||
default "i686" if BR2_x86_core2 && BR2_i386
|
||||
default "i686" if BR2_x86_corei7 && BR2_i386
|
||||
default "i686" if BR2_x86_atom && BR2_i386
|
||||
default "i686" if BR2_x86_opteron && BR2_i386
|
||||
default "i686" if BR2_x86_opteron_sse3 && BR2_i386
|
||||
default "i686" if BR2_x86_barcelona && BR2_i386
|
||||
default "i686" if BR2_x86_jaguar && BR2_i386
|
||||
default "i686" if BR2_x86_steamroller && BR2_i386
|
||||
default "i686" if BR2_x86_k6
|
||||
default "i686" if BR2_x86_k6_2
|
||||
default "i686" if BR2_x86_athlon
|
||||
default "i686" if BR2_x86_athlon_4
|
||||
default "x86_64" if BR2_x86_64
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE"
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y if !BR2_x86_i386
|
||||
|
||||
config BR2_GCC_TARGET_ARCH
|
||||
default "i386" if BR2_x86_i386
|
||||
default "i486" if BR2_x86_i486
|
||||
default "i586" if BR2_x86_i586
|
||||
default "pentium-mmx" if BR2_x86_pentium_mmx
|
||||
default "i686" if BR2_x86_i686
|
||||
default "pentiumpro" if BR2_x86_pentiumpro
|
||||
default "pentium-m" if BR2_x86_pentium_m
|
||||
default "pentium2" if BR2_x86_pentium2
|
||||
default "pentium3" if BR2_x86_pentium3
|
||||
default "pentium4" if BR2_x86_pentium4
|
||||
default "prescott" if BR2_x86_prescott
|
||||
default "nocona" if BR2_x86_nocona
|
||||
default "core2" if BR2_x86_core2
|
||||
default "corei7" if BR2_x86_corei7
|
||||
default "corei7-avx" if BR2_x86_corei7_avx
|
||||
default "core-avx2" if BR2_x86_core_avx2
|
||||
default "atom" if BR2_x86_atom
|
||||
default "k8" if BR2_x86_opteron
|
||||
default "k8-sse3" if BR2_x86_opteron_sse3
|
||||
default "barcelona" if BR2_x86_barcelona
|
||||
default "btver2" if BR2_x86_jaguar
|
||||
default "bdver3" if BR2_x86_steamroller
|
||||
default "k6" if BR2_x86_k6
|
||||
default "k6-2" if BR2_x86_k6_2
|
||||
default "athlon" if BR2_x86_athlon
|
||||
default "athlon-4" if BR2_x86_athlon_4
|
||||
default "winchip-c6" if BR2_x86_winchip_c6
|
||||
default "winchip2" if BR2_x86_winchip2
|
||||
default "c3" if BR2_x86_c3
|
||||
default "c3-2" if BR2_x86_c32
|
||||
default "geode" if BR2_x86_geode
|
59
arch/Config.in.xtensa
Normal file
59
arch/Config.in.xtensa
Normal file
@ -0,0 +1,59 @@
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
depends on BR2_xtensa
|
||||
default BR2_xtensa_fsf
|
||||
config BR2_XTENSA_CUSTOM
|
||||
select BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
bool "Custom Xtensa processor configuration"
|
||||
config BR2_xtensa_fsf
|
||||
select BR2_ARCH_HAS_MMU_MANDATORY
|
||||
bool "fsf - Default configuration"
|
||||
endchoice
|
||||
|
||||
config BR2_XTENSA_CUSTOM_NAME
|
||||
string "Custom Xtensa processor configuration name"
|
||||
depends on BR2_XTENSA_CUSTOM
|
||||
default ""
|
||||
help
|
||||
Name given to a custom Xtensa processor configuration.
|
||||
|
||||
config BR2_XTENSA_CORE_NAME
|
||||
string
|
||||
default BR2_XTENSA_CUSTOM_NAME if BR2_XTENSA_CUSTOM
|
||||
default "" if BR2_xtensa_fsf
|
||||
|
||||
config BR2_XTENSA_OVERLAY_DIR
|
||||
string "Overlay directory for custom configuration"
|
||||
depends on BR2_XTENSA_CUSTOM
|
||||
default ""
|
||||
help
|
||||
Provide the directory path that contains the overlay file
|
||||
for a custom processor configuration. The path is relative
|
||||
to the top directory of buildroot.
|
||||
These overlay files are tar packages with updated configuration
|
||||
files for various toolchain packages and Xtensa processor
|
||||
configurations. They are provided by the processor vendor or
|
||||
directly from Tensilica.
|
||||
|
||||
choice
|
||||
prompt "Target Architecture Endianness"
|
||||
depends on BR2_XTENSA_CUSTOM
|
||||
default BR2_XTENSA_LITTLE_ENDIAN
|
||||
|
||||
config BR2_XTENSA_LITTLE_ENDIAN
|
||||
bool "Little endian"
|
||||
|
||||
config BR2_XTENSA_BIG_ENDIAN
|
||||
bool "Big endian"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "LITTLE" if BR2_XTENSA_LITTLE_ENDIAN
|
||||
default "BIG" if BR2_xtensa_fsf || BR2_XTENSA_BIG_ENDIAN
|
||||
|
||||
config BR2_ARCH
|
||||
default "xtensa" if BR2_xtensa
|
||||
|
||||
config BR2_ARCH_HAS_ATOMICS
|
||||
default y
|
7
board/bananapi/boot.cmd
Normal file
7
board/bananapi/boot.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
setenv bootargs console=tty1 root=/dev/mmcblk0p2 rootwait panic=10 earlyprintk ${extra}
|
||||
fatload mmc 0 0x49000000 sun7i-a20-bananapi.dtb
|
||||
fatload mmc 0 0x46000000 uImage
|
||||
setenv fdt_high ffffffff
|
||||
setenv video-mode sunxi:1024x768-24@60,monitor=hdmi,hpd=1,edid=1
|
||||
bootm 0x46000000 - 0x49000000
|
||||
|
3256
board/bananapi/kernel.config
Normal file
3256
board/bananapi/kernel.config
Normal file
File diff suppressed because it is too large
Load Diff
BIN
board/bananapi/linux-rtl8192cu.patch.gz
Normal file
BIN
board/bananapi/linux-rtl8192cu.patch.gz
Normal file
Binary file not shown.
12
board/bananapi/mkimage.sh
Executable file
12
board/bananapi/mkimage.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
BOARD_DIR=$(dirname $0)
|
||||
COMMON_DIR=$BOARD_DIR/../common
|
||||
|
||||
export BOARD=$(basename $BOARD_DIR)
|
||||
export IMG_DIR=$BOARD_DIR/../../output/$BOARD/images/
|
||||
export UBOOT_BIN=$IMG_DIR/u-boot-sunxi-with-spl.bin
|
||||
export UBOOT_SEEK=16
|
||||
|
||||
$COMMON_DIR/mkimage.sh
|
||||
|
1
board/bananapi/overlay/etc/board
Normal file
1
board/bananapi/overlay/etc/board
Normal file
@ -0,0 +1 @@
|
||||
bananapi
|
44
board/bananapi/overlay/etc/init.d/S00hostname
Executable file
44
board/bananapi/overlay/etc/init.d/S00hostname
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
start() {
|
||||
echo -n "Setting hostname: "
|
||||
|
||||
sn=$(cat /sys/class/net/eth0/address | tr -d ':')
|
||||
sn=${sn: -8}
|
||||
echo $sn > /var/cache/serial_number
|
||||
hostname="meye-$sn"
|
||||
/bin/hostname $hostname
|
||||
echo "127.0.0.1 localhost $hostname" > /etc/hosts
|
||||
|
||||
echo "done"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
15
board/bananapi/postscript.sh
Executable file
15
board/bananapi/postscript.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
UBOOT_HOST_DIR=$TARGET/../build/host-uboot-tools-*
|
||||
|
||||
# copy System.map
|
||||
cp $TARGET/../build/linux-*/System.map $TARGET/System.map
|
||||
|
||||
cp $IMG_DIR/uImage $BOOT_DIR
|
||||
cp $IMG_DIR/sun7i-a20-bananapi.dtb $BOOT_DIR
|
||||
|
||||
$UBOOT_HOST_DIR/tools/mkimage -C none -A arm -T script -d $BOARD_DIR/boot.cmd $BOOT_DIR/boot.scr
|
||||
|
||||
# disable software updating
|
||||
sed -i 's/enable_update true/enable_update false/' $TARGET/etc/motioneye.conf
|
||||
|
1042
board/common/busybox-1.22.x.config
Normal file
1042
board/common/busybox-1.22.x.config
Normal file
File diff suppressed because it is too large
Load Diff
148
board/common/cleanups.sh
Executable file
148
board/common/cleanups.sh
Executable file
@ -0,0 +1,148 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$TARGET" ]; then
|
||||
echo "this script must be invoked from postscript.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf $TARGET/etc/network/
|
||||
rm -rf $TARGET/etc/dhcp/
|
||||
rm -rf $TARGET/etc/ssh/
|
||||
rm -rf $TARGET/etc/rc_keymaps
|
||||
rm -rf $TARGET/etc/default
|
||||
rm -rf $TARGET/etc/ctdb
|
||||
rm -rf $TARGET/etc/sudoers.d
|
||||
rm -rf $TARGET/usr/share/locale/*
|
||||
|
||||
rm -f $TARGET/etc/rc_maps.cfg
|
||||
rm -f $TARGET/etc/udev/hwdb.d/20-pci-vendor-model.hwdb
|
||||
rm -f $TARGET/etc/motion-dist.conf
|
||||
rm -f $TARGET/etc/hostname
|
||||
rm -f $TARGET/etc/os-release
|
||||
rm -f $TARGET/boot/.gitkeep
|
||||
|
||||
find $TARGET -name '*libmount*' | xargs rm -f
|
||||
|
||||
rm -f $TARGET/bin/more
|
||||
rm -f $TARGET/bin/wdctl
|
||||
rm -f $TARGET/usr/sbin/readprofile
|
||||
rm -f $TARGET/sbin/nologin
|
||||
rm -f $TARGET/bin/mountpoint
|
||||
rm -f $TARGET/sbin/ldattach
|
||||
rm -f $TARGET/sbin/fstrim
|
||||
rm -f $TARGET/usr/sbin/rtcwake
|
||||
rm -f $TARGET/bin/lsblk
|
||||
rm -f $TARGET/usr/bin/col
|
||||
rm -f $TARGET/sbin/fdformat
|
||||
rm -f $TARGET/sbin/ctrlaltdel
|
||||
rm -f $TARGET/bin/findmnt
|
||||
rm -f $TARGET/usr/bin/colcrt
|
||||
rm -f $TARGET/usr/sbin/partx
|
||||
rm -f $TARGET/sbin/fsfreeze
|
||||
rm -f $TARGET/usr/bin/colrm
|
||||
rm -f $TARGET/usr/sbin/addpart
|
||||
rm -f $TARGET/sbin/blkdiscard
|
||||
rm -f $TARGET/usr/sbin/delpart
|
||||
rm -f $TARGET/usr/bin/column
|
||||
rm -f $TARGET/sbin/swapon
|
||||
rm -f $TARGET/usr/sbin/resizepart
|
||||
rm -f $TARGET/usr/bin/hexdump
|
||||
rm -f $TARGET/sbin/swapoff
|
||||
rm -f $TARGET/usr/bin/rev
|
||||
rm -f $TARGET/sbin/chcpu
|
||||
rm -f $TARGET/sbin/hwclock
|
||||
rm -f $TARGET/usr/bin/tailf
|
||||
rm -f $TARGET/usr/bin/pg
|
||||
rm -f $TARGET/sbin/blkid
|
||||
rm -f $TARGET/usr/bin/ul
|
||||
rm -f $TARGET/sbin/findfs
|
||||
rm -f $TARGET/sbin/wipefs
|
||||
rm -f $TARGET/usr/bin/script
|
||||
rm -f $TARGET/usr/bin/scriptreplay
|
||||
rm -f $TARGET/sbin/fsck.minix
|
||||
rm -f $TARGET/sbin/mkfs.minix
|
||||
rm -f $TARGET/usr/bin/setterm
|
||||
rm -f $TARGET/usr/bin/flock
|
||||
rm -f $TARGET/sbin/mkfs
|
||||
rm -f $TARGET/usr/bin/ipcmk
|
||||
rm -f $TARGET/sbin/mkfs.bfs
|
||||
rm -f $TARGET/usr/bin/ipcrm
|
||||
rm -f $TARGET/usr/bin/ipcs
|
||||
rm -f $TARGET/sbin/mkswap
|
||||
rm -f $TARGET/usr/bin/renice
|
||||
rm -f $TARGET/sbin/swaplabel
|
||||
rm -f $TARGET/usr/bin/setsid
|
||||
rm -f $TARGET/sbin/blockdev
|
||||
rm -f $TARGET/usr/bin/cytune
|
||||
rm -f $TARGET/usr/bin/setarch
|
||||
rm -f $TARGET/sbin/sfdisk
|
||||
rm -f $TARGET/usr/bin/prlimit
|
||||
rm -f $TARGET/sbin/cfdisk
|
||||
rm -f $TARGET/usr/bin/lscpu
|
||||
rm -f $TARGET/usr/bin/unshare
|
||||
rm -f $TARGET/usr/bin/nsenter
|
||||
rm -f $TARGET/usr/bin/cal
|
||||
rm -f $TARGET/usr/bin/look
|
||||
rm -f $TARGET/usr/bin/mcookie
|
||||
rm -f $TARGET/usr/bin/namei
|
||||
rm -f $TARGET/usr/bin/whereis
|
||||
rm -f $TARGET/usr/bin/lslocks
|
||||
rm -f $TARGET/usr/bin/uuidgen
|
||||
rm -f $TARGET/usr/bin/getopt
|
||||
rm -f $TARGET/bin/isosize
|
||||
rm -f $TARGET/usr/sbin/fdformat
|
||||
|
||||
rm -f $TARGET/usr/bin/slogin
|
||||
rm -f $TARGET/usr/bin/ssh-keyscan
|
||||
rm -f $TARGET/usr/bin/ssh-add
|
||||
rm -f $TARGET/usr/bin/ssh-agent
|
||||
|
||||
rm -f $TARGET/usr/libexec/ssh-keysign
|
||||
rm -f $TARGET/usr/libexec/ssh-pkcs11-helper
|
||||
rm -f $TARGET/usr/libexec/rmt
|
||||
|
||||
# samba4 unneeded stuff
|
||||
rm -f $TARGET/usr/bin/cifsdd
|
||||
rm -f $TARGET/usr/bin/containers_*
|
||||
rm -f $TARGET/usr/bin/ctdb*
|
||||
rm -f $TARGET/usr/bin/dbwrap_tool
|
||||
rm -f $TARGET/usr/bin/eventlogadm
|
||||
rm -f $TARGET/usr/bin/gentest
|
||||
rm -f $TARGET/usr/bin/ldb*
|
||||
rm -f $TARGET/usr/bin/locktest
|
||||
rm -f $TARGET/usr/bin/ltdbtool
|
||||
rm -f $TARGET/usr/bin/masktest
|
||||
rm -f $TARGET/usr/bin/ndrdump
|
||||
rm -f $TARGET/usr/bin/net
|
||||
rm -f $TARGET/usr/bin/ntdb*
|
||||
rm -f $TARGET/usr/bin/ntlm_auth
|
||||
rm -f $TARGET/usr/bin/oLschema2ldif
|
||||
rm -f $TARGET/usr/bin/onnode
|
||||
rm -f $TARGET/usr/bin/pdbedit
|
||||
rm -f $TARGET/usr/bin/pidl
|
||||
rm -f $TARGET/usr/bin/ping_pong
|
||||
rm -f $TARGET/usr/bin/profiles
|
||||
rm -f $TARGET/usr/bin/reg*
|
||||
rm -f $TARGET/usr/bin/rpcclient
|
||||
rm -f $TARGET/usr/bin/sharesec
|
||||
rm -f $TARGET/usr/bin/smbcacls
|
||||
rm -f $TARGET/usr/bin/smbcontrol
|
||||
rm -f $TARGET/usr/bin/smbcquotas
|
||||
rm -f $TARGET/usr/bin/smbget
|
||||
rm -f $TARGET/usr/bin/smbspool
|
||||
rm -f $TARGET/usr/bin/smbstatus
|
||||
rm -f $TARGET/usr/bin/smbta-util
|
||||
rm -f $TARGET/usr/bin/smbtar
|
||||
rm -f $TARGET/usr/bin/smbtree
|
||||
rm -f $TARGET/usr/bin/smnotify
|
||||
rm -f $TARGET/usr/bin/tdb*
|
||||
rm -f $TARGET/usr/bin/testparm
|
||||
rm -f $TARGET/usr/bin/tvservice
|
||||
rm -f $TARGET/usr/bin/wbinfo
|
||||
rm -f $TARGET/usr/sbin/ctdb*
|
||||
rm -f $TARGET/usr/sbin/winbindd
|
||||
rm -f $TARGET/usr/share/perl5
|
||||
|
||||
rm -rf $TARGET/usr/lib/python2.7/site-packages/samba
|
||||
rm -rf $TARGET/usr/lib/python2.7/ensurepip
|
||||
|
170
board/common/mkimage.sh
Executable file
170
board/common/mkimage.sh
Executable file
@ -0,0 +1,170 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ -z "$IMG_DIR" ] || [ -z "$BOARD" ]; then
|
||||
echo "this script must be invoked from board specific mkimage.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test "root" != "$USER" && exec sudo -E $0 "$@"
|
||||
|
||||
function msg() {
|
||||
echo ":: $1"
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
set +e
|
||||
|
||||
# unmount loop mounts
|
||||
mount | grep /dev/loop | cut -d ' ' -f 3 | xargs -r umount
|
||||
|
||||
# remove loop devices
|
||||
losetup -a | cut -d ':' -f 1 | xargs -r losetup -d
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
BOOT_SRC=$IMG_DIR/boot
|
||||
BOOT=$IMG_DIR/.boot
|
||||
BOOT_IMG=$IMG_DIR/boot.img
|
||||
BOOT_SIZE="16" # MB
|
||||
|
||||
ROOT_SRC=$IMG_DIR/rootfs.tar
|
||||
ROOT=$IMG_DIR/.root
|
||||
ROOT_IMG=$IMG_DIR/root.img
|
||||
ROOT_SIZE="120" # MB
|
||||
|
||||
DISK_SIZE="140" # MB
|
||||
|
||||
# boot filesystem
|
||||
msg "creating boot loop device"
|
||||
dd if=/dev/zero of=$BOOT_IMG bs=1M count=$BOOT_SIZE
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f $BOOT_IMG
|
||||
|
||||
msg "creating boot filesystem"
|
||||
mkfs.vfat -F16 $loop_dev
|
||||
|
||||
msg "mounting boot loop device"
|
||||
mkdir -p $BOOT
|
||||
mount -o loop $loop_dev $BOOT
|
||||
|
||||
msg "copying boot filesystem contents"
|
||||
cp $BOOT_SRC/* $BOOT
|
||||
sync
|
||||
|
||||
msg "unmounting boot filesystem"
|
||||
umount $BOOT
|
||||
|
||||
msg "destroying boot loop device"
|
||||
losetup -d $loop_dev
|
||||
sync
|
||||
|
||||
# root filesystem
|
||||
msg "creating root loop device"
|
||||
dd if=/dev/zero of=$ROOT_IMG bs=1M count=$ROOT_SIZE
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f $ROOT_IMG
|
||||
|
||||
msg "creating root filesystem"
|
||||
mkfs.ext4 $loop_dev
|
||||
tune2fs -O^has_journal $loop_dev
|
||||
|
||||
msg "mounting root loop device"
|
||||
mkdir -p $ROOT
|
||||
mount -o loop $loop_dev $ROOT
|
||||
|
||||
msg "copying root filesystem contents"
|
||||
tar -xpsf $ROOT_SRC -C $ROOT
|
||||
|
||||
msg "unmounting root filesystem"
|
||||
umount $ROOT
|
||||
|
||||
msg "destroying root loop device"
|
||||
losetup -d $loop_dev
|
||||
sync
|
||||
|
||||
DISK_IMG=$IMG_DIR/disk.img
|
||||
BOOT_IMG=$IMG_DIR/boot.img
|
||||
ROOT_IMG=$IMG_DIR/root.img
|
||||
|
||||
if ! [ -r $BOOT_IMG ]; then
|
||||
echo "boot image missing"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if ! [ -r $ROOT_IMG ]; then
|
||||
echo "root image missing"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# disk image
|
||||
msg "creating disk loop device"
|
||||
dd if=/dev/zero of=$DISK_IMG bs=1M count=$DISK_SIZE
|
||||
if [ -n "$UBOOT_BIN" ] && [ -n "$UBOOT_SEEK" ]; then
|
||||
msg "copying u-boot image"
|
||||
dd conv=notrunc if=$UBOOT_BIN of=$DISK_IMG bs=512 seek=$UBOOT_SEEK
|
||||
fi
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f $DISK_IMG
|
||||
|
||||
msg "partitioning disk"
|
||||
set +e
|
||||
fdisk -u=sectors $loop_dev <<END
|
||||
o
|
||||
n
|
||||
p
|
||||
1
|
||||
|
||||
+${BOOT_SIZE}M
|
||||
n
|
||||
p
|
||||
2
|
||||
|
||||
+${ROOT_SIZE}M
|
||||
|
||||
t
|
||||
1
|
||||
e
|
||||
a
|
||||
1
|
||||
w
|
||||
END
|
||||
set -e
|
||||
sync
|
||||
|
||||
msg "reading partition offsets"
|
||||
boot_offs=$(fdisk -u=sectors -l $loop_dev | grep -E 'loop[[:digit:]]p1' | tr -d '*' | tr -s ' ' | cut -d ' ' -f 2)
|
||||
root_offs=$(fdisk -u=sectors -l $loop_dev | grep -E 'loop[[:digit:]]p2' | tr -d '*' | tr -s ' ' | cut -d ' ' -f 2)
|
||||
|
||||
msg "destroying disk loop device"
|
||||
losetup -d $loop_dev
|
||||
|
||||
msg "creating boot loop device"
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f -o $(($boot_offs * 512)) $DISK_IMG
|
||||
|
||||
msg "copying boot image"
|
||||
dd if=$BOOT_IMG of=$loop_dev
|
||||
sync
|
||||
|
||||
msg "destroying boot loop device"
|
||||
losetup -d $loop_dev
|
||||
|
||||
msg "creating root loop device"
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f -o $(($root_offs * 512)) $DISK_IMG
|
||||
sync
|
||||
|
||||
msg "copying root image"
|
||||
dd if=$ROOT_IMG of=$loop_dev
|
||||
sync
|
||||
|
||||
msg "destroying root loop device"
|
||||
losetup -d $loop_dev
|
||||
sync
|
||||
|
||||
mv $DISK_IMG $(dirname $DISK_IMG)/motioneyeos-$BOARD.img
|
||||
DISK_IMG=$(dirname $DISK_IMG)/motioneyeos-$BOARD.img
|
||||
|
||||
msg "$(realpath "$DISK_IMG") is ready"
|
||||
|
5
board/common/overlay/etc/date.conf
Normal file
5
board/common/overlay/etc/date.conf
Normal file
@ -0,0 +1,5 @@
|
||||
date_timeout=10
|
||||
date_method=http
|
||||
date_host="google.com"
|
||||
date_interval=900
|
||||
|
11
board/common/overlay/etc/fstab
Normal file
11
board/common/overlay/etc/fstab
Normal file
@ -0,0 +1,11 @@
|
||||
# /etc/fstab: static file system information.
|
||||
#
|
||||
# <file system> <mount pt> <type> <options> <dump> <pass>
|
||||
/dev/mmcblk0p1 /boot vfat ro,defaults 0 0
|
||||
/dev/mmcblk0p3 /data auto defaults,noatime 0 0
|
||||
proc /proc proc defaults 0 0
|
||||
devpts /dev/pts devpts gid=5,mode=620 0 0
|
||||
tmpfs /dev/shm tmpfs mode=0777 0 0
|
||||
tmpfs /tmp tmpfs mode=1777 0 0
|
||||
sysfs /sys sysfs defaults 0 0
|
||||
|
28
board/common/overlay/etc/group
Normal file
28
board/common/overlay/etc/group
Normal file
@ -0,0 +1,28 @@
|
||||
root:x:0:
|
||||
daemon:x:1:
|
||||
bin:x:2:
|
||||
sys:x:3:
|
||||
adm:x:4:
|
||||
tty:x:5:
|
||||
disk:x:6:
|
||||
lp:x:7:
|
||||
mail:x:8:
|
||||
kmem:x:9:
|
||||
wheel:x:10:root
|
||||
cdrom:x:11:
|
||||
dialout:x:18:
|
||||
floppy:x:19:
|
||||
video:x:28:
|
||||
audio:x:29:
|
||||
tape:x:32:
|
||||
www-data:x:33:
|
||||
utmp:x:43:
|
||||
plugdev:x:46:
|
||||
staff:x:50:
|
||||
lock:x:54:
|
||||
haldaemon:x:68:
|
||||
dbus:x:81:
|
||||
netdev:x:82:
|
||||
ftp:x:83
|
||||
nogroup:x:99:
|
||||
users:x:100:
|
1
board/common/overlay/etc/hosts
Symbolic link
1
board/common/overlay/etc/hosts
Symbolic link
@ -0,0 +1 @@
|
||||
/tmp/hosts
|
43
board/common/overlay/etc/init.d/S00hostname
Executable file
43
board/common/overlay/etc/init.d/S00hostname
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
start() {
|
||||
echo -n "Setting hostname: "
|
||||
|
||||
sn=$(cat /proc/cpuinfo | grep Serial | tr -d ' ' | cut -d ':' -f 2)
|
||||
sn=${sn: -8}
|
||||
echo $sn > /var/cache/serial_number
|
||||
hostname="meye-$sn"
|
||||
/bin/hostname $hostname
|
||||
echo "127.0.0.1 localhost $hostname" > /etc/hosts
|
||||
|
||||
echo "done"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
28
board/common/overlay/etc/init.d/S01logging
Executable file
28
board/common/overlay/etc/init.d/S01logging
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start logging
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting logging: "
|
||||
start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n
|
||||
echo "done"
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping logging: "
|
||||
start-stop-daemon -K -q -p /var/run/syslogd.pid
|
||||
echo "done"
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
27
board/common/overlay/etc/init.d/S02watchdog
Executable file
27
board/common/overlay/etc/init.d/S02watchdog
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
test -c /dev/watchdog || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting watchdog: "
|
||||
watchdog -t 5 /dev/watchdog
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping watchdog: "
|
||||
kill `pidof watchdog` 2>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
45
board/common/overlay/etc/init.d/S10udev
Executable file
45
board/common/overlay/etc/init.d/S10udev
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/udev/udev.conf ] || exit 0
|
||||
|
||||
source /etc/udev/udev.conf
|
||||
|
||||
start() {
|
||||
echo -n "Starting eudev: "
|
||||
echo '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||
/sbin/udevd --daemon
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
/sbin/udevadm trigger --type=subsystems --action=add
|
||||
/sbin/udevadm trigger --type=devices --action=add
|
||||
/sbin/udevadm settle --timeout=30
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping eudev: "
|
||||
udevadm control --stop-exec-queue
|
||||
killall udevd
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
120
board/common/overlay/etc/init.d/S11datapart
Executable file
120
board/common/overlay/etc/init.d/S11datapart
Executable file
@ -0,0 +1,120 @@
|
||||
#!/bin/bash
|
||||
|
||||
DISK_DEV="/dev/mmcblk0"
|
||||
DATA_DEV="${DISK_DEV}p3"
|
||||
set +e
|
||||
|
||||
# don't execute the script if kernel cmdline has "nodatapart" keyword
|
||||
if /bin/cat /proc/cmdline | /bin/grep "nodatapart"; then
|
||||
exit;
|
||||
fi
|
||||
|
||||
|
||||
start() {
|
||||
echo "Setting up data partition"
|
||||
|
||||
# if the partition is not present, allocate it and issue a reboot
|
||||
if ! [ -b $DATA_DEV ]; then
|
||||
echo "Allocating data partition"
|
||||
echo -e "n
|
||||
p
|
||||
3
|
||||
\n
|
||||
\n
|
||||
w
|
||||
" | /sbin/fdisk $DISK_DEV
|
||||
sync
|
||||
sleep 1
|
||||
echo b > /proc/sysrq-trigger
|
||||
fi
|
||||
|
||||
# if the filesystem is not valid (not yet formatted), format it
|
||||
if /usr/sbin/debugfs -R 'lcd /' $DATA_DEV 2>&1 | grep 'Bad magic'; then
|
||||
echo "Formatting data partition"
|
||||
mkfs.ext4 $DATA_DEV
|
||||
mount /data
|
||||
|
||||
fi
|
||||
|
||||
if df /dev/mmcblk0p3 >/dev/null 2>&1; then
|
||||
# make sure required directories exist
|
||||
mkdir -p /data/etc
|
||||
mkdir -p /data/log
|
||||
mkdir -p /data/output
|
||||
mkdir -p /data/media
|
||||
chmod 775 /data/output
|
||||
chmod 775 /data/media
|
||||
|
||||
# make sure a localtime symlink exists
|
||||
if ! [ -e /data/etc/localtime ]; then
|
||||
ln -s /usr/share/zoneinfo/UTC /data/etc/localtime
|
||||
fi
|
||||
|
||||
# make sure root and admin users exist
|
||||
touch /data/etc/shadow
|
||||
chmod go-rwx /data/etc/shadow
|
||||
if ! grep root /data/etc/shadow &>/dev/null; then
|
||||
echo 'root::::::::' >> /data/etc/shadow
|
||||
fi
|
||||
if ! grep admin /data/etc/shadow &>/dev/null; then
|
||||
echo 'admin::::::::' >> /data/etc/shadow
|
||||
fi
|
||||
|
||||
# set root and admin passwords
|
||||
if [ -f /data/etc/motion.conf ]; then
|
||||
password=$(cat /data/etc/motion.conf | grep admin_password | cut -d ' ' -f 3-)
|
||||
fi
|
||||
if [ -z "$password" ]; then
|
||||
echo "Setting empty admin password"
|
||||
else
|
||||
echo "Setting custom root/admin password"
|
||||
fi
|
||||
|
||||
rm -f /data/etc/shadow+
|
||||
|
||||
echo -en "$password\n$password\n" | passwd &>/dev/null # root
|
||||
echo -en "$password\n$password\n" | passwd admin &>/dev/null # admin
|
||||
|
||||
sed -r -i 's/root:([^:]+):[[:digit:]]+:/root:\1::/' /data/etc/shadow # removes pwd expiration
|
||||
sed -r -i 's/admin:([^:]+):[[:digit:]]+:/admin:\1::/' /data/etc/shadow # removes pwd expiration
|
||||
|
||||
# mount binds
|
||||
mount --rbind /data/output /home/ftp/sdcard
|
||||
mount --rbind /data/media /home/ftp/storage
|
||||
|
||||
# copy common sys config files
|
||||
if [ -f /etc/watch.conf ] && ! [ -f /data/etc/watch.conf ]; then
|
||||
cp /etc/watch.conf /data/etc/watch.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
130
board/common/overlay/etc/init.d/S35wifi
Executable file
130
board/common/overlay/etc/init.d/S35wifi
Executable file
@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
|
||||
sys_conf="/etc/wpa_supplicant.conf"
|
||||
conf="/data/etc/wpa_supplicant.conf"
|
||||
log="/var/log/wpa_supplicant.log"
|
||||
prog="/usr/sbin/wpa_supplicant"
|
||||
iface=wlan0
|
||||
driver=wext
|
||||
|
||||
watch_conf="/data/etc/watch.conf"
|
||||
link_watch=yes
|
||||
link_watch_timeout=20
|
||||
|
||||
if [ -f $watch_conf ]; then
|
||||
source $watch_conf
|
||||
fi
|
||||
|
||||
if [ -f $sys_conf ] && ! [ -f $conf ]; then
|
||||
mkdir -p $(dirname $conf)
|
||||
cp $sys_conf $conf
|
||||
fi
|
||||
|
||||
if ! [ -f $conf ] || ! [ -s $conf ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
SSID=$(cat ${conf} | grep ssid | grep -v scan_ssid | cut -d '"' -f 2)
|
||||
|
||||
if [ -z "$SSID" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
connected() {
|
||||
if ip link show dev $iface 2>&1 | grep LOWER_UP > /dev/null 2>&1; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
watch() {
|
||||
count=0
|
||||
while true; do
|
||||
sleep 5
|
||||
if connected; then
|
||||
count=0
|
||||
else
|
||||
if [ $count -lt $link_watch_timeout ]; then
|
||||
count=$(($count + 5))
|
||||
logger -t wifi -s "disconnected"
|
||||
else
|
||||
logger -t wifi -s "disconnected for $link_watch_timeout seconds, rebooting"
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
start() {
|
||||
echo -n "Starting wpa_supplicant: "
|
||||
|
||||
# wait up to 5 seconds for interface
|
||||
count=0
|
||||
while ! ifconfig $iface >/dev/null 2>&1; do
|
||||
sleep 1
|
||||
count=$(($count + 1))
|
||||
if [ $count -ge 5 ]; then
|
||||
echo "no device"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
iwconfig $iface power off > /dev/null 2>&1
|
||||
$prog -i$iface -c$conf -D$driver -B > $log 2>&1
|
||||
count=0
|
||||
while true; do
|
||||
sleep 1
|
||||
|
||||
if connected; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $count -gt $link_watch_timeout ] || ! pidof wpa_supplicant > /dev/null; then
|
||||
echo "failed"
|
||||
reboot
|
||||
return
|
||||
fi
|
||||
|
||||
count=$(($count + 1))
|
||||
done
|
||||
|
||||
if [ "$link_watch" == "yes" ]; then
|
||||
watch &
|
||||
fi
|
||||
|
||||
echo "done"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Shutting down wpa_supplicant: "
|
||||
kill `pidof wpa_supplicant` 2>/dev/null
|
||||
ps | grep wifi | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
echo "done"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
147
board/common/overlay/etc/init.d/S36ppp
Executable file
147
board/common/overlay/etc/init.d/S36ppp
Executable file
@ -0,0 +1,147 @@
|
||||
#!/bin/sh
|
||||
|
||||
sys_conf="/etc/ppp/default"
|
||||
conf="/data/etc/ppp"
|
||||
prog="/usr/sbin/pppd"
|
||||
net_dev="ppp0"
|
||||
provider="mobile"
|
||||
|
||||
watch_conf="/data/etc/watch.conf"
|
||||
|
||||
if [ -f $watch_conf ]; then
|
||||
source $watch_conf
|
||||
fi
|
||||
|
||||
if [ -d $sys_conf ] && ! [ -d $conf ]; then
|
||||
mkdir -p $(dirname $conf)
|
||||
cp -r $sys_conf $conf
|
||||
fi
|
||||
|
||||
if ! [ -f $conf/modem ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
connected() {
|
||||
if ifconfig | grep ppp0 >/dev/null 2>&1; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
watch() {
|
||||
count=0
|
||||
while true; do
|
||||
sleep 5
|
||||
if connected; then
|
||||
count=0
|
||||
else
|
||||
if [ $count -lt $link_watch_timeout ]; then
|
||||
count=$(($count + 5))
|
||||
logger -t ppp -s "disconnected"
|
||||
else
|
||||
logger -t ppp -s "disconnected for $link_watch_timeout seconds, rebooting"
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -s $conf/usb_modeswitch ]; then
|
||||
IFS=: venprod=($(cat $conf/usb_modeswitch))
|
||||
vendor=${venprod[0]}
|
||||
product=${venprod[1]}
|
||||
# wait for usb device
|
||||
if [ -n "$vendor" ] && [ -n "$product" ]; then
|
||||
echo -n "Starting usb_modeswitch: "
|
||||
count=0
|
||||
while true; do
|
||||
if lsusb | grep $vendor:$product >/dev/null 2>&1 || [ $count -gt $link_watch_timeout ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
count=$(($count + 1))
|
||||
sleep 1
|
||||
done
|
||||
/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.conf -v $vendor -p $product > /var/log/usb_modeswitch.log 2>&1
|
||||
echo "done"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Starting pppd: "
|
||||
|
||||
# wait for modem
|
||||
modem=$(head -n 1 $conf/modem)
|
||||
count=0
|
||||
while true; do
|
||||
if [ -e /dev/$modem ] || [ $count -gt $link_watch_timeout ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
count=$(($count + 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if ! [ -e /dev/$modem ]; then
|
||||
echo "modem /dev/$modem not present"
|
||||
return
|
||||
fi
|
||||
|
||||
$prog call $provider
|
||||
count=0
|
||||
while true; do
|
||||
sleep 1
|
||||
|
||||
if connected; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $count -gt $link_watch_timeout ] || ! pidof pppd > /dev/null; then
|
||||
echo "failed"
|
||||
reboot
|
||||
return
|
||||
fi
|
||||
|
||||
count=$(($count + 1))
|
||||
done
|
||||
|
||||
if [ "$link_watch" == "yes" ]; then
|
||||
watch &
|
||||
fi
|
||||
|
||||
echo "done"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Shutting down pppd: "
|
||||
kill `pidof pppd` 2>/dev/null
|
||||
ps | grep ppp | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
echo "done"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
204
board/common/overlay/etc/init.d/S40network
Executable file
204
board/common/overlay/etc/init.d/S40network
Executable file
@ -0,0 +1,204 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /var/lib/dhcp
|
||||
dh_conf="/var/cache/dhclient.conf"
|
||||
sys_static_conf="/etc/static_ip.conf"
|
||||
static_conf="/data/etc/static_ip.conf"
|
||||
watch_conf="/data/etc/watch.conf"
|
||||
|
||||
link_watch=yes
|
||||
link_watch_timeout=20
|
||||
ip_watch=yes
|
||||
ip_watch_timeout=40
|
||||
|
||||
link_nego_timeout=10
|
||||
eth=eth0
|
||||
wlan=wlan0
|
||||
|
||||
if [ -f $watch_conf ]; then
|
||||
source $watch_conf
|
||||
fi
|
||||
|
||||
if [ -f $sys_static_conf ] && ! [ -f $static_conf ]; then
|
||||
mkdir -p $(dirname $static_conf)
|
||||
cp $sys_static_conf $static_conf
|
||||
fi
|
||||
|
||||
test -r $static_conf && source $static_conf
|
||||
|
||||
watch_eth() {
|
||||
count=0
|
||||
while true; do
|
||||
sleep 5
|
||||
if mii-tool $eth 2>&1 | grep "link ok" > /dev/null; then
|
||||
count=0
|
||||
else
|
||||
if [ $count -lt $link_watch_timeout ]; then
|
||||
count=$(($count + 5))
|
||||
logger -t ethernet -s "disconnected"
|
||||
else
|
||||
logger -t ethernet -s "disconnected for $link_watch_timeout seconds, rebooting"
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
watch_ip() {
|
||||
iface=$1
|
||||
count=0
|
||||
while true; do
|
||||
sleep 5
|
||||
if ip addr show dev $iface | grep inet &>/dev/null; then
|
||||
count=0
|
||||
else
|
||||
if [ $count -lt $ip_watch_timeout ]; then
|
||||
count=$(($count + 5))
|
||||
logger -t network -s "$iface has no IP address"
|
||||
else
|
||||
logger -t network -s "$iface had no IP address for $ip_watch_timeout seconds, rebooting"
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
start_lo() {
|
||||
ifconfig lo up
|
||||
}
|
||||
|
||||
start_wlan() {
|
||||
if ! ifconfig $wlan >/dev/null 2>&1; then
|
||||
echo "$wlan: no device"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "$(cat /sys/class/net/$wlan/carrier 2>/dev/null)" != "1" ]; then
|
||||
echo "$wlan: no link"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -n "$static_ip" ]; then
|
||||
echo "$wlan: setting static IP to $static_ip"
|
||||
ifconfig $wlan $static_ip up
|
||||
static_ip="" # won't be used again
|
||||
else
|
||||
echo "$wlan: starting dhclient"
|
||||
dhclient -cf "$dh_conf" $wlan
|
||||
fi
|
||||
|
||||
if [ "$ip_watch" == "yes" ]; then
|
||||
watch_ip $wlan &
|
||||
fi
|
||||
}
|
||||
|
||||
start_eth() {
|
||||
# wait up to 3 seconds for driver
|
||||
count=0
|
||||
while ! ifconfig $eth >/dev/null 2>&1; do
|
||||
sleep 1
|
||||
count=$(($count + 1))
|
||||
if [ $count -ge 3 ]; then
|
||||
echo "$eth: no device"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
# bring it up
|
||||
ifconfig $eth up
|
||||
|
||||
# wait up to 3 seconds for operstate
|
||||
count=0
|
||||
while [ "$(cat /sys/class/net/$eth/operstate 2>&1)" == "unknown" ]; do
|
||||
sleep 1
|
||||
count=$(($count + 1))
|
||||
if [ $count -ge 3 ]; then
|
||||
echo "$eth: no link"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
# wait up to link_nego_timeout seconds for link
|
||||
count=0
|
||||
while [ "$(cat /sys/class/net/$eth/carrier 2>&1)" != "1" ]; do
|
||||
sleep 1
|
||||
count=$(($count + 1))
|
||||
if [ $count -ge $link_nego_timeout ]; then
|
||||
echo "$eth: no link"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$static_ip" ]; then
|
||||
echo "$eth: setting static IP to $static_ip"
|
||||
ifconfig $eth $static_ip up
|
||||
static_ip="" # won't be used again
|
||||
else
|
||||
echo "$eth: starting dhclient"
|
||||
dhclient -cf "$dh_conf" $eth
|
||||
fi
|
||||
|
||||
if [ "$link_watch" == "yes" ]; then
|
||||
watch_eth &
|
||||
fi
|
||||
|
||||
if [ "$ip_watch" == "yes" ]; then
|
||||
watch_ip $eth &
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
hostname=$(hostname)
|
||||
echo "send host-name = \"$hostname\";" > /var/cache/dhclient.conf
|
||||
|
||||
start_lo
|
||||
start_wlan
|
||||
|
||||
# if wifi or ppp connection configured, start eth in background
|
||||
ssid=$(cat /data/etc/wpa_supplicant.conf 2>&1 | grep ssid | grep -v scan_ssid | cut -d '"' -f 2)
|
||||
if [ -n "$ssid" ] || [ -r /data/etc/ppp/modem ]; then
|
||||
start_eth &>/dev/null &
|
||||
else
|
||||
start_eth
|
||||
fi
|
||||
|
||||
if [ -n "$static_gw" ]; then
|
||||
echo "setting static gateway to $static_gw"
|
||||
ip route add default via $static_gw
|
||||
fi
|
||||
|
||||
if [ -n "$static_dns" ]; then
|
||||
echo "setting static DNS server to $static_dns"
|
||||
echo "nameserver $static_dns" > /etc/resolv.conf
|
||||
fi
|
||||
|
||||
# print the current network configuration
|
||||
ifconfig -a
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting network: "
|
||||
start
|
||||
echo "done"
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping network: "
|
||||
killall dhclient
|
||||
ps | grep S40network | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
echo "done"
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
61
board/common/overlay/etc/init.d/S41netwatch
Executable file
61
board/common/overlay/etc/init.d/S41netwatch
Executable file
@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
watch_conf="/data/etc/watch.conf"
|
||||
netwatch_retries=3
|
||||
netwatch_timeout=5
|
||||
netwatch_interval=20
|
||||
|
||||
if [ -f $watch_conf ]; then
|
||||
source $watch_conf
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "$netwatch_host" ] || [ -z "$netwatch_port" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
watch() {
|
||||
count=0
|
||||
netwatch_retries=$(($netwatch_retries - 1))
|
||||
while true; do
|
||||
if nc -z -w $netwatch_timeout $netwatch_host $netwatch_port </dev/null >/dev/null 2>&1; then
|
||||
count=0
|
||||
else
|
||||
if [ $count -lt $netwatch_retries ]; then
|
||||
count=$(($count + 1))
|
||||
continue
|
||||
else
|
||||
logger -t netwatch -s "cannot connect to $netwatch_host:$netwatch_port, rebooting"
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
sleep $netwatch_interval
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting netwatch: "
|
||||
watch &
|
||||
echo "done"
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping netwatch: "
|
||||
ps | grep netwatch | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
echo "done"
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
52
board/common/overlay/etc/init.d/S50sshd
Executable file
52
board/common/overlay/etc/init.d/S50sshd
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
|
||||
conf="/etc/sshd_config"
|
||||
|
||||
# Make sure the ssh-keygen program exists
|
||||
[ -f /usr/bin/ssh-keygen ] || exit 0
|
||||
|
||||
# Create any missing keys
|
||||
mkdir -p /data/etc/ssh
|
||||
/usr/bin/ssh-keygen -A
|
||||
|
||||
umask 077
|
||||
|
||||
start() {
|
||||
echo -n "Starting sshd: "
|
||||
hostname=$(hostname)
|
||||
echo "Welcome to $hostname!" > /var/cache/sshd_banner
|
||||
/usr/sbin/sshd -f $conf
|
||||
touch /var/lock/sshd
|
||||
echo "done"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping sshd: "
|
||||
killall sshd
|
||||
rm -f /var/lock/sshd
|
||||
echo "done"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
121
board/common/overlay/etc/init.d/S60date
Executable file
121
board/common/overlay/etc/init.d/S60date
Executable file
@ -0,0 +1,121 @@
|
||||
#!/bin/sh
|
||||
|
||||
sys_conf="/etc/date.conf"
|
||||
conf="/data/etc/date.conf"
|
||||
|
||||
if [ -f $sys_conf ] && ! [ -f $conf ]; then
|
||||
mkdir -p $(dirname $conf)
|
||||
cp $sys_conf $conf
|
||||
fi
|
||||
|
||||
if ! [ -f $conf ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
date_timeout=10
|
||||
date_method=http
|
||||
date_host="google.com"
|
||||
date_interval="900"
|
||||
|
||||
source $conf
|
||||
|
||||
kill_after_timeout() {
|
||||
sleep $date_timeout
|
||||
ps aux | grep httplib | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | xargs -r kill
|
||||
}
|
||||
|
||||
set_current_date_http() {
|
||||
kill_after_timeout &
|
||||
|
||||
timestamp=$(python -c "import calendar, httplib, email.utils; conn = httplib.HTTPConnection('$date_host'); conn.request('HEAD', '/'); \
|
||||
print calendar.timegm(email.utils.parsedate(conn.getresponse().getheader('date')))")
|
||||
|
||||
if [ -n "$timestamp" ]; then
|
||||
date +%s -s @$timestamp > /dev/null
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
set_current_date_ntp() {
|
||||
cat /etc/ntp.conf | grep server | head -n 1 | cut -d ' ' -f 2 | xargs ntpdate -t $date_timeout -s
|
||||
}
|
||||
|
||||
start_http() {
|
||||
echo -n "Setting current date using http: "
|
||||
set_current_date_http
|
||||
[ $? == 0 ] && date || echo "failed"
|
||||
|
||||
echo -n "Starting http date updater: "
|
||||
while true; do
|
||||
sleep $date_interval
|
||||
set_current_date_http
|
||||
done &
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
start_ntp() {
|
||||
mkdir -p /var/lib/ntp
|
||||
|
||||
echo -n "Setting current date using ntp: "
|
||||
set_current_date_ntp
|
||||
[ $? == 0 ] && date || echo "failed"
|
||||
|
||||
echo -n "Starting ntpd: "
|
||||
ntpd -g -c /etc/ntp.conf
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
stop_http() {
|
||||
echo -n "Shutting down date updater: "
|
||||
ps | grep S60date | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
stop_ntp() {
|
||||
echo -n "Shutting down ntpd: "
|
||||
kill `pidof ntpd`&>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ "$date_method" == "http" ]; then
|
||||
start_http
|
||||
else
|
||||
start_ntp
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ "$date_method" == "http" ]; then
|
||||
stop_http
|
||||
else
|
||||
stop_ntp
|
||||
fi
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
41
board/common/overlay/etc/init.d/S70proftpd
Executable file
41
board/common/overlay/etc/init.d/S70proftpd
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/proftpd.conf ] || exit 0
|
||||
|
||||
mkdir -p /var/run/proftpd
|
||||
touch /var/log/wtmp
|
||||
|
||||
start() {
|
||||
echo -n "Starting proftpd: "
|
||||
/usr/sbin/proftpd &>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping proftpd: "
|
||||
kill -9 `pidof proftpd` 2>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
38
board/common/overlay/etc/init.d/S80crond
Executable file
38
board/common/overlay/etc/init.d/S80crond
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /data/etc/crontabs/
|
||||
|
||||
start() {
|
||||
echo -n "Starting crond: "
|
||||
/usr/sbin/crond
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping crond: "
|
||||
kill `pidof crond` 2>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
68
board/common/overlay/etc/init.d/S91smb
Executable file
68
board/common/overlay/etc/init.d/S91smb
Executable file
@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/samba/smb.conf ] || exit 0
|
||||
|
||||
mkdir -p /var/log/samba
|
||||
mkdir -p /var/lib/samba/private
|
||||
|
||||
start() {
|
||||
echo -n "Setting smb admin password: "
|
||||
if [ -f /data/etc/motion.conf ]; then
|
||||
password=$(cat /data/etc/motion.conf | grep admin_password | cut -d ' ' -f 3)
|
||||
fi
|
||||
echo -e "$password\n$password\n" | /usr/bin/smbpasswd -a admin -s > /dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
|
||||
echo -n "Starting smbd: "
|
||||
smbd -D
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
|
||||
echo -n "Starting nmbd: "
|
||||
nmbd -D
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Shutting down smbd: "
|
||||
kill -9 `pidof smbd` 2>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
|
||||
echo -n "Shutting down nmbd: "
|
||||
kill -9 `pidof nmbd` 2>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
echo -n "Reloading smb.conf file: "
|
||||
kill -HUP `pidof smbd` 2>/dev/null
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
|
||||
reload)
|
||||
reload
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
140
board/common/overlay/etc/init.d/S95motioneye
Executable file
140
board/common/overlay/etc/init.d/S95motioneye
Executable file
@ -0,0 +1,140 @@
|
||||
#!/bin/sh
|
||||
|
||||
sys_conf="/etc/motioneye.conf"
|
||||
conf="/data/etc/motioneye.conf"
|
||||
watch_timeout=120
|
||||
dev_v4l_by_id="/dev/v4l/by-id/"
|
||||
|
||||
if [ -f $sys_conf ] && ! [ -f $conf ]; then
|
||||
mkdir -p $(dirname $conf)
|
||||
cp $sys_conf $conf
|
||||
fi
|
||||
|
||||
if [ -f "$conf" ]; then
|
||||
opts=$(cat "$conf" | while read line; do echo "--$line"; done)
|
||||
port=$(echo "$opts" | grep -oE 'port [[:digit:]]+' | cut -d ' ' -f 2)
|
||||
else
|
||||
echo "configuration file not present"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
responsive() {
|
||||
if wget -q -t 1 -T 2 -O - http://127.0.0.1:$port/static/img/motioneye-logo.svg >/dev/null 2>&1; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
watch() {
|
||||
count=0
|
||||
while true; do
|
||||
sleep 5
|
||||
if responsive; then
|
||||
count=0
|
||||
else
|
||||
if [ $count -lt $watch_timeout ]; then
|
||||
count=$(($count + 5))
|
||||
else
|
||||
logger -t motioneye -s "not responding for $watch_timeout seconds, rebooting"
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
find_persistent_device() {
|
||||
device=$1
|
||||
|
||||
if ! [ -d $dev_v4l_by_id ]; then
|
||||
echo $device
|
||||
return
|
||||
fi
|
||||
|
||||
for p in $dev_v4l_by_id/*; do
|
||||
if [ $(realpath "$p") == $device ]; then
|
||||
echo $p | sed 's#//*#/#g'
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
echo $device
|
||||
}
|
||||
|
||||
start() {
|
||||
echo -n "Starting motioneye: "
|
||||
meyectl startserver -b -c $conf -l
|
||||
|
||||
count=0
|
||||
while true; do
|
||||
sleep 1
|
||||
|
||||
if responsive; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $count -gt $watch_timeout ]; then
|
||||
echo "failed"
|
||||
reboot
|
||||
return
|
||||
fi
|
||||
|
||||
count=$(($count + 1))
|
||||
done
|
||||
|
||||
# add connected camera(s) with default settings
|
||||
if responsive && ! [ -f /data/etc/motion.conf ]; then
|
||||
count=$(ls /dev/video* 2>/dev/null | wc -l)
|
||||
index=1
|
||||
for device in $(ls /dev/video* 2>/dev/null); do
|
||||
if [ "$count" -gt "1" ]; then
|
||||
output_dir="/data/output/camera$index/"
|
||||
else
|
||||
output_dir="/data/output/"
|
||||
fi
|
||||
loc="/config/add/?_username=admin"
|
||||
device=$(find_persistent_device $device)
|
||||
body="{\"path\": \"$device\", \"proto\": \"v4l2\"}"
|
||||
signature=$(echo -n "POST:$loc:$body:" | sha1sum | cut -d ' ' -f 1)
|
||||
|
||||
curl -s -m 60 --data "$body" "http://127.0.0.1:$port$loc&_signature=$signature" > /dev/null
|
||||
index=$(($index + 1))
|
||||
done
|
||||
fi
|
||||
|
||||
watch &
|
||||
|
||||
echo "done"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Shutting down motioneye: "
|
||||
meyectl stopserver &>/dev/null && echo "done" || echo "failed"
|
||||
ps | grep motioneye | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
32
board/common/overlay/etc/init.d/rcK
Executable file
32
board/common/overlay/etc/init.d/rcK
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOOT_LOG=/var/log/boot.log
|
||||
PID_FILE=/tmp/rc.pid
|
||||
|
||||
echo "---- shutting down ----" >> $BOOT_LOG
|
||||
|
||||
# stop all init scripts in /etc/init.d
|
||||
# executing them in numerical order.
|
||||
(for i in /etc/init.d/S??*; do
|
||||
[ ! -f "$i" ] && continue
|
||||
[ -f /data/etc/no_$(basename $i) ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh) # Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set stop
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*) # No sh extension, so fork subprocess.
|
||||
$i stop
|
||||
;;
|
||||
esac
|
||||
done& echo $! > $PID_FILE) | tee -a $BOOT_LOG &
|
||||
|
||||
pid=$(cat $PID_FILE)
|
||||
while kill -0 $pid 2>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
43
board/common/overlay/etc/init.d/rcS
Executable file
43
board/common/overlay/etc/init.d/rcS
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOOT_LOG=/var/log/boot.log
|
||||
PID_FILE=/tmp/rc.pid
|
||||
|
||||
if ! [ -d /var/log ]; then
|
||||
# the very first boot won't have the /var/log directory
|
||||
BOOT_LOG=/tmp/boot.log
|
||||
TMP_LOG=yes
|
||||
fi
|
||||
|
||||
echo "---- booting ----" >> $BOOT_LOG
|
||||
|
||||
# start all init scripts in /etc/init.d
|
||||
# executing them in numerical order.
|
||||
(for i in /etc/init.d/S??*; do
|
||||
[ ! -f "$i" ] && continue
|
||||
[ -f /data/etc/no_$(basename $i) ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh) # Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*) # No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done& echo $! > $PID_FILE) | tee -a $BOOT_LOG &
|
||||
|
||||
pid=$(cat $PID_FILE)
|
||||
while kill -0 $pid 2>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [ -n "$TMP_LOG" ]; then
|
||||
# persist the boot log at first boot
|
||||
mv $BOOT_LOG /var/log
|
||||
fi
|
||||
|
39
board/common/overlay/etc/inittab
Normal file
39
board/common/overlay/etc/inittab
Normal file
@ -0,0 +1,39 @@
|
||||
# /etc/inittab
|
||||
#
|
||||
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Note: BusyBox init doesn't support runlevels. The runlevels field is
|
||||
# completely ignored by BusyBox init. If you want runlevels, use
|
||||
# sysvinit.
|
||||
#
|
||||
# Format for each entry: <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# id == tty to run on, or empty for /dev/console
|
||||
# runlevels == ignored
|
||||
# action == one of sysinit, respawn, askfirst, wait, and once
|
||||
# process == program to run
|
||||
|
||||
# Startup the system
|
||||
null::sysinit:/bin/mount -t proc proc /proc
|
||||
null::sysinit:/bin/mkdir -p /dev/pts
|
||||
null::sysinit:/bin/mkdir -p /dev/shm
|
||||
null::sysinit:/bin/mount --make-shared /
|
||||
null::sysinit:/bin/mount -a
|
||||
null::sysinit:/sbin/remountrw
|
||||
null::sysinit:/sbin/loadmodules
|
||||
# now run any rc scripts
|
||||
::sysinit:/etc/init.d/rcS
|
||||
::sysinit:/sbin/userinit
|
||||
|
||||
# Put a getty on the serial port
|
||||
tty1::respawn:/sbin/getty -L tty1 115200 vt100
|
||||
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
null::shutdown:/etc/init.d/rcK
|
||||
null::shutdown:/bin/umount -a -r
|
||||
null::shutdown:/sbin/swapoff -a
|
||||
|
44
board/common/overlay/etc/inputrc
Normal file
44
board/common/overlay/etc/inputrc
Normal file
@ -0,0 +1,44 @@
|
||||
# /etc/inputrc - global inputrc for libreadline
|
||||
# See readline(3readline) and `info readline' for more information.
|
||||
|
||||
# Be 8 bit clean.
|
||||
set input-meta on
|
||||
set output-meta on
|
||||
set bell-style visible
|
||||
|
||||
# To allow the use of 8bit-characters like the german umlauts, comment out
|
||||
# the line below. However this makes the meta key not work as a meta key,
|
||||
# which is annoying to those which don't need to type in 8-bit characters.
|
||||
|
||||
# set convert-meta off
|
||||
|
||||
"\e0d": backward-word
|
||||
"\e0c": forward-word
|
||||
"\e[h": beginning-of-line
|
||||
"\e[f": end-of-line
|
||||
"\e[1~": beginning-of-line
|
||||
"\e[4~": end-of-line
|
||||
#"\e[5~": beginning-of-history
|
||||
#"\e[6~": end-of-history
|
||||
"\e[3~": delete-char
|
||||
"\e[2~": quoted-insert
|
||||
|
||||
# Common standard keypad and cursor
|
||||
# (codes courtsey Werner Fink, <werner@suse.de>)
|
||||
#"\e[1~": history-search-backward
|
||||
"\e[2~": yank
|
||||
"\e[3~": delete-char
|
||||
#"\e[4~": set-mark
|
||||
"\e[5~": history-search-backward
|
||||
"\e[6~": history-search-forward
|
||||
# Normal keypad and cursor of xterm
|
||||
"\e[F": end-of-line
|
||||
"\e[H": beginning-of-line
|
||||
# Application keypad and cursor of xterm
|
||||
"\eOA": previous-history
|
||||
"\eOC": forward-char
|
||||
"\eOB": next-history
|
||||
"\eOD": backward-char
|
||||
"\eOF": end-of-line
|
||||
"\eOH": beginning-of-line
|
||||
|
1
board/common/overlay/etc/issue
Normal file
1
board/common/overlay/etc/issue
Normal file
@ -0,0 +1 @@
|
||||
Welcome to motionEye!
|
1
board/common/overlay/etc/localtime
Symbolic link
1
board/common/overlay/etc/localtime
Symbolic link
@ -0,0 +1 @@
|
||||
/data/etc/localtime
|
1918
board/common/overlay/etc/mime.types
Normal file
1918
board/common/overlay/etc/mime.types
Normal file
File diff suppressed because it is too large
Load Diff
7
board/common/overlay/etc/modprobe.conf
Normal file
7
board/common/overlay/etc/modprobe.conf
Normal file
@ -0,0 +1,7 @@
|
||||
# disable wifi power management
|
||||
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1
|
||||
options mwifiex disconnect_on_suspend=0
|
||||
options rndis_wlan power_save=0
|
||||
options b43 hwpctl=0
|
||||
options ath6kl_core suspend_mode=1
|
||||
|
0
board/common/overlay/etc/modules
Normal file
0
board/common/overlay/etc/modules
Normal file
25
board/common/overlay/etc/motioneye.conf
Normal file
25
board/common/overlay/etc/motioneye.conf
Normal file
@ -0,0 +1,25 @@
|
||||
conf_path /data/etc
|
||||
run_path /tmp
|
||||
log_path /var/log
|
||||
media_path /data/output
|
||||
motion_binary /usr/bin/motion-mrdave
|
||||
log_level info
|
||||
listen 0.0.0.0
|
||||
port 80
|
||||
mount_check_interval 300
|
||||
motion_check_interval 10
|
||||
cleanup_interval 43200
|
||||
thumbnailer_interval 60
|
||||
remote_request_timeout 10
|
||||
mjpg_client_timeout 10
|
||||
mjpg_client_idle_timeout 10
|
||||
smb_shares true
|
||||
smb_mount_root /data/media
|
||||
wpa_supplicant_conf /data/etc/wpa_supplicant.conf
|
||||
local_time_file /data/etc/localtime
|
||||
enable_reboot true
|
||||
enable_update true
|
||||
smtp_timeout 60
|
||||
zip_timeout 500
|
||||
add_remove_cameras true
|
||||
|
1
board/common/overlay/etc/mtab
Symbolic link
1
board/common/overlay/etc/mtab
Symbolic link
@ -0,0 +1 @@
|
||||
/proc/mounts
|
17
board/common/overlay/etc/nsswitch.conf
Normal file
17
board/common/overlay/etc/nsswitch.conf
Normal file
@ -0,0 +1,17 @@
|
||||
# /etc/nsswitch.conf
|
||||
#
|
||||
# Example configuration of GNU Name Service Switch functionality.
|
||||
# If you have the `glibc-doc-reference' and `info' packages installed, try:
|
||||
# `info libc "Name Service Switch"' for information about this file.
|
||||
|
||||
passwd: files
|
||||
group: files
|
||||
shadow: files
|
||||
hosts: files dns
|
||||
networks: files
|
||||
|
||||
protocols: files
|
||||
services: files
|
||||
ethers: files
|
||||
rpc: files
|
||||
|
9
board/common/overlay/etc/ntp.conf
Normal file
9
board/common/overlay/etc/ntp.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server 0.pool.ntp.org iburst
|
||||
server 1.pool.ntp.org iburst
|
||||
server 2.pool.ntp.org iburst
|
||||
|
||||
restrict default noquery nopeer
|
||||
restrict 127.0.0.1
|
||||
restrict ::1
|
||||
|
||||
driftfile /var/lib/ntp/ntp.drift
|
16
board/common/overlay/etc/passwd
Normal file
16
board/common/overlay/etc/passwd
Normal file
@ -0,0 +1,16 @@
|
||||
root:x:0:0:root:/root:/bin/sh
|
||||
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
|
||||
bin:x:2:2:bin:/bin:/bin/sh
|
||||
sys:x:3:3:sys:/dev:/bin/sh
|
||||
sync:x:4:100:sync:/bin:/bin/sync
|
||||
mail:x:8:8:mail:/var/spool/mail:/bin/sh
|
||||
proxy:x:13:13:proxy:/bin:/bin/sh
|
||||
www-data:x:33:33:www-data:/var/www:/bin/sh
|
||||
backup:x:34:34:backup:/var/backups:/bin/sh
|
||||
operator:x:37:37:Operator:/var:/bin/sh
|
||||
haldaemon:x:68:68:hald:/:/bin/sh
|
||||
dbus:x:81:81:dbus:/var/run/dbus:/bin/sh
|
||||
ftp:x:83:83:ftp:/home/ftp:/bin/sh
|
||||
sshd:x:103:99:sshd:/var:/bin/sh
|
||||
nobody:x:99:99:nobody:/home:/bin/sh
|
||||
admin:x:0:0::/home/ftp:/bin/sh
|
1
board/common/overlay/etc/ppp/auth
Symbolic link
1
board/common/overlay/etc/ppp/auth
Symbolic link
@ -0,0 +1 @@
|
||||
/data/etc/ppp/auth
|
1
board/common/overlay/etc/ppp/chatscripts/apn
Symbolic link
1
board/common/overlay/etc/ppp/chatscripts/apn
Symbolic link
@ -0,0 +1 @@
|
||||
/data/etc/ppp/apn
|
1
board/common/overlay/etc/ppp/chatscripts/extra
Symbolic link
1
board/common/overlay/etc/ppp/chatscripts/extra
Symbolic link
@ -0,0 +1 @@
|
||||
/data/etc/ppp/extra
|
21
board/common/overlay/etc/ppp/chatscripts/mobile.chat
Normal file
21
board/common/overlay/etc/ppp/chatscripts/mobile.chat
Normal file
@ -0,0 +1,21 @@
|
||||
ABORT 'BUSY'
|
||||
ABORT 'NO CARRIER'
|
||||
ABORT 'VOICE'
|
||||
ABORT 'NO DIALTONE'
|
||||
ABORT 'NO DIAL TONE'
|
||||
ABORT 'NO ANSWER'
|
||||
ABORT 'DELAYED'
|
||||
REPORT CONNECT
|
||||
TIMEOUT 6
|
||||
'' 'ATQ0'
|
||||
'OK-AT-OK' 'ATZ'
|
||||
TIMEOUT 3
|
||||
'OK' @/etc/ppp/chatscripts/pin
|
||||
'OK\d-AT-OK' 'ATI'
|
||||
'OK' 'ATZ'
|
||||
'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
|
||||
'OK' @/etc/ppp/chatscripts/extra
|
||||
'OK-AT-OK' @/etc/ppp/chatscripts/apn
|
||||
'OK' 'ATDT*99***1#'
|
||||
TIMEOUT 30
|
||||
CONNECT ''
|
1
board/common/overlay/etc/ppp/chatscripts/pin
Symbolic link
1
board/common/overlay/etc/ppp/chatscripts/pin
Symbolic link
@ -0,0 +1 @@
|
||||
/data/etc/ppp/pin
|
12
board/common/overlay/etc/ppp/ip-up
Executable file
12
board/common/overlay/etc/ppp/ip-up
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
resolv_conf=/etc/resolv.conf
|
||||
|
||||
echo -n > $resolv_conf
|
||||
if [ -n "$DNS1" ]; then
|
||||
echo "nameserver $DNS1" >> $resolv_conf
|
||||
fi
|
||||
if [ -n "$DNS2" ]; then
|
||||
echo "nameserver $DNS2" >> $resolv_conf
|
||||
fi
|
||||
|
1
board/common/overlay/etc/ppp/modem
Symbolic link
1
board/common/overlay/etc/ppp/modem
Symbolic link
@ -0,0 +1 @@
|
||||
/data/etc/ppp/modem
|
13
board/common/overlay/etc/ppp/options
Normal file
13
board/common/overlay/etc/ppp/options
Normal file
@ -0,0 +1,13 @@
|
||||
lock
|
||||
crtscts
|
||||
modem
|
||||
passive
|
||||
novj
|
||||
defaultroute
|
||||
noipdefault
|
||||
usepeerdns
|
||||
noauth
|
||||
hide-password
|
||||
persist
|
||||
holdoff 10
|
||||
maxfail 0
|
4
board/common/overlay/etc/ppp/peers/mobile
Normal file
4
board/common/overlay/etc/ppp/peers/mobile
Normal file
@ -0,0 +1,4 @@
|
||||
file /etc/ppp/modem
|
||||
file /etc/ppp/options
|
||||
file /etc/ppp/auth
|
||||
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile.chat"
|
55
board/common/overlay/etc/profile
Normal file
55
board/common/overlay/etc/profile
Normal file
@ -0,0 +1,55 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login interactive shells.
|
||||
|
||||
export PATH=\
|
||||
/bin:\
|
||||
/sbin:\
|
||||
/usr/bin:\
|
||||
/usr/sbin:\
|
||||
/usr/bin/X11:\
|
||||
/usr/local/bin
|
||||
|
||||
# If running interactively, then:
|
||||
if [ "$PS1" ]; then
|
||||
|
||||
if [ "$BASH" ]; then
|
||||
export PS1="[\u@\h \W]\\$ "
|
||||
alias ll='/bin/ls --color=tty -laFh'
|
||||
alias ls='/bin/ls --color=tty -F'
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';
|
||||
else
|
||||
if [ "`id -u`" -eq 0 ]; then
|
||||
export PS1='# '
|
||||
else
|
||||
export PS1='$ '
|
||||
fi
|
||||
fi
|
||||
|
||||
export USER=`id -un`
|
||||
export LOGNAME=$USER
|
||||
export HOSTNAME=`/bin/hostname`
|
||||
export HISTSIZE=1000
|
||||
export HISTFILESIZE=1000
|
||||
export PAGER='/bin/more '
|
||||
export EDITOR='/bin/vi'
|
||||
export INPUTRC=/etc/inputrc
|
||||
export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
|
||||
|
||||
### Some aliases
|
||||
alias ps2='ps facux '
|
||||
alias ps1='ps faxo "%U %t %p %a" '
|
||||
alias af='ps af'
|
||||
alias cls='clear'
|
||||
alias df='df -h'
|
||||
alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 '
|
||||
#alias bc='bc -l'
|
||||
alias minicom='minicom -c on'
|
||||
alias calc='calc -Cd '
|
||||
alias bc='calc -Cd '
|
||||
fi;
|
||||
|
||||
# Source configuration files from /etc/profile.d
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -r "$i" ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
25
board/common/overlay/etc/proftpd.conf
Normal file
25
board/common/overlay/etc/proftpd.conf
Normal file
@ -0,0 +1,25 @@
|
||||
ServerName "motionEye"
|
||||
ServerType standalone
|
||||
DefaultServer on
|
||||
Port 21
|
||||
UseIPv6 off
|
||||
Umask 022
|
||||
MaxInstances 4
|
||||
User ftp
|
||||
Group nogroup
|
||||
DefaultRoot /home/ftp
|
||||
AllowOverwrite on
|
||||
RequireValidShell off
|
||||
UseFtpUsers off
|
||||
RootLogin on
|
||||
|
||||
<Limit SITE_CHMOD>
|
||||
DenyAll
|
||||
</Limit>
|
||||
|
||||
<Limit WRITE>
|
||||
DenyAll
|
||||
</Limit>
|
||||
|
||||
Include /data/etc/proftpd*.conf
|
||||
|
61
board/common/overlay/etc/protocols
Normal file
61
board/common/overlay/etc/protocols
Normal file
@ -0,0 +1,61 @@
|
||||
# Internet (IP) protocols
|
||||
#
|
||||
# Updated from http://www.iana.org/assignments/protocol-numbers and other
|
||||
# sources.
|
||||
|
||||
ip 0 IP # internet protocol, pseudo protocol number
|
||||
hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
|
||||
icmp 1 ICMP # internet control message protocol
|
||||
igmp 2 IGMP # Internet Group Management
|
||||
ggp 3 GGP # gateway-gateway protocol
|
||||
ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
|
||||
st 5 ST # ST datagram mode
|
||||
tcp 6 TCP # transmission control protocol
|
||||
egp 8 EGP # exterior gateway protocol
|
||||
igp 9 IGP # any private interior gateway (Cisco)
|
||||
pup 12 PUP # PARC universal packet protocol
|
||||
udp 17 UDP # user datagram protocol
|
||||
hmp 20 HMP # host monitoring protocol
|
||||
xns-idp 22 XNS-IDP # Xerox NS IDP
|
||||
rdp 27 RDP # "reliable datagram" protocol
|
||||
iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
|
||||
dccp 33 DCCP # Datagram Congestion Control Prot. [RFC4340]
|
||||
xtp 36 XTP # Xpress Transfer Protocol
|
||||
ddp 37 DDP # Datagram Delivery Protocol
|
||||
idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
|
||||
ipv6 41 IPv6 # Internet Protocol, version 6
|
||||
ipv6-route 43 IPv6-Route # Routing Header for IPv6
|
||||
ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
|
||||
idrp 45 IDRP # Inter-Domain Routing Protocol
|
||||
rsvp 46 RSVP # Reservation Protocol
|
||||
gre 47 GRE # General Routing Encapsulation
|
||||
esp 50 IPSEC-ESP # Encap Security Payload [RFC2406]
|
||||
ah 51 IPSEC-AH # Authentication Header [RFC2402]
|
||||
skip 57 SKIP # SKIP
|
||||
ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
|
||||
ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
|
||||
ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
|
||||
rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
|
||||
vmtp 81 VMTP # Versatile Message Transport
|
||||
eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
|
||||
ospf 89 OSPFIGP # Open Shortest Path First IGP
|
||||
ax.25 93 AX.25 # AX.25 frames
|
||||
ipip 94 IPIP # IP-within-IP Encapsulation Protocol
|
||||
etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
|
||||
encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
|
||||
# 99 # any private encryption scheme
|
||||
pim 103 PIM # Protocol Independent Multicast
|
||||
ipcomp 108 IPCOMP # IP Payload Compression Protocol
|
||||
vrrp 112 VRRP # Virtual Router Redundancy Protocol [RFC5798]
|
||||
l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
|
||||
isis 124 ISIS # IS-IS over IPv4
|
||||
sctp 132 SCTP # Stream Control Transmission Protocol
|
||||
fc 133 FC # Fibre Channel
|
||||
mobility-header 135 Mobility-Header # Mobility Support for IPv6 [RFC3775]
|
||||
udplite 136 UDPLite # UDP-Lite [RFC3828]
|
||||
mpls-in-ip 137 MPLS-in-IP # MPLS-in-IP [RFC4023]
|
||||
manet 138 # MANET Protocols [RFC5498]
|
||||
hip 139 HIP # Host Identity Protocol
|
||||
shim6 140 Shim6 # Shim6 Protocol [RFC5533]
|
||||
wesp 141 WESP # Wrapped Encapsulating Security Payload
|
||||
rohc 142 ROHC # Robust Header Compression
|
BIN
board/common/overlay/etc/random-seed
Normal file
BIN
board/common/overlay/etc/random-seed
Normal file
Binary file not shown.
1
board/common/overlay/etc/resolv.conf
Symbolic link
1
board/common/overlay/etc/resolv.conf
Symbolic link
@ -0,0 +1 @@
|
||||
../tmp/resolv.conf
|
23
board/common/overlay/etc/samba/smb.conf
Normal file
23
board/common/overlay/etc/samba/smb.conf
Normal file
@ -0,0 +1,23 @@
|
||||
[global]
|
||||
workgroup = MOTIONEYE
|
||||
server string = motionEye
|
||||
security = user
|
||||
map to guest = bad user
|
||||
encrypt passwords = yes
|
||||
private dir = /var/lib/samba/private
|
||||
public = no
|
||||
writable = no
|
||||
include = /data/etc/smb.conf
|
||||
load printers = no
|
||||
printing = bsd
|
||||
printcap name = /dev/null
|
||||
disable spoolss = yes
|
||||
|
||||
[sdcard]
|
||||
comment = SD Card Output Directory
|
||||
path = /data/output
|
||||
|
||||
[storage]
|
||||
comment = Attached Storage Devices
|
||||
path = /data/media
|
||||
|
57
board/common/overlay/etc/securetty
Normal file
57
board/common/overlay/etc/securetty
Normal file
@ -0,0 +1,57 @@
|
||||
tty1
|
||||
tty2
|
||||
tty3
|
||||
tty4
|
||||
tty5
|
||||
tty6
|
||||
tty7
|
||||
tty8
|
||||
ttyS0
|
||||
ttyS1
|
||||
ttyS2
|
||||
ttyS3
|
||||
ttyAMA0
|
||||
ttyAMA1
|
||||
ttyAMA2
|
||||
ttyAMA3
|
||||
ttySAC0
|
||||
ttySAC1
|
||||
ttySAC2
|
||||
ttySAC3
|
||||
ttyUL0
|
||||
ttyUL1
|
||||
ttyUL2
|
||||
ttyUL3
|
||||
ttyPS0
|
||||
ttyPS1
|
||||
ttyPSC0
|
||||
ttyPSC1
|
||||
ttyPSC2
|
||||
ttyPSC3
|
||||
ttyCPM0
|
||||
ttyCPM1
|
||||
ttyCPM2
|
||||
ttyCPM3
|
||||
ttymxc0
|
||||
ttymxc1
|
||||
ttymxc2
|
||||
ttyO0
|
||||
ttyO1
|
||||
ttyO2
|
||||
ttyO3
|
||||
ttyAM0
|
||||
ttyAM1
|
||||
ttyAM2
|
||||
ttySC0
|
||||
ttySC1
|
||||
ttySC2
|
||||
ttySC3
|
||||
ttySC4
|
||||
ttySC5
|
||||
ttySC6
|
||||
ttySC7
|
||||
ttyGS0
|
||||
hvc0
|
||||
hvc1
|
||||
hvc2
|
||||
hvc3
|
302
board/common/overlay/etc/services
Normal file
302
board/common/overlay/etc/services
Normal file
@ -0,0 +1,302 @@
|
||||
# /etc/services:
|
||||
# $Id: services,v 1.1 2004/10/09 02:49:18 andersen Exp $
|
||||
#
|
||||
# Network services, Internet style
|
||||
#
|
||||
# Note that it is presently the policy of IANA to assign a single well-known
|
||||
# port number for both TCP and UDP; hence, most entries here have two entries
|
||||
# even if the protocol doesn't support UDP operations.
|
||||
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports
|
||||
# are included, only the more common ones.
|
||||
|
||||
tcpmux 1/tcp # TCP port service multiplexer
|
||||
echo 7/tcp
|
||||
echo 7/udp
|
||||
discard 9/tcp sink null
|
||||
discard 9/udp sink null
|
||||
systat 11/tcp users
|
||||
daytime 13/tcp
|
||||
daytime 13/udp
|
||||
netstat 15/tcp
|
||||
qotd 17/tcp quote
|
||||
msp 18/tcp # message send protocol
|
||||
msp 18/udp # message send protocol
|
||||
chargen 19/tcp ttytst source
|
||||
chargen 19/udp ttytst source
|
||||
ftp-data 20/tcp
|
||||
ftp 21/tcp
|
||||
fsp 21/udp fspd
|
||||
ssh 22/tcp # SSH Remote Login Protocol
|
||||
ssh 22/udp # SSH Remote Login Protocol
|
||||
telnet 23/tcp
|
||||
# 24 - private
|
||||
smtp 25/tcp mail
|
||||
# 26 - unassigned
|
||||
time 37/tcp timserver
|
||||
time 37/udp timserver
|
||||
rlp 39/udp resource # resource location
|
||||
nameserver 42/tcp name # IEN 116
|
||||
whois 43/tcp nicname
|
||||
re-mail-ck 50/tcp # Remote Mail Checking Protocol
|
||||
re-mail-ck 50/udp # Remote Mail Checking Protocol
|
||||
domain 53/tcp nameserver # name-domain server
|
||||
domain 53/udp nameserver
|
||||
mtp 57/tcp # deprecated
|
||||
bootps 67/tcp # BOOTP server
|
||||
bootps 67/udp
|
||||
bootpc 68/tcp # BOOTP client
|
||||
bootpc 68/udp
|
||||
tftp 69/udp
|
||||
gopher 70/tcp # Internet Gopher
|
||||
gopher 70/udp
|
||||
rje 77/tcp netrjs
|
||||
finger 79/tcp
|
||||
www 80/tcp http # WorldWideWeb HTTP
|
||||
www 80/udp # HyperText Transfer Protocol
|
||||
link 87/tcp ttylink
|
||||
kerberos 88/tcp kerberos5 krb5 # Kerberos v5
|
||||
kerberos 88/udp kerberos5 krb5 # Kerberos v5
|
||||
supdup 95/tcp
|
||||
# 100 - reserved
|
||||
hostnames 101/tcp hostname # usually from sri-nic
|
||||
iso-tsap 102/tcp tsap # part of ISODE.
|
||||
csnet-ns 105/tcp cso-ns # also used by CSO name server
|
||||
csnet-ns 105/udp cso-ns
|
||||
# unfortunately the poppassd (Eudora) uses a port which has already
|
||||
# been assigned to a different service. We list the poppassd as an
|
||||
# alias here. This should work for programs asking for this service.
|
||||
# (due to a bug in inetd the 3com-tsmux line is disabled)
|
||||
#3com-tsmux 106/tcp poppassd
|
||||
#3com-tsmux 106/udp poppassd
|
||||
rtelnet 107/tcp # Remote Telnet
|
||||
rtelnet 107/udp
|
||||
pop-2 109/tcp postoffice # POP version 2
|
||||
pop-2 109/udp
|
||||
pop-3 110/tcp # POP version 3
|
||||
pop-3 110/udp
|
||||
sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP
|
||||
sunrpc 111/udp portmapper # RPC 4.0 portmapper UDP
|
||||
auth 113/tcp authentication tap ident
|
||||
sftp 115/tcp
|
||||
uucp-path 117/tcp
|
||||
nntp 119/tcp readnews untp # USENET News Transfer Protocol
|
||||
ntp 123/tcp
|
||||
ntp 123/udp # Network Time Protocol
|
||||
netbios-ns 137/tcp # NETBIOS Name Service
|
||||
netbios-ns 137/udp
|
||||
netbios-dgm 138/tcp # NETBIOS Datagram Service
|
||||
netbios-dgm 138/udp
|
||||
netbios-ssn 139/tcp # NETBIOS session service
|
||||
netbios-ssn 139/udp
|
||||
imap2 143/tcp # Interim Mail Access Proto v2
|
||||
imap2 143/udp
|
||||
snmp 161/udp # Simple Net Mgmt Proto
|
||||
snmp-trap 162/udp snmptrap # Traps for SNMP
|
||||
cmip-man 163/tcp # ISO mgmt over IP (CMOT)
|
||||
cmip-man 163/udp
|
||||
cmip-agent 164/tcp
|
||||
cmip-agent 164/udp
|
||||
xdmcp 177/tcp # X Display Mgr. Control Proto
|
||||
xdmcp 177/udp
|
||||
nextstep 178/tcp NeXTStep NextStep # NeXTStep window
|
||||
nextstep 178/udp NeXTStep NextStep # server
|
||||
bgp 179/tcp # Border Gateway Proto.
|
||||
bgp 179/udp
|
||||
prospero 191/tcp # Cliff Neuman's Prospero
|
||||
prospero 191/udp
|
||||
irc 194/tcp # Internet Relay Chat
|
||||
irc 194/udp
|
||||
smux 199/tcp # SNMP Unix Multiplexer
|
||||
smux 199/udp
|
||||
at-rtmp 201/tcp # AppleTalk routing
|
||||
at-rtmp 201/udp
|
||||
at-nbp 202/tcp # AppleTalk name binding
|
||||
at-nbp 202/udp
|
||||
at-echo 204/tcp # AppleTalk echo
|
||||
at-echo 204/udp
|
||||
at-zis 206/tcp # AppleTalk zone information
|
||||
at-zis 206/udp
|
||||
qmtp 209/tcp # The Quick Mail Transfer Protocol
|
||||
qmtp 209/udp # The Quick Mail Transfer Protocol
|
||||
z3950 210/tcp wais # NISO Z39.50 database
|
||||
z3950 210/udp wais
|
||||
ipx 213/tcp # IPX
|
||||
ipx 213/udp
|
||||
imap3 220/tcp # Interactive Mail Access
|
||||
imap3 220/udp # Protocol v3
|
||||
ulistserv 372/tcp # UNIX Listserv
|
||||
ulistserv 372/udp
|
||||
https 443/tcp # MCom
|
||||
https 443/udp # MCom
|
||||
snpp 444/tcp # Simple Network Paging Protocol
|
||||
snpp 444/udp # Simple Network Paging Protocol
|
||||
saft 487/tcp # Simple Asynchronous File Transfer
|
||||
saft 487/udp # Simple Asynchronous File Transfer
|
||||
npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS
|
||||
npmp-local 610/udp dqs313_qmaster # npmp-local / DQS
|
||||
npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS
|
||||
npmp-gui 611/udp dqs313_execd # npmp-gui / DQS
|
||||
hmmp-ind 612/tcp dqs313_intercell# HMMP Indication / DQS
|
||||
hmmp-ind 612/udp dqs313_intercell# HMMP Indication / DQS
|
||||
#
|
||||
# UNIX specific services
|
||||
#
|
||||
exec 512/tcp
|
||||
biff 512/udp comsat
|
||||
login 513/tcp
|
||||
who 513/udp whod
|
||||
shell 514/tcp cmd # no passwords used
|
||||
syslog 514/udp
|
||||
printer 515/tcp spooler # line printer spooler
|
||||
talk 517/udp
|
||||
ntalk 518/udp
|
||||
route 520/udp router routed # RIP
|
||||
timed 525/udp timeserver
|
||||
tempo 526/tcp newdate
|
||||
courier 530/tcp rpc
|
||||
conference 531/tcp chat
|
||||
netnews 532/tcp readnews
|
||||
netwall 533/udp # -for emergency broadcasts
|
||||
uucp 540/tcp uucpd # uucp daemon
|
||||
afpovertcp 548/tcp # AFP over TCP
|
||||
afpovertcp 548/udp # AFP over TCP
|
||||
remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem
|
||||
klogin 543/tcp # Kerberized `rlogin' (v5)
|
||||
kshell 544/tcp krcmd # Kerberized `rsh' (v5)
|
||||
kerberos-adm 749/tcp # Kerberos `kadmin' (v5)
|
||||
#
|
||||
webster 765/tcp # Network dictionary
|
||||
webster 765/udp
|
||||
#
|
||||
# From ``Assigned Numbers'':
|
||||
#
|
||||
#> The Registered Ports are not controlled by the IANA and on most systems
|
||||
#> can be used by ordinary user processes or programs executed by ordinary
|
||||
#> users.
|
||||
#
|
||||
#> Ports are used in the TCP [45,106] to name the ends of logical
|
||||
#> connections which carry long term conversations. For the purpose of
|
||||
#> providing services to unknown callers, a service contact port is
|
||||
#> defined. This list specifies the port used by the server process as its
|
||||
#> contact port. While the IANA can not control uses of these ports it
|
||||
#> does register or list uses of these ports as a convienence to the
|
||||
#> community.
|
||||
#
|
||||
nfsdstatus 1110/tcp
|
||||
nfsd-keepalive 1110/udp
|
||||
|
||||
ingreslock 1524/tcp
|
||||
ingreslock 1524/udp
|
||||
prospero-np 1525/tcp # Prospero non-privileged
|
||||
prospero-np 1525/udp
|
||||
datametrics 1645/tcp old-radius # datametrics / old radius entry
|
||||
datametrics 1645/udp old-radius # datametrics / old radius entry
|
||||
sa-msg-port 1646/tcp old-radacct # sa-msg-port / old radacct entry
|
||||
sa-msg-port 1646/udp old-radacct # sa-msg-port / old radacct entry
|
||||
radius 1812/tcp # Radius
|
||||
radius 1812/udp # Radius
|
||||
radacct 1813/tcp # Radius Accounting
|
||||
radacct 1813/udp # Radius Accounting
|
||||
nfsd 2049/tcp nfs
|
||||
nfsd 2049/udp nfs
|
||||
cvspserver 2401/tcp # CVS client/server operations
|
||||
cvspserver 2401/udp # CVS client/server operations
|
||||
mysql 3306/tcp # MySQL
|
||||
mysql 3306/udp # MySQL
|
||||
rfe 5002/tcp # Radio Free Ethernet
|
||||
rfe 5002/udp # Actually uses UDP only
|
||||
cfengine 5308/tcp # CFengine
|
||||
cfengine 5308/udp # CFengine
|
||||
bbs 7000/tcp # BBS service
|
||||
#
|
||||
#
|
||||
# Kerberos (Project Athena/MIT) services
|
||||
# Note that these are for Kerberos v4, and are unofficial. Sites running
|
||||
# v4 should uncomment these and comment out the v5 entries above.
|
||||
#
|
||||
kerberos4 750/udp kerberos-iv kdc # Kerberos (server) udp
|
||||
kerberos4 750/tcp kerberos-iv kdc # Kerberos (server) tcp
|
||||
kerberos_master 751/udp # Kerberos authentication
|
||||
kerberos_master 751/tcp # Kerberos authentication
|
||||
passwd_server 752/udp # Kerberos passwd server
|
||||
krb_prop 754/tcp # Kerberos slave propagation
|
||||
krbupdate 760/tcp kreg # Kerberos registration
|
||||
kpasswd 761/tcp kpwd # Kerberos "passwd"
|
||||
kpop 1109/tcp # Pop with Kerberos
|
||||
knetd 2053/tcp # Kerberos de-multiplexor
|
||||
zephyr-srv 2102/udp # Zephyr server
|
||||
zephyr-clt 2103/udp # Zephyr serv-hm connection
|
||||
zephyr-hm 2104/udp # Zephyr hostmanager
|
||||
eklogin 2105/tcp # Kerberos encrypted rlogin
|
||||
#
|
||||
# Unofficial but necessary (for NetBSD) services
|
||||
#
|
||||
supfilesrv 871/tcp # SUP server
|
||||
supfiledbg 1127/tcp # SUP debugging
|
||||
#
|
||||
# Datagram Delivery Protocol services
|
||||
#
|
||||
rtmp 1/ddp # Routing Table Maintenance Protocol
|
||||
nbp 2/ddp # Name Binding Protocol
|
||||
echo 4/ddp # AppleTalk Echo Protocol
|
||||
zip 6/ddp # Zone Information Protocol
|
||||
#
|
||||
# Services added for the Debian GNU/Linux distribution
|
||||
poppassd 106/tcp # Eudora
|
||||
poppassd 106/udp # Eudora
|
||||
mailq 174/tcp # Mailer transport queue for Zmailer
|
||||
mailq 174/tcp # Mailer transport queue for Zmailer
|
||||
omirr 808/tcp omirrd # online mirror
|
||||
omirr 808/udp omirrd # online mirror
|
||||
rmtcfg 1236/tcp # Gracilis Packeten remote config server
|
||||
xtel 1313/tcp # french minitel
|
||||
coda_opcons 1355/udp # Coda opcons (Coda fs)
|
||||
coda_venus 1363/udp # Coda venus (Coda fs)
|
||||
coda_auth 1357/udp # Coda auth (Coda fs)
|
||||
coda_udpsrv 1359/udp # Coda udpsrv (Coda fs)
|
||||
coda_filesrv 1361/udp # Coda filesrv (Coda fs)
|
||||
codacon 1423/tcp venus.cmu # Coda Console (Coda fs)
|
||||
coda_aux1 1431/tcp # coda auxiliary service (Coda fs)
|
||||
coda_aux1 1431/udp # coda auxiliary service (Coda fs)
|
||||
coda_aux2 1433/tcp # coda auxiliary service (Coda fs)
|
||||
coda_aux2 1433/udp # coda auxiliary service (Coda fs)
|
||||
coda_aux3 1435/tcp # coda auxiliary service (Coda fs)
|
||||
coda_aux3 1435/udp # coda auxiliary service (Coda fs)
|
||||
cfinger 2003/tcp # GNU Finger
|
||||
afbackup 2988/tcp # Afbackup system
|
||||
afbackup 2988/udp # Afbackup system
|
||||
icp 3130/tcp # Internet Cache Protocol (Squid)
|
||||
icp 3130/udp # Internet Cache Protocol (Squid)
|
||||
postgres 5432/tcp # POSTGRES
|
||||
postgres 5432/udp # POSTGRES
|
||||
fax 4557/tcp # FAX transmission service (old)
|
||||
hylafax 4559/tcp # HylaFAX client-server protocol (new)
|
||||
noclog 5354/tcp # noclogd with TCP (nocol)
|
||||
noclog 5354/udp # noclogd with UDP (nocol)
|
||||
hostmon 5355/tcp # hostmon uses TCP (nocol)
|
||||
hostmon 5355/udp # hostmon uses TCP (nocol)
|
||||
ircd 6667/tcp # Internet Relay Chat
|
||||
ircd 6667/udp # Internet Relay Chat
|
||||
webcache 8080/tcp # WWW caching service
|
||||
webcache 8080/udp # WWW caching service
|
||||
tproxy 8081/tcp # Transparent Proxy
|
||||
tproxy 8081/udp # Transparent Proxy
|
||||
mandelspawn 9359/udp mandelbrot # network mandelbrot
|
||||
amanda 10080/udp # amanda backup services
|
||||
amandaidx 10082/tcp # amanda backup services
|
||||
amidxtape 10083/tcp # amanda backup services
|
||||
isdnlog 20011/tcp # isdn logging system
|
||||
isdnlog 20011/udp # isdn logging system
|
||||
vboxd 20012/tcp # voice box system
|
||||
vboxd 20012/udp # voice box system
|
||||
binkp 24554/tcp # Binkley
|
||||
binkp 24554/udp # Binkley
|
||||
asp 27374/tcp # Address Search Protocol
|
||||
asp 27374/udp # Address Search Protocol
|
||||
tfido 60177/tcp # Ifmail
|
||||
tfido 60177/udp # Ifmail
|
||||
fido 60179/tcp # Ifmail
|
||||
fido 60179/udp # Ifmail
|
||||
|
||||
# Local services
|
||||
|
1
board/common/overlay/etc/shadow
Symbolic link
1
board/common/overlay/etc/shadow
Symbolic link
@ -0,0 +1 @@
|
||||
/data/etc/shadow
|
18
board/common/overlay/etc/sshd_config
Normal file
18
board/common/overlay/etc/sshd_config
Normal file
@ -0,0 +1,18 @@
|
||||
Port 22
|
||||
ListenAddress 0.0.0.0
|
||||
|
||||
HostKey /data/etc/ssh_host_key
|
||||
HostKey /data/etc/ssh_host_rsa_key
|
||||
HostKey /data/etc/ssh_host_dsa_key
|
||||
HostKey /data/etc/ssh_host_ecdsa_key
|
||||
HostKey /data/etc/ssh_host_ed25519_key
|
||||
|
||||
PermitRootLogin yes
|
||||
PermitEmptyPasswords yes
|
||||
AuthorizedKeysFile /data/etc/ssh_authorized_keys
|
||||
UseDNS no
|
||||
Banner /var/cache/sshd_banner
|
||||
|
||||
UsePrivilegeSeparation sandbox
|
||||
Subsystem sftp /usr/libexec/sftp-server
|
||||
|
@ -0,0 +1,2 @@
|
||||
SUBSYSTEMS=="scsi", ENV{ID_FS_TYPE}=="vfat|ext2|ext3|ext4" RUN+="/bin/mkdir -p /data/media/%k", RUN+="/bin/mount /dev/%k /data/media/%k"
|
||||
SUBSYSTEMS=="scsi", ENV{ID_FS_TYPE}=="ntfs" RUN+="/bin/mkdir -p /data/media/%k", RUN+="/usr/bin/ntfs-3g /dev/%k /data/media/%k"
|
12
board/common/overlay/etc/watch.conf
Normal file
12
board/common/overlay/etc/watch.conf
Normal file
@ -0,0 +1,12 @@
|
||||
link_watch=yes
|
||||
link_watch_timeout=20
|
||||
|
||||
ip_watch=yes
|
||||
ip_watch_timeout=40
|
||||
|
||||
#netwatch_host=www.google.com
|
||||
#netwatch_port=80
|
||||
netwatch_retries=3
|
||||
netwatch_timeout=5
|
||||
netwatch_interval=20
|
||||
|
6
board/common/overlay/etc/wpa_supplicant.conf
Normal file
6
board/common/overlay/etc/wpa_supplicant.conf
Normal file
@ -0,0 +1,6 @@
|
||||
update_config=1
|
||||
ctrl_interface=/var/run/wpa_supplicant
|
||||
|
||||
network={
|
||||
scan_ssid=1
|
||||
}
|
BIN
board/common/overlay/lib/firmware/mt7601u.bin
Normal file
BIN
board/common/overlay/lib/firmware/mt7601u.bin
Normal file
Binary file not shown.
319
board/common/overlay/sbin/dhclient-script
Executable file
319
board/common/overlay/sbin/dhclient-script
Executable file
@ -0,0 +1,319 @@
|
||||
#!/bin/bash
|
||||
|
||||
make_resolv_conf() {
|
||||
resolv_conf=/etc/resolv.conf
|
||||
echo -n > $resolv_conf
|
||||
# DHCPv4
|
||||
if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] ||
|
||||
[ -n "$new_domain_name_servers" ]; then
|
||||
if [ -n "$new_domain_name" ]; then
|
||||
echo domain ${new_domain_name%% *} >>$resolv_conf
|
||||
fi
|
||||
|
||||
if [ -n "$new_domain_search" ]; then
|
||||
if [ -n "$new_domain_name" ]; then
|
||||
domain_in_search_list=""
|
||||
for domain in $new_domain_search; do
|
||||
if [ "$domain" = "${new_domain_name}" ] ||
|
||||
[ "$domain" = "${new_domain_name}." ]; then
|
||||
domain_in_search_list="Yes"
|
||||
fi
|
||||
done
|
||||
if [ -z "$domain_in_search_list" ]; then
|
||||
new_domain_search="$new_domain_name $new_domain_search"
|
||||
fi
|
||||
fi
|
||||
echo "search ${new_domain_search}" >> $resolv_conf
|
||||
elif [ -n "$new_domain_name" ]; then
|
||||
echo "search ${new_domain_name}" >> $resolv_conf
|
||||
fi
|
||||
|
||||
if [ -n "$new_domain_name_servers" ]; then
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
echo nameserver $nameserver >>$resolv_conf
|
||||
done
|
||||
else # keep 'old' nameservers
|
||||
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$resolv_conf
|
||||
fi
|
||||
# DHCPv6
|
||||
elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then
|
||||
if [ -n "$new_dhcp6_domain_search" ]; then
|
||||
echo "search ${new_dhcp6_domain_search}" >> $resolv_conf
|
||||
fi
|
||||
|
||||
if [ -n "$new_dhcp6_name_servers" ]; then
|
||||
for nameserver in $new_dhcp6_name_servers; do
|
||||
# append %interface to link-local-address nameservers
|
||||
if [ "${nameserver##fe80::}" != "$nameserver" ] ||
|
||||
[ "${nameserver##FE80::}" != "$nameserver" ]; then
|
||||
nameserver="${nameserver}%${interface}"
|
||||
fi
|
||||
echo nameserver $nameserver >>$resolv_conf
|
||||
done
|
||||
else # keep 'old' nameservers
|
||||
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$resolv_conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# set host name
|
||||
set_hostname() {
|
||||
local current_hostname
|
||||
|
||||
if [ -n "$new_host_name" ]; then
|
||||
current_hostname=$(hostname)
|
||||
|
||||
# current host name is empty, '(none)' or 'localhost' or differs from new one from DHCP
|
||||
if [ -z "$current_hostname" ] ||
|
||||
[ "$current_hostname" = '(none)' ] ||
|
||||
[ "$current_hostname" = 'localhost' ] ||
|
||||
[ "$current_hostname" = "$old_host_name" ]; then
|
||||
if [ "$new_host_name" != "$old_host_name" ]; then
|
||||
hostname "$new_host_name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
exit_with_hooks() {
|
||||
exit_status=$1
|
||||
if [ -f /etc/dhclient-exit-hooks ]; then
|
||||
. /etc/dhclient-exit-hooks
|
||||
fi
|
||||
exit $exit_status
|
||||
}
|
||||
|
||||
# The 576 MTU is only used for X.25 and dialup connections
|
||||
# where the admin wants low latency. Such a low MTU can cause
|
||||
# problems with UDP traffic, among other things. As such,
|
||||
# disallow MTUs from 576 and below by default, so that broken
|
||||
# MTUs are ignored, but higher stuff is allowed (1492, 1500, etc).
|
||||
if [ -z "$new_interface_mtu" ] || [ "$new_interface_mtu" -le 576 ]; then
|
||||
new_interface_mtu=''
|
||||
fi
|
||||
|
||||
# The action starts here
|
||||
|
||||
# Invoke the local dhcp client enter hooks, if they exist.
|
||||
if [ -f /etc/dhclient-enter-hooks ]; then
|
||||
exit_status=0
|
||||
. /etc/dhclient-enter-hooks
|
||||
if [ $exit_status -ne 0 ]; then
|
||||
exit $exit_status
|
||||
fi
|
||||
fi
|
||||
|
||||
# Execute the operation
|
||||
case "$reason" in
|
||||
|
||||
### DHCPv4 Handlers
|
||||
|
||||
MEDIUM|ARPCHECK|ARPSEND)
|
||||
# Do nothing
|
||||
;;
|
||||
PREINIT)
|
||||
# The DHCP client is requesting that an interface be
|
||||
# configured as required in order to send packets prior to
|
||||
# receiving an actual address. - dhclient-script(8)
|
||||
|
||||
# ensure interface is up
|
||||
ip link set dev ${interface} up
|
||||
|
||||
if [ -n "$alias_ip_address" ]; then
|
||||
# flush alias IP from interface
|
||||
ip -4 addr flush dev ${interface} label ${interface}:0
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
BOUND|RENEW|REBIND|REBOOT)
|
||||
set_hostname
|
||||
|
||||
if [ -n "$old_ip_address" ] && [ -n "$alias_ip_address" ] &&
|
||||
[ "$alias_ip_address" != "$old_ip_address" ]; then
|
||||
# alias IP may have changed => flush it
|
||||
ip -4 addr flush dev ${interface} label ${interface}:0
|
||||
fi
|
||||
|
||||
if [ -n "$old_ip_address" ] &&
|
||||
[ "$old_ip_address" != "$new_ip_address" ]; then
|
||||
# leased IP has changed => flush it
|
||||
ip -4 addr flush dev ${interface} label ${interface}
|
||||
fi
|
||||
|
||||
if [ -z "$old_ip_address" ] ||
|
||||
[ "$old_ip_address" != "$new_ip_address" ] ||
|
||||
[ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
|
||||
# new IP has been leased or leased IP changed => set it
|
||||
ip -4 addr add ${new_ip_address}${new_subnet_mask:+/$new_subnet_mask} \
|
||||
${new_broadcast_address:+broadcast $new_broadcast_address} \
|
||||
dev ${interface} label ${interface}
|
||||
|
||||
if [ -n "$new_interface_mtu" ]; then
|
||||
# set MTU
|
||||
ip link set dev ${interface} mtu ${new_interface_mtu}
|
||||
fi
|
||||
|
||||
# set if_metric if IF_METRIC is set or there's more than one router
|
||||
if_metric="$IF_METRIC"
|
||||
if [ "${new_routers%% *}" != "${new_routers}" ]; then
|
||||
if_metric=${if_metric:-1}
|
||||
fi
|
||||
|
||||
for router in $new_routers; do
|
||||
if [ "$new_subnet_mask" = "255.255.255.255" ]; then
|
||||
# point-to-point connection => set explicit route
|
||||
ip -4 route add ${router} dev $interface >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# set default route
|
||||
ip -4 route add default via ${router} dev ${interface} \
|
||||
${if_metric:+metric $if_metric} >/dev/null 2>&1
|
||||
|
||||
if [ -n "$if_metric" ]; then
|
||||
if_metric=$((if_metric+1))
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$alias_ip_address" ] &&
|
||||
[ "$new_ip_address" != "$alias_ip_address" ]; then
|
||||
# separate alias IP given, which may have changed
|
||||
# => flush it, set it & add host route to it
|
||||
ip -4 addr flush dev ${interface} label ${interface}:0
|
||||
ip -4 addr add ${alias_ip_address}${alias_subnet_mask:+/$alias_subnet_mask} \
|
||||
dev ${interface} label ${interface}:0
|
||||
ip -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# update /etc/resolv.conf
|
||||
make_resolv_conf
|
||||
|
||||
;;
|
||||
|
||||
EXPIRE|FAIL|RELEASE|STOP)
|
||||
if [ -n "$alias_ip_address" ]; then
|
||||
# flush alias IP
|
||||
ip -4 addr flush dev ${interface} label ${interface}:0
|
||||
fi
|
||||
|
||||
if [ -n "$old_ip_address" ]; then
|
||||
# flush leased IP
|
||||
ip -4 addr flush dev ${interface} label ${interface}
|
||||
fi
|
||||
|
||||
if [ -n "$alias_ip_address" ]; then
|
||||
# alias IP given => set it & add host route to it
|
||||
ip -4 addr add ${alias_ip_address}${alias_network_arg} \
|
||||
dev ${interface} label ${interface}:0
|
||||
ip -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
TIMEOUT)
|
||||
if [ -n "$alias_ip_address" ]; then
|
||||
# flush alias IP
|
||||
ip -4 addr flush dev ${interface} label ${interface}:0
|
||||
fi
|
||||
|
||||
# set IP from recorded lease
|
||||
ip -4 addr add ${new_ip_address}${new_subnet_mask:+/$new_subnet_mask} \
|
||||
${new_broadcast_address:+broadcast $new_broadcast_address} \
|
||||
dev ${interface} label ${interface}
|
||||
|
||||
if [ -n "$new_interface_mtu" ]; then
|
||||
# set MTU
|
||||
ip link set dev ${interface} mtu ${new_interface_mtu}
|
||||
fi
|
||||
|
||||
# if there is no router recorded in the lease or the 1st router answers pings
|
||||
if [ -z "$new_routers" ] || ping -q -c 1 "${new_routers%% *}"; then
|
||||
if [ -n "$alias_ip_address" ] &&
|
||||
[ "$new_ip_address" != "$alias_ip_address" ]; then
|
||||
# separate alias IP given => set up the alias IP & add host route to it
|
||||
ip -4 addr add ${alias_ip_address}${alias_subnet_mask:+/$alias_subnet_mask} \
|
||||
dev ${interface} label ${interface}:0
|
||||
ip -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# set if_metric if IF_METRIC is set or there's more than one router
|
||||
if_metric="$IF_METRIC"
|
||||
if [ "${new_routers%% *}" != "${new_routers}" ]; then
|
||||
if_metric=${if_metric:-1}
|
||||
fi
|
||||
|
||||
# set default route
|
||||
for router in $new_routers; do
|
||||
ip -4 route add default via ${router} dev ${interface} \
|
||||
${if_metric:+metric $if_metric} >/dev/null 2>&1
|
||||
|
||||
if [ -n "$if_metric" ]; then
|
||||
if_metric=$((if_metric+1))
|
||||
fi
|
||||
done
|
||||
|
||||
# update /etc/resolv.conf
|
||||
make_resolv_conf
|
||||
else
|
||||
# flush all IPs from interface
|
||||
ip -4 addr flush dev ${interface}
|
||||
exit_with_hooks 1
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
### DHCPv6 Handlers
|
||||
# TODO handle prefix change: ?based on ${old_ip6_prefix} and ${new_ip6_prefix}?
|
||||
|
||||
PREINIT6)
|
||||
# ensure interface is up
|
||||
ip link set ${interface} up
|
||||
|
||||
# flush any stale global permanent IPs from interface
|
||||
ip -6 addr flush dev ${interface} scope global permanent
|
||||
|
||||
;;
|
||||
|
||||
BOUND6|RENEW6|REBIND6)
|
||||
if [ "${new_ip6_address}" ] && [ "${new_ip6_prefixlen}" ]; then
|
||||
# set leased IP
|
||||
ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
|
||||
dev ${interface} scope global
|
||||
fi
|
||||
|
||||
# update /etc/resolv.conf
|
||||
if [ "${reason}" = BOUND6 ] ||
|
||||
[ "${new_dhcp6_name_servers}" != "${old_dhcp6_name_servers}" ] ||
|
||||
[ "${new_dhcp6_domain_search}" != "${old_dhcp6_domain_search}" ]; then
|
||||
make_resolv_conf
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
DEPREF6)
|
||||
if [ -z "${cur_ip6_prefixlen}" ]; then
|
||||
exit_with_hooks 1
|
||||
fi
|
||||
|
||||
# set preferred lifetime of leased IP to 0
|
||||
ip -6 addr change ${cur_ip6_address}/${cur_ip6_prefixlen} \
|
||||
dev ${interface} scope global preferred_lft 0
|
||||
|
||||
;;
|
||||
|
||||
EXPIRE6|RELEASE6|STOP6)
|
||||
if [ -z "${old_ip6_address}" ] || [ -z "${old_ip6_prefixlen}" ]; then
|
||||
exit_with_hooks 1
|
||||
fi
|
||||
|
||||
# delete leased IP
|
||||
ip -6 addr del ${old_ip6_address}/${old_ip6_prefixlen} \
|
||||
dev ${interface}
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
exit_with_hooks 0
|
||||
|
12
board/common/overlay/sbin/loadmodules
Executable file
12
board/common/overlay/sbin/loadmodules
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -r /etc/modules ]; then
|
||||
cat /etc/modules | while read line; do test -n "$line" && /sbin/modprobe $line; done
|
||||
fi
|
||||
|
||||
if [ -r /data/etc/modules ]; then
|
||||
cat /data/etc/modules | while read line; do test -n "$line" && /sbin/modprobe $line; done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
6
board/common/overlay/sbin/reboot
Executable file
6
board/common/overlay/sbin/reboot
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set +e
|
||||
(sleep 10 && /usr/bin/killall -STOP watchdog) &
|
||||
/bin/busybox reboot
|
||||
|
19
board/common/overlay/sbin/remountrw
Executable file
19
board/common/overlay/sbin/remountrw
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
motioneye_conf=/data/etc/motioneye.conf
|
||||
|
||||
test -f $motioneye_conf || exit 0
|
||||
|
||||
if grep 'log-level debug' $motioneye_conf >/dev/null; then
|
||||
echo -n "Remounting boot partition read-write: "
|
||||
mount -o remount,rw /boot
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
|
||||
echo -n "Remounting root partition read-write: "
|
||||
mount -o remount,rw /
|
||||
[ $? == 0 ] && echo "done" || echo "failed"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
8
board/common/overlay/sbin/userinit
Executable file
8
board/common/overlay/sbin/userinit
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -r /data/etc/userinit.sh ]; then
|
||||
/bin/bash /data/etc/userinit.sh
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
11
board/common/overlay/usr/bin/motion
Executable file
11
board/common/overlay/usr/bin/motion
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
MOTION_SVN="/usr/bin/motion-svn"
|
||||
MOTION_MRDAVE="/usr/bin/motion-mrdave"
|
||||
|
||||
motion=$MOTION_MRDAVE
|
||||
|
||||
echo "using motion binary $motion"
|
||||
|
||||
exec $motion "$*"
|
||||
|
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Abidjan
Normal file
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Abidjan
Normal file
Binary file not shown.
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Accra
Normal file
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Accra
Normal file
Binary file not shown.
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Addis_Ababa
Normal file
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Addis_Ababa
Normal file
Binary file not shown.
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Algiers
Normal file
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Algiers
Normal file
Binary file not shown.
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Asmara
Normal file
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Asmara
Normal file
Binary file not shown.
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Bamako
Normal file
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Bamako
Normal file
Binary file not shown.
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Bangui
Normal file
BIN
board/common/overlay/usr/share/zoneinfo/Africa/Bangui
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user